Class endstone::Form¶
template <typename T>
Represents a generic form. More...
- #include <endstone/form/form.h>
Public Types¶
| Type | Name | 
|---|---|
| typedef std::function< void(Player *)> | OnCloseCallback | 
Public Functions¶
| 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¶
| Type | Name | 
|---|---|
| OnCloseCallback | on_close_ | 
| Message | title_ | 
Detailed Description¶
The Form class provides a base abstraction for different types of forms. It supports three types of forms: Action, Message, and Modal. Each form has a title, which can be a string or a translatable object.
Public Types Documentation¶
typedef OnCloseCallback¶
Public Functions Documentation¶
function Form¶
function getOnClose¶
Gets the on close callback of the form.
Returns:
The on close callback of the form.
function getTitle¶
Gets the title of the form.
Returns:
The title of the form.
function setOnClose¶
Sets the on close callback of the form.
Parameters:
- on_closeThe callback to be set.
Returns:
A reference to the current form.
function setTitle¶
Sets the title of the form.
Parameters:
- titleThe title of the form to be set.
Returns:
A reference to the current form.
Protected Attributes Documentation¶
variable on_close_¶
variable title_¶
The documentation for this class was generated from the following file include/endstone/form/form.h