|
Nui
|
Examplary dialog class for the most simple kinds of dialogs. More...
#include <dialog.hpp>
Classes | |
| struct | ConstructionArgs |
Public Types | |
| enum class | Button { Ok , Cancel , Yes , No } |
| enum class | ButtonConfiguration { Ok , OkCancel , YesNo , None } |
Public Member Functions | |
| DialogController (ConstructionArgs &&args) | |
| Constructs a new DialogController. | |
| void | showModal () |
| Shows the dialog as a modal dialog (blocks the UI). | |
| void | show () |
| Shows the dialog as a non-modal dialog (does not block the UI). | |
| void | hide () |
| Hides the dialog. | |
| bool | isOpen () const |
| Returns true if the dialog is open. | |
| void | setClassName (std::string const &className) |
| Sets the class name of the dialog. | |
| void | setButtonClassName (std::string const &className) |
| Sets the class name of the dialog buttons. | |
| void | setTitle (std::string const &title) |
| Sets the title of the dialog. | |
| void | setBody (std::string const &body) |
| Sets the body of the dialog. | |
| void | setButtonConfiguration (ButtonConfiguration buttons) |
| Sets the button configuration of the dialog. | |
| void | setOnButtonClicked (std::function< void(Button)> const &onButtonClicked) |
| Sets the callback that is called when a button is clicked. | |
Friends | |
| Nui::ElementRenderer | Dialog (DialogController &controller) |
| Creates a dialog element with the specified controller. | |
Examplary dialog class for the most simple kinds of dialogs.
|
strong |
|
strong |
|
explicit |
Constructs a new DialogController.
| args | The intial values for the dialog. |
| void Nui::Components::DialogController::hide | ( | ) |
Hides the dialog.
| bool Nui::Components::DialogController::isOpen | ( | ) | const |
Returns true if the dialog is open.
| void Nui::Components::DialogController::setBody | ( | std::string const & | body | ) |
Sets the body of the dialog.
| void Nui::Components::DialogController::setButtonClassName | ( | std::string const & | className | ) |
Sets the class name of the dialog buttons.
| void Nui::Components::DialogController::setButtonConfiguration | ( | ButtonConfiguration | buttons | ) |
Sets the button configuration of the dialog.
| void Nui::Components::DialogController::setClassName | ( | std::string const & | className | ) |
Sets the class name of the dialog.
| void Nui::Components::DialogController::setOnButtonClicked | ( | std::function< void(Button)> const & | onButtonClicked | ) |
Sets the callback that is called when a button is clicked.
| void Nui::Components::DialogController::setTitle | ( | std::string const & | title | ) |
Sets the title of the dialog.
| void Nui::Components::DialogController::show | ( | ) |
Shows the dialog as a non-modal dialog (does not block the UI).
| void Nui::Components::DialogController::showModal | ( | ) |
Shows the dialog as a modal dialog (blocks the UI).
|
friend |
Creates a dialog element with the specified controller.
| controller | An instance of DialogController. |