Torque2D Reference
|
#include <guiControl.h>
Public Types | |
enum | horizSizingOptions { horizResizeRight = 0, horizResizeWidth, horizResizeLeft, horizResizeCenter, horizResizeRelative } |
enum | vertSizingOptions { vertResizeBottom = 0, vertResizeHeight, vertResizeTop, vertResizeCenter, vertResizeRelative } |
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... | |
![]() | |
~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) | |
![]() | |
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 () |
![]() | |
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 (const U8 namespaceLinkMask=LinkSuperClassName|LinkClassName) | |
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) |
![]() | |
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... | |
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 void | initPersistFields () |
![]() | |
enum | SimObjectNSLinkType { LinkClassName = BIT(0), LinkSuperClassName = BIT(1) } |
![]() | |
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... | |
![]() | |
SimObjectList | objectList |
void * | mMutex |
![]() | |
static SimObject::Notify * | mNotifyFreeList = NULL |
enum horizSizingOptions |
enum vertSizingOptions |
GuiControl | ( | ) |
|
virtual |
|
virtual |
Occurs when the accelerator key for this control is pressed
index | Index in the acclerator map of the key |
Reimplemented in GuiMenuBar, and GuiButtonBaseCtrl.
|
virtual |
Occurs when the accelerator key for this control is released
index | Index in the acclerator map of the key |
Reimplemented in GuiButtonBaseCtrl.
void addAcceleratorKey | ( | ) |
Adds the accelerator key for this object to the canvas.
|
virtual |
Adds an object as a child of this object.
obj | New child object of this control |
Reimplemented from SimGroup.
void awaken | ( | ) |
Called when this control and its children have been wired up.
|
virtual |
Adds this control's accelerator key to the accelerator map, and recursively tells all children to do the same.
Reimplemented in GuiMenuBar.
|
virtual |
Called when a child control of the object is resized
child | Child object |
Reimplemented in GuiTabBookCtrl, GuiScrollCtrl, GuiRolloutCtrl, GuiStackControl, GuiAutoScrollCtrl, and GuiDynamicCtrlArrayControl.
void clearFirstResponder | ( | ) |
Clears the first responder for this chain.
|
virtual |
Returns true if the provided control is a child (grandchild, or greatgrandchild) of this one.
child | Control to test |
bool cursorInControl | ( | ) |
Returns true if the global cursor is inside this control.
DECLARE_CONOBJECT | ( | GuiControl | ) |
|
protected |
Executes mAltConsoleCommand, and returns the result.
|
protected |
Executes mConsoleCommand, and returns the result.
|
virtual |
Find the first tab-accessable child of this control.
|
virtual |
Returns the control which the provided point is under, with layering
pt | Point to test |
initialLayer | Layer of gui objects to begin the search |
Reimplemented in GuiScrollCtrl, GuiWindowCtrl, and GuiTabPageCtrl.
|
virtual |
Find the last tab-accessable child of this control
firstCall | Set to true to clear the global previous responder |
|
virtual |
Find next tab-accessable control with regards to the provided control.
curResponder | Current control |
firstCall | Set to true to clear the global current responder |
Reimplemented in GuiWindowCtrl, and GuiTabPageCtrl.
|
virtual |
Find previous tab-accessable control with respect to the provided one
curResponder | Current control |
firstCall | Set to true to clear the global previous responder |
Reimplemented in GuiWindowCtrl, and GuiTabPageCtrl.
|
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.
Get information about the cursor.
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.
|
inline |
Returns extents of the control.
|
inline |
Returns the first responder for this chain.
|
protected |
Returns value of control's bound variable as a float.
LangTable * getGUILangTable | ( | void | ) |
const UTF8 * getGUIString | ( | S32 | id | ) |
|
inline |
Returns the height of the control.
|
protected |
Returns value of control's bound variable as a integer.
|
inline |
Returns the X position of the control.
|
inline |
Returns minimum size the control can be.
GuiControl * getParent | ( | ) |
Returns the control which owns this one.
|
inline |
Returns position of the control.
GuiCanvas * getRoot | ( | ) |
Returns the root canvas of this control.
|
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.
|
virtual |
Get information about the size of a scroll line.
rowHeight | The height, in pixels, of a row |
columnWidth | The width, in pixels, of a column |
|
inline |
Returns the Y position of the control.
|
protected |
Returns value of control's bound variable as a string.
|
inline |
Returns the width of the control.
Returns global coordinates translated into local space
src | Global coordinates to translate |
|
static |
|
virtual |
Called after any property of the object is changed in the world editor.
Reimplemented from SimObject.
Reimplemented in GuiMLTextCtrl, GuiTextCtrl, and GuiMessageVectorCtrl.
|
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:
Reimplemented from SimObject.
|
inline |
Returns true if this control is active.
|
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.
|
inline |
Returns true if the object is visible.
Translates local coordinates (wrt this object) into global coordinates
src | Local coordinates to translate |
|
virtual |
Sets up this control to be the first in it's group to respond to an input event
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
lockingControl | Control to lock the mouse within |
void mouseLock | ( | ) |
Turn on mouse locking with last used lock control.
void mouseUnlock | ( | ) |
Unlock the mouse.
|
virtual |
Occurs when this control performs its "action".
Reimplemented in GuiMenuBar, GuiPopUpMenuCtrlEx, GuiPopUpMenuCtrl, GuiButtonBaseCtrl, and GuiCheckBoxCtrl.
|
virtual |
Called when this object is added to the scene.
Reimplemented from SimObject.
Reimplemented in GuiMLTextCtrl, GuiPopUpMenuCtrlEx, GuiPopUpMenuCtrl, GuiTextEditCtrl, GuiTextCtrl, and GuiMessageVectorCtrl.
|
virtual |
Called when this object has a new child.
Reimplemented in GuiTabBookCtrl, GuiAutoScrollCtrl, and GuiScriptNotifyCtrl.
|
virtual |
Called when one of this objects children is removed.
Reimplemented in GuiTabBookCtrl, GuiAutoScrollCtrl, and GuiScriptNotifyCtrl.
|
virtual |
Called if this object is a dialog, when it is removed from the visible layers.
Reimplemented in GuiScriptNotifyCtrl.
|
virtual |
Called if this object is a dialog, when it is added to the visible layers.
Reimplemented in GuiScriptNotifyCtrl.
|
virtual |
General input handler.
Reimplemented in GuiInputCtrl.
|
virtual |
Happens when a key is depressed
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.
|
virtual |
Happens when a key is held down, resulting in repeated keystrokes.
event | Event descriptor (which contains the key) |
|
virtual |
Happens when a key is released
event | Event descriptor (which contains the key) |
Reimplemented in GuiButtonBaseCtrl.
|
virtual |
Occurs when the first responder for this chain is lost.
Reimplemented in GuiTextEditCtrl, and GuiScriptNotifyCtrl.
|
virtual |
Receive a message from another control
Reimplemented in GuiButtonBaseCtrl.
|
virtual |
Reimplemented in GuiTreeViewCtrl, and SceneWindow.
|
virtual |
Reimplemented in SceneWindow.
|
virtual |
Reimplemented in SceneWindow.
|
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.
Called when a mouseDown event occurs on a control and the GUI editor is active
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.
|
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.
Called when a mouseDragged event occurs on a control and the GUI editor is active
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 |
|
virtual |
|
virtual |
|
virtual |
Reimplemented in GuiTreeViewCtrl, SceneWindow, GuiTabBookCtrl, GuiMenuBar, GuiColorPickerCtrl, GuiFormCtrl, GuiPopupTextListCtrlEx, GuiArrayCtrl, GuiPaneControl, GuiMouseEventCtrl, and GuiMenuBackgroundCtrl.
|
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.
Called when a mouseUp event occurs on a control and the GUI editor is active
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 |
|
virtual |
Reimplemented in SceneWindow, and GuiScrollCtrl.
|
virtual |
Reimplemented in SceneWindow, and GuiScrollCtrl.
|
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.
|
virtual |
Called when this object is removed.
Reimplemented from SimGroup.
Reimplemented in SceneWindow, GuiTabBookCtrl, GuiEditCtrl, GuiTextListCtrl, and GuiMessageVectorCtrl.
Called when this control is to render itself
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, GuiFadeinBitmapCtrl, GuiMessageVectorCtrl, GuiToolboxButtonCtrl, GuiPaneControl, GuiConsoleTextCtrl, GuiTabPageCtrl, GuiSeparatorCtrl, GuiProgressCtrl, GuiCheckBoxCtrl, GuiBitmapBorderCtrl, GuiSpriteCtrl, GuiMLTextEditCtrl, GuiBackgroundCtrl, GuiButtonCtrl, and GuiBorderButtonCtrl.
|
virtual |
Reimplemented in GuiTreeViewCtrl, SceneWindow, GuiEditCtrl, GuiArrayCtrl, and GuiMouseEventCtrl.
Called when a rightMouseDown event occurs on a control and the GUI editor is active
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 |
|
virtual |
Reimplemented in SceneWindow, and GuiMouseEventCtrl.
|
virtual |
Reimplemented in SceneWindow, GuiButtonBaseCtrl, and GuiMouseEventCtrl.
|
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, GuiBitmapBorderCtrl, GuiSpriteCtrl, GuiTabPageCtrl, and GuiInputCtrl.
|
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, GuiBitmapBorderCtrl, GuiSpriteCtrl, GuiConsole, GuiTabPageCtrl, GuiInputCtrl, and GuiButtonCtrl.
Called when this objects parent is resized
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.
|
virtual |
This function will return true if the provided coordinates (wrt parent object) are within the bounds of this control
parentCoordPoint | Coordinates to test |
Reimplemented in GuiSubmenuBackgroundCtrl.
void preRender | ( | ) |
Prerender this control and all its children.
|
virtual |
Removes a child object from this control.
obj | Object to remove from this control |
Reimplemented from SimGroup.
Called when this control should render its children
offset | The location this control is to begin rendering |
updateRect | The screen area this control has drawing access to |
Renders justified text using the profile.
|
virtual |
Render a tooltip at the specified cursor position for this control
cursorPos | position of cursor to display the tip near |
tipText | optional alternate tip to be rendered |
Changes the size and/or position of this control
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
value | True if this is active |
|
virtual |
Changes the bounds of this control
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.
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
variable | Variable name |
void setControlProfile | ( | GuiControlProfile * | prof | ) |
Sets the control profile for this control.
prof | Control profile to apply |
|
virtual |
Changes the size of this control
newExtent | New size of this control |
|
virtual |
Sets the first responder for child controls
firstResponder | First responder for this chain |
Reimplemented in GuiCanvas, and GuiScriptNotifyCtrl.
|
virtual |
Sets this object to be a first responder.
Reimplemented in GuiTextEditCtrl, and GuiScriptNotifyCtrl.
|
protected |
Sets the value of the console variable bound to this control
value | Float value to assign to control's console variable |
|
virtual |
Changes the height of this control
newHeight | New Height of this control |
|
protected |
Sets the value of the console variable bound to this control
value | Integer value to assign to control's console variable |
|
virtual |
Changes the X position of this control
newXPosition | New X Position of this control |
|
virtual |
Changes the position of this control
newPosition | New position of this control |
|
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
horz | Width of the control |
vert | Height of the control |
|
virtual |
Changes the Y position of this control
newYPosition | New Y Position of this control |
|
virtual |
Sets the update area of the control to encompass the whole control.
Reimplemented in GuiTabBookCtrl.
Sets the area (local coordinates) this control wants refreshed each frame
pos | UpperLeft point on rectangle of refresh area |
ext | Extent of update rect |
|
protected |
Sets the value of the console variable bound to this control
value | String value to assign to control's console variable |
|
virtual |
Sets the visibility of the control
value | True if object should be visible |
|
virtual |
Changes the width of this control
newWidth | New width of this control |
void sleep | ( | ) |
Called when this control is no more.
|
virtual |
Overrides Parent Serialization to allow specific controls to not be saved (Dynamic Controls, etc)
Reimplemented from SimSet.
|
protected |
bool mActive |
|
protected |
bool mAwake |
RectI mBounds |
bool mCanSave |
|
protected |
|
protected |
SimObjectPtr<GuiControl> mFirstResponder |
|
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 |
|
protected |
GuiControlProfile* mTooltipProfile |
S32 mTooltipWidth |
|
protected |
Set from vertSizingOptions.
bool mVisible |
|
static |
|
static |
Has this control modified the cursor? -1 or type.
|
static |
static GuiControl boolean that specifies if the GUI Editor is active
|
static |
static GuiEditCtrl pointer that gives controls access to editor-NULL if editor is closed
|
static |