#include <dialogbox.h>
Public Member Functions | |
DialogBox (std::string t, std::string m) throw (UIException) | |
ANSWER | getAnswer () const |
Returns the answer of the user. | |
virtual void | refresh () throw (UIException) |
virtual void | resize () throw (UIException) |
virtual int | run () throw (UIException) |
Display and runs the dialog. | |
virtual | ~DialogBox () |
Private Attributes | |
ANSWER | answer |
Button * | cancelbutton |
OK
and Cancel
.
It is displayed by calling run()
. To find out which button was pressed, call getAnswer()
.
Definition at line 73 of file dialogbox.h.
DialogBox::DialogBox | ( | std::string | t, | |
std::string | m | |||
) | throw (UIException) |
Definition at line 24 of file dialogbox.cc.
DialogBox::~DialogBox | ( | ) | [virtual] |
ANSWER YAPETUI::DialogBox::getAnswer | ( | ) | const [inline] |
Returns the answer of the user.
ANSWER_OK
if the user pressed to OK
button or ANSWER_CANCEL
if the user pressed the Cancel
button. Definition at line 103 of file dialogbox.h.
References answer.
Referenced by MainWindow::changePassword(), MainWindow::deleteSelectedRecord(), MainWindow::openFile(), and MainWindow::quit().
void DialogBox::refresh | ( | ) | throw (UIException) [virtual] |
Reimplemented from YAPETUI::MessageBox.
Definition at line 74 of file dialogbox.cc.
References cancelbutton, YAPETUI::Button::refresh(), and refresh().
Referenced by run().
void DialogBox::resize | ( | ) | throw (UIException) [virtual] |
Reimplemented from YAPETUI::MessageBox.
Definition at line 67 of file dialogbox.cc.
References cancelbutton, YAPETUI::MessageBox::getBaseHeight(), YAPETUI::MessageBox::getOkButtonLength(), YAPETUI::MessageBox::getStartX(), YAPETUI::MessageBox::getStartY(), and YAPETUI::MessageBox::resize().
int DialogBox::run | ( | ) | throw (UIException) [virtual] |
Display and runs the dialog. To find out which button was pressed by the user, call getAnswer()
.
\n
. Reimplemented from YAPETUI::MessageBox.
Definition at line 38 of file dialogbox.cc.
References answer, YAPETUI::ANSWER_CANCEL, YAPETUI::ANSWER_OK, cancelbutton, YAPETUI::Button::focus(), refresh(), YAPETUI::BaseWindow::resizeAll(), and YAPETUI::MessageBox::run().
Referenced by MainWindow::changePassword(), MainWindow::deleteSelectedRecord(), MainWindow::openFile(), and MainWindow::quit().
ANSWER YAPETUI::DialogBox::answer [private] |
Button* YAPETUI::DialogBox::cancelbutton [private] |
Definition at line 75 of file dialogbox.h.
Referenced by refresh(), resize(), run(), and ~DialogBox().