IMS2  Pre-Alpha
An Orbiter add-on to allow on-runtime construction of spacecraft from predefined modules
GUIalert Class Reference

Special plugin to display a popup message with an ok prompt. More...

Inheritance diagram for GUIalert:
GUIpopup GUIplugin GUIentity

Public Member Functions

 GUIalert (string text, GUI_BaseElement *parent, RECT rect, GUI_STYLE styleid)
 Creates a GUI alert and inserts it into the desired place in the GUI. More...
 
bool ProcessChildren (GUI_MOUSE_EVENT _event, int _x, int _y)
 forwards a mouse event to all children. More...
 
- Public Member Functions inherited from GUIplugin
void DrawChildren (SURFHANDLE _tgt, RECT &drawablerect, int xoffset=0, int yoffset=0)
 Draws all visible children of the GUIplugin. More...
 
bool IsVisible ()
 
void SetVisible (bool visible)
 
bool IsFixed ()
 
void SetFixed (bool fixed)
 
GUI_BaseElementGetFirstVisibleChild ()
 
bool Update ()
 checks all children if any of them need a redraw. More...
 
- Public Member Functions inherited from GUIentity
void RegisterGuiElement (GUI_BaseElement *_element, int _parentId)
 Registers a GUI element that has not been created by this GUIentity. More...
 
int GetDynamicUID ()
 
virtual GUI_BaseElementGetElementById (int _id)
 
GUI_PageCreatePage (RECT _rect, int parent, int _id=-1, GUI_STYLE styleId=STYLE_DEFAULT, bool drawbackground=false)
 Creates a new GUI_Page element. More...
 
GUI_LabelCreateLabel (string text, RECT _rect, int parent, int _id=-1, GUI_STYLE styleId=STYLE_HEADING)
 Creates a new GUI_Label element. More...
 
GUI_LabelValuePair * CreateLabelValuePair (string label, string value, RECT _rect, int parent, int id=-1, GUI_STYLE styleId=STYLE_HEADING, GUI_FONT valueFontId=GUI_NO_FONT)
 Creates a new GUI_LabelValuePair. More...
 
GUI_ListBoxCreateListBox (RECT _rect, int parent, int _id=-1, GUI_STYLE styleId=STYLE_LISTBOX, GUI_STYLE scrollbar_styleId=STYLE_LISTBOX, bool _multiselect=false, bool _noSelect=false)
 Creates a new GUI_ListBox. More...
 
GUI_StaticButtonCreateStaticButton (RECT _rect, int srcX, int srcY, SURFHANDLE _src, int parent, int _id=-1)
 Creates a new GUI_StaticButton. More...
 
GUI_DynamicButtonCreateDynamicButton (string text, RECT _rect, int parent, int _id=-1, GUI_STYLE styleId=STYLE_BUTTON)
 Creates a new GUI_DynamicButton. More...
 
GUI_CheckBoxCreateCheckBox (string text, RECT _rect, int parent, int _id=-1, GUI_STYLE styleId=STYLE_CHECKBOX)
 Creates a new GUI_CheckBox. More...
 
GUI_RadioButtonCreateRadioButton (string text, RECT _rect, int parent, int _id=-1, GUI_STYLE styleId=STYLE_CHECKBOX)
 Creates a new GUI_RadioButton. More...
 
GUI_StatusBar * CreateStatusBar (RECT _rect, int parent, int _id=-1, GUI_STYLE styleid=STYLE_STATUSBAR)
 
void SetStyleSet (string _styleset)
 Sets the styleset this GUIentity uses. More...
 
GUI_ElementStyleGetStyle (GUI_STYLE _styleId=STYLE_DEFAULT)
 
GUI_fontGetFont (GUI_FONT _fontid)
 

Additional Inherited Members

- Protected Member Functions inherited from GUIpopup
 GUIpopup (GUI_BaseElement *parent, RECT rect, GUI_STYLE styleid)
 
void close ()
 closes and destroys the popup
 
- Protected Member Functions inherited from GUIplugin
bool AddChildToParent (GUI_BaseElement *child, int parentId)
 Adds a child to an element in this GUIplugin child: Pointer to the GUI element to be added to a parent parentId: uid of the intended parent. pass -1 if the element is a root element in this plugin. More...
 
- Protected Attributes inherited from GUIpopup
int width
 
int height
 
- Protected Attributes inherited from GUIplugin
bool isvisible = false
 Tells the plugin whether to draw its elements or not.
 
bool isfixed = false
 Whether the plugin has a fixed position inside a scrollable element.
 
vector< GUI_BaseElement * > rootelements
 The GUImanager can assume that all its registered GUI_Surfaces are root elements. The plugin doesn't have that luxury, but still needs to know which elements are at the root.
 
- Protected Attributes inherited from GUIentity
map< int, GUI_BaseElement * > elements
 a searchtree containing all GUI_Elements of this entity
 
UINT newuid = GUI_UID_DOMAIN
 Variable used to pass out dynamic UIDs for GUI elements.
 
FontsAndStylesfontsandstyles
 Pointer to the global FontsAndStyles instance.
 
string styleset = "default"
 Identifier of the defualt styleset of this entity.
 
- Static Protected Attributes inherited from GUIpopup
static const int POPUP = 1
 identifier for the page on which the popups controlls will be drawn
 

Detailed Description

Special plugin to display a popup message with an ok prompt.

Not intended to be instantiated directly. Rather, call GUImanager::Alert()

Constructor & Destructor Documentation

GUIalert::GUIalert ( string  text,
GUI_BaseElement parent,
RECT  rect,
GUI_STYLE  styleid 
)

Creates a GUI alert and inserts it into the desired place in the GUI.

The Alert will automatically be destroyed when the "ok" button is cclicked.

Parameters
textThe text you want to display in the alert.
parentPointer to the element in which the alert should be drawn
rectparent-relative rectangle of the Alert.
styleidIdentifier for the style in which to render the alert

Member Function Documentation

bool GUIalert::ProcessChildren ( GUI_MOUSE_EVENT  _event,
int  _x,
int  _y 
)
virtual

forwards a mouse event to all children.

Parameters
_eventThe event to be forwarded
_xthe x coordinate of the mouse click
_ythe y coordinate of the mouse click
Returns
True if any of the children have consumed the event.

Reimplemented from GUIplugin.


The documentation for this class was generated from the following files: