Control management macros
To ease the default GUI controls management some macros are defined in hgeguictrls.h:
#define hgeButtonGetState(gui,id)
((hgeGUIButton*)gui->GetCtrl(id))->GetState()
#define hgeButtonSetState(gui,id,b)
((hgeGUIButton*)gui->GetCtrl(id))->SetState(b)
#define hgeSliderGetValue(gui,id)
((hgeGUISlider*)gui->GetCtrl(id))->GetValue()
#define hgeSliderSetValue(gui,id,f)
((hgeGUISlider*)gui->GetCtrl(id))->SetValue(f)
#define hgeGetTextCtrl(gui,id)
((hgeGUIText*)gui->GetCtrl(id))
#define hgeGetListboxCtrl(gui,id)
((hgeGUIListbox*)gui->GetCtrl(id))
Macros
- hgeButtonGetState
- Returns a button's state (bool). The gui parameter is a pointer to the
hgeGUI object (hgeGUI *), and the id parameter
is the button's identificator (int).
- hgeButtonSetState
- Changes a button's state. The gui parameter is a pointer to the
hgeGUI object (hgeGUI *), the id parameter
is the button's identificator (int). The b parameter is the new
state for the button (bool).
- hgeSliderGetValue
- Returns a slider's current position (float). The gui parameter is a pointer to the
hgeGUI object (hgeGUI *), and the id parameter
is the slider's identificator (int).
- hgeSliderSetValue
- Changes a slider's current position. The gui parameter is a pointer to the
hgeGUI object (hgeGUI *), and the id parameter
is the slider's identificator (int). The f parameter is the new position for
the slider (float).
- hgeGetTextCtrl
- Returns a pointer to the hgeGUIText object, based on it's identificator.
The gui parameter is a pointer to the hgeGUI object (hgeGUI *),
and the id parameter is the text's identificator (int).
- hgeGetListboxCtrl
- Returns a pointer to the hgeGUIListbox object, based on it's identificator.
The gui parameter is a pointer to the hgeGUI object (hgeGUI *),
and the id parameter is the text's identificator (int).
Requirements
Header: hgeguictrls.h
|