#include <CUI_MessageBox.h>
Inheritance diagram for CUI_MessageBox:
Public Member Functions | |
CUI_MessageBox (CUI_UI *ui=NULL, float x=0, float y=0, float x2=1, float y2=1, CUI_Frame *parent=NULL, IUI_Shader *shader=NULL, IUI_Shader *cursor=NULL, CUI_CoordSys *coordsys=NULL, char *message=NULL, char *title=NULL, IUI_Shader *icon=NULL, unsigned short type=UI_MB_OK) | |
virtual | ~CUI_MessageBox () |
virtual bool | SetUI (CUI_UI *ui) |
Set UI - add child elements to the ui. | |
virtual bool | ProcessKey (unsigned long key) |
Process a incoming key. | |
virtual bool | CallbackFunc (int id, int numparam, void *param) |
Callback function to handle updating the selection. | |
virtual bool | SetFont (IUI_Font *font) |
Set the font for this messagebox. | |
virtual bool | SetMessage (char *text) |
Update the message text. | |
virtual bool | SetTitle (char *text) |
Update the title. | |
virtual bool | SetIcon (IUI_Shader *icon) |
Set the icon shader. | |
virtual bool | SetType (unsigned short type) |
Set the type. | |
virtual bool | SetButtonShaders (IUI_Shader *shader=NULL, IUI_Shader *hover=NULL, IUI_Shader *click=NULL) |
Set the shaders for the default button. | |
virtual bool | SetOptionalButtonShaders (IUI_Shader *shader=NULL, IUI_Shader *hover=NULL, IUI_Shader *click=NULL) |
Set the shaders for the optional button. | |
virtual bool | SetScrollShaders (IUI_Shader *shader=NULL, IUI_Shader *barShader=NULL) |
Set the shaders for the scrollbar. | |
virtual bool | SetTextBoxShader (IUI_Shader *shader) |
Set the shader for the textbox background. | |
virtual bool | SetTextBoxSize (unsigned int columns, unsigned int rows) |
Set the size of the textbox. | |
Protected Attributes | |
CUI_Widget * | m_titleFrame |
The widget to display the title. | |
CUI_ScrollableTextBox * | m_messageFrame |
The scrollable TextBox that displays the message. | |
CUI_Frame * | m_iconFrame |
The frame that displays the icon. | |
CUI_Button * | m_defaultButton |
The default button. | |
CUI_Button * | m_optionalButton |
The secondary optional button. | |
unsigned short | m_type |
The type of this message box. | |
unsigned short | m_selected |
Currently selected. |
Similar functionality to the win32 MessageBox. A title and text displaying a message, an icon to quickly give an idea of the context, and either an OK button or YES and NO buttons.
No Pop-Up functionality is builtin to the class itself. Maybe in CUI_UI?
There is no real control functionality in this class, but I think it is necessary enough in general usage for it to make sense to include it in the control library.
Recognized flags:
[system]
UI_CLICKED
UI_HOVER
UI_SELECTED
UI_DISABLED
UI_INACTIVE
|
The type parameter is taken from defines in the header. Which are also used as parameters for the returntype in callback. |
|
responsible for deleting the child UI elements |
|
Callback function to handle updating the selection.
Update currently selected, redo param and send it to the global
Reimplemented from CUI_Frame. |
|
Process a incoming key.
Space/enter takes currently selected button (ok/yes is default). Reimplemented from CUI_Frame. |
|
The type of this message box.
|