Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

PG_MessageBox Class Reference

#include <pgmessagebox.h>

Inheritance diagram for PG_MessageBox:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 PG_MessageBox (PG_Widget *parent, const PG_Rect &r, const std::string &windowtitle, const std::string &windowtext, const PG_Rect &btn1, const std::string &btn1text, const PG_Rect &btn2, const std::string &btn2text, PG_Label::TextAlign textalign=PG_Label::CENTER, const std::string &style="MessageBox")
 Creates a PopUp with 2 Buttons.
 PG_MessageBox (PG_Widget *parent, const PG_Rect &r, const std::string &windowtitle, const std::string &windowtext, const PG_Rect &btn1, const std::string &btn1text, PG_Label::TextAlign textalign=PG_Label::CENTER, const std::string &style="MessageBox")
 Creates a PopUp with 1 Button.
 ~PG_MessageBox ()
 Destructor.
void LoadThemeStyle (const std::string &widgettype)
 Load a specific themestyle.
int WaitForClick ()
 OBSOLETE - Waits for a button click and returns Button ID.

Protected Member Functions

virtual bool handleButton (PG_Button *button)
 Checks if button is pressed.

Protected Attributes

PG_Buttonmy_btnok
PG_Buttonmy_btncancel

Detailed Description

Author:
Thomas Bamesberger

Definition at line 47 of file pgmessagebox.h.


Constructor & Destructor Documentation

PG_MessageBox::PG_MessageBox PG_Widget parent,
const PG_Rect r,
const std::string &  windowtitle,
const std::string &  windowtext,
const PG_Rect btn1,
const std::string &  btn1text,
const PG_Rect btn2,
const std::string &  btn2text,
PG_Label::TextAlign  textalign = PG_Label::CENTER,
const std::string &  style = "MessageBox"
 

Creates a PopUp with 2 Buttons.

Parameters:
parent Parent widget
r rectangle of PopUp
windowtitle Title of window
windowtext Text to appear in window
btn1 Struct PG_Rect to create Button 1
btn1text Text to appear in Button 1
btn2 Struct PG_Rect to create Button 2
btn2text Text to appear in Button 2
textalign Alignment for windowtext
style widgetstyle to use (default "MessageBox")

Definition at line 35 of file pgmessagebox.cpp.

References handleButton(), my_btncancel, my_btnok, PG_Widget::SetID(), and PG_Button::sigClick.

PG_MessageBox::PG_MessageBox PG_Widget parent,
const PG_Rect r,
const std::string &  windowtitle,
const std::string &  windowtext,
const PG_Rect btn1,
const std::string &  btn1text,
PG_Label::TextAlign  textalign = PG_Label::CENTER,
const std::string &  style = "MessageBox"
 

Creates a PopUp with 1 Button.

Parameters:
parent Parent widget
r rectangle of PopUp
windowtitle Title of window
windowtext Text to appear in window
btn1 Struct PG_Rect to create Button 1
btn1text Text to appear in Button 1
textalign Alignment for windowtext
style widgetstyle to use (default "MessageBox")

Definition at line 49 of file pgmessagebox.cpp.

References handleButton(), my_btncancel, my_btnok, PG_Widget::SetID(), and PG_Button::sigClick.

PG_MessageBox::~PG_MessageBox  ) 
 

Destructor.

Definition at line 61 of file pgmessagebox.cpp.

References my_btncancel, and my_btnok.


Member Function Documentation

bool PG_MessageBox::handleButton PG_Button button  )  [protected, virtual]
 

Checks if button is pressed.

Parameters:
button pointer to PG_BUtton

Definition at line 89 of file pgmessagebox.cpp.

References PG_Widget::GetID(), PG_Widget::QuitModal(), and PG_Widget::SetModalStatus().

Referenced by PG_MessageBox().

void PG_MessageBox::LoadThemeStyle const std::string &  widgettype  ) 
 

Load a specific themestyle.

Parameters:
widgettype name of widget type to load

Reimplemented from PG_Window.

Definition at line 79 of file pgmessagebox.cpp.

References PG_Button::LoadThemeStyle(), PG_Window::LoadThemeStyle(), my_btncancel, and my_btnok.

int PG_MessageBox::WaitForClick  )  [inline]
 

OBSOLETE - Waits for a button click and returns Button ID.

This method is obsolete. Please use the RunModal method.

Definition at line 90 of file pgmessagebox.h.

References PG_Widget::RunModal().


Member Data Documentation

PG_Button* PG_MessageBox::my_btncancel [protected]
 

Definition at line 105 of file pgmessagebox.h.

Referenced by LoadThemeStyle(), PG_MessageBox(), and ~PG_MessageBox().

PG_Button* PG_MessageBox::my_btnok [protected]
 

Definition at line 103 of file pgmessagebox.h.

Referenced by LoadThemeStyle(), PG_MessageBox(), and ~PG_MessageBox().


The documentation for this class was generated from the following files:
Generated on Tue Jun 24 02:19:06 2008 for Advanced Strategic Command by  doxygen 1.4.2