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

PG_MessageBox Class Reference

Inheritance diagram for PG_MessageBox:

Inheritance graph
[legend]
Collaboration diagram for PG_MessageBox:

Collaboration graph
[legend]
List of all members.

Detailed Description

Author:
Thomas Bamesberger


Public Member Functions

 PG_MessageBox (PG_Widget *parent, const PG_Rect &r, const char *windowtitle, const char *windowtext, const PG_Rect &btn1, const char *btn1text, const PG_Rect &btn2, const char *btn2text, PG_Label::TextAlign textalign=PG_Label::CENTER, const char *style="MessageBox")
 Creates a PopUp with 2 Buttons.

 PG_MessageBox (PG_Widget *parent, const PG_Rect &r, const char *windowtitle, const char *windowtext, const PG_Rect &btn1, const char *btn1text, PG_Label::TextAlign textalign=PG_Label::CENTER, const char *style="MessageBox")
 Creates a PopUp with 1 Button.

 ~PG_MessageBox ()
 Destructor.

void LoadThemeStyle (const char *widgettype)
 Load a specific themestyle.

int WaitForClick ()
 Waits for a button click and returns Button ID.


Protected Member Functions

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


Protected Attributes

int buttonflag
 Buttonflag is set to ButtonID, if a button is clicked.

PG_Buttonmy_btnok
PG_Buttonmy_btncancel


Constructor & Destructor Documentation

PG_MessageBox::PG_MessageBox PG_Widget parent,
const PG_Rect r,
const char *  windowtitle,
const char *  windowtext,
const PG_Rect btn1,
const char *  btn1text,
const PG_Rect btn2,
const char *  btn2text,
PG_Label::TextAlign  textalign = PG_Label::CENTER,
const char *  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")

PG_MessageBox::PG_MessageBox PG_Widget parent,
const PG_Rect r,
const char *  windowtitle,
const char *  windowtext,
const PG_Rect btn1,
const char *  btn1text,
PG_Label::TextAlign  textalign = PG_Label::CENTER,
const char *  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")

PG_MessageBox::~PG_MessageBox  ) 
 

Destructor.


Member Function Documentation

bool PG_MessageBox::handleButton PG_Button button  )  [protected]
 

Checks if button is pressed.

Parameters:
button pointer to PG_BUtton

void PG_MessageBox::LoadThemeStyle const char *  widgettype  ) 
 

Load a specific themestyle.

Parameters:
widgettype name of widget type to load

Reimplemented from PG_Window.

int PG_MessageBox::WaitForClick  ) 
 

Waits for a button click and returns Button ID.


Member Data Documentation

int PG_MessageBox::buttonflag [protected]
 

Buttonflag is set to ButtonID, if a button is clicked.

PG_Button* PG_MessageBox::my_btncancel [protected]
 

PG_Button* PG_MessageBox::my_btnok [protected]
 



The ParaGUI Project - Alexander Pipelka