Class for displaying a dialog box. More...
#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 |
A dialog box presents the user a message and the buttons OK and Cancel.
It is displayed by calling run(). To find out which button was pressed, call getAnswer().
Definition at line 75 of file dialogbox.h.
| DialogBox::DialogBox | ( | std::string | t, | |
| std::string | m | |||
| ) | throw (UIException) |
Definition at line 26 of file dialogbox.cc.
| DialogBox::~DialogBox | ( | ) | [virtual] |
Definition at line 35 of file dialogbox.cc.
References cancelbutton.
| ANSWER YAPET::UI::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 105 of file dialogbox.h.
References answer.
Referenced by MainWindow::changePassword(), MainWindow::deleteSelectedRecord(), MainWindow::openFile(), MainWindow::quit(), MainWindow::run(), and PasswordRecord::sureToCancel().

| void DialogBox::refresh | ( | ) | throw (UIException) [virtual] |
Reimplemented from YAPET::UI::MessageBox.
Definition at line 87 of file dialogbox.cc.
References cancelbutton, and YAPET::UI::Button::refresh().
Referenced by run().


| void DialogBox::resize | ( | ) | throw (UIException) [virtual] |
Reimplemented from YAPET::UI::MessageBox.
Definition at line 80 of file dialogbox.cc.
References cancelbutton, YAPET::UI::MessageBox::getBaseHeight(), YAPET::UI::MessageBox::getOkButtonLength(), YAPET::UI::MessageBox::getStartX(), and YAPET::UI::MessageBox::getStartY().

| 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 YAPET::UI::MessageBox.
Definition at line 40 of file dialogbox.cc.
References answer, cancelbutton, YAPET::UI::Button::focus(), KEY_ESC, refresh(), YAPET::UI::BaseWindow::resizeAll(), and YAPET::UI::MessageBox::run().
Referenced by MainWindow::changePassword(), MainWindow::deleteSelectedRecord(), MainWindow::openFile(), MainWindow::quit(), MainWindow::run(), and PasswordRecord::sureToCancel().


ANSWER YAPET::UI::DialogBox::answer [private] |
Definition at line 78 of file dialogbox.h.
Referenced by getAnswer(), and run().
Button* YAPET::UI::DialogBox::cancelbutton [private] |
Definition at line 77 of file dialogbox.h.
Referenced by refresh(), resize(), run(), and ~DialogBox().
1.7.1