Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

BMessagebox Class Reference

#include <BMessagebox.h>

Inheritance diagram for BMessagebox:

Inheritance graph
[legend]
Collaboration diagram for BMessagebox:

Collaboration graph
[legend]
List of all members.

Detailed Description

A simple message box.

This displays a text and can have an OK button, an additional Cancel button, or no buttons at all.


Public Types

enum  BMessageboxType { TYPE_NONE, TYPE_OK, TYPE_OK_CANCEL }
enum  BMessageboxResult { RESULT_OK, RESULT_CANCEL }

Public Member Functions

 BMessagebox (BScreen *screen, const BSize &size, const std::string &text, BMessageboxType type)
 ~BMessagebox ()
void run ()
 Run the message box, blocking until a button is clicked.

void onButtonClick (BButton *button)
int result ()
 Return whether the user clicked OK or Cancel.


Static Public Member Functions

void runMessage (BScreen *screen, const std::string &txt, BWidget::Rotation rot=BWidget::ROT_0)
 Run a very simple dialog: Just a text and an OK button.


Member Enumeration Documentation

enum BMessagebox::BMessageboxResult
 

Enumeration values:
RESULT_OK 
RESULT_CANCEL 

enum BMessagebox::BMessageboxType
 

Enumeration values:
TYPE_NONE 
TYPE_OK  No buttons.
TYPE_OK_CANCEL  An OK and a Cancel button.


Constructor & Destructor Documentation

BMessagebox::BMessagebox BScreen   screen,
const BSize   size,
const std::string &    text,
BMessageboxType    type
 

BMessagebox::~BMessagebox  
 


Member Function Documentation

void BMessagebox::onButtonClick BButton   button [virtual]
 

Reimplemented from BButton::Delegate.

int BMessagebox::result   [inline]
 

Return whether the user clicked OK or Cancel.

void BMessagebox::run   [virtual]
 

Run the message box, blocking until a button is clicked.

If type is TYPE_NONE, this returns immediately. Use show() and BGUI::get()->repaint() instead.

Reimplemented from BDialog.

void BMessagebox::runMessage BScreen   screen,
const std::string &    txt,
BWidget::Rotation    rot = BWidget::ROT_0
[static]
 

Run a very simple dialog: Just a text and an OK button.


The documentation for this class was generated from the following file:
Generated on Sat Dec 29 10:00:40 2007 for DSGUI by doxygen1.3-rc3