Displays a message in a window on the screen. More...
#include <messagebox.h>


Public Member Functions | |
| MessageBox (std::string t, std::string m) throw (UIException) | |
| virtual void | refresh () throw (UIException) |
| virtual void | resize () throw (UIException) |
| virtual int | run () throw (UIException) |
| virtual | ~MessageBox () |
Protected Member Functions | |
| int | getBaseHeight () const |
| int | getOkButtonLength () const |
| int | getStartX () const |
| int | getStartY () const |
| int | getWidth () const |
Private Types | |
| enum | { BASE_HEIGHT = 6, BASE_WIDTH = 4 } |
Private Member Functions | |
| void | createWindow () throw (UIException) |
Private Attributes | |
| std::string | message |
| Button * | okbutton |
| std::string | title |
| WINDOW * | window |
Displays a message in a separate window on the screen. A button will be available to quit the message.
Line breaks in the message string are not handled at all. So try to avoid them.
Definition at line 60 of file messagebox.h.
anonymous enum [private] |
Definition at line 62 of file messagebox.h.
| MessageBox::MessageBox | ( | std::string | t, | |
| std::string | m | |||
| ) | throw (UIException) |
Definition at line 46 of file messagebox.cc.
| MessageBox::~MessageBox | ( | ) | [virtual] |
Definition at line 53 of file messagebox.cc.
| void MessageBox::createWindow | ( | ) | throw (UIException) [private] |
Definition at line 28 of file messagebox.cc.
References BASE_HEIGHT, getStartX(), getStartY(), getWidth(), okbutton, and window.
Referenced by resize().


| int YAPET::UI::MessageBox::getBaseHeight | ( | ) | const [inline, protected] |
Definition at line 75 of file messagebox.h.
Referenced by YAPET::UI::DialogBox::resize().

| int YAPET::UI::MessageBox::getOkButtonLength | ( | ) | const [inline, protected] |
Definition at line 91 of file messagebox.h.
References YAPET::UI::Button::getLength(), and okbutton.
Referenced by YAPET::UI::DialogBox::resize().


| int YAPET::UI::MessageBox::getStartX | ( | ) | const [inline, protected] |
Definition at line 83 of file messagebox.h.
References getWidth(), and YAPET::UI::BaseWindow::maxX().
Referenced by createWindow(), and YAPET::UI::DialogBox::resize().


| int YAPET::UI::MessageBox::getStartY | ( | ) | const [inline, protected] |
Definition at line 87 of file messagebox.h.
References BASE_HEIGHT, and YAPET::UI::BaseWindow::maxY().
Referenced by createWindow(), and YAPET::UI::DialogBox::resize().


| int YAPET::UI::MessageBox::getWidth | ( | ) | const [inline, protected] |
Definition at line 79 of file messagebox.h.
References BASE_WIDTH, and message.
Referenced by createWindow(), and getStartX().

| void MessageBox::refresh | ( | ) | throw (UIException) [virtual] |
Implements YAPET::UI::BaseWindow.
Reimplemented in YAPET::UI::DialogBox.
Definition at line 84 of file messagebox.cc.
References box(), message, YAPET::UI::MESSAGEBOX, YAPET::UI::MESSAGEBOX_TITLE, okbutton, YAPET::UI::Button::refresh(), YAPET::UI::Colors::setcolor(), title, and window.
Referenced by run().


| void MessageBox::resize | ( | ) | throw (UIException) [virtual] |
Implements YAPET::UI::BaseWindow.
Reimplemented in YAPET::UI::DialogBox.
Definition at line 71 of file messagebox.cc.
References createWindow(), okbutton, and window.

| int MessageBox::run | ( | ) | throw (UIException) [virtual] |
Reimplemented in YAPET::UI::DialogBox.
Definition at line 60 of file messagebox.cc.
References YAPET::UI::Button::focus(), KEY_REFRESH, okbutton, refresh(), and YAPET::UI::BaseWindow::refreshAll().
Referenced by MainWindow::addNewRecord(), MainWindow::changePassword(), MainWindow::createFile(), MainWindow::deleteSelectedRecord(), MainWindow::editSelectedRecord(), MainWindow::lockScreen(), MainWindow::openFile(), PasswordRecord::PasswordRecord(), PWGenDialog::run(), PasswordRecord::run(), PasswordDialog::run(), FileOpen::run(), YAPET::UI::DialogBox::run(), MainWindow::saveFile(), MainWindow::searchTerm(), and MainWindow::setSortOrder().


std::string YAPET::UI::MessageBox::message [private] |
Definition at line 70 of file messagebox.h.
Referenced by getWidth(), and refresh().
Button* YAPET::UI::MessageBox::okbutton [private] |
Definition at line 67 of file messagebox.h.
Referenced by createWindow(), getOkButtonLength(), refresh(), resize(), run(), and ~MessageBox().
std::string YAPET::UI::MessageBox::title [private] |
Definition at line 69 of file messagebox.h.
Referenced by refresh().
WINDOW* YAPET::UI::MessageBox::window [private] |
Definition at line 66 of file messagebox.h.
Referenced by createWindow(), refresh(), resize(), and ~MessageBox().
1.7.1