YAPETUI::MessageBox Class Reference

Displays a message in a window on the screen. More...

#include <messagebox.h>

Inheritance diagram for YAPETUI::MessageBox:

YAPETUI::BaseWindow YAPETUI::DialogBox

List of all members.

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
Buttonokbutton
std::string title
WINDOW * window


Detailed Description

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 58 of file messagebox.h.


Member Enumeration Documentation

anonymous enum [private]

Enumerator:
BASE_HEIGHT 
BASE_WIDTH 

Definition at line 60 of file messagebox.h.


Constructor & Destructor Documentation

MessageBox::MessageBox ( std::string  t,
std::string  m 
) throw (UIException)

Definition at line 42 of file messagebox.cc.

References createWindow().

MessageBox::~MessageBox (  )  [virtual]

Definition at line 49 of file messagebox.cc.

References okbutton, and window.


Member Function Documentation

void MessageBox::createWindow (  )  throw (UIException) [private]

Definition at line 26 of file messagebox.cc.

References BASE_HEIGHT, getStartX(), getStartY(), getWidth(), okbutton, and window.

Referenced by MessageBox(), and 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 79 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 65 of file messagebox.cc.

References createWindow(), okbutton, and window.

Referenced by YAPETUI::DialogBox::resize().

int MessageBox::run (  )  throw (UIException) [virtual]

Reimplemented in YAPETUI::DialogBox.

Definition at line 56 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(), and MainWindow::saveFile().


Member Data Documentation

std::string YAPETUI::MessageBox::message [private]

Definition at line 68 of file messagebox.h.

Referenced by getWidth(), and refresh().

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]

Definition at line 67 of file messagebox.h.

Referenced by refresh().

WINDOW* YAPETUI::MessageBox::window [private]

Definition at line 64 of file messagebox.h.

Referenced by createWindow(), refresh(), resize(), and ~MessageBox().


The documentation for this class was generated from the following files:
Generated on Wed Feb 27 16:15:42 2008 for YAPET by  doxygen 1.5.4