|
Antares Simulator
Power System Simulator
|
Standard message Box for Antares. More...
#include <message.h>
Public Types | |
| enum | DefaultButtonType { btnStartID = 100000 , btnOk , btnYes , btnNo , btnRetry , btnDiscard , btnQuitWithoutSaving , btnSaveChanges , btnCancel , btnSaveAs , btnUpgrade , btnContinue , btnViewResults , btnQuit } |
| using | ItemList = std::vector< Component::Spotlight::IItem::Ptr > |
| Array of items. | |
Public Member Functions | |
Constructor & Destructor | |
| Message (wxWindow *parent, const wxString &title, const wxString &subtitle=wxEmptyString, const wxString &msg=wxEmptyString, const char *icon="images/misc/book.png") | |
| Default Constructor. | |
| virtual | ~Message () |
| Destructor. | |
Buttons | |
| void | add (const wxString &caption, DefaultButtonType value, bool defaultButton=false, int space=3) |
| Add a new custom button. More... | |
| void | add (DefaultButtonType btn, bool defaultButton=false, int space=3) |
| Add a predefined button. More... | |
List | |
| void | add (Component::Spotlight::IItem::Ptr item) |
| Add an item in the list. | |
| void | appendError (const AnyString &text) |
| Add an error. | |
| void | appendWarning (const AnyString &text) |
| Add a warning. | |
| Message & | operator+= (Component::Spotlight::IItem::Ptr item) |
Show | |
| uint | showModal () |
| Display the message box. | |
| void | showModalAsync () |
| Display the message box (async) | |
Extras | |
| void | recommendedWidth (uint w) |
| Set the recommended width of the dialog box. More... | |
Standard message Box for Antares.
showModal() should be used instead of ShowModal() | void Antares::Window::Message::add | ( | const wxString & | caption, |
| DefaultButtonType | value, | ||
| bool | defaultButton = false, |
||
| int | space = 3 |
||
| ) |
Add a new custom button.
| caption | Caption of the button |
| value | An arbitrary unique identifier for this button. It should be less than btnStartID. |
| defaultButton | True to make it the default result |
| space | The space to add after before this button |
|
inline |
Add a predefined button.
| btn | The predefined button ID |
| defaultButton | True to make it the default result |
| space | The space to add after before this button |
|
inline |
|
inline |
Set the recommended width of the dialog box.
A value of 0 means automatic. This value will be used only if the message list is not empty