Class endstone::MessageForm¶
ClassList > endstone > MessageForm
Represents a form with two buttons.
#include <endstone/form/message_form.h>
Inherits the following classes: endstone::Form
Public Types¶
| Type | Name |
|---|---|
| typedef std::function< void(Player *, int)> | OnSubmitCallback |
Public Types inherited from endstone::Form¶
See endstone::Form
| Type | Name |
|---|---|
| typedef std::function< void(Player *)> | OnCloseCallback |
Public Functions¶
| Type | Name |
|---|---|
| Message | getButton1 () const Get the text of button1. |
| Message | getButton2 () const Get the text of button2. |
| Message | getContent () const Get the content of the form. |
| OnSubmitCallback | getOnSubmit () const Gets the on submit callback of the form. |
| MessageForm & | setButton1 (Message text) Set the text of button1. |
| MessageForm & | setButton2 (Message text) Set the text of button2. |
| MessageForm & | setContent (Message text) Set the content of the form. |
| MessageForm & | setOnSubmit (OnSubmitCallback on_submit) Sets the on submit callback of the form. |
Public Functions inherited from endstone::Form¶
See endstone::Form
| Type | Name |
|---|---|
| Form () = default |
|
| OnCloseCallback | getOnClose () const Gets the on close callback of the form. |
| Message | getTitle () const Gets the title of the form. |
| T & | setOnClose (OnCloseCallback on_close) Sets the on close callback of the form. |
| T & | setTitle (Message title) Sets the title of the form. |
Protected Attributes inherited from endstone::Form¶
See endstone::Form
| Type | Name |
|---|---|
| OnCloseCallback | on_close_ |
| Message | title_ |
Public Types Documentation¶
typedef OnSubmitCallback¶
Public Functions Documentation¶
function getButton1¶
Get the text of button1.
Returns:
The text of button1.
function getButton2¶
Get the text of button2.
Returns:
The text of button2.
function getContent¶
Get the content of the form.
Returns:
The content of the form.
function getOnSubmit¶
Gets the on submit callback of the form.
Returns:
The on submit callback of the form.
function setButton1¶
Set the text of button1.
Parameters:
textThe text to set as the button1 text.
Returns:
A reference to the current form.
function setButton2¶
Set the text of button2.
Parameters:
textThe text to set as the button2 text.
Returns:
A reference to the current form.
function setContent¶
Set the content of the form.
Parameters:
textThe text to set as the content.
Returns:
A reference to the current form.
function setOnSubmit¶
Sets the on submit callback of the form.
Parameters:
on_submitThe callback to be set.
Returns:
A reference to the current form.
The documentation for this class was generated from the following file include/endstone/form/message_form.h