torque Torque Game Engine Documentation
TGE Version 1.5.2

GuiControl Class Reference

#include <guiControl.h>

Inheritance diagram for GuiControl:

Inheritance graph
[legend]

Detailed Description

Root class for all GUI controls in Torque.

See also:
GUI for an overview of the Torque GUI system.

Introduction

GuiControl is the base class for GUI controls in Torque. It provides these basic areas of functionality:

The Graphical User Interface (GUI) has an overview of the GUI system.


Control State

GuiControlProfilemProfile
GuiControlProfilemTooltipProfile
S32 mTipHoverTime
bool mVisible
bool mActive
bool mAwake
bool mSetFirstResponder
bool mCanSave
S32 mLayer
RectI mBounds
Point2I mMinExtent
StringTableEntry mLangTableName
LangTablemLangTable
static bool smDesignTime
 static GuiControl boolean that specifies if the GUI Editor is active

Keyboard Input

GuiControlmFirstResponder
static GuiControlsmPrevResponder
static GuiControlsmCurResponder

Design Time Editor Access

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

Control State

S32 mHorizSizing
 Set from horizSizingOptions.
S32 mVertSizing
 Set from vertSizingOptions.
StringTableEntry mConsoleVariable
StringTableEntry mConsoleCommand
StringTableEntry mAltConsoleCommand
StringTableEntry mAcceleratorKey
StringTableEntry mTooltip

Console

The console variable collection of functions allows a console variable to be bound to the GUI control.

This allows, say, an edit field to be bound to '$foo'. The value of the console variable '$foo' would then be equal to the text inside the text field. Changing either changes the other.

void setVariable (const char *value)
 Sets the value of the console variable bound to this control.
void setIntVariable (S32 value)
 Sets the value of the console variable bound to this control.
void setFloatVariable (F32 value)
 Sets the value of the console variable bound to this control.
const char * getVariable ()
 Returns value of control's bound variable as a string.
S32 getIntVariable ()
 Returns value of control's bound variable as a integer.
F32 getFloatVariable ()
 Returns value of control's bound variable as a float.
void setConsoleVariable (const char *variable)
 Set the name of the console variable which this GuiObject is bound to.
void setConsoleCommand (const char *newCmd)
 Set the name of the console function bound to, such as a script function a button calls when clicked.
const char * getConsoleCommand ()
 Returns the name of the function bound to this GuiControl.
LangTablegetGUILangTable (void)
const UTF8getGUIString (S32 id)

Editor

These functions are used by the GUI Editor

void setSizing (S32 horz, S32 vert)
 Sets the size of the GuiControl.
void write (Stream &stream, U32 tabStop, U32 flags)
 Overrides Parent Serialization to allow specific controls to not be saved (Dynamic Controls, etc).
bool getCanSave ()
 Returns boolean specifying if a control can be serialized.
void setCanSave (bool bCanSave)
 Set serialization flag.
bool getCanSaveParent ()
 Returns boolean as to whether any parent of this control has the 'no serialization' flag set.

Initialization

 DECLARE_CONOBJECT (GuiControl)
 GuiControl ()
virtual ~GuiControl ()
static void initPersistFields ()
 Register dynamic fields in a subclass of ConsoleObject.

Accessors

const Point2IgetPosition ()
 Returns position of the control.
const Point2IgetExtent ()
 Returns extents of the control.
const RectIgetBounds ()
 Returns the bounds of the control.
const Point2IgetMinExtent ()
 Returns minimum size the control can be.
const S32 getLeft ()
 Returns the X position of the control.
const S32 getTop ()
 Returns the Y position of the control.
const S32 getWidth ()
 Returns the width of the control.
const S32 getHeight ()
 Returns the height of the control.

Flags

virtual void setVisible (bool value)
 Sets the visibility of the control.
bool isVisible ()
 Returns true if the object is visible.
void setActive (bool value)
 Sets the status of this control as active and responding or inactive.
bool isActive ()
 Returns true if this control is active.
bool isAwake ()
 Returns true if this control is awake.

Children

void addObject (SimObject *obj)
 Adds an object as a child of this object.
void removeObject (SimObject *obj)
 Removes a child object from this control.
GuiControlgetParent ()
 Returns the control which owns this one.
GuiCanvasgetRoot ()
 Returns the root canvas of this control.

Coordinates

Point2I localToGlobalCoord (const Point2I &src)
 Translates local coordinates (wrt this object) into global coordinates.
Point2I globalToLocalCoord (const Point2I &src)
 Returns global coordinates translated into local space.

Resizing

virtual void resize (const Point2I &newPosition, const Point2I &newExtent)
 Changes the size and/or position of this control.
virtual void setPosition (const Point2I &newPosition)
 Changes the position of this control.
virtual void setExtent (const Point2I &newExtent)
 Changes the size of this control.
virtual void setBounds (const RectI &newBounds)
 Changes the bounds of this control.
virtual void setLeft (S32 newLeft)
 Changes the X position of this control.
virtual void setTop (S32 newTop)
 Changes the Y position of this control.
virtual void setWidth (S32 newWidth)
 Changes the width of this control.
virtual void setHeight (S32 newHeight)
 Changes the height of this control.
virtual void childResized (GuiControl *child)
 Called when a child control of the object is resized.
virtual void parentResized (const Point2I &oldParentExtent, const Point2I &newParentExtent)
 Called when this objects parent is resized.

Rendering

virtual void onRender (Point2I offset, const RectI &updateRect)
 Called when this control is to render itself.
virtual bool renderTooltip (Point2I cursorPos, const char *tipText=NULL)
void renderChildControls (Point2I offset, const RectI &updateRect)
 Called when this control should render its children.
void setUpdateRegion (Point2I pos, Point2I ext)
 Sets the area (local coordinates) this control wants refreshed each frame.
virtual void setUpdate ()
 Sets the update area of the control to encompass the whole control.

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.
virtual void onSleep ()
 Called when this object is asked to sleep.
virtual void onPreRender ()
 Do special pre-render proecessing.
virtual void onRemove ()
 Called when this object is removed.
virtual void onChildRemoved (GuiControl *child)
 Called when one of this objects children is removed.
bool onAdd ()
 Called when this object is added to the scene.
virtual void onChildAdded (GuiControl *child)
 Called when this object has a new child.

Console

virtual const char * getScriptValue ()
 Returns the value of the variable bound to this object.
virtual void setScriptValue (const char *value)
 Sets the value of the variable bound to this object.

Input (Keyboard/Mouse)

virtual bool pointInControl (const Point2I &parentCoordPoint)
 This function will return true if the provided coordinates (wrt parent object) are within the bounds of this control.
bool cursorInControl ()
 Returns true if the global cursor is inside this control.
virtual GuiControlfindHitControl (const Point2I &pt, S32 initialLayer=-1)
 Returns the control which the provided point is under, with layering.
void mouseLock (GuiControl *lockingControl)
 Lock the mouse within the provided control.
void mouseLock ()
 Turn on mouse locking with last used lock control.
void mouseUnlock ()
 Unlock the mouse.
bool isMouseLocked ()
 Returns true if the mouse is locked.

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)
 Called when a mouseDown event occurs on a control and the GUI editor is active.
virtual bool onMouseUpEditor (const GuiEvent &event, Point2I offset)
 Called when a mouseUp event occurs on a control and the GUI editor is active.
virtual bool onRightMouseDownEditor (const GuiEvent &event, Point2I offset)
 Called when a rightMouseDown event occurs on a control and the GUI editor is active.
virtual bool onMouseDraggedEditor (const GuiEvent &event, Point2I offset)
 Called when a mouseDragged event occurs on a control and the GUI editor is active.

Tabs

virtual GuiControlfindFirstTabable ()
 Find the first tab-accessable child of this control.
virtual GuiControlfindLastTabable (bool firstCall=true)
 Find the last tab-accessable child of this control.
virtual GuiControlfindPrevTabable (GuiControl *curResponder, bool firstCall=true)
 Find previous tab-accessable control with respect to the provided one.
virtual GuiControlfindNextTabable (GuiControl *curResponder, bool firstCall=true)
 Find next tab-accessable control with regards to the provided control.

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)
 Sets the first responder for child controls.
virtual void makeFirstResponder (bool value)
 Sets up this control to be the first in it's group to respond to an input event.
bool isFirstResponder ()
 Returns true if this control is a first responder.
virtual void setFirstResponder ()
 Sets this object to be a first responder.
void clearFirstResponder ()
 Clears the first responder for this chain.
GuiControlgetFirstResponder ()
 Returns the first responder for this chain.
virtual void onLoseFirstResponder ()
 Occurs when the first responder for this chain is lost.

Keyboard Events

void addAcceleratorKey ()
 Adds the accelerator key for this object to the canvas.
virtual void buildAcceleratorMap ()
 Adds this control's accelerator key to the accelerator map, and recursively tells all children to do the same.
virtual void acceleratorKeyPress (U32 index)
 Occurs when the accelerator key for this control is pressed.
virtual void acceleratorKeyRelease (U32 index)
 Occurs when the accelerator key for this control is released.
virtual bool onKeyDown (const GuiEvent &event)
 Happens when a key is depressed.
virtual bool onKeyUp (const GuiEvent &event)
 Happens when a key is released.
virtual bool onKeyRepeat (const GuiEvent &event)
 Happens when a key is held down, resulting in repeated keystrokes.

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.
virtual void onMessage (GuiControl *sender, S32 msg)
 Receive a message from another control.

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.
virtual void onDialogPop ()
 Called if this object is a dialog, when it is removed from the visible layers.

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)
 Get information about the size of a scroll line.
virtual void getCursor (GuiCursor *&cursor, bool &showCursor, const GuiEvent &lastGuiEvent)
 Get information about the cursor.
void awaken ()
 Called when this control and its children have been wired up.
void sleep ()
 Called when this control is no more.
void preRender ()
 Prerender this control and all its children.
virtual bool onInputEvent (const InputEvent &event)
 General input handler.
virtual bool ControlIsChild (GuiControl *child)
 Returns true if the provided control is a child (grandchild, or greatgrandchild) of this one.
void setControlProfile (GuiControlProfile *prof)
 Sets the control profile for this control.
virtual void onAction ()
 Occurs when this control performs its "action".
void renderJustifiedText (Point2I offset, Point2I extent, const char *text)
 Renders justified text using the profile.
void inspectPostApply ()
 Called after any property of the object is changed in the world editor.
void inspectPreApply ()
 Called before any property of the object is changed in the world editor.

Private Types

typedef SimGroup Parent

Private Attributes

StringTableEntry mClassName
StringTableEntry mSuperClassName


Member Typedef Documentation


Member Enumeration Documentation

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

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 GuiControl::~GuiControl (  )  [virtual]


Member Function Documentation

void GuiControl::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 GuiControl::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 GuiControl::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

const char* GuiControl::getVariable (  )  [protected]

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

S32 GuiControl::getIntVariable (  )  [protected]

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

F32 GuiControl::getFloatVariable (  )  [protected]

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

void GuiControl::setConsoleVariable ( const char *  variable  ) 

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

Parameters:
variable Variable name

void GuiControl::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

const char* GuiControl::getConsoleCommand (  ) 

Returns the name of the function bound to this GuiControl.

LangTable* GuiControl::getGUILangTable ( void   ) 

const UTF8* GuiControl::getGUIString ( S32  id  ) 

void GuiControl::setSizing ( S32  horz,
S32  vert 
)

Sets the size of the GuiControl.

Parameters:
horz Width of the control
vert Height of the control

void GuiControl::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.

bool GuiControl::getCanSave (  ) 

Returns boolean specifying if a control can be serialized.

void GuiControl::setCanSave ( bool  bCanSave  ) 

Set serialization flag.

bool GuiControl::getCanSaveParent (  ) 

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

GuiControl::DECLARE_CONOBJECT ( GuiControl   ) 

const Point2I& GuiControl::getPosition (  )  [inline]

Returns position of the control.

const Point2I& GuiControl::getExtent (  )  [inline]

Returns extents of the control.

const RectI& GuiControl::getBounds (  )  [inline]

Returns the bounds of the control.

const Point2I& GuiControl::getMinExtent (  )  [inline]

Returns minimum size the control can be.

const S32 GuiControl::getLeft (  )  [inline]

Returns the X position of the control.

const S32 GuiControl::getTop (  )  [inline]

Returns the Y position of the control.

const S32 GuiControl::getWidth (  )  [inline]

Returns the width of the control.

const S32 GuiControl::getHeight (  )  [inline]

Returns the height of the control.

virtual void GuiControl::setVisible ( bool  value  )  [virtual]

Sets the visibility of the control.

Parameters:
value True if object should be visible

bool GuiControl::isVisible (  )  [inline]

Returns true if the object is visible.

void GuiControl::setActive ( bool  value  ) 

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

Parameters:
value True if this is active

bool GuiControl::isActive (  )  [inline]

Returns true if this control is active.

bool GuiControl::isAwake (  )  [inline]

Returns true if this control is awake.

virtual void GuiControl::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

virtual void GuiControl::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 EditTSCtrl, MissionAreaEditor, TerrainEditor, GuiFrameSetCtrl, GuiWindowCtrl, GuiTextEditCtrl, and GuiEditCtrl.

void GuiControl::addObject ( SimObject obj  )  [virtual]

Adds an object as a child of this object.

Parameters:
obj New child object of this control

Reimplemented from SimGroup.

Reimplemented in GuiFrameSetCtrl, GuiScrollCtrl, and GuiStackControl.

void GuiControl::removeObject ( SimObject obj  )  [virtual]

Removes a child object from this control.

Parameters:
obj Object to remove from this control

Reimplemented from SimGroup.

Reimplemented in GuiFrameSetCtrl, and GuiStackControl.

GuiControl* GuiControl::getParent (  ) 

Returns the control which owns this one.

GuiCanvas* GuiControl::getRoot (  ) 

Returns the root canvas of this control.

Reimplemented in GuiTerrPreviewCtrl.

Point2I GuiControl::localToGlobalCoord ( const Point2I src  ) 

Translates local coordinates (wrt this object) into global coordinates.

Parameters:
src Local coordinates to translate

Point2I GuiControl::globalToLocalCoord ( const Point2I src  ) 

Returns global coordinates translated into local space.

Parameters:
src Global coordinates to translate

virtual void GuiControl::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 GuiControlArrayControl, GuiFrameSetCtrl, GuiPaneControl, GuiScrollCtrl, GuiStackControl, GuiTabBookCtrl, GuiWindowCtrl, GuiMLTextCtrl, GuiMLTextEditCtrl, GuiInspectorField, GuiInspectorGroup, GuiInspectorDynamicField, GuiInspectorTypeFileName, GuiInspectorTypeColor, and GuiVectorFieldCtrl.

virtual void GuiControl::setPosition ( const Point2I newPosition  )  [virtual]

Changes the position of this control.

Parameters:
newPosition New position of this control

virtual void GuiControl::setExtent ( const Point2I newExtent  )  [virtual]

Changes the size of this control.

Parameters:
newExtent New size of this control

virtual void GuiControl::setBounds ( const RectI newBounds  )  [virtual]

Changes the bounds of this control.

Parameters:
newBounds New bounds of this control

virtual void GuiControl::setLeft ( S32  newLeft  )  [virtual]

Changes the X position of this control.

Parameters:
newXPosition New X Position of this control

virtual void GuiControl::setTop ( S32  newTop  )  [virtual]

Changes the Y position of this control.

Parameters:
newYPosition New Y Position of this control

virtual void GuiControl::setWidth ( S32  newWidth  )  [virtual]

Changes the width of this control.

Parameters:
newWidth New width of this control

virtual void GuiControl::setHeight ( S32  newHeight  )  [virtual]

Changes the height of this control.

Parameters:
newHeight New Height of this control

virtual void GuiControl::childResized ( GuiControl child  )  [virtual]

Called when a child control of the object is resized.

Parameters:
child Child object

Reimplemented in GuiScrollCtrl, GuiStackControl, and GuiTabBookCtrl.

virtual void GuiControl::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 MissionAreaEditor, GuiListBoxCtrl, GuiMLTextCtrl, GuiTextEditCtrl, GuiInspector, and GuiMessageVectorCtrl.

virtual bool GuiControl::renderTooltip ( Point2I  cursorPos,
const char *  tipText = NULL 
) [virtual]

void GuiControl::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 GuiControl::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

virtual void GuiControl::setUpdate (  )  [virtual]

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

Reimplemented in GuiTabBookCtrl.

void GuiControl::awaken (  ) 

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

void GuiControl::sleep (  ) 

Called when this control is no more.

void GuiControl::preRender (  ) 

Prerender this control and all its children.

virtual void GuiControl::onRemove (  )  [virtual]

Called when this object is removed.

Reimplemented from SimGroup.

Reimplemented in GuiTabBookCtrl, GuiTextListCtrl, GuiMessageVectorCtrl, and GuiVectorFieldCtrl.

virtual void GuiControl::onChildRemoved ( GuiControl child  )  [virtual]

Called when one of this objects children is removed.

Reimplemented in GuiTabBookCtrl.

virtual void GuiControl::onChildAdded ( GuiControl child  )  [virtual]

Called when this object has a new child.

Reimplemented in GuiTabBookCtrl.

virtual const char* GuiControl::getScriptValue (  )  [virtual]

virtual void GuiControl::setScriptValue ( const char *  value  )  [virtual]

Sets the value of the variable bound to this object.

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

virtual bool GuiControl::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.

bool GuiControl::cursorInControl (  ) 

Returns true if the global cursor is inside this control.

virtual GuiControl* 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.

void GuiControl::mouseLock ( GuiControl lockingControl  ) 

Lock the mouse within the provided control.

Parameters:
lockingControl Control to lock the mouse within

Reimplemented in GuiCanvas.

void GuiControl::mouseLock (  ) 

Turn on mouse locking with last used lock control.

void GuiControl::mouseUnlock (  ) 

Unlock the mouse.

bool GuiControl::isMouseLocked (  ) 

Returns true if the mouse is locked.

virtual bool GuiControl::onInputEvent ( const InputEvent event  )  [virtual]

General input handler.

Reimplemented in EditTSCtrl, and GuiInputCtrl.

virtual bool GuiControl::onMouseWheelUp ( const GuiEvent event  )  [virtual]

Reimplemented in GuiScrollCtrl.

virtual bool GuiControl::onMouseWheelDown ( const GuiEvent event  )  [virtual]

Reimplemented in GuiScrollCtrl.

virtual void GuiControl::onRightMouseDown ( const GuiEvent event  )  [virtual]

virtual void GuiControl::onRightMouseUp ( const GuiEvent event  )  [virtual]

virtual void GuiControl::onRightMouseDragged ( const GuiEvent event  )  [virtual]

Reimplemented in EditTSCtrl, GuiPlayerView, and GuiMouseEventCtrl.

virtual void GuiControl::onMiddleMouseDown ( const GuiEvent event  )  [virtual]

Reimplemented in GuiTreeViewCtrl.

virtual void GuiControl::onMiddleMouseUp ( const GuiEvent event  )  [virtual]

virtual void GuiControl::onMiddleMouseDragged ( const GuiEvent event  )  [virtual]

virtual bool GuiControl::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.

virtual bool GuiControl::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

virtual bool GuiControl::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

virtual bool GuiControl::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

virtual GuiControl* GuiControl::findFirstTabable (  )  [virtual]

Find the first tab-accessable child of this control.

virtual GuiControl* 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

virtual GuiControl* 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.

virtual GuiControl* 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.

virtual bool GuiControl::ControlIsChild ( GuiControl child  )  [virtual]

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

Parameters:
child Control to test

virtual void GuiControl::setFirstResponder ( GuiControl firstResponder  )  [virtual]

Sets the first responder for child controls.

Parameters:
firstResponder First responder for this chain

Reimplemented in GuiCanvas.

virtual void GuiControl::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

bool GuiControl::isFirstResponder (  ) 

Returns true if this control is a first responder.

virtual void GuiControl::setFirstResponder (  )  [virtual]

Sets this object to be a first responder.

Reimplemented in GuiTextEditCtrl.

void GuiControl::clearFirstResponder (  ) 

Clears the first responder for this chain.

GuiControl* GuiControl::getFirstResponder (  )  [inline]

Returns the first responder for this chain.

virtual void GuiControl::onLoseFirstResponder (  )  [virtual]

Occurs when the first responder for this chain is lost.

Reimplemented in GuiTextEditCtrl.

void GuiControl::addAcceleratorKey (  ) 

Adds the accelerator key for this object to the canvas.

virtual void GuiControl::buildAcceleratorMap (  )  [virtual]

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

Reimplemented in GuiMenuBar.

virtual void GuiControl::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 GuiButtonBaseCtrl, and GuiMenuBar.

virtual void GuiControl::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.

virtual bool GuiControl::onKeyDown ( const GuiEvent event  )  [virtual]

virtual bool GuiControl::onKeyUp ( const GuiEvent event  )  [virtual]

Happens when a key is released.

Parameters:
event Event descriptor (which contains the key)

Reimplemented in GuiButtonBaseCtrl.

virtual bool GuiControl::onKeyRepeat ( const GuiEvent event  )  [virtual]

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

Parameters:
event Event descriptor (which contains the key)

void GuiControl::setControlProfile ( GuiControlProfile prof  ) 

Sets the control profile for this control.

See also:
GuiControlProfile
Parameters:
prof Control profile to apply

virtual void GuiControl::onAction (  )  [virtual]

Occurs when this control performs its "action".

Reimplemented in GuiButtonBaseCtrl, GuiCheckBoxCtrl, GuiPopUpMenuCtrl, and GuiMenuBar.

void GuiControl::messageSiblings ( S32  message  ) 

Send a message to all siblings.

virtual void GuiControl::onMessage ( GuiControl sender,
S32  msg 
) [virtual]

Receive a message from another control.

Reimplemented in GuiButtonBaseCtrl.

virtual void GuiControl::onDialogPush (  )  [virtual]

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

virtual void GuiControl::onDialogPop (  )  [virtual]

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

void GuiControl::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

void GuiControl::inspectPostApply (  )  [virtual]

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

See also:
inspectPreApply

Reimplemented from SimObject.

Reimplemented in GuiControlArrayControl, GuiBitmapButtonCtrl, GuiBitmapCtrl, GuiMLTextCtrl, GuiTextCtrl, GuiMessageVectorCtrl, and GuiTheoraCtrl.

void GuiControl::inspectPreApply (  )  [virtual]

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

The calling order here is:

Reimplemented from SimObject.


Field Documentation

bool GuiControl::smDesignTime [static]

static GuiControl boolean that specifies if the GUI Editor is active

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

Set from horizSizingOptions.

Set from vertSizingOptions.




All Rights Reserved GarageGames.com, Inc. 1999-2005
Auto-magically Generated with Doxygen