#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 |
Line breaks in the message string are not handled at all. So try to avoid them.
Definition at line 58 of file messagebox.h.
anonymous enum [private] |
MessageBox::MessageBox | ( | std::string | t, | |
std::string | m | |||
) | throw (UIException) |
Definition at line 43 of file messagebox.cc.
MessageBox::~MessageBox | ( | ) | [virtual] |
void MessageBox::createWindow | ( | ) | throw (UIException) [private] |
Definition at line 27 of file messagebox.cc.
References BASE_HEIGHT, getStartX(), getStartY(), getWidth(), okbutton, and window.
Referenced by resize().
int YAPETUI::MessageBox::getBaseHeight | ( | ) | const [inline, protected] |
Definition at line 73 of file messagebox.h.
References BASE_HEIGHT.
Referenced by YAPETUI::DialogBox::resize().
int YAPETUI::MessageBox::getOkButtonLength | ( | ) | const [inline, protected] |
Definition at line 87 of file messagebox.h.
References YAPETUI::Button::getLength(), and okbutton.
Referenced by YAPETUI::DialogBox::resize().
int YAPETUI::MessageBox::getStartX | ( | ) | const [inline, protected] |
Definition at line 79 of file messagebox.h.
References getWidth(), and YAPETUI::BaseWindow::maxX().
Referenced by createWindow(), and YAPETUI::DialogBox::resize().
int YAPETUI::MessageBox::getStartY | ( | ) | const [inline, protected] |
Definition at line 83 of file messagebox.h.
References BASE_HEIGHT, and YAPETUI::BaseWindow::maxY().
Referenced by createWindow(), and YAPETUI::DialogBox::resize().
int YAPETUI::MessageBox::getWidth | ( | ) | const [inline, protected] |
Definition at line 75 of file messagebox.h.
References BASE_WIDTH, and message.
Referenced by createWindow(), and getStartX().
void MessageBox::refresh | ( | ) | throw (UIException) [virtual] |
Implements YAPETUI::BaseWindow.
Reimplemented in YAPETUI::DialogBox.
Definition at line 80 of file messagebox.cc.
References box(), message, YAPETUI::MESSAGEBOX, YAPETUI::MESSAGEBOX_TITLE, okbutton, YAPETUI::Button::refresh(), YAPETUI::Colors::setcolor(), title, and window.
Referenced by run().
void MessageBox::resize | ( | ) | throw (UIException) [virtual] |
Implements YAPETUI::BaseWindow.
Reimplemented in YAPETUI::DialogBox.
Definition at line 66 of file messagebox.cc.
References createWindow(), okbutton, and window.
int MessageBox::run | ( | ) | throw (UIException) [virtual] |
Reimplemented in YAPETUI::DialogBox.
Definition at line 57 of file messagebox.cc.
References YAPETUI::Button::focus(), KEY_REFRESH, okbutton, refresh(), and YAPETUI::BaseWindow::refreshAll().
Referenced by MainWindow::addNewRecord(), MainWindow::changePassword(), MainWindow::createFile(), MainWindow::deleteSelectedRecord(), MainWindow::editSelectedRecord(), MainWindow::lockScreen(), MainWindow::openFile(), PasswordRecord::refresh(), PasswordRecord::run(), PasswordDialog::run(), FileOpen::run(), YAPETUI::DialogBox::run(), MainWindow::saveFile(), MainWindow::searchTerm(), and MainWindow::setSortOrder().
std::string YAPETUI::MessageBox::message [private] |
Button* YAPETUI::MessageBox::okbutton [private] |
Definition at line 65 of file messagebox.h.
Referenced by createWindow(), getOkButtonLength(), refresh(), resize(), run(), and ~MessageBox().
std::string YAPETUI::MessageBox::title [private] |
WINDOW* YAPETUI::MessageBox::window [private] |
Definition at line 64 of file messagebox.h.
Referenced by createWindow(), refresh(), resize(), and ~MessageBox().