GuiButtonBaseCtrl
Engine/source/gui/buttons/guiButtonBaseCtrl.h
Base class for all button controls.
Callbacks
DECLARE_CALLBACK(void , onMouseDown , () )
DECLARE_CALLBACK(void , onMouseUp , () )
DECLARE_CALLBACK(void , onClick , () )
DECLARE_CALLBACK(void , onRightClick , () )
DECLARE_CALLBACK(void , onDoubleClick , () )
DECLARE_CALLBACK(void , onMouseEnter , () )
DECLARE_CALLBACK(void , onMouseLeave , () )
DECLARE_CALLBACK(void , onMouseDragged , () )
Protected Attributes
bool
Point where left mouse button was pressed down.
bool
bool
bool
bool
Public Functions
acceleratorKeyPress(U32 index)
Occurs when the accelerator key for this control is pressed.
acceleratorKeyRelease(U32 index)
Occurs when the accelerator key for this control is released.
DECLARE_CATEGORY("Gui Buttons" )
DECLARE_DESCRIPTION("A basic button control." )
const char *
Returns the value of the variable bound to this object.
bool
onMessage(GuiControl * sender, S32 msg)
Receive a message from another control.
onMouseDown(const GuiEvent & )
onMouseDragged(const GuiEvent & event)
bool
onWake()
Called when this object is asked to wake up returns true if it's actually awake at the end.
setDepressed(bool depressed)
setScriptValue(const char * value)
Sets the value of the variable bound to this object.
setStateOn(bool bStateOn)
setUseMouseEvents(bool val)
bool
Public Static Functions
Detailed Description
Base class for all button controls.
Subclasses are mostly for specific rendering types.
Callbacks
DECLARE_CALLBACK(void , onMouseDown , () )
DECLARE_CALLBACK(void , onMouseUp , () )
DECLARE_CALLBACK(void , onClick , () )
DECLARE_CALLBACK(void , onRightClick , () )
DECLARE_CALLBACK(void , onDoubleClick , () )
DECLARE_CALLBACK(void , onMouseEnter , () )
DECLARE_CALLBACK(void , onMouseLeave , () )
DECLARE_CALLBACK(void , onMouseDragged , () )
Public Types
ButtonType
Enumerator
- ButtonTypePush
- ButtonTypeCheck
- ButtonTypeRadio
typedef GuiControl Parent
Protected Attributes
StringTableEntry mButtonText
StringTableEntry mButtonTextID
S32 mButtonType
bool mDepressed
Point2I mMouseDownPoint
Point where left mouse button was pressed down.
Used to find when to start a mouse drag.
bool mMouseDragged
bool mMouseOver
S32 mRadioGroup
bool mStateOn
bool mUseMouseEvents
Public Functions
GuiButtonBaseCtrl()
acceleratorKeyPress(U32 index)
Reimplemented from: GuiControl
acceleratorKeyRelease(U32 index)
Reimplemented from: GuiControl
DECLARE_CATEGORY("Gui Buttons" )
DECLARE_CONOBJECT(GuiButtonBaseCtrl )
DECLARE_DESCRIPTION("A basic button control." )
getScriptValue()
Reimplemented from: GuiControl
getStateOn()
getText()
onAction()
Reimplemented from: GuiControl
onKeyDown(const GuiEvent & event)
Reimplemented from: GuiControl
onKeyUp(const GuiEvent & event)
Reimplemented from: GuiControl
onMessage(GuiControl * sender, S32 msg)
Reimplemented from: GuiControl
onMouseDown(const GuiEvent & )
Reimplemented from: GuiControl
Reimplemented by: GuiGradientSwatchCtrl, VEditorButton
onMouseDragged(const GuiEvent & event)
Reimplemented from: GuiControl
Reimplemented by: GuiGradientSwatchCtrl, VEditorButton
onMouseEnter(const GuiEvent & )
Reimplemented from: GuiControl
Reimplemented by: VEditorButton
onMouseLeave(const GuiEvent & )
Reimplemented from: GuiControl
Reimplemented by: VEditorButton
onMouseUp(const GuiEvent & )
Reimplemented from: GuiControl
Reimplemented by: VEditorButton
onRightMouseUp(const GuiEvent & )
Reimplemented from: GuiControl
Reimplemented by: VEditorButton
onWake()
Reimplemented from: GuiControl
Reimplemented by: GuiButtonCtrl, GuiCheckBoxCtrl, GuiIconButtonCtrl, GuiSwatchButtonCtrl, GuiToolboxButtonCtrl, GuiGradientSwatchCtrl
resetState()
setDepressed(bool depressed)
setScriptValue(const char * value)
Reimplemented from: GuiControl
setStateOn(bool bStateOn)
setText(const char * text)
setTextID(const char * id)
setTextID(S32 id)
setUseMouseEvents(bool val)
usesMouseEvents()