Torque2D Reference

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | List of all members
GuiControl Class Reference
Gui System » Core

`#include <guiControl.h>`

Inheritance diagram for GuiControl:

## Public Types
enum | horizSizingOptions { horizResizeRight = 0, horizResizeWidth, horizResizeLeft, horizResizeCenter, horizResizeRelative }
enum | vertSizingOptions { vertResizeBottom = 0, vertResizeHeight, vertResizeTop, vertResizeCenter, vertResizeRelative }
Public Types inherited from SimSet
typedef SimObjectList::iterator | iterator
typedef SimObjectList::value_type | value
Public Types inherited from SimObject
enum | WriteFlags { SelectedOnly = BIT(0) }

## Public Member Functions
virtual void | getScrollLineSizes (U32 *rowHeight, U32 *columnWidth)
virtual void | getCursor (GuiCursor *&cursor, bool &showCursor, const GuiEvent &lastGuiEvent)
void | awaken ()
| Called when this control and its children have been wired up. More...
void | sleep ()
| Called when this control is no more. More...
void | preRender ()
| Prerender this control and all its children. More...
virtual bool | onInputEvent (const InputEvent &event)
| General input handler. More...
virtual bool | ControlIsChild (GuiControl *child)
void | setControlProfile (GuiControlProfile *prof)
virtual void | onAction ()
| Occurs when this control performs its "action". More...
void | renderJustifiedText (Point2I offset, Point2I extent, const char *text)
void | inspectPostApply ()
void | inspectPreApply ()
Editor
These functions are used by the GUI Editor
void | setSizing (S32 horz, S32 vert)
void | write (Stream &stream, U32 tabStop, U32 flags)
| Overrides Parent Serialization to allow specific controls to not be saved (Dynamic Controls, etc) More...
bool | getCanSave ()
| Returns boolean specifying if a control can be serialized. More...
void | setCanSave (bool bCanSave)
| Set serialization flag. More...
bool | getCanSaveParent ()
| Returns boolean as to whether any parent of this control has the 'no serialization' flag set. More...
Accessors
const Point2I & | getPosition ()
| Returns position of the control. More...
const Point2I & | getExtent ()
| Returns extents of the control. More...
const RectI & | getBounds ()
| Returns the bounds of the control. More...
const Point2I & | getMinExtent ()
| Returns minimum size the control can be. More...
const S32 | getLeft ()
| Returns the X position of the control. More...
const S32 | getTop ()
| Returns the Y position of the control. More...
const S32 | getWidth ()
| Returns the width of the control. More...
const S32 | getHeight ()
| Returns the height of the control. More...
Flags
virtual void | setVisible (bool value)
bool | isVisible ()
| Returns true if the object is visible. More...
void | setActive (bool value)
bool | isActive ()
| Returns true if this control is active. More...
bool | isAwake ()
| Returns true if this control is awake. More...
Children
void | addObject (SimObject *obj)
void | removeObject (SimObject *obj)
GuiControl * | getParent ()
| Returns the control which owns this one. More...
GuiCanvas * | getRoot ()
Coordinates
Point2I | localToGlobalCoord (const Point2I &src)
Point2I | globalToLocalCoord (const Point2I &src)
Resizing
virtual void | resize (const Point2I &newPosition, const Point2I &newExtent)
virtual void | setPosition (const Point2I &newPosition)
virtual void | setExtent (const Point2I &newExtent)
virtual void | setBounds (const RectI &newBounds)
virtual void | setLeft (S32 newLeft)
virtual void | setTop (S32 newTop)
virtual void | setWidth (S32 newWidth)
virtual void | setHeight (S32 newHeight)
virtual void | childResized (GuiControl *child)
virtual void | parentResized (const Point2I &oldParentExtent, const Point2I &newParentExtent)
Rendering
virtual void | onRender (Point2I offset, const RectI &updateRect)
virtual bool | renderTooltip (Point2I cursorPos, const char *tipText=NULL)
void | renderChildControls (Point2I offset, const RectI &updateRect)
void | setUpdateRegion (Point2I pos, Point2I ext)
virtual void | setUpdate ()
| Sets the update area of the control to encompass the whole control. More...
Events
If you subclass these, make sure to call the Parent::'s versions.
virtual bool | onWake ()
| Called when this object is asked to wake up returns true if it's actually awake at the end. More...
virtual void | onSleep ()
| Called when this object is asked to sleep. More...
virtual void | onPreRender ()
| Do special pre-render proecessing. More...
virtual void | onRemove ()
| Called when this object is removed. More...
virtual void | onChildRemoved (GuiControl *child)
| Called when one of this objects children is removed. More...
bool | onAdd ()
| Called when this object is added to the scene. More...
virtual void | onChildAdded (GuiControl *child)
| Called when this object has a new child. More...
Input (Keyboard/Mouse)
virtual bool | pointInControl (const Point2I &parentCoordPoint)
bool | cursorInControl ()
| Returns true if the global cursor is inside this control. More...
virtual GuiControl * | findHitControl (const Point2I &pt, S32 initialLayer=-1)
void | mouseLock (GuiControl *lockingControl)
void | mouseLock ()
| Turn on mouse locking with last used lock control. More...
void | mouseUnlock ()
| Unlock the mouse. More...
bool | isMouseLocked ()
| Returns true if the mouse is locked. More...
Mouse Events
These functions are called when the input event which is in the name of the function occurs.
virtual void | onMouseUp (const GuiEvent &event)
virtual void | onMouseDown (const GuiEvent &event)
virtual void | onMouseMove (const GuiEvent &event)
virtual void | onMouseDragged (const GuiEvent &event)
virtual void | onMouseEnter (const GuiEvent &event)
virtual void | onMouseLeave (const GuiEvent &event)
virtual bool | onMouseWheelUp (const GuiEvent &event)
virtual bool | onMouseWheelDown (const GuiEvent &event)
virtual void | onRightMouseDown (const GuiEvent &event)
virtual void | onRightMouseUp (const GuiEvent &event)
virtual void | onRightMouseDragged (const GuiEvent &event)
virtual void | onMiddleMouseDown (const GuiEvent &event)
virtual void | onMiddleMouseUp (const GuiEvent &event)
virtual void | onMiddleMouseDragged (const GuiEvent &event)
Editor Mouse Events
These functions are called when the input event which is in the name of the function occurs. Conversly from normal mouse events, these have a boolean return value that, if they return true, the editor will NOT act on them or be able to respond to this particular event. This is particularly useful for when writing controls so that they may become aware of the editor and allow customization of their data or appearance as if they were actually in use. For example, the GuiTabBookCtrl catches on mouse down to select a tab and NOT let the editor do any instant group manipulation.
virtual bool | onMouseDownEditor (const GuiEvent &event, Point2I offset)
virtual bool | onMouseUpEditor (const GuiEvent &event, Point2I offset)
virtual bool | onRightMouseDownEditor (const GuiEvent &event, Point2I offset)
virtual bool | onMouseDraggedEditor (const GuiEvent &event, Point2I offset)
Tabs
virtual GuiControl * | findFirstTabable ()
| Find the first tab-accessable child of this control. More...
virtual GuiControl * | findLastTabable (bool firstCall=true)
virtual GuiControl * | findPrevTabable (GuiControl *curResponder, bool firstCall=true)
virtual GuiControl * | findNextTabable (GuiControl *curResponder, bool firstCall=true)
First Responder
A first responder is the control which reacts first, in it's responder chain, to keyboard events The responder chain is set for each parent and so there is only one first responder amongst it's children.
virtual void | setFirstResponder (GuiControl *firstResponder)
virtual void | makeFirstResponder (bool value)
bool | isFirstResponder ()
| Returns true if this control is a first responder. More...
virtual void | setFirstResponder ()
| Sets this object to be a first responder. More...
void | clearFirstResponder ()
| Clears the first responder for this chain. More...
GuiControl * | getFirstResponder ()
| Returns the first responder for this chain. More...
virtual void | onLoseFirstResponder ()
| Occurs when the first responder for this chain is lost. More...
Keyboard Events
void | addAcceleratorKey ()
| Adds the accelerator key for this object to the canvas. More...
virtual void | buildAcceleratorMap ()
virtual void | acceleratorKeyPress (U32 index)
virtual void | acceleratorKeyRelease (U32 index)
virtual bool | onKeyDown (const GuiEvent &event)
virtual bool | onKeyUp (const GuiEvent &event)
virtual bool | onKeyRepeat (const GuiEvent &event)
Peer Messaging
Used to send a message to other GUIControls which are children of the same parent. This is mostly used by radio controls.
void | messageSiblings (S32 message)
| Send a message to all siblings. More...
virtual void | onMessage (GuiControl *sender, S32 msg)
Canvas Events
Functions called by the canvas
virtual void | onDialogPush ()
| Called if this object is a dialog, when it is added to the visible layers. More...
virtual void | onDialogPop ()
| Called if this object is a dialog, when it is removed from the visible layers. More...
Public Member Functions inherited from SimGroup
| ~SimGroup ()
void | addObject (SimObject *, SimObjectId)
void | addObject (SimObject *, const char *name)
virtual SimObject * | findObject (const char *name)
| Find an object in the group. More...
bool | processArguments (S32 argc, const char **argv)
| Process constructor options. (ie, new SimObject(1,2,3)) More...
| DECLARE_CONOBJECT (SimGroup)
Public Member Functions inherited from SimSet
| SimSet ()
| ~SimSet ()
virtual void | onDeleteNotify (SimObject *object)
virtual U32 | getTamlChildCount (void) const
| Called when Taml attempts to compile a list of children. More...
virtual SimObject * | getTamlChild (const U32 childIndex) const
| Called when Taml attempts to compile a list of children. More...
virtual void | addTamlChild (SimObject *pSimObject)
| Called when Taml attempts to populate an objects children during a read. More...
void | callOnChildren (const char *method, S32 argc, const char *argv[], bool executeOnChildGroups=true)
SimObject * | findObjectByInternalName (const char *internalName, bool searchChildren=false)
virtual bool | writeObject (Stream *stream)
virtual bool | readObject (Stream *stream)
void | lock ()
void | unlock ()
| DECLARE_CONOBJECT (SimSet)
void | _setVectorAssoc (const char *file, const U32 line)
virtual void | pushObject (SimObject *)
virtual void | popObject ()
| Remove an object from the end of the list. More...
void | bringObjectToFront (SimObject *obj)
void | pushObjectToBack (SimObject *obj)
SimObject * | front ()
SimObject * | first ()
SimObject * | last ()
bool | empty ()
S32 | size () const
iterator | begin ()
iterator | end ()
value | operator[] (S32 index)
iterator | find (iterator first, iterator last, SimObject *obj)
iterator | find (SimObject *obj)
template<typename T >
bool | containsType (void)
virtual bool | reOrder (SimObject *obj, SimObject *target=0)
SimObject * | at (S32 index) const
void | deleteObjects (void)
void | clear ()
Public Member Functions inherited from SimObject
StringTableEntry | getClassNamespace () const
StringTableEntry | getSuperClassNamespace () const
void | setClassNamespace (const char *classNamespace)
void | setSuperClassNamespace (const char *superClassNamespace)
void | pushScriptCallbackGuard (void)
void | popScriptCallbackGuard (void)
S32 | getScriptCallbackGuard (void)
Namespace * | getNamespace ()
| Return the object's namespace. More...
const char * | tabComplete (const char *prevText, S32 baseLen, bool)
virtual void | dump ()
virtual void | dumpClassHierarchy ()
SimObject * | clone (const bool copyDynamicFields)
virtual void | copyTo (SimObject *object)
template<typename T >
bool | isType (void)
virtual bool | handlesConsoleMethod (const char *fname, S32 *routingId)
| DECLARE_CONOBJECT (SimObject)
Notify * | removeNotify (void *ptr, Notify::Type)
| Remove a notification from the list. More...
void | deleteNotify (SimObject *obj)
| Notify an object when we are deleted. More...
void | clearNotify (SimObject *obj)
| Notify an object when we are cleared. More...
void | clearAllNotifications ()
| Remove all notifications for this object. More...
void | processDeleteNotifies ()
| Send out deletion notifications. More...
void | registerReference (SimObject **obj)
void | unregisterReference (SimObject **obj)
const char * | getDataField (StringTableEntry slotName, const char *array)
void | setDataField (StringTableEntry slotName, const char *array, const char *value)
const char * | getPrefixedDataField (StringTableEntry fieldName, const char *array)
void | setPrefixedDataField (StringTableEntry fieldName, const char *array, const char *value)
const char * | getPrefixedDynamicDataField (StringTableEntry fieldName, const char *array, const S32 fieldType=-1)
void | setPrefixedDynamicDataField (StringTableEntry fieldName, const char *array, const char *value, const S32 fieldType=-1)
StringTableEntry | getDataFieldPrefix (StringTableEntry fieldName)
U32 | getDataFieldType (StringTableEntry slotName, const char *array)
SimFieldDictionary * | getFieldDictionary ()
void | clearDynamicFields (void)
| Clear all dynamic fields. More...
void | setCanSaveDynamicFields (bool bCanSave)
| Set whether fields created at runtime should be saved. Default is true. More...
bool | getCanSaveDynamicFields (void) const
| Get whether fields created at runtime should be saved. Default is true. More...
void | setInternalName (const char *newname)
StringTableEntry | getInternalName ()
| Get the internal of of this control. More...
virtual bool | save (const char *pcFilePath, bool bOnlySelected=false)
| Save object as a TorqueScript File. More...
virtual bool | isMethod (const char *methodName)
| Check if a method exists in the objects current namespace. More...
SimObjectId | getId (void) const
StringTableEntry | getIdString (void) const
U32 | getType () const
const StringTableEntry | getName (void) const
void | setId (SimObjectId id)
void | assignName (const char *name)
SimGroup * | getGroup () const
bool | isChildOfGroup (SimGroup *pGroup)
bool | isProperlyAdded () const
bool | isDeleted () const
bool | isRemoved () const
bool | isLocked ()
void | setLocked (bool b)
bool | isHidden ()
void | setHidden (bool b)
void | setProgenitorFile (const char *pFile)
StringTableEntry | getProgenitorFile (void) const
void | setPeriodicTimerID (const S32 timerID)
S32 | getPeriodicTimerID (void) const
bool | isPeriodicTimerActive (void) const
bool | isSelected () const
bool | isExpanded () const
void | setSelected (bool sel)
void | setExpanded (bool exp)
void | setModDynamicFields (bool dyn)
void | setModStaticFields (bool sta)
| SimObject ()
virtual | ~SimObject ()
virtual void | onGroupAdd ()
| Called when the object is added to a SimGroup. More...
virtual void | onGroupRemove ()
| Called when the object is removed from a SimGroup. More...
virtual void | onNameChange (const char *name)
| Called when the object's name is changed. More...
virtual void | onStaticModified (const char *slotName, const char *newValue=NULL)
virtual void | onEditorEnable ()
| Called when the editor is activated. More...
virtual void | onEditorDisable ()
| Called when the editor is deactivated. More...
bool | registerObject ()
bool | registerObject (U32 id)
bool | registerObject (const char *name)
bool | registerObject (const char *name, U32 id)
void | unregisterObject ()
void | deleteObject ()
bool | addToSet (SimObjectId)
bool | addToSet (const char *)
bool | removeFromSet (SimObjectId)
bool | removeFromSet (const char *)
virtual bool | writeField (StringTableEntry fieldname, const char *value)
virtual void | writeFields (Stream &stream, U32 tabStop)
virtual void | buildFilterList ()
void | addFieldFilter (const char *fieldName)
void | removeFieldFilter (const char *fieldName)
void | clearFieldFilters ()
bool | isFiltered (const char *fieldName)
void | assignFieldsFrom (SimObject *obj)
void | assignDynamicFieldsFrom (SimObject *obj)
Public Member Functions inherited from ConsoleObject
const AbstractClassRep::Field * | findField (StringTableEntry fieldName) const
| Get a reference to a field by name. More...
virtual AbstractClassRep * | getClassRep () const
| Gets the ClassRep. More...
bool | setField (const char *fieldName, const char *value)
| Set the value of a field. More...
virtual | ~ConsoleObject ()
const AbstractClassRep::FieldList & | getFieldList () const
| Get a list of all the fields. This information cannot be modified. More...
AbstractClassRep::FieldList & | getModifiableFieldList ()
bool & | getDynamicGroupExpand ()
S32 | getClassId (U32 netClassGroup) const
const char * | getClassName () const

## Static Public Attributes
Design Time Editor Access
static GuiEditCtrl * | smEditorHandle = NULL

## Protected Member Functions
Callbacks
Executes a console command, and returns the result. The global console variable $ThisControl is set to the id of the calling control. WARNING: because multiple controls may set $ThisControl, at any time, the value of $ThisControl should be stored in a local variable by the callback code. The use of the $ThisControl variable is not thread safe.
const char * | execConsoleCallback ()
| Executes mConsoleCommand, and returns the result. More...
const char * | execAltConsoleCallback ()
| Executes mAltConsoleCommand, and returns the result. More...
Protected Member Functions inherited from SimObject
virtual void | onTamlPreWrite (void)
| Taml callbacks. More...
virtual void | onTamlPostWrite (void)
| Called after Taml has finished writing the object. More...
virtual void | onTamlPreRead (void)
| Called prior to Taml reading the object. More...
virtual void | onTamlPostRead (const TamlCustomNodes &customNodes)
virtual void | onTamlAddParent (SimObject *pParentObject)
| Called after Taml has finished reading the object and has added the object to any parent. More...
virtual void | onTamlCustomWrite (TamlCustomNodes &customNodes)
| Called during the writing of the object to allow custom properties to be written. More...
virtual void | onTamlCustomRead (const TamlCustomNodes &customNodes)
| Called during the reading of the object to allow custom properties to be read. More...
void | linkNamespaces ()
void | unlinkNamespaces ()
Protected Member Functions inherited from ConsoleObject
| ConsoleObject ()
| ConsoleObject (const ConsoleObject &)

## Control State
GuiControlProfile * | mProfile
GuiControlProfile * | mTooltipProfile
S32 | mTipHoverTime
S32 | mTooltipWidth
bool | mVisible
bool | mActive
bool | mAwake
bool | mSetFirstResponder
bool | mCanSave
bool | mIsContainer
| if true, then the GuiEditor can drag other controls into this one. More...
S32 | mLayer
RectI | mBounds
Point2I | mMinExtent
StringTableEntry | mLangTableName
LangTable * | mLangTable
static S32 | smCursorChanged = -1
| Has this control modified the cursor? -1 or type. More...
static bool | smDesignTime = false
S32 | mHorizSizing
| Set from horizSizingOptions. More...
S32 | mVertSizing
| Set from vertSizingOptions. More...
StringTableEntry | mConsoleVariable
StringTableEntry | mConsoleCommand
StringTableEntry | mAltConsoleCommand
StringTableEntry | mAcceleratorKey
StringTableEntry | mTooltip

## Keyboard Input
SimObjectPtr< GuiControl > | mFirstResponder
static GuiControl * | smPrevResponder = NULL
static GuiControl * | smCurResponder = NULL

## Console
void | setVariable (const char *value)
void | setIntVariable (S32 value)
void | setFloatVariable (F32 value)
const char * | getVariable ()
| Returns value of control's bound variable as a string. More...
S32 | getIntVariable ()
| Returns value of control's bound variable as a integer. More...
F32 | getFloatVariable ()
| Returns value of control's bound variable as a float. More...
void | setConsoleVariable (const char *variable)
void | setConsoleCommand (const char *newCmd)
const char * | getConsoleCommand ()
| Returns the name of the function bound to this GuiControl. More...
LangTable * | getGUILangTable (void)
const UTF8 * | getGUIString (S32 id)
virtual const char * | getScriptValue ()
| Returns the value of the variable bound to this object. More...
virtual void | setScriptValue (const char *value)
| Sets the value of the variable bound to this object. More...

## Initialization
| DECLARE_CONOBJECT (GuiControl)
| GuiControl ()
virtual | ~GuiControl ()
static void | initPersistFields ()

## Additional Inherited Members
Static Public Member Functions inherited from SimObject
static void | initPersistFields ()
Static Public Member Functions inherited from ConsoleObject
static const char * | lookupClassName (const U32 in_classTag)
| Get the classname from a class tag. More...
static void | initPersistFields ()
static void | consoleInit ()
static ConsoleObject * | create (const char *in_pClassName)
static ConsoleObject * | create (const U32 groupId, const U32 typeId, const U32 in_classId)
static AbstractClassRep * | getStaticClassRep ()
| Get the abstract class information for this class. More...
static AbstractClassRep * | getParentStaticClassRep ()
| Get the abstract class information for this class's superclass. More...
Static Protected Member Functions inherited from SimObject
static bool | setClass (void *obj, const char *data)
static bool | setSuperClass (void *obj, const char *data)
static bool | writeCanSaveDynamicFields (void *obj, StringTableEntry pFieldName)
static bool | writeInternalName (void *obj, StringTableEntry pFieldName)
static bool | setParentGroup (void *obj, const char *data)
static bool | writeParentGroup (void *obj, StringTableEntry pFieldName)
static bool | writeSuperclass (void *obj, StringTableEntry pFieldName)
static bool | writeClass (void *obj, StringTableEntry pFieldName)
static SimObject::Notify * | allocNotify ()
| Get a free Notify structure. More...
static void | freeNotify (SimObject::Notify *)
| Mark a Notify structure as free. More...
Static Protected Member Functions inherited from ConsoleObject
static void | addGroup (const char *in_pGroupname, const char *in_pGroupDocs=NULL)
static void | endGroup (const char *in_pGroupname)
static void | addField (const char *in_pFieldname, const U32 in_fieldType, const dsize_t in_fieldOffset, const U32 in_elementCount=1, EnumTable *in_table=NULL, const char *in_pFieldDocs=NULL)
static void | addField (const char *in_pFieldname, const U32 in_fieldType, const dsize_t in_fieldOffset, AbstractClassRep::WriteDataNotify in_writeDataFn, const U32 in_elementCount=1, EnumTable *in_table=NULL, const char *in_pFieldDocs=NULL)
static void | addField (const char *in_pFieldname, const U32 in_fieldType, const dsize_t in_fieldOffset, const char *in_pFieldDocs)
static void | addField (const char *in_pFieldname, const U32 in_fieldType, const dsize_t in_fieldOffset, AbstractClassRep::WriteDataNotify in_writeDataFn, const char *in_pFieldDocs)
static void | addFieldV (const char *in_pFieldname, const U32 in_fieldType, const dsize_t in_fieldOffset, ConsoleTypeValidator *v, const char *in_pFieldDocs=NULL)
static void | addProtectedField (const char *in_pFieldname, const U32 in_fieldType, const dsize_t in_fieldOffset, AbstractClassRep::SetDataNotify in_setDataFn, AbstractClassRep::GetDataNotify in_getDataFn=&defaultProtectedGetFn, const U32 in_elementCount=1, EnumTable *in_table=NULL, const char *in_pFieldDocs=NULL)
static void | addProtectedField (const char *in_pFieldname, const U32 in_fieldType, const dsize_t in_fieldOffset, AbstractClassRep::SetDataNotify in_setDataFn, AbstractClassRep::GetDataNotify in_getDataFn=&defaultProtectedGetFn, AbstractClassRep::WriteDataNotify in_writeDataFn=&defaultProtectedWriteFn, const U32 in_elementCount=1, EnumTable *in_table=NULL, const char *in_pFieldDocs=NULL)
static void | addProtectedField (const char *in_pFieldname, const U32 in_fieldType, const dsize_t in_fieldOffset, AbstractClassRep::SetDataNotify in_setDataFn, AbstractClassRep::GetDataNotify in_getDataFn=&defaultProtectedGetFn, const char *in_pFieldDocs=NULL)
static void | addProtectedField (const char *in_pFieldname, const U32 in_fieldType, const dsize_t in_fieldOffset, AbstractClassRep::SetDataNotify in_setDataFn, AbstractClassRep::GetDataNotify in_getDataFn=&defaultProtectedGetFn, AbstractClassRep::WriteDataNotify in_writeDataFn=&defaultProtectedWriteFn, const char *in_pFieldDocs=NULL)
static void | addDepricatedField (const char *fieldName)
static bool | removeField (const char *in_pFieldname)
Protected Attributes inherited from SimSet
SimObjectList | objectList
void * | mMutex
Protected Attributes inherited from SimObject
SimObjectId | mId
| Id number for this object. More...
StringTableEntry | mIdString
Namespace * | mNameSpace
U32 | mTypeMask
S32 | mScriptCallbackGuard
| Whether the object is executing a script callback. More...
bool | mCanSaveFieldDictionary
| true if dynamic fields (added at runtime) should be saved, defaults to true More...
StringTableEntry | mInternalName
| Stores object Internal Name. More...
StringTableEntry | mClassName
| Stores the class name to link script class namespaces. More...
StringTableEntry | mSuperClassName
| Stores super class name to link script class namespaces. More...
Static Protected Attributes inherited from SimObject
static SimObject::Notify * | mNotifyFreeList = NULL

## Member Enumeration Documentation

enum horizSizingOptions

Enumerator
horizResizeRight | fixed on the left and width
horizResizeWidth | fixed on the left and right
horizResizeLeft | fixed on the right and width
horizResizeCenter |
horizResizeRelative | resize relative

enum vertSizingOptions

Enumerator
vertResizeBottom | fixed on the top and in height
vertResizeHeight | fixed on the top and bottom
vertResizeTop | fixed in height and on the bottom
vertResizeCenter |
vertResizeRelative | resize relative

## Constructor & Destructor Documentation

GuiControl | ( |  | ) |

~GuiControl | ( |  | ) |
| virtual

## Member Function Documentation

void acceleratorKeyPress | ( | U32 | index | ) |
| virtual

Occurs when the accelerator key for this control is pressed

Parameters

  index | Index in the acclerator map of the key

Reimplemented in GuiMenuBar, and GuiButtonBaseCtrl.

void acceleratorKeyRelease | ( | U32 | index | ) |
| virtual

Occurs when the accelerator key for this control is released

Parameters

  index | Index in the acclerator map of the key

Reimplemented in GuiButtonBaseCtrl.

void addAcceleratorKey | ( |  | ) |

Adds the accelerator key for this object to the canvas.

void addObject | ( | SimObject * | obj | ) |
| virtual

Adds an object as a child of this object.

Parameters

  obj | New child object of this control

Reimplemented from SimGroup.

void awaken | ( |  | ) |

Called when this control and its children have been wired up.

void buildAcceleratorMap | ( |  | ) |
| virtual

Adds this control's accelerator key to the accelerator map, and recursively tells all children to do the same.

Reimplemented in GuiMenuBar.

void childResized | ( | GuiControl * | child | ) |
| virtual

Called when a child control of the object is resized

Parameters

  child | Child object

Reimplemented in GuiTabBookCtrl, GuiScrollCtrl, GuiRolloutCtrl, GuiStackControl, GuiAutoScrollCtrl, and GuiDynamicCtrlArrayControl.

void clearFirstResponder | ( |  | ) |

Clears the first responder for this chain.

bool ControlIsChild | ( | GuiControl * | child | ) |
| virtual

Returns true if the provided control is a child (grandchild, or greatgrandchild) of this one.

Parameters

  child | Control to test

bool cursorInControl | ( |  | ) |

Returns true if the global cursor is inside this control.

DECLARE_CONOBJECT | ( | GuiControl |  | ) |

const char * execAltConsoleCallback | ( |  | ) |
| protected

Executes mAltConsoleCommand, and returns the result.

const char * execConsoleCallback | ( |  | ) |
| protected

Executes mConsoleCommand, and returns the result.

GuiControl * findFirstTabable | ( |  | ) |
| virtual

Find the first tab-accessable child of this control.

GuiControl * findHitControl | ( | const Point2I & | pt,
|  | S32 | initialLayer = `-1`
| ) |  |
| virtual

Returns the control which the provided point is under, with layering

Parameters

  pt | Point to test
  initialLayer | Layer of gui objects to begin the search

Reimplemented in GuiScrollCtrl, GuiWindowCtrl, and GuiTabPageCtrl.

GuiControl * findLastTabable | ( | bool | firstCall = `true` | ) |
| virtual

Find the last tab-accessable child of this control

Parameters

  firstCall | Set to true to clear the global previous responder

GuiControl * findNextTabable | ( | GuiControl * | curResponder,
|  | bool | firstCall = `true`
| ) |  |
| virtual

Find next tab-accessable control with regards to the provided control.

Parameters

  curResponder | Current control
  firstCall | Set to true to clear the global current responder

Reimplemented in GuiWindowCtrl, and GuiTabPageCtrl.

GuiControl * findPrevTabable | ( | GuiControl * | curResponder,
|  | bool | firstCall = `true`
| ) |  |
| virtual

Find previous tab-accessable control with respect to the provided one

Parameters

  curResponder | Current control
  firstCall | Set to true to clear the global previous responder

Reimplemented in GuiWindowCtrl, and GuiTabPageCtrl.

const RectI& getBounds | ( |  | ) |
| inline

Returns the bounds of the control.

bool getCanSave | ( |  | ) |

Returns boolean specifying if a control can be serialized.

bool getCanSaveParent | ( |  | ) |

Returns boolean as to whether any parent of this control has the 'no serialization' flag set.

const char * getConsoleCommand | ( |  | ) |

Returns the name of the function bound to this GuiControl.

void getCursor | ( | GuiCursor *& | cursor,
|  | bool & | showCursor,
|  | const GuiEvent & | lastGuiEvent
| ) |  |
| virtual

Get information about the cursor.

Parameters

  cursor | Cursor information will be stored here
  showCursor | Will be set to true if the cursor is visible
  lastGuiEvent | GuiEvent containing cursor position and modifyer keys (ie ctrl, shift, alt etc)

Reimplemented in GuiFrameSetCtrl, GuiWindowCtrl, and GuiEditCtrl.

const Point2I& getExtent | ( |  | ) |
| inline

Returns extents of the control.

GuiControl* getFirstResponder | ( |  | ) |
| inline

Returns the first responder for this chain.

F32 getFloatVariable | ( |  | ) |
| protected

Returns value of control's bound variable as a float.

LangTable * getGUILangTable | ( | void |  | ) |

const UTF8 * getGUIString | ( | S32 | id | ) |

const S32 getHeight | ( |  | ) |
| inline

Returns the height of the control.

S32 getIntVariable | ( |  | ) |
| protected

Returns value of control's bound variable as a integer.

const S32 getLeft | ( |  | ) |
| inline

Returns the X position of the control.

const Point2I& getMinExtent | ( |  | ) |
| inline

Returns minimum size the control can be.

GuiControl * getParent | ( |  | ) |

Returns the control which owns this one.

const Point2I& getPosition | ( |  | ) |
| inline

Returns position of the control.

GuiCanvas * getRoot | ( |  | ) |

Returns the root canvas of this control.

const char * getScriptValue | ( |  | ) |
| virtual

Returns the value of the variable bound to this object.

Reimplemented in GuiPopUpMenuCtrlEx, GuiPopUpMenuCtrl, GuiMLTextCtrl, GuiColorPickerCtrl, GuiTextEditCtrl, GuiTextCtrl, GuiButtonBaseCtrl, GuiTextListCtrl, GuiConsoleTextCtrl, GuiProgressCtrl, and GuiCheckBoxCtrl.

void getScrollLineSizes | ( | U32 * | rowHeight,
|  | U32 * | columnWidth
| ) |  |
| virtual

Get information about the size of a scroll line.

Parameters

  rowHeight | The height, in pixels, of a row
  columnWidth | The width, in pixels, of a column

const S32 getTop | ( |  | ) |
| inline

Returns the Y position of the control.

const char * getVariable | ( |  | ) |
| protected

Returns value of control's bound variable as a string.

const S32 getWidth | ( |  | ) |
| inline

Returns the width of the control.

Point2I globalToLocalCoord | ( | const Point2I & | src | ) |

Returns global coordinates translated into local space

Parameters

  src | Global coordinates to translate

void initPersistFields | ( | void |  | ) |
| static

void inspectPostApply | ( |  | ) |
| virtual

Called after any property of the object is changed in the world editor.

See also
  inspectPreApply

Reimplemented from SimObject.

Reimplemented in GuiMLTextCtrl, GuiTextCtrl, and GuiMessageVectorCtrl.

void inspectPreApply | ( |  | ) |
| virtual

Specifically, this is called by setDataField when a static field is modified, see the console details. Called before any property of the object is changed in the world editor.

The calling order here is:

- inspectPreApply()
- ...
- calls to setDataField()
- ...
- inspectPostApply()

Reimplemented from SimObject.

bool isActive | ( |  | ) |
| inline

Returns true if this control is active.

bool isAwake | ( |  | ) |
| inline

Returns true if this control is awake.

bool isFirstResponder | ( |  | ) |

Returns true if this control is a first responder.

bool isMouseLocked | ( |  | ) |

Returns true if the mouse is locked.

bool isVisible | ( |  | ) |
| inline

Returns true if the object is visible.

Point2I localToGlobalCoord | ( | const Point2I & | src | ) |

Translates local coordinates (wrt this object) into global coordinates

Parameters

  src | Local coordinates to translate

void makeFirstResponder | ( | bool | value | ) |
| virtual

Sets up this control to be the first in it's group to respond to an input event

Parameters

  value | True if this should be a first responder

void messageSiblings | ( | S32 | message | ) |

Send a message to all siblings.

void mouseLock | ( | GuiControl * | lockingControl | ) |

Lock the mouse within the provided control

Parameters

  lockingControl | Control to lock the mouse within

void mouseLock | ( |  | ) |

Turn on mouse locking with last used lock control.

void mouseUnlock | ( |  | ) |

Unlock the mouse.

void onAction | ( |  | ) |
| virtual

Occurs when this control performs its "action".

Reimplemented in GuiMenuBar, GuiPopUpMenuCtrlEx, GuiPopUpMenuCtrl, GuiButtonBaseCtrl, and GuiCheckBoxCtrl.

bool onAdd | ( | void |  | ) |
| virtual

Called when this object is added to the scene.

Reimplemented from SimObject.

Reimplemented in GuiMLTextCtrl, GuiPopUpMenuCtrlEx, GuiPopUpMenuCtrl, GuiTextEditCtrl, GuiTextCtrl, and GuiMessageVectorCtrl.

void onChildAdded | ( | GuiControl * | child | ) |
| virtual

Called when this object has a new child.

Reimplemented in GuiTabBookCtrl, GuiAutoScrollCtrl, and GuiScriptNotifyCtrl.

void onChildRemoved | ( | GuiControl * | child | ) |
| virtual

Called when one of this objects children is removed.

Reimplemented in GuiTabBookCtrl, GuiAutoScrollCtrl, and GuiScriptNotifyCtrl.

void onDialogPop | ( |  | ) |
| virtual

Called if this object is a dialog, when it is removed from the visible layers.

Reimplemented in GuiScriptNotifyCtrl.

void onDialogPush | ( |  | ) |
| virtual

Called if this object is a dialog, when it is added to the visible layers.

Reimplemented in GuiScriptNotifyCtrl.

bool onInputEvent | ( | const InputEvent & | event | ) |
| virtual

General input handler.

Reimplemented in GuiInputCtrl.

bool onKeyDown | ( | const GuiEvent & | event | ) |
| virtual

Happens when a key is depressed

Parameters

  event | Event descriptor (which contains the key)

Reimplemented in GuiTreeViewCtrl, GuiMLTextCtrl, GuiTabBookCtrl, GuiScrollCtrl, GuiPopUpMenuCtrlEx, GuiPopUpMenuCtrl, GuiWindowCtrl, GuiTextEditCtrl, GuiEditCtrl, GuiTextListCtrl, GuiArrayCtrl, GuiPopupTextListCtrlEx, GuiButtonBaseCtrl, GuiMenuTextListCtrl, GuiTextEditSliderCtrl, GuiPopupTextListCtrl, GuiFadeinBitmapCtrl, GuiConsoleEditCtrl, and GuiMLTextEditCtrl.

bool onKeyRepeat | ( | const GuiEvent & | event | ) |
| virtual

Happens when a key is held down, resulting in repeated keystrokes.

Parameters

  event | Event descriptor (which contains the key)

bool onKeyUp | ( | const GuiEvent & | event | ) |
| virtual

Happens when a key is released

Parameters

  event | Event descriptor (which contains the key)

Reimplemented in GuiButtonBaseCtrl.

void onLoseFirstResponder | ( |  | ) |
| virtual

Occurs when the first responder for this chain is lost.

Reimplemented in GuiTextEditCtrl, and GuiScriptNotifyCtrl.

void onMessage | ( | GuiControl * | sender,
|  | S32 | msg
| ) |  |
| virtual

Receive a message from another control

Reimplemented in GuiButtonBaseCtrl.

void onMiddleMouseDown | ( | const GuiEvent & | event | ) |
| virtual

Reimplemented in GuiTreeViewCtrl, and SceneWindow.

void onMiddleMouseDragged | ( | const GuiEvent & | event | ) |
| virtual

Reimplemented in SceneWindow.

void onMiddleMouseUp | ( | const GuiEvent & | event | ) |
| virtual

Reimplemented in SceneWindow.

void onMouseDown | ( | const GuiEvent & | event | ) |
| virtual

Reimplemented in GuiTreeViewCtrl, SceneWindow, GuiMLTextCtrl, GuiTabBookCtrl, GuiScrollCtrl, GuiMenuBar, GuiPopUpMenuCtrlEx, GuiPopUpMenuCtrl, GuiColorPickerCtrl, GuiWindowCtrl, GuiTextEditCtrl, GuiListBoxCtrl, GuiFrameSetCtrl, GuiEditCtrl, GuiFormCtrl, GuiRolloutCtrl, DbgFileView, GuiArrayCtrl, GuiMenuTextListCtrl, GuiPaneControl, GuiMessageVectorCtrl, GuiTextEditSliderCtrl, GuiButtonBaseCtrl, GuiPopupTextListCtrl, GuiPopUpBackgroundCtrlEx, GuiSliderCtrl, GuiFilterCtrl, GuiSubmenuBackgroundCtrl, GuiDragAndDropControl, GuiFadeinBitmapCtrl, GuiBubbleTextCtrl, GuiPopUpBackgroundCtrl, GuiMouseEventCtrl, GuiTabPageCtrl, GuiCheckBoxCtrl, and GuiMenuBackgroundCtrl.

virtual bool onMouseDownEditor | ( | const GuiEvent & | event,
|  | Point2I | offset
| ) |  |
| inline virtual

Called when a mouseDown event occurs on a control and the GUI editor is active

Parameters

  event | the GuiEvent which caused the call to this function
  offset | the offset which is representative of the units x and y that the editor takes up on screen

Reimplemented in GuiTabBookCtrl, and GuiTabPageCtrl.

void onMouseDragged | ( | const GuiEvent & | event | ) |
| virtual

Reimplemented in GuiTreeViewCtrl, SceneWindow, GuiMLTextCtrl, GuiScrollCtrl, GuiMenuBar, GuiColorPickerCtrl, GuiWindowCtrl, GuiTextEditCtrl, GuiListBoxCtrl, GuiFrameSetCtrl, GuiEditCtrl, GuiFormCtrl, DbgFileView, GuiArrayCtrl, GuiSceneObjectCtrl, GuiTextEditSliderCtrl, GuiSliderCtrl, GuiFilterCtrl, GuiDragAndDropControl, GuiMouseEventCtrl, and GuiMenuBackgroundCtrl.

virtual bool onMouseDraggedEditor | ( | const GuiEvent & | event,
|  | Point2I | offset
| ) |  |
| inline virtual

Called when a mouseDragged event occurs on a control and the GUI editor is active

Parameters

  event | the GuiEvent which caused the call to this function
  offset | the offset which is representative of the units x and y that the editor takes up on screen

void onMouseEnter | ( | const GuiEvent & | event | ) |
| virtual

Reimplemented in GuiTreeViewCtrl, SceneWindow, GuiPopUpMenuCtrlEx, GuiPopUpMenuCtrl, GuiColorPickerCtrl, GuiFormCtrl, GuiArrayCtrl, GuiPaneControl, GuiSceneObjectCtrl, GuiButtonBaseCtrl, GuiSliderCtrl, and GuiMouseEventCtrl.

void onMouseLeave | ( | const GuiEvent & | event | ) |
| virtual

Reimplemented in GuiTreeViewCtrl, SceneWindow, GuiTabBookCtrl, GuiMenuBar, GuiPopUpMenuCtrlEx, GuiPopUpMenuCtrl, GuiColorPickerCtrl, GuiFormCtrl, GuiArrayCtrl, GuiPaneControl, GuiSceneObjectCtrl, GuiButtonBaseCtrl, GuiSliderCtrl, and GuiMouseEventCtrl.

void onMouseMove | ( | const GuiEvent & | event | ) |
| virtual

Reimplemented in GuiTreeViewCtrl, SceneWindow, GuiTabBookCtrl, GuiMenuBar, GuiColorPickerCtrl, GuiFormCtrl, GuiPopupTextListCtrlEx, GuiArrayCtrl, GuiPaneControl, GuiMouseEventCtrl, and GuiMenuBackgroundCtrl.

void onMouseUp | ( | const GuiEvent & | event | ) |
| virtual

Reimplemented in GuiTreeViewCtrl, SceneWindow, GuiMLTextCtrl, GuiScrollCtrl, GuiMenuBar, GuiPopUpMenuCtrlEx, GuiPopUpMenuCtrl, GuiColorPickerCtrl, GuiWindowCtrl, GuiTextEditCtrl, GuiFrameSetCtrl, GuiEditCtrl, GuiFormCtrl, GuiRolloutCtrl, DbgFileView, GuiPopupTextListCtrlEx, GuiSceneObjectCtrl, GuiMenuTextListCtrl, GuiPaneControl, GuiMessageVectorCtrl, GuiTextEditSliderCtrl, GuiButtonBaseCtrl, GuiPopupTextListCtrl, GuiSliderCtrl, GuiFilterCtrl, GuiDragAndDropControl, GuiMouseEventCtrl, and GuiCheckBoxCtrl.

virtual bool onMouseUpEditor | ( | const GuiEvent & | event,
|  | Point2I | offset
| ) |  |
| inline virtual

Called when a mouseUp event occurs on a control and the GUI editor is active

Parameters

  event | the GuiEvent which caused the call to this function
  offset | the offset which is representative of the units x and y that the editor takes up on screen

bool onMouseWheelDown | ( | const GuiEvent & | event | ) |
| virtual

Reimplemented in SceneWindow, and GuiScrollCtrl.

bool onMouseWheelUp | ( | const GuiEvent & | event | ) |
| virtual

Reimplemented in SceneWindow, and GuiScrollCtrl.

void onPreRender | ( |  | ) |
| virtual

Do special pre-render proecessing.

Reimplemented in GuiEditorRuler, GuiTreeViewCtrl, GuiMLTextCtrl, GuiScrollCtrl, GuiMenuBar, GuiTextEditCtrl, GuiTabBookCtrl, DbgFileView, GuiTextCtrl, GuiEditCtrl, GuiTextEditSliderCtrl, GuiFilterCtrl, GuiConsoleTextCtrl, GuiProgressCtrl, GuiFadeinBitmapCtrl, and GuiConsole.

void onRemove | ( |  | ) |
| virtual

Called when this object is removed.

Reimplemented from SimGroup.

Reimplemented in SceneWindow, GuiTabBookCtrl, GuiEditCtrl, GuiTextListCtrl, and GuiMessageVectorCtrl.

void onRender | ( | Point2I | offset,
|  | const RectI & | updateRect
| ) |  |
| virtual

Called when this control is to render itself

Parameters

  offset | The location this control is to begin rendering
  updateRect | The screen area this control has drawing access to

Reimplemented in GuiEditorRuler, GuiTreeViewCtrl, SceneWindow, GuiMLTextCtrl, GuiScrollCtrl, GuiMenuBar, GuiPopUpMenuCtrlEx, GuiWindowCtrl, GuiPopUpMenuCtrl, GuiInspectorField, GuiTextEditCtrl, GuiRolloutCtrl, GuiTabBookCtrl, GuiFrameSetCtrl, GuiColorPickerCtrl, GuiListBoxCtrl, GuiIconButtonCtrl, GuiFormCtrl, GuiTextCtrl, GuiBitmapButtonTextCtrl, GuiArrayCtrl, GuiEditCtrl, GuiTextEditSliderCtrl, GuiSliderCtrl, GuiSceneObjectCtrl, GuiBitmapButtonCtrl, GuiImageButtonCtrl, GuiFilterCtrl, GuiBitmapCtrl, GuiGraphCtrl, GuiMessageVectorCtrl, GuiFadeinBitmapCtrl, GuiToolboxButtonCtrl, GuiPaneControl, GuiConsoleTextCtrl, GuiTabPageCtrl, GuiSeparatorCtrl, GuiProgressCtrl, GuiSpriteCtrl, GuiCheckBoxCtrl, GuiBitmapBorderCtrl, GuiMLTextEditCtrl, GuiBackgroundCtrl, GuiButtonCtrl, and GuiBorderButtonCtrl.

void onRightMouseDown | ( | const GuiEvent & | event | ) |
| virtual

Reimplemented in GuiTreeViewCtrl, SceneWindow, GuiEditCtrl, GuiArrayCtrl, and GuiMouseEventCtrl.

virtual bool onRightMouseDownEditor | ( | const GuiEvent & | event,
|  | Point2I | offset
| ) |  |
| inline virtual

Called when a rightMouseDown event occurs on a control and the GUI editor is active

Parameters

  event | the GuiEvent which caused the call to this function
  offset | the offset which is representative of the units x and y that the editor takes up on screen

void onRightMouseDragged | ( | const GuiEvent & | event | ) |
| virtual

Reimplemented in SceneWindow, and GuiMouseEventCtrl.

void onRightMouseUp | ( | const GuiEvent & | event | ) |
| virtual

Reimplemented in SceneWindow, GuiButtonBaseCtrl, and GuiMouseEventCtrl.

void onSleep | ( |  | ) |
| virtual

Called when this object is asked to sleep.

Reimplemented in GuiTreeViewCtrl, GuiMLTextCtrl, GuiScrollCtrl, GuiMenuBar, GuiPopUpMenuCtrlEx, GuiPopUpMenuCtrl, GuiTabBookCtrl, GuiWindowCtrl, GuiFormCtrl, GuiTextEditCtrl, GuiIconButtonCtrl, GuiImageButtonCtrl, GuiSceneObjectCtrl, GuiStackControl, GuiPaneControl, GuiMessageVectorCtrl, GuiBitmapButtonCtrl, GuiEditCtrl, GuiTextCtrl, GuiBitmapCtrl, GuiToolboxButtonCtrl, GuiArrayCtrl, GuiConsoleTextCtrl, GuiControlArrayControl, GuiGridControl, GuiSpriteCtrl, GuiBitmapBorderCtrl, GuiTabPageCtrl, and GuiInputCtrl.

bool onWake | ( |  | ) |
| virtual

Called when this object is asked to wake up returns true if it's actually awake at the end.

Reimplemented in GuiTreeViewCtrl, GuiMLTextCtrl, GuiScrollCtrl, GuiFrameSetCtrl, GuiMenuBar, GuiPopUpMenuCtrlEx, GuiPopUpMenuCtrl, GuiTabBookCtrl, GuiWindowCtrl, GuiListBoxCtrl, GuiFormCtrl, GuiTextEditCtrl, GuiIconButtonCtrl, GuiRolloutCtrl, GuiTextListCtrl, DbgFileView, GuiImageButtonCtrl, GuiSceneObjectCtrl, GuiStackControl, GuiPaneControl, GuiGraphCtrl, GuiMessageVectorCtrl, GuiBitmapButtonCtrl, GuiEditCtrl, GuiTextCtrl, GuiSliderCtrl, GuiFadeinBitmapCtrl, GuiFilterCtrl, GuiBitmapCtrl, GuiToolboxButtonCtrl, GuiButtonBaseCtrl, GuiArrayCtrl, GuiConsoleTextCtrl, GuiControlArrayControl, GuiCheckBoxCtrl, GuiGridControl, GuiSpriteCtrl, GuiBitmapBorderCtrl, GuiConsole, GuiTabPageCtrl, GuiInputCtrl, and GuiButtonCtrl.

void parentResized | ( | const Point2I & | oldParentExtent,
|  | const Point2I & | newParentExtent
| ) |  |
| virtual

Called when this objects parent is resized

Parameters

  oldParentExtent | The old size of the parent object
  newParentExtent | The new size of the parent object

Reimplemented in GuiMLTextCtrl, GuiTextEditCtrl, GuiListBoxCtrl, GuiInspector, GuiMessageVectorCtrl, and GuiScriptNotifyCtrl.

bool pointInControl | ( | const Point2I & | parentCoordPoint | ) |
| virtual

This function will return true if the provided coordinates (wrt parent object) are within the bounds of this control

Parameters

  parentCoordPoint | Coordinates to test

Reimplemented in GuiSubmenuBackgroundCtrl.

void preRender | ( |  | ) |

Prerender this control and all its children.

void removeObject | ( | SimObject * | obj | ) |
| virtual

Removes a child object from this control.

Parameters

  obj | Object to remove from this control

Reimplemented from SimGroup.

void renderChildControls | ( | Point2I | offset,
|  | const RectI & | updateRect
| ) |  |

Called when this control should render its children

Parameters

  offset | The location this control is to begin rendering
  updateRect | The screen area this control has drawing access to

void renderJustifiedText | ( | Point2I | offset,
|  | Point2I | extent,
|  | const char * | text
| ) |  |

Renders justified text using the profile.

Note
  This should move into the graphics library at some point

bool renderTooltip | ( | Point2I | cursorPos,
|  | const char * | tipText = `NULL`
| ) |  |
| virtual

Render a tooltip at the specified cursor position for this control

Parameters

  cursorPos | position of cursor to display the tip near
  tipText | optional alternate tip to be rendered

void resize | ( | const Point2I & | newPosition,
|  | const Point2I & | newExtent
| ) |  |
| virtual

Changes the size and/or position of this control

Parameters

  newPosition | New position of this control
  newExtent | New size of this control

Reimplemented in SceneWindow, GuiMLTextCtrl, GuiTabBookCtrl, GuiInspectorDynamicField, GuiScrollCtrl, GuiInspectorTypeColor, GuiInspectorField, GuiWindowCtrl, GuiInspectorTypeFileName, GuiFrameSetCtrl, GuiRolloutCtrl, GuiFormCtrl, GuiStackControl, GuiPaneControl, GuiAutoScrollCtrl, GuiScriptNotifyCtrl, GuiMLTextEditCtrl, GuiDynamicCtrlArrayControl, GuiControlArrayControl, and GuiGridControl.

void setActive | ( | bool | value | ) |

Sets the status of this control as active and responding or inactive

Parameters

  value | True if this is active

void setBounds | ( | const RectI & | newBounds | ) |
| virtual

Changes the bounds of this control

Parameters

  newBounds | New bounds of this control

void setCanSave | ( | bool | bCanSave | ) |

Set serialization flag.

void setConsoleCommand | ( | const char * | newCmd | ) |

Set the name of the console function bound to, such as a script function a button calls when clicked.

Parameters

  newCmd | Console function to attach to this GuiControl

void setConsoleVariable | ( | const char * | variable | ) |

Set the name of the console variable which this GuiObject is bound to

Parameters

  variable | Variable name

void setControlProfile | ( | GuiControlProfile * | prof | ) |

Sets the control profile for this control.

See also
  GuiControlProfile

Parameters

  prof | Control profile to apply

void setExtent | ( | const Point2I & | newExtent | ) |
| virtual

Changes the size of this control

Parameters

  newExtent | New size of this control

void setFirstResponder | ( | GuiControl * | firstResponder | ) |
| virtual

Sets the first responder for child controls

Parameters

  firstResponder | First responder for this chain

Reimplemented in GuiCanvas, and GuiScriptNotifyCtrl.

void setFirstResponder | ( |  | ) |
| virtual

Sets this object to be a first responder.

Reimplemented in GuiTextEditCtrl, and GuiScriptNotifyCtrl.

void setFloatVariable | ( | F32 | value | ) |
| protected

Sets the value of the console variable bound to this control

Parameters

  value | Float value to assign to control's console variable

void setHeight | ( | S32 | newHeight | ) |
| virtual

Changes the height of this control

Parameters

  newHeight | New Height of this control

void setIntVariable | ( | S32 | value | ) |
| protected

Sets the value of the console variable bound to this control

Parameters

  value | Integer value to assign to control's console variable

void setLeft | ( | S32 | newLeft | ) |
| virtual

Changes the X position of this control

Parameters

  newXPosition | New X Position of this control

void setPosition | ( | const Point2I & | newPosition | ) |
| virtual

Changes the position of this control

Parameters

  newPosition | New position of this control

void setScriptValue | ( | const char * | value | ) |
| virtual

Sets the value of the variable bound to this object.

Reimplemented in GuiMLTextCtrl, GuiColorPickerCtrl, GuiTextEditCtrl, GuiTextCtrl, GuiButtonBaseCtrl, GuiSliderCtrl, GuiTextListCtrl, GuiConsoleTextCtrl, and GuiProgressCtrl.

void setSizing | ( | S32 | horz,
|  | S32 | vert
| ) |  |

Sets the size of the GuiControl

Parameters

  horz | Width of the control
  vert | Height of the control

void setTop | ( | S32 | newTop | ) |
| virtual

Changes the Y position of this control

Parameters

  newYPosition | New Y Position of this control

void setUpdate | ( |  | ) |
| virtual

Sets the update area of the control to encompass the whole control.

Reimplemented in GuiTabBookCtrl.

void setUpdateRegion | ( | Point2I | pos,
|  | Point2I | ext
| ) |  |

Sets the area (local coordinates) this control wants refreshed each frame

Parameters

  pos | UpperLeft point on rectangle of refresh area
  ext | Extent of update rect

void setVariable | ( | const char * | value | ) |
| protected

Sets the value of the console variable bound to this control

Parameters

  value | String value to assign to control's console variable

void setVisible | ( | bool | value | ) |
| virtual

Sets the visibility of the control

Parameters

  value | True if object should be visible

void setWidth | ( | S32 | newWidth | ) |
| virtual

Changes the width of this control

Parameters

  newWidth | New width of this control

void sleep | ( |  | ) |

Called when this control is no more.

void write | ( | Stream & | stream,
|  | U32 | tabStop,
|  | U32 | flags
| ) |  |
| virtual

Overrides Parent Serialization to allow specific controls to not be saved (Dynamic Controls, etc)

Reimplemented from SimSet.

## Member Data Documentation

StringTableEntry mAcceleratorKey
| protected

bool mActive

StringTableEntry mAltConsoleCommand
| protected

bool mAwake

RectI mBounds

bool mCanSave

StringTableEntry mConsoleCommand
| protected

StringTableEntry mConsoleVariable
| protected

SimObjectPtr<GuiControl> mFirstResponder

S32 mHorizSizing
| protected

Set from horizSizingOptions.

bool mIsContainer

if true, then the GuiEditor can drag other controls into this one.

LangTable* mLangTable

StringTableEntry mLangTableName

S32 mLayer

Point2I mMinExtent

GuiControlProfile* mProfile

bool mSetFirstResponder

S32 mTipHoverTime

StringTableEntry mTooltip
| protected

GuiControlProfile* mTooltipProfile

S32 mTooltipWidth

S32 mVertSizing
| protected

Set from vertSizingOptions.

bool mVisible

GuiControl * smCurResponder = NULL
| static

S32 smCursorChanged = -1
| static

Has this control modified the cursor? -1 or type.

bool smDesignTime = false
| static

static GuiControl boolean that specifies if the GUI Editor is active

GuiEditCtrl * smEditorHandle = NULL
| static

static GuiEditCtrl pointer that gives controls access to editor-NULL if editor is closed

GuiControl * smPrevResponder = NULL
| static

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

- gui/guiControl.h
- gui/guiControl.cc