Torque2D Reference
Loading...
Searching...
No Matches
Classes | Public Member Functions | Static Public Member Functions | Protected Types | Protected Attributes | List of all members
GuiCanvas Class Reference

#include <guiCanvas.h>

+ Inheritance diagram for GuiCanvas:

Classes

struct  AccKeyMap
 Accelerator key map. More...
 

Public Member Functions

 DECLARE_CONOBJECT (GuiCanvas)
 
 GuiCanvas ()
 
virtual ~GuiCanvas ()
 
void setBackgroundColor (const ColorF &backgroundColor)
 Background color.
 
const ColorFgetBackgroundColor (void) const
 
void setUseBackgroundColor (const bool useBackgroundColor)
 
bool getUseBackgroundColor (void) const
 
virtual void setRenderFront (bool front)
 
Point2I getCursorExtent ()
 
virtual bool isEditMode ()
 
Rendering methods
virtual void renderFrame (bool preRenderOnly, bool bufferSwap=true)
 
virtual void paint ()
 Repaints the entire canvas by calling resetUpdateRegions() and then renderFrame()
 
virtual void addUpdateRegion (Point2I pos, Point2I ext)
 
virtual void resetUpdateRegions ()
 
void maintainSizing ()
 Resizes the content control to match the canvas size.
 
virtual void buildUpdateUnion (RectI *updateUnion)
 
virtual void swapBuffers ()
 
Canvas Content Management
virtual void setContentControl (GuiControl *gui)
 
virtual GuiControlgetContentControl ()
 Returns the content control.
 
virtual void pushDialogControl (GuiControl *gui, S32 layer=0)
 
virtual void popDialogControl (S32 layer=0)
 
virtual void popDialogControl (GuiControl *gui)
 
Cursor commands

A cursor can be on, but not be shown. If a cursor is not on, than it does not process input.

virtual void setCursor (GuiCursor *cursor)
 
virtual bool getUseNativeCursor (void)
 
virtual void useNativeCursor (bool useNative)
 
virtual bool isCursorON ()
 Returns true if the cursor is on.
 
void setDoubleClickTime (S32 time)
 Sets the time allowed between clicks to be considered a double click.
 
void setDoubleClickWidth (S32 width)
 Sets the amount of movement allowed that won't cancel a double click.
 
void setDoubleClickHeight (S32 height)
 
virtual void setCursorON (bool onOff)
 
virtual void setCursorPos (const Point2I &pt)
 
virtual Point2I getCursorPos ()
 Returns the point, in screenspace, at which the cursor is located.
 
virtual void showCursor (bool state)
 
virtual bool isCursorShown ()
 Returns true if the cursor is being rendered.
 
Input Processing
virtual bool processInputEvent (const InputEvent *event)
 
virtual void processMouseMoveEvent (const MouseMoveEvent *event)
 
virtual void processScreenTouchEvent (const ScreenTouchEvent *event)
 
Mouse Methods
virtual void mouseLock (GuiControl *lockingControl)
 
virtual void mouseUnlock (GuiControl *lockingControl)
 
virtual GuiControlgetMouseControl ()
 Returns the control which the mouse is over.
 
virtual GuiControlgetMouseLockedControl ()
 Returns the control which the mouse is locked to if any.
 
virtual bool mouseButtonDown (void)
 Returns true if the left mouse button is down.
 
virtual bool mouseRightButtonDown (void)
 Returns true if the right mouse button is down.
 
virtual void checkLockMouseMove (const GuiEvent &event)
 
Mouse input methods

These events process the events before passing them down to the controls they effect. This allows for things such as the input locking and such.

Each of these methods corosponds to the action in it's method name and processes the GuiEvent passd as a parameter

virtual void rootMouseUp (const GuiEvent &event)
 
virtual void rootMouseDown (const GuiEvent &event)
 
virtual void rootMouseMove (const GuiEvent &event)
 
virtual void rootMouseDragged (const GuiEvent &event)
 
virtual void rootScreenTouchUp (const GuiEvent &event)
 
virtual void rootScreenTouchDown (const GuiEvent &event)
 
virtual void rootScreenTouchMove (const GuiEvent &event)
 
virtual void rootRightMouseDown (const GuiEvent &event)
 
virtual void rootRightMouseUp (const GuiEvent &event)
 
virtual void rootRightMouseDragged (const GuiEvent &event)
 
virtual void rootMiddleMouseDown (const GuiEvent &event)
 
virtual void rootMiddleMouseUp (const GuiEvent &event)
 
virtual void rootMiddleMouseDragged (const GuiEvent &event)
 
virtual void rootMouseWheelUp (const GuiEvent &event)
 
virtual void rootMouseWheelDown (const GuiEvent &event)
 
Keyboard input methods

First responders

A first responder is a the GuiControl which responds first to input events before passing them off for further processing.

virtual bool tabNext (void)
 Moves the first responder to the next tabable controle.
 
virtual bool tabPrev (void)
 Moves the first responder to the previous tabable control.
 
virtual void addAcceleratorKey (GuiControl *ctrl, U32 index, U32 keyCode, U32 modifier)
 
virtual void onFocus (bool foundFirstResponder)
 
virtual void setFirstResponder (GuiControl *firstResponder)
 
- Public Member Functions inherited from GuiControl
virtual bool isEditSelected ()
 
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.
 
void sleep ()
 Called when this control is no more.
 
void preRender ()
 Prerender this control and all its children.
 
bool sendScriptMouseEvent (const char *name, const GuiEvent &event)
 
bool sendScriptKeyEvent (const char *name, const InputEvent &event)
 
virtual bool onInputEvent (const InputEvent &event)
 General input handler.
 
virtual bool ControlIsChild (GuiControl *child)
 
virtual void setControlProfile (GuiControlProfile *prof)
 
virtual void onAction ()
 Occurs when this control performs its "action".
 
void renderText (const Point2I &offset, const Point2I &extent, const char *text, GuiControlProfile *profile, TextRotationOptions rot=tRotateNone)
 
virtual void renderLineList (const Point2I &offset, const Point2I &extent, const S32 startOffsetY, const vector< string > lineList, GuiControlProfile *profile, const TextRotationOptions rot=tRotateNone)
 
virtual vector< string > getLineList (const char *text, GuiControlProfile *profile, S32 totalWidth)
 
virtual void renderTextLine (const Point2I &startPoint, const string line, GuiControlProfile *profile, F32 rotationInDegrees, U32 ibeamPosAtLineStart, U32 lineNumber)
 
RectI applyMargins (Point2I &offset, Point2I &extent, GuiControlState currentState, GuiControlProfile *profile)
 Returns a new rect based on the margins.
 
RectI applyBorders (Point2I &offset, Point2I &extent, GuiControlState currentState, GuiControlProfile *profile)
 Returns the bounds of the rect after considering the borders.
 
RectI applyPadding (Point2I &offset, Point2I &extent, GuiControlState currentState, GuiControlProfile *profile)
 Returns the bounds of the rect this time with padding.
 
RectI getInnerRect (GuiControlState currentState=GuiControlState::NormalState)
 Returns the bounds of the rect with margin, borders, and padding applied.
 
RectI getInnerRect (Point2I &offset, GuiControlState currentState=GuiControlState::NormalState)
 
virtual RectI getInnerRect (Point2I &offset, Point2I &extent, GuiControlState currentState, GuiControlProfile *profile)
 
Point2I getOuterExtent (Point2I &innerExtent, GuiControlState currentState, GuiControlProfile *profile)
 Returns the extent of the outer rect given the extent of the inner rect.
 
S32 getOuterWidth (S32 innerExtent, GuiControlState currentState, GuiControlProfile *profile)
 
S32 getOuterHeight (S32 innerExtent, GuiControlState currentState, GuiControlProfile *profile)
 
virtual void inspectPostApply ()
 
virtual void inspectPreApply ()
 
Point2I extentBattery (Point2I &newExtent)
 
void resetStoredExtent ()
 
Point2F relPosBatteryH (S32 pos, S32 ext, S32 parentExt)
 
Point2F relPosBatteryV (S32 pos, S32 ext, S32 parentExt)
 
void relPosBattery (Point2F &battery, S32 pos, S32 ext, S32 parentExt)
 
void resetStoredRelPos ()
 
virtual void setDataField (StringTableEntry slotName, const char *array, const char *value)
 
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)
 
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.
 
virtual void setVisible (bool value)
 
bool isVisible ()
 Returns true if the object is visible.
 
virtual void setActive (bool value)
 
bool isActive ()
 Returns true if this control is active.
 
bool isAwake ()
 Returns true if this control is awake.
 
virtual void addObject (SimObject *obj)
 
void removeObject (SimObject *obj)
 
GuiControlgetParent ()
 Returns the control which owns this one.
 
GuiCanvasgetRoot ()
 Returns the root canvas of this control.
 
virtual Point2I localToGlobalCoord (const Point2I &src)
 
virtual Point2I globalToLocalCoord (const Point2I &src)
 
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 childMoved (GuiControl *child)
 
virtual void childrenReordered ()
 Called when the children of this control may have been reordered.
 
virtual void parentResized (const Point2I &oldParentExtent, const Point2I &newParentExtent)
 
void preventResizeModeFill ()
 Removes the resize mode of fill and changes it to right or bottom.
 
void preventResizeModeCenter ()
 Removes the resize mode of center and changes it to right or bottom.
 
virtual void onRender (Point2I offset, const RectI &updateRect)
 
virtual bool renderTooltip (Point2I &cursorPos, const char *tipText=NULL)
 
virtual void renderChildControls (const Point2I &offset, const RectI &content, const RectI &updateRect)
 
virtual void renderChild (GuiControl *ctrl, const Point2I &offset, const RectI &content, const RectI &clipRect)
 Renders a single child control.
 
void setUpdateRegion (Point2I pos, Point2I ext)
 
virtual void setUpdate ()
 Sets the update area of the control to encompass the whole control.
 
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 using delete.
 
virtual void onGroupRemove ()
 Called when this object is removed using delete or parent.remove().
 
virtual bool onAdd ()
 Called when this object is added to the scene.
 
virtual void onChildAdded (GuiControl *child)
 Called when this object has a new child. Congratulations!
 
virtual void onChildRemoved (GuiControl *child)
 Called when a child is removed.
 
virtual bool pointInControl (const Point2I &parentCoordPoint)
 
bool cursorInControl ()
 Returns true if the global cursor is inside this control.
 
virtual GuiControlfindHitControl (const Point2I &pt, S32 initialLayer=-1)
 
virtual void mouseLock ()
 Turn on mouse locking with last used lock control.
 
virtual void mouseUnlock ()
 Unlock the mouse.
 
virtual bool isMouseLocked ()
 Returns true if the mouse is locked.
 
virtual void onTouchUp (const GuiEvent &event)
 
virtual void onTouchDown (const GuiEvent &event)
 
virtual void onTouchMove (const GuiEvent &event)
 
virtual void onTouchDragged (const GuiEvent &event)
 
virtual void onTouchEnter (const GuiEvent &event)
 
virtual void onTouchLeave (const GuiEvent &event)
 
virtual void onMouseWheelUp (const GuiEvent &event)
 
virtual void 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)
 
virtual bool onMouseDownEditor (const GuiEvent &event, const Point2I &offset)
 
virtual bool onMouseUpEditor (const GuiEvent &event, const Point2I &offset)
 
virtual bool onRightMouseDownEditor (const GuiEvent &event, const Point2I &offset)
 
virtual bool onMouseDraggedEditor (const GuiEvent &event, const Point2I &offset)
 
virtual GuiControlfindFirstTabable ()
 Find the first tab-accessable child of this control.
 
virtual GuiControlfindLastTabable (bool firstCall=true)
 
virtual GuiControlfindPrevTabable (GuiControl *curResponder, bool firstCall=true)
 
virtual GuiControlfindNextTabable (GuiControl *curResponder, bool firstCall=true)
 
virtual void makeFirstResponder (bool value)
 
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.
 
void clearFirstResponder (GuiControl *target)
 
GuiControlgetFirstResponder ()
 Returns the first responder for this chain.
 
virtual void onLoseFirstResponder ()
 Occurs when the first responder for this chain is lost.
 
void addAcceleratorKey ()
 Adds the accelerator key for this object to the canvas.
 
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)
 
void messageSiblings (S32 message)
 Send a message to all siblings.
 
virtual void onMessage (GuiControl *sender, S32 msg)
 Receive a message from another control.
 
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.
 
void setConsoleVariable (const char *variable)
 
void setConsoleCommand (const char *newCmd)
 
const char * getConsoleCommand ()
 Returns the name of the function bound to this GuiControl.
 
LangTablegetGUILangTable (void)
 
const UTF8 * getGUIString (S32 id)
 
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.
 
 DECLARE_CONOBJECT (GuiControl)
 
 GuiControl ()
 
virtual ~GuiControl ()
 
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.
 
virtual void setText (const char *text)
 
virtual void setTextID (S32 id)
 
virtual void setTextID (const char *id)
 
virtual const char * getText ()
 
void setTextWrap (const bool wrap)
 
bool getTextWrap ()
 
void setTextExtend (const bool extend)
 
bool getTextExtend ()
 
const horizSizingOptions getHorizSizing ()
 
const vertSizingOptions getVertSizing ()
 
void setHorizSizing (const horizSizingOptions sizing)
 
void setVertSizing (const vertSizingOptions sizing)
 
- Public Member Functions inherited from SimGroup
 ~SimGroup ()
 
void addObject (SimObject *, SimObjectId)
 
void addObject (SimObject *, const char *name)
 
virtual void onChildRemoved (SimObject *)
 
virtual SimObjectfindObject (const char *name)
 Find an object in the group.
 
bool processArguments (S32 argc, const char **argv)
 Process constructor options. (ie, new SimObject(1,2,3))
 
 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.
 
virtual SimObjectgetTamlChild (const U32 childIndex) const
 Called when Taml attempts to compile a list of children.
 
virtual void addTamlChild (SimObject *pSimObject)
 Called when Taml attempts to populate an objects children during a read.
 
void callOnChildren (const char *method, S32 argc, const char *argv[], bool executeOnChildGroups=true)
 
SimObjectfindObjectByInternalName (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.
 
void bringObjectToFront (SimObject *obj)
 
void pushObjectToBack (SimObject *obj)
 
SimObjectfront ()
 
SimObjectfirst ()
 
SimObjectlast ()
 
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)
 
bool isMember (SimObject *obj)
 
virtual bool reOrder (SimObject *obj, SimObject *target=0)
 
SimObjectat (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)
 
NamespacegetNamespace ()
 Return the object's namespace.
 
const char * tabComplete (const char *prevText, S32 baseLen, bool)
 
virtual void dump ()
 
virtual void dumpClassHierarchy ()
 
SimObjectclone (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)
 
NotifyremoveNotify (void *ptr, Notify::Type)
 Remove a notification from the list.
 
void deleteNotify (SimObject *obj)
 Notify an object when we are deleted.
 
void clearNotify (SimObject *obj)
 Notify an object when we are cleared.
 
void clearAllNotifications ()
 Remove all notifications for this object.
 
void processDeleteNotifies ()
 Send out deletion notifications.
 
void registerReference (SimObject **obj)
 
void unregisterReference (SimObject **obj)
 
void addListener (std::string objID)
 
void removeListener (std::string objID)
 
void removeAllListeners ()
 
void postEvent (std::string eventName, std::string data)
 
const char * getDataField (StringTableEntry slotName, const char *array)
 
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)
 
SimFieldDictionarygetFieldDictionary ()
 
void clearDynamicFields (void)
 Clear all dynamic fields.
 
void setCanSaveDynamicFields (bool bCanSave)
 Set whether fields created at runtime should be saved. Default is true.
 
bool getCanSaveDynamicFields (void) const
 Get whether fields created at runtime should be saved. Default is true.
 
void setInternalName (const char *newname)
 
StringTableEntry getInternalName ()
 Get the internal of of this control.
 
virtual bool save (const char *pcFilePath, bool bOnlySelected=false)
 Save object as a TorqueScript File.
 
virtual bool isMethod (const char *methodName)
 Check if a method exists in the objects current namespace.
 
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)
 
SimGroupgetGroup () const
 
bool isChildOfGroup (SimGroup *pGroup)
 
bool isProperlyAdded () const
 
bool isDeleted () const
 
bool isRemoved () const
 
bool isLocked () const
 
void setLocked (bool b)
 
bool isHidden () const
 
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.
 
virtual void onNameChange (const char *name)
 Called when the object's name is changed.
 
virtual void onStaticModified (const char *slotName, const char *newValue=NULL)
 
virtual void onEditorEnable ()
 Called when the editor is activated.
 
virtual void onEditorDisable ()
 Called when the editor is deactivated.
 
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::FieldfindField (StringTableEntry fieldName) const
 Get a reference to a field by name.
 
virtual AbstractClassRepgetClassRep () const
 Gets the ClassRep.
 
bool setField (const char *fieldName, const char *value)
 Set the value of a field.
 
virtual ~ConsoleObject ()
 
const AbstractClassRep::FieldListgetFieldList () const
 Get a list of all the fields. This information cannot be modified.
 
AbstractClassRep::FieldListgetModifiableFieldList ()
 
bool & getDynamicGroupExpand ()
 
S32 getClassId (U32 netClassGroup) const
 
const char * getClassName () const
 
- Public Member Functions inherited from Tickable
 Tickable ()
 
virtual ~Tickable ()
 
virtual bool isProcessingTicks () const
 
virtual void setProcessTicks (bool tick=true)
 

Static Public Member Functions

static void initPersistFields ()
 
- Static Public Member Functions inherited from GuiControl
static void initPersistFields ()
 
static bool setTextProperty (void *obj, const char *data)
 
static const char * getTextProperty (void *obj, const char *data)
 
static bool writeTextWrapFn (void *obj, const char *data)
 
static bool writeTextExtendFn (void *obj, const char *data)
 
static bool setExtentFn (void *obj, const char *data)
 
static bool setMinExtentFn (void *obj, const char *data)
 
static bool writeMinExtentFn (void *obj, const char *data)
 
static bool setPositionFn (void *obj, const char *data)
 
- 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.
 
static void initPersistFields ()
 
static void consoleInit ()
 
static AbstractClassRepgetStaticClassRep ()
 Get the abstract class information for this class.
 
static AbstractClassRepgetParentStaticClassRep ()
 Get the abstract class information for this class's superclass.
 
static ConsoleObjectcreate (const char *in_pClassName)
 
static ConsoleObjectcreate (const U32 groupId, const U32 typeId, const U32 in_classId)
 
- Static Public Member Functions inherited from Tickable
static bool advanceTime (U32 timeDelta)
 

Protected Types

typedef GuiControl Parent
 
typedef SimObject Grandparent
 

Protected Attributes

ColorF mBackgroundColor
 Background color.
 
bool mUseBackgroundColor
 
Rendering
RectI mOldUpdateRects [2]
 
RectI mCurUpdateRect
 
F32 rLastFrameTime
 
Cursor Properties
F32 mPixelsPerMickey
 
bool cursorON
 
bool mShowCursor
 
bool mRenderFront
 
Point2F cursorPt
 
Point2I lastCursorPt
 
GuiCursordefaultCursor
 
GuiCursorlastCursor
 
bool lastCursorON
 
bool mUseNativeCursor
 
Keyboard Input
GuiControlkeyboardControl
 All keyboard events will go to this ctrl first.
 
U32 nextKeyTime
 
Vector< AccKeyMapmAcceleratorMap
 
U32 hoverControlStart
 
GuiControlhoverControl
 
Point2I hoverPosition
 
bool hoverPositionSet
 
U32 hoverLeftControlTime
 
- Protected Attributes inherited from GuiControl
bool mPreviouslyAwake
 
S32 mHorizSizing
 Set from horizSizingOptions.
 
S32 mVertSizing
 Set from vertSizingOptions.
 
Point2I mStoredExtent
 
Point2F mStoredRelativePosH
 
Point2F mStoredRelativePosV
 
bool mUseRelPosH
 
bool mUseRelPosV
 
StringTableEntry mConsoleVariable
 
StringTableEntry mConsoleCommand
 
StringTableEntry mAltConsoleCommand
 
StringTableEntry mAcceleratorKey
 
StringTableEntry mTooltip
 
StringTableEntry mText
 
StringTableEntry mTextID
 
bool mTextWrap
 
bool mTextExtend
 
AlignmentType mAlignment
 
VertAlignmentType mVAlignment
 
F32 mFontSizeAdjust
 
ColorI mFontColor
 
bool mOverrideFontColor
 
- Protected Attributes inherited from SimSet
SimObjectList objectList
 
void * mMutex
 
- Protected Attributes inherited from SimObject
SimObjectId mId
 Id number for this object.
 
StringTableEntry mIdString
 
NamespacemNameSpace
 
U32 mTypeMask
 
S32 mScriptCallbackGuard
 Whether the object is executing a script callback.
 
bool mCanSaveFieldDictionary
 true if dynamic fields (added at runtime) should be saved, defaults to true
 
StringTableEntry mInternalName
 Stores object Internal Name.
 
StringTableEntry mClassName
 Stores the class name to link script class namespaces.
 
StringTableEntry mSuperClassName
 Stores super class name to link script class namespaces.
 

Mouse Input

SimObjectPtr< GuiControlmMouseCapturedControl
 All mouse events will go to this ctrl only.
 
SimObjectPtr< GuiControlmMouseControl
 the control the mouse was last seen in unless some other one captured it
 
bool mMouseControlClicked
 whether the current ctrl has been clicked - used by helpctrl
 
U32 mPrevMouseTime
 this determines how long the mouse has been in the same control
 
U32 mNextMouseTime
 used for onMouseRepeat()
 
U32 mInitialMouseDelay
 also used for onMouseRepeat()
 
bool mMouseButtonDown
 Flag to determine if the button is depressed.
 
bool mMouseRightButtonDown
 bool to determine if the right button is depressed
 
bool mMouseMiddleButtonDown
 Middle button flag.
 
GuiEvent mLastEvent
 
U8 mLastMouseClickCount
 
S32 mLastMouseDownTime
 
bool mLeftMouseLast
 
bool mMiddleMouseLast
 
bool mRightMouseLast
 
Point2F mMouseDownPoint
 
S32 mDoubleClickWidth
 
S32 mDoubleClickHeight
 
S32 mDoubleClickTime
 
Point2F mPrevMouseMovePosition
 Holds the previous position of the mouse the last time a mouse move event was processed.
 
S32 mTouchDetectionSize
 Changes in the x or y position of the mouse greater than this value will could be touch events.
 
bool mPotentialTouchEvent
 True if the mouse made a jump that looks like a touch event.
 
U8 mPotentialMouseEventCount
 Counts how many small mouse movements have occured in a row that to determine if touch has been abandoned.
 
bool mHideCursorBecauseOfTouch
 Touch event has been detected. Hide the cursor.
 
virtual void findMouseControl (const GuiEvent &event)
 
bool DoesControlStackContainControl (GuiControl *stack, const GuiControl *ctrl)
 
virtual void refreshMouseControl ()
 

Additional Inherited Members

- Public Types inherited from GuiControl
enum  horizSizingOptions {
  horizResizeRight = 0 , horizResizeWidth , horizResizeLeft , horizResizeCenter ,
  horizResizeRelative , horizResizeFill
}
 
enum  vertSizingOptions {
  vertResizeBottom = 0 , vertResizeHeight , vertResizeTop , vertResizeCenter ,
  vertResizeRelative , vertResizeFill
}
 
enum  TextRotationOptions { tRotateNone = 0 , tRotateLeft , tRotateRight }
 
- 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 Attributes inherited from GuiControl
GuiControlProfilemProfile
 
GuiControlProfilemTooltipProfile
 
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.
 
bool mUseInput
 True if input events like a click can be passed to this gui. False will pass events to the parent and this object and its children will not process input (touch and keyboard).
 
S32 mLayer
 
RectI mBounds
 
Point2I mMinExtent
 
Point2I mRenderInsetLT
 
Point2I mRenderInsetRB
 Add this to the mBounds and parent offset to get the true render location of the control.
 
StringTableEntry mLangTableName
 The actual rendered inset for the right and bottom sides.
 
LangTablemLangTable
 
GuiControlmFirstResponder
 
- Static Public Attributes inherited from GuiControl
static GuiEditCtrlsmEditorHandle = NULL
 static GuiEditCtrl pointer that gives controls access to editor-NULL if editor is closed
 
static S32 smCursorChanged = -1
 Has this control modified the cursor? -1 or type.
 
static bool smDesignTime = false
 static GuiControl boolean that specifies if the GUI Editor is active
 
static GuiControlsmPrevResponder = NULL
 
static GuiControlsmCurResponder = NULL
 
- Static Public Attributes inherited from SimObject
static bool disableNameChanging = false
 
- Static Public Attributes inherited from Tickable
static const U32 smTickShift = 4
 Shift value to control how often Ticks occur.
 
static const U32 smTickMs = ( 1 << smTickShift )
 Number of milliseconds per tick, 32 in this case.
 
static const F32 smTickSec = ( F32( Tickable::smTickMs ) / 1000.f )
 Fraction of a second per tick.
 
static const U32 smTickMask = ( smTickMs - 1 )
 
- Protected Member Functions inherited from GuiControl
virtual void interpolateTick (F32 delta)
 
virtual void processTick ()
 
virtual void advanceTime (F32 timeDelta)
 
S32 getTextHorizontalOffset (S32 textWidth, S32 totalWidth, AlignmentType align)
 
S32 getTextVerticalOffset (S32 textHeight, S32 totalHeight, VertAlignmentType align)
 
AlignmentType getAlignmentType ()
 
VertAlignmentType getVertAlignmentType ()
 
AlignmentType getAlignmentType (GuiControlProfile *profile)
 
VertAlignmentType getVertAlignmentType (GuiControlProfile *profile)
 
const ColorIgetFontColor (GuiControlProfile *profile, const GuiControlState state=GuiControlState::NormalState)
 
const char * execConsoleCallback ()
 Executes mConsoleCommand, and returns the result.
 
const char * execAltConsoleCallback ()
 Executes mAltConsoleCommand, and returns the result.
 
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.
 
S32 getIntVariable ()
 Returns value of control's bound variable as a integer.
 
F32 getFloatVariable ()
 Returns value of control's bound variable as a float.
 
- Protected Member Functions inherited from SimObject
virtual void onTamlPreWrite (void)
 Taml callbacks.
 
virtual void onTamlPostWrite (void)
 Called after Taml has finished writing the object.
 
virtual void onTamlPreRead (void)
 Called prior to Taml reading the object.
 
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.
 
virtual void onTamlCustomWrite (TamlCustomNodes &customNodes)
 Called during the writing of the object to allow custom properties to be written.
 
virtual void onTamlCustomRead (const TamlCustomNodes &customNodes)
 Called during the reading of the object to allow custom properties to be read.
 
void linkNamespaces ()
 
void unlinkNamespaces ()
 
- Protected Member Functions inherited from ConsoleObject
 ConsoleObject ()
 
 ConsoleObject (const ConsoleObject &)
 
- 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 writeObjectName (void *obj, StringTableEntry pFieldName)
 
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 bool setProtectedName (void *obj, const char *data)
 
static SimObject::NotifyallocNotify ()
 Get a free Notify structure.
 
static void freeNotify (SimObject::Notify *)
 Mark a Notify structure as free.
 
- 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)
 
- Static Protected Attributes inherited from SimObject
static SimObject::NotifymNotifyFreeList = NULL
 

Detailed Description

A canvas on which rendering occurs.

What a GUICanvas Can Contain...

Content Control

A content control is the top level GuiControl for a screen. This GuiControl will be the parent control for all other GuiControls on that particular screen.

Dialogs

A dialog is essentially another screen, only it gets overlaid on top of the current content control, and all input goes to the dialog. This is most akin to the "Open File" dialog box found in most operating systems. When you choose to open a file, and the "Open File" dialog pops up, you can no longer send input to the application, and must complete or cancel the open file request. Torque keeps track of layers of dialogs. The dialog with the highest layer is on top and will get all the input, unless the dialog is modeless, which is a profile option.

See also
GuiControlProfile

Dirty Rectangles

The GuiCanvas is based on dirty regions.

Every frame the canvas paints only the areas of the canvas that are 'dirty' or need updating. In most cases, this only is the area under the mouse cursor. This is why if you look in guiCanvas.cc the call to glClear is commented out. If you want a really good idea of what exactly dirty regions are and how they work, un-comment that glClear line in the renderFrame method of guiCanvas.cc

What you will see is a black screen, except in the dirty regions, where the screen will be painted normally. If you are making an animated GuiControl you need to add your control to the dirty areas of the canvas.

Member Typedef Documentation

◆ Grandparent

typedef SimObject Grandparent
protected

◆ Parent

typedef GuiControl Parent
protected

Constructor & Destructor Documentation

◆ GuiCanvas()

GuiCanvas ( )

Background color.

◆ ~GuiCanvas()

~GuiCanvas ( )
virtual

Member Function Documentation

◆ addAcceleratorKey()

void addAcceleratorKey ( GuiControl ctrl,
U32  index,
U32  keyCode,
U32  modifier 
)
virtual

Setups a keyboard accelerator which maps to a GuiControl.

Parameters
ctrlGuiControl to map to.
index
keyCodeKey code.
modifierShift, ctrl, etc.

◆ addUpdateRegion()

void addUpdateRegion ( Point2I  pos,
Point2I  ext 
)
virtual

Adds a dirty area to the canvas so it will be updated on the next frame

Parameters
posScreen-coordinates of the upper-left hand corner of the dirty area
extWidth/height of the dirty area

◆ buildUpdateUnion()

void buildUpdateUnion ( RectI updateUnion)
virtual

This builds a rectangle which encompasses all of the dirty regions to be repainted

Parameters
updateUnion(out) Rectangle which surrounds all dirty areas

◆ checkLockMouseMove()

void checkLockMouseMove ( const GuiEvent event)
virtual

◆ DECLARE_CONOBJECT()

DECLARE_CONOBJECT ( GuiCanvas  )

◆ DoesControlStackContainControl()

bool DoesControlStackContainControl ( GuiControl stack,
const GuiControl ctrl 
)
protected

◆ findMouseControl()

void findMouseControl ( const GuiEvent event)
protectedvirtual

◆ getBackgroundColor()

const ColorF & getBackgroundColor ( void  ) const
inline

◆ getContentControl()

GuiControl * getContentControl ( )
virtual

Returns the content control.

◆ getCursorExtent()

Point2I getCursorExtent ( )
inline

used by the tooltip resource

◆ getCursorPos()

virtual Point2I getCursorPos ( )
inlinevirtual

Returns the point, in screenspace, at which the cursor is located.

◆ getMouseControl()

virtual GuiControl * getMouseControl ( )
inlinevirtual

Returns the control which the mouse is over.

◆ getMouseLockedControl()

virtual GuiControl * getMouseLockedControl ( )
inlinevirtual

Returns the control which the mouse is locked to if any.

◆ getUseBackgroundColor()

bool getUseBackgroundColor ( void  ) const
inline

◆ getUseNativeCursor()

bool getUseNativeCursor ( void  )
virtual

◆ initPersistFields()

void initPersistFields ( )
static

◆ isCursorON()

virtual bool isCursorON ( )
inlinevirtual

Returns true if the cursor is on.

◆ isCursorShown()

virtual bool isCursorShown ( )
inlinevirtual

Returns true if the cursor is being rendered.

◆ isEditMode()

bool isEditMode ( )
virtual

Reimplemented from GuiControl.

◆ maintainSizing()

void maintainSizing ( )

Resizes the content control to match the canvas size.

◆ mouseButtonDown()

virtual bool mouseButtonDown ( void  )
inlinevirtual

Returns true if the left mouse button is down.

◆ mouseLock()

void mouseLock ( GuiControl lockingControl)
virtual

When a control gets the mouse lock this means that that control gets ALL mouse input and no other control recieves any input.

Parameters
lockingControlControl to lock mouse to

Reimplemented from GuiControl.

◆ mouseRightButtonDown()

virtual bool mouseRightButtonDown ( void  )
inlinevirtual

Returns true if the right mouse button is down.

◆ mouseUnlock()

void mouseUnlock ( GuiControl lockingControl)
virtual

Unlocks the mouse from a control

Parameters
lockingControlControl to unlock from

◆ onFocus()

void onFocus ( bool  foundFirstResponder)
virtual

Reimplemented from GuiControl.

◆ paint()

void paint ( )
virtual

Repaints the entire canvas by calling resetUpdateRegions() and then renderFrame()

◆ popDialogControl() [1/2]

void popDialogControl ( GuiControl gui)
virtual

Removes a specific dialog control

Parameters
guiDialog to remove from the dialog stack

◆ popDialogControl() [2/2]

void popDialogControl ( S32  layer = 0)
virtual

Removes a specific layer of dialogs

Parameters
layerLayer to pop off from

◆ processInputEvent()

bool processInputEvent ( const InputEvent event)
virtual

Processes an input event

See also
InputEvent
Parameters
eventInput event to process

◆ processMouseMoveEvent()

void processMouseMoveEvent ( const MouseMoveEvent event)
virtual

Processes a mouse movement event

See also
MouseMoveEvent
Parameters
eventMouse move event to process

◆ processScreenTouchEvent()

void processScreenTouchEvent ( const ScreenTouchEvent event)
virtual

◆ pushDialogControl()

void pushDialogControl ( GuiControl gui,
S32  layer = 0 
)
virtual

Adds a dialog control onto the stack of dialogs

Parameters
guiDialog to add
layerLayer to put dialog on

◆ refreshMouseControl()

void refreshMouseControl ( )
protectedvirtual

◆ renderFrame()

void renderFrame ( bool  preRenderOnly,
bool  bufferSwap = true 
)
virtual

Repaints the dirty regions of the canvas

Parameters
preRenderOnlyIf set to true, only the onPreRender methods of all the GuiControls will be called
bufferSwapIf set to true, it will swap buffers at the end. This is to support canvas-subclassing.

◆ resetUpdateRegions()

void resetUpdateRegions ( )
virtual

Resets the update regions so that the next call to renderFrame will repaint the whole canvas

◆ rootMiddleMouseDown()

void rootMiddleMouseDown ( const GuiEvent event)
virtual

◆ rootMiddleMouseDragged()

void rootMiddleMouseDragged ( const GuiEvent event)
virtual

◆ rootMiddleMouseUp()

void rootMiddleMouseUp ( const GuiEvent event)
virtual

◆ rootMouseDown()

void rootMouseDown ( const GuiEvent event)
virtual

◆ rootMouseDragged()

void rootMouseDragged ( const GuiEvent event)
virtual

◆ rootMouseMove()

void rootMouseMove ( const GuiEvent event)
virtual

◆ rootMouseUp()

void rootMouseUp ( const GuiEvent event)
virtual

◆ rootMouseWheelDown()

void rootMouseWheelDown ( const GuiEvent event)
virtual

◆ rootMouseWheelUp()

void rootMouseWheelUp ( const GuiEvent event)
virtual

◆ rootRightMouseDown()

void rootRightMouseDown ( const GuiEvent event)
virtual

◆ rootRightMouseDragged()

void rootRightMouseDragged ( const GuiEvent event)
virtual

◆ rootRightMouseUp()

void rootRightMouseUp ( const GuiEvent event)
virtual

◆ rootScreenTouchDown()

void rootScreenTouchDown ( const GuiEvent event)
virtual

◆ rootScreenTouchMove()

void rootScreenTouchMove ( const GuiEvent event)
virtual

◆ rootScreenTouchUp()

void rootScreenTouchUp ( const GuiEvent event)
virtual

◆ setBackgroundColor()

void setBackgroundColor ( const ColorF backgroundColor)
inline

Background color.

◆ setContentControl()

void setContentControl ( GuiControl gui)
virtual

This sets the content control to something different

Parameters
guiNew content control

◆ setCursor()

void setCursor ( GuiCursor cursor)
virtual

Sets the cursor for the canvas.

Parameters
cursorNew cursor to use.

◆ setCursorON()

void setCursorON ( bool  onOff)
virtual

Turns the cursor on or off.

Parameters
onOffTrue if the cursor should be on.

◆ setCursorPos()

void setCursorPos ( const Point2I pt)
virtual

Sets the position of the cursor

Parameters
ptPoint, in screenspace for the cursor

◆ setDoubleClickHeight()

void setDoubleClickHeight ( S32  height)
inline

◆ setDoubleClickTime()

void setDoubleClickTime ( S32  time)
inline

Sets the time allowed between clicks to be considered a double click.

◆ setDoubleClickWidth()

void setDoubleClickWidth ( S32  width)
inline

Sets the amount of movement allowed that won't cancel a double click.

◆ setFirstResponder()

void setFirstResponder ( GuiControl firstResponder)
virtual

Sets the first responder.

Parameters
firstResponderControl to designate as first responder

Reimplemented from GuiControl.

◆ setRenderFront()

virtual void setRenderFront ( bool  front)
inlinevirtual

This turns on/off front-buffer rendering

Parameters
frontTrue if all rendering should be done to the front buffer

◆ setUseBackgroundColor()

void setUseBackgroundColor ( const bool  useBackgroundColor)
inline

◆ showCursor()

virtual void showCursor ( bool  state)
inlinevirtual

Enable/disable rendering of the cursor.

Parameters
stateTrue if we should render cursor

◆ swapBuffers()

void swapBuffers ( )
virtual

This will swap the buffers at the end of renderFrame. It was added for canvas sub-classes in case they wanted to do some custom code before the buffer flip occured.

◆ tabNext()

bool tabNext ( void  )
virtual

Moves the first responder to the next tabable controle.

◆ tabPrev()

bool tabPrev ( void  )
virtual

Moves the first responder to the previous tabable control.

◆ useNativeCursor()

void useNativeCursor ( bool  useNative)
virtual

Member Data Documentation

◆ cursorON

bool cursorON
protected

◆ cursorPt

Point2F cursorPt
protected

◆ defaultCursor

GuiCursor* defaultCursor
protected

◆ hoverControl

GuiControl* hoverControl
protected

◆ hoverControlStart

U32 hoverControlStart
protected

◆ hoverLeftControlTime

U32 hoverLeftControlTime
protected

◆ hoverPosition

Point2I hoverPosition
protected

◆ hoverPositionSet

bool hoverPositionSet
protected

◆ keyboardControl

GuiControl* keyboardControl
protected

All keyboard events will go to this ctrl first.

◆ lastCursor

GuiCursor* lastCursor
protected

◆ lastCursorON

bool lastCursorON
protected

◆ lastCursorPt

Point2I lastCursorPt
protected

◆ mAcceleratorMap

Vector<AccKeyMap> mAcceleratorMap
protected

◆ mBackgroundColor

ColorF mBackgroundColor
protected

Background color.

◆ mCurUpdateRect

RectI mCurUpdateRect
protected

◆ mDoubleClickHeight

S32 mDoubleClickHeight
protected

◆ mDoubleClickTime

S32 mDoubleClickTime
protected

◆ mDoubleClickWidth

S32 mDoubleClickWidth
protected

◆ mHideCursorBecauseOfTouch

bool mHideCursorBecauseOfTouch
protected

Touch event has been detected. Hide the cursor.

◆ mInitialMouseDelay

U32 mInitialMouseDelay
protected

also used for onMouseRepeat()

◆ mLastEvent

GuiEvent mLastEvent
protected

◆ mLastMouseClickCount

U8 mLastMouseClickCount
protected

◆ mLastMouseDownTime

S32 mLastMouseDownTime
protected

◆ mLeftMouseLast

bool mLeftMouseLast
protected

◆ mMiddleMouseLast

bool mMiddleMouseLast
protected

◆ mMouseButtonDown

bool mMouseButtonDown
protected

Flag to determine if the button is depressed.

◆ mMouseCapturedControl

SimObjectPtr<GuiControl> mMouseCapturedControl
protected

All mouse events will go to this ctrl only.

◆ mMouseControl

SimObjectPtr<GuiControl> mMouseControl
protected

the control the mouse was last seen in unless some other one captured it

◆ mMouseControlClicked

bool mMouseControlClicked
protected

whether the current ctrl has been clicked - used by helpctrl

◆ mMouseDownPoint

Point2F mMouseDownPoint
protected

◆ mMouseMiddleButtonDown

bool mMouseMiddleButtonDown
protected

Middle button flag.

◆ mMouseRightButtonDown

bool mMouseRightButtonDown
protected

bool to determine if the right button is depressed

◆ mNextMouseTime

U32 mNextMouseTime
protected

used for onMouseRepeat()

◆ mOldUpdateRects

RectI mOldUpdateRects[2]
protected

◆ mPixelsPerMickey

F32 mPixelsPerMickey
protected

This is the scale factor which relates mouse movement in pixels (one unit of mouse movement is a mickey) to units in the GUI.

◆ mPotentialMouseEventCount

U8 mPotentialMouseEventCount
protected

Counts how many small mouse movements have occured in a row that to determine if touch has been abandoned.

◆ mPotentialTouchEvent

bool mPotentialTouchEvent
protected

True if the mouse made a jump that looks like a touch event.

◆ mPrevMouseMovePosition

Point2F mPrevMouseMovePosition
protected

Holds the previous position of the mouse the last time a mouse move event was processed.

◆ mPrevMouseTime

U32 mPrevMouseTime
protected

this determines how long the mouse has been in the same control

◆ mRenderFront

bool mRenderFront
protected

◆ mRightMouseLast

bool mRightMouseLast
protected

◆ mShowCursor

bool mShowCursor
protected

◆ mTouchDetectionSize

S32 mTouchDetectionSize
protected

Changes in the x or y position of the mouse greater than this value will could be touch events.

◆ mUseBackgroundColor

bool mUseBackgroundColor
protected

◆ mUseNativeCursor

bool mUseNativeCursor
protected

◆ nextKeyTime

U32 nextKeyTime
protected

◆ rLastFrameTime

F32 rLastFrameTime
protected

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