#include <messagedialog.h>
Inheritance diagram for MessageDialog:

Public Member Functions | |
| MessageDialog (PG_Widget *parent, const PG_Rect &r, const std::string &windowtitle, const std::string &windowtext, const std::string &btn1text, const std::string &btn2text, PG_Label::TextAlign textalign=PG_Label::CENTER, const std::string &style="MessageBox", bool rememberCheckbox=false) | |
| Creates a PopUp with 2 Buttons. | |
| MessageDialog (PG_Widget *parent, const PG_Rect &r, const std::string &windowtitle, const std::string &windowtext, const std::string &btn1text, PG_Label::TextAlign textalign=PG_Label::CENTER, const std::string &style="MessageBox") | |
| Creates a PopUp with 1 Button. | |
| MessageDialog (PG_Widget *parent, const PG_Rect &r, const std::string &windowtitle, const std::string &windowtext, PG_Label::TextAlign textalign=PG_Label::CENTER, const std::string &style="MessageBox") | |
| Creates a PopUp without Buttons. | |
| ~MessageDialog () | |
| void | LoadThemeStyle (const std::string &widgettype) |
| PG_Widget * | getTextBox () |
| void | EnableDefaultKeys (bool enable) |
| void | SetText (const std::string &text) |
| bool | remberChoice () |
Protected Member Functions | |
| virtual bool | handleButton (PG_Button *button) |
| Checks if button is pressed. | |
| bool | eventKeyDown (const SDL_KeyboardEvent *key) |
Protected Attributes | |
| PG_Button * | my_btnok |
| PG_Button * | my_btncancel |
| PG_CheckButton * | checkbox |
Definition at line 33 of file messagedialog.h.
| MessageDialog::MessageDialog | ( | PG_Widget * | parent, | |
| const PG_Rect & | r, | |||
| const std::string & | windowtitle, | |||
| const std::string & | windowtext, | |||
| const std::string & | btn1text, | |||
| const std::string & | btn2text, | |||
| PG_Label::TextAlign | textalign = PG_Label::CENTER, |
|||
| const std::string & | style = "MessageBox", |
|||
| bool | rememberCheckbox = false | |||
| ) |
Creates a PopUp with 2 Buttons.
| parent | Parent widget | |
| r | rectangle of PopUp | |
| windowtitle | Title of window | |
| windowtext | Text to appear in window | |
| btn1text | Text to appear in Button 1 | |
| btn2text | Text to appear in Button 2 | |
| textalign | Alignment for windowtext | |
| style | widgetstyle to use (default "MessageBox") | |
| rememberCheckbox | true if a "remember choice" checkbox shall be shown |
Definition at line 33 of file messagedialog.cpp.
References checkbox, handleButton(), min(), my_btncancel, and my_btnok.
| MessageDialog::MessageDialog | ( | PG_Widget * | parent, | |
| const PG_Rect & | r, | |||
| const std::string & | windowtitle, | |||
| const std::string & | windowtext, | |||
| const std::string & | btn1text, | |||
| PG_Label::TextAlign | textalign = PG_Label::CENTER, |
|||
| const std::string & | style = "MessageBox" | |||
| ) |
Creates a PopUp with 1 Button.
| parent | Parent widget | |
| r | rectangle of PopUp | |
| windowtitle | Title of window | |
| windowtext | Text to appear in window | |
| btn1text | Text to appear in Button 1 | |
| textalign | Alignment for windowtext | |
| style | widgetstyle to use (default "MessageBox") |
Definition at line 76 of file messagedialog.cpp.
References handleButton(), min(), and my_btnok.
| MessageDialog::MessageDialog | ( | PG_Widget * | parent, | |
| const PG_Rect & | r, | |||
| const std::string & | windowtitle, | |||
| const std::string & | windowtext, | |||
| PG_Label::TextAlign | textalign = PG_Label::CENTER, |
|||
| const std::string & | style = "MessageBox" | |||
| ) |
Creates a PopUp without Buttons.
| parent | Parent widget | |
| r | rectangle of PopUp | |
| windowtitle | Title of window | |
| windowtext | Text to appear in window | |
| textalign | Alignment for windowtext | |
| style | widgetstyle to use (default "MessageBox") |
Definition at line 91 of file messagedialog.cpp.
| MessageDialog::~MessageDialog | ( | ) |
Definition at line 139 of file messagedialog.cpp.
| void MessageDialog::LoadThemeStyle | ( | const std::string & | widgettype | ) |
| PG_Widget * MessageDialog::getTextBox | ( | ) |
| void MessageDialog::EnableDefaultKeys | ( | bool | enable | ) |
| void MessageDialog::SetText | ( | const std::string & | text | ) |
Definition at line 162 of file messagedialog.cpp.
References TextRenderer::GetText(), and TextRenderer::SetText().
Referenced by PG_StatusWindowData::SetText().
| bool MessageDialog::remberChoice | ( | ) |
Definition at line 99 of file messagedialog.cpp.
References checkbox.
Referenced by new_choice_dlg().
| bool MessageDialog::handleButton | ( | PG_Button * | button | ) | [protected, virtual] |
Checks if button is pressed.
| button | pointer to PG_BUtton |
Definition at line 179 of file messagedialog.cpp.
References ASC_PG_Dialog::quitModalLoop().
Referenced by MessageDialog().
| bool MessageDialog::eventKeyDown | ( | const SDL_KeyboardEvent * | key | ) | [protected, virtual] |
Reimplemented from ASC_PG_Dialog.
Definition at line 108 of file messagedialog.cpp.
References ASC_PG_Dialog::quitModalLoop().
PG_Button* MessageDialog::my_btnok [protected] |
PG_Button* MessageDialog::my_btncancel [protected] |
Definition at line 100 of file messagedialog.h.
Referenced by LoadThemeStyle(), and MessageDialog().
PG_CheckButton* MessageDialog::checkbox [protected] |
1.5.1