Entire Class Index | Main Class Index | Cross Index | Global Index

# Class CL_MessageBox

MessageBox component
Contained in: global
Derived from: CL_Window
Derived by: none
Group: GUI (Controls)

#include <ClanLib/gui.h>

### public function member index:
### Construction:
`` | `CL_MessageBox` | `(`CL_Component`* `parent`, `CL_StyleManager`* `style` = NULL)`;
`` | `CL_MessageBox` | `(`const` `std::string`& `title`, `const` `std::string`& `text`, `const` `std::string`& `button1`, `const` `std::string`& `button2`, `const` `std::string`& `button3`, `CL_Component`* `parent`, `CL_StyleManager`* `style` = NULL)`;
``virtual`` | `~CL_MessageBox` | `()`;
``static` `void`` | `info` | `(`const` `std::string`& `text`, `CL_Component`* `parent`, `CL_StyleManager`* `style` = NULL)`;
``static` `void`` | `info` | `(`const` `std::string`& `title`, `const` `std::string`& `text`, `CL_Component`* `parent`, `CL_StyleManager`* `style` = NULL)`;
``static` `int`` | `info` | `(`const` `std::string`& `title`, `const` `std::string`& `text`, `const` `std::string`& `button1`, `const` `std::string`& `button2`, `const` `std::string`& `button3`, `CL_Component`* `parent`, `CL_StyleManager`* `style` = NULL)`;
### Attributes:
``const` `std::string`&` | `get_text` | `() `const``;
``int`` | `get_result_button` | `() `const``;
### Operations:
``void`` | `set_text` | `(`const` `std::string`& `text`)`;
### Signals:
``CL_Signal_v0`&` | `sig_button1` | `()`;
``CL_Signal_v0`&` | `sig_button2` | `()`;
``CL_Signal_v0`&` | `sig_button3` | `()`;

## Description:

## Function Member Descriptions:

CL_MessageBox::CL_MessageBox - MessageBox constructor
`` `CL_MessageBox``(`CL_Component`* `parent`, `CL_StyleManager`* `style` = NULL)`;

CL_MessageBox::CL_MessageBox - MessageBox constructor
`` `CL_MessageBox``(`const` `std::string`& `title`, `const` `std::string`& `text`, `const` `std::string`& `button1`, `const` `std::string`& `button2`, `const` `std::string`& `button3`, `CL_Component`* `parent`, `CL_StyleManager`* `style` = NULL)`;

CL_MessageBox::get_result_button - Returns the index of the button clicked.
``int`` `get_result_button``() `const``;

CL_MessageBox::get_text - Returns the message text.
``const` `std::string`&` `get_text``() `const``;

CL_MessageBox::info - Creates a messagebox "Information" with text and an OK button.
``static` `void`` `info``(`const` `std::string`& `text`, `CL_Component`* `parent`, `CL_StyleManager`* `style` = NULL)`;

CL_MessageBox::info - Creates a message box with title, text and an OK button.
``static` `void`` `info``(`const` `std::string`& `title`, `const` `std::string`& `text`, `CL_Component`* `parent`, `CL_StyleManager`* `style` = NULL)`;

CL_MessageBox::info - Creates a message box with title, text and up to three buttons.
``static` `int`` `info``(`const` `std::string`& `title`, `const` `std::string`& `text`, `const` `std::string`& `button1`, `const` `std::string`& `button2`, `const` `std::string`& `button3`, `CL_Component`* `parent`, `CL_StyleManager`* `style` = NULL)`;

CL_MessageBox::set_text - Sets the message text.
``void`` `set_text``(`const` `std::string`& `text`)`;

CL_MessageBox::sig_button1 - Signal for button 1
``CL_Signal_v0`&` `sig_button1``()`;

CL_MessageBox::sig_button2 - Signal for button 2
``CL_Signal_v0`&` `sig_button2``()`;

CL_MessageBox::sig_button3 - Signal for button 3
``CL_Signal_v0`&` `sig_button3``()`;

CL_MessageBox::~CL_MessageBox - MessageBox destructor
``virtual`` `~CL_MessageBox``()`;

## Variable Member Descriptions: