Torque2D Reference
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
GuiTreeViewCtrl Class Reference

#include <guiTreeViewCtrl.h>

+ Inheritance diagram for GuiTreeViewCtrl:

Classes

struct  Item
 

Public Member Functions

 GuiTreeViewCtrl ()
 
virtual ~GuiTreeViewCtrl ()
 
void syncSelection ()
 Used for syncing the mSelected and mSelectedItems lists. More...
 
void lockSelection (bool lock)
 
void hideSelection (bool hide)
 
void addSelection (S32 itemId)
 
void removeSelection (S32 itemId)
 
bool setItemSelected (S32 itemId, bool select)
 Sets the flag of the item with the matching itemId. More...
 
bool setItemExpanded (S32 itemId, bool expand)
 
bool setItemValue (S32 itemId, StringTableEntry Value)
 
const char * getItemText (S32 itemId)
 
const char * getItemValue (S32 itemId)
 
StringTableEntry getTextToRoot (S32 itemId, const char *delimiter="")
 
ItemgetItem (S32 itemId)
 
ItemcreateItem (S32 icon)
 
bool editItem (S32 itemId, const char *newText, const char *newValue)
 
void unlinkItem (Item *item)
 
S32 insertItem (S32 parentId, const char *text, const char *value="", const char *iconString="", S16 normalImage=0, S16 expandedImage=1)
 
bool removeItem (S32 itemId)
 
void removeAllChildren (S32 itemId)
 
bool buildIconTable (const char *icons)
 
void setInstantGroup (SimObject *obj)
 
S32 getIcon (const char *iconString)
 
const S32 getFirstRootItem () const
 
S32 getChildItem (S32 itemId)
 
S32 getParentItem (S32 itemId)
 
S32 getNextSiblingItem (S32 itemId)
 
S32 getPrevSiblingItem (S32 itemId)
 
S32 getItemCount ()
 
S32 getSelectedItem ()
 
S32 getSelectedItem (S32 index)
 
S32 getSelectedItemsCount ()
 
void moveItemUp (S32 itemId)
 
void moveItemDown (S32 itemId)
 
bool scrollVisible (Item *item)
 
bool scrollVisible (S32 itemId)
 
bool scrollVisibleByObjectId (S32 objID)
 
void deleteSelection ()
 
void clearSelection ()
 
S32 findItemByName (const char *name)
 
S32 findItemByObjectId (S32 iObjId)
 
bool onWake ()
 Called when this object is asked to wake up returns true if it's actually awake at the end. More...
 
void onSleep ()
 Called when this object is asked to sleep. More...
 
void onPreRender ()
 Do special pre-render proecessing. More...
 
bool onKeyDown (const GuiEvent &event)
 
void onMouseDown (const GuiEvent &event)
 
void onMiddleMouseDown (const GuiEvent &event)
 
void onMouseMove (const GuiEvent &event)
 
void onMouseEnter (const GuiEvent &event)
 
void onMouseLeave (const GuiEvent &event)
 
void onRightMouseDown (const GuiEvent &event)
 
void onMouseDragged (const GuiEvent &event)
 
void onMouseUp (const GuiEvent &event)
 
bool childSearch (Item *item, SimObject *obj, bool yourBaby)
 Returns false if the object is a child of one of the inner items. More...
 
void inspectorSearch (Item *item, Item *parent, SimSet *parentSet, SimSet *newParentSet)
 
void onRenderCell (Point2I offset, Point2I cell, bool, bool)
 
void onRender (Point2I offset, const RectI &updateRect)
 
void inspectObject (SimObject *obj, bool okToEdit)
 
void buildVisibleTree (bool bForceFullUpdate=false)
 
 DECLARE_CONOBJECT (GuiTreeViewCtrl)
 
- Public Member Functions inherited from GuiArrayCtrl
 GuiArrayCtrl ()
 
 DECLARE_CONOBJECT (GuiArrayCtrl)
 
Point2I getSize ()
 
virtual void setSize (Point2I size)
 
void setHeaderDim (const Point2I &dim)
 
void getScrollDimensions (S32 &cell_size, S32 &num_cells)
 
void setSelectedCell (Point2I cell)
 
void deselectCells ()
 
Point2I getSelectedCell ()
 
void scrollSelectionVisible ()
 
void scrollCellVisible (Point2I cell)
 
virtual void onRenderColumnHeaders (Point2I offset, Point2I parentOffset, Point2I headerDim)
 
virtual void onRenderRowHeader (Point2I offset, Point2I parentOffset, Point2I headerDim, Point2I cell)
 
- Public Member Functions inherited from GuiControl
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 ()
 
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...
 
const Point2IgetPosition ()
 Returns position of the control. More...
 
const Point2IgetExtent ()
 Returns extents of the control. More...
 
const RectIgetBounds ()
 Returns the bounds of the control. More...
 
const Point2IgetMinExtent ()
 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...
 
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...
 
void addObject (SimObject *obj)
 
void removeObject (SimObject *obj)
 
GuiControlgetParent ()
 Returns the control which owns this one. More...
 
GuiCanvasgetRoot ()
 
Point2I localToGlobalCoord (const Point2I &src)
 
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 parentResized (const Point2I &oldParentExtent, const Point2I &newParentExtent)
 
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...
 
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...
 
virtual bool pointInControl (const Point2I &parentCoordPoint)
 
bool cursorInControl ()
 Returns true if the global cursor is inside this control. More...
 
virtual GuiControlfindHitControl (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...
 
virtual bool onMouseWheelUp (const GuiEvent &event)
 
virtual bool onMouseWheelDown (const GuiEvent &event)
 
virtual void onRightMouseUp (const GuiEvent &event)
 
virtual void onRightMouseDragged (const GuiEvent &event)
 
virtual void onMiddleMouseUp (const GuiEvent &event)
 
virtual void onMiddleMouseDragged (const GuiEvent &event)
 
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)
 
virtual GuiControlfindFirstTabable ()
 Find the first tab-accessable child of this control. More...
 
virtual GuiControlfindLastTabable (bool firstCall=true)
 
virtual GuiControlfindPrevTabable (GuiControl *curResponder, bool firstCall=true)
 
virtual GuiControlfindNextTabable (GuiControl *curResponder, bool firstCall=true)
 
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...
 
GuiControlgetFirstResponder ()
 Returns the first responder for this chain. More...
 
virtual void onLoseFirstResponder ()
 Occurs when the first responder for this chain is lost. More...
 
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 onKeyUp (const GuiEvent &event)
 
virtual bool onKeyRepeat (const GuiEvent &event)
 
void messageSiblings (S32 message)
 Send a message to all siblings. More...
 
virtual void onMessage (GuiControl *sender, S32 msg)
 
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...
 
void setConsoleVariable (const char *variable)
 
void setConsoleCommand (const char *newCmd)
 
const char * getConsoleCommand ()
 Returns the name of the function bound to this GuiControl. More...
 
LangTablegetGUILangTable (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...
 
 DECLARE_CONOBJECT (GuiControl)
 
 GuiControl ()
 
virtual ~GuiControl ()
 
- Public Member Functions inherited from SimGroup
 ~SimGroup ()
 
void addObject (SimObject *, SimObjectId)
 
void addObject (SimObject *, const char *name)
 
virtual SimObjectfindObject (const char *name)
 Find an object in the group. More...
 
bool processArguments (S32 argc, const char **argv)
 Process constructor options. (ie, new SimObject(1,2,3)) More...
 
 DECLARE_CONOBJECT (SimGroup)
 
- Public Member Functions inherited from SimSet
 SimSet ()
 
 ~SimSet ()
 
virtual void onDeleteNotify (SimObject *object)
 
virtual U32 getTamlChildCount (void) const
 Called when Taml attempts to compile a list of children. More...
 
virtual SimObjectgetTamlChild (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)
 
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. More...
 
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)
 
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. More...
 
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. 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)
 
SimFieldDictionarygetFieldDictionary ()
 
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)
 
SimGroupgetGroup () 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)
 
- Public Member Functions inherited from ConsoleObject
const AbstractClassRep::FieldfindField (StringTableEntry fieldName) const
 Get a reference to a field by name. More...
 
virtual AbstractClassRepgetClassRep () const
 Gets the ClassRep. More...
 
bool setField (const char *fieldName, const char *value)
 Set the value of a field. More...
 
virtual ~ConsoleObject ()
 
const AbstractClassRep::FieldListgetFieldList () const
 Get a list of all the fields. This information cannot be modified. More...
 
AbstractClassRep::FieldListgetModifiableFieldList ()
 
bool & getDynamicGroupExpand ()
 
S32 getClassId (U32 netClassGroup) const
 
const char * getClassName () const
 

Static Public Member Functions

static void initPersistFields ()
 

Public Attributes

Vector< Item * > mItems
 
Vector< Item * > mVisibleItems
 
Vector< Item * > mSelectedItems
 
Vector< S32 > mSelected
 
S32 mItemCount
 
ItemmItemFreeList
 
ItemmRoot
 
S32 mInstantGroup
 
S32 mMaxWidth
 
S32 mSelectedItem
 
S32 mDraggedToItem
 
S32 mTempItem
 
S32 mStart
 
BitSet32 mFlags
 

Protected Member Functions

void destroyChildren (Item *item, Item *parent)
 
void destroyItem (Item *item)
 
void destroyTree ()
 
void deleteItem (Item *item)
 
void buildItem (Item *item, U32 tabLevel, bool bForceFullUpdate=false)
 
bool hitTest (const Point2I &pnt, Item *&item, BitSet32 &flags)
 
virtual bool onVirtualParentBuild (Item *item, bool bForceFullUpdate=false)
 
virtual bool onVirtualParentExpand (Item *item)
 
virtual bool onVirtualParentCollapse (Item *item)
 
virtual void onItemSelected (Item *item)
 
void addInspectorDataItem (Item *parent, SimObject *obj)
 
- Protected Member Functions inherited from GuiArrayCtrl
bool cellSelected (Point2I cell)
 
virtual void onCellSelected (Point2I cell)
 
virtual void onCellHighlighted (Point2I cell)
 
- Protected Member Functions inherited from GuiControl
const char * execConsoleCallback ()
 Executes mConsoleCommand, and returns the result. More...
 
const char * execAltConsoleCallback ()
 Executes mAltConsoleCommand, and returns the result. More...
 
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...
 

Protected Attributes

TextureHandle mIconTable [MaxIcons]
 
bool mDebug
 
S32 mTabSize
 
S32 mTextOffset
 
bool mFullRowSelect
 
S32 mItemHeight
 
bool mDestroyOnSleep
 
bool mSupportMouseDragging
 
bool mMultipleSelections
 
bool mDeleteObjectAllowed
 
bool mDragToItemAllowed
 
S32 mOldDragY
 
S32 mCurrentDragCell
 
S32 mPreviousDragCell
 
S32 mDragMidPoint
 
bool mMouseDragged
 
StringTableEntry mBitmapBase
 
TextureHandle mTexRollover
 
TextureHandle mTexSelected
 
S32 mTicksPassed
 
S32 mTreeRefreshInterval
 
ColorI mAltFontColor
 
ColorI mAltFontColorHL
 
ColorI mAltFontColorSE
 
SimObjectPtr< SimObjectmRootObject
 
- Protected Attributes inherited from GuiArrayCtrl
Point2I mHeaderDim
 
Point2I mSize
 
Point2I mCellSize
 
Point2I mSelectedCell
 
Point2I mMouseOverCell
 
Resource< GFontmFont
 
- Protected Attributes inherited from GuiControl
S32 mHorizSizing
 Set from horizSizingOptions. More...
 
S32 mVertSizing
 Set from vertSizingOptions. More...
 
StringTableEntry mConsoleVariable
 
StringTableEntry mConsoleCommand
 
StringTableEntry mAltConsoleCommand
 
StringTableEntry mAcceleratorKey
 
StringTableEntry mTooltip
 

Enums

enum  TreeState {
  RebuildVisible = BIT(0), IsInspector = BIT(1), IsEditable = BIT(2), ShowTreeLines = BIT(3),
  BuildingVisTree = BIT(4)
}
 
enum  { MaxIcons = 32 }
 
enum  Icons {
  Default1 = 0, SimGroup1, SimGroup2, SimGroup3,
  SimGroup4, Audio, Camera, Hidden,
  Lock1, Lock2, Default, Icon31,
  Icon32
}
 
enum  mDragMidPointFlags { NomDragMidPoint, AbovemDragMidPoint, BelowmDragMidPoint }
 
enum  HitFlags { OnIndent = BIT(0), OnImage = BIT(1), OnText = BIT(2), OnRow = BIT(3) }
 
enum  BmpIndices {
  BmpDunno, BmpLastChild, BmpChild, BmpExp,
  BmpExpN, BmpExpP, BmpExpPN, BmpCon,
  BmpConN, BmpConP, BmpConPN, BmpLine,
  BmpGlow
}
 

Additional Inherited Members

- Public Types inherited from GuiControl
enum  horizSizingOptions {
  horizResizeRight = 0, horizResizeWidth, horizResizeLeft, horizResizeCenter,
  horizResizeRelative
}
 
enum  vertSizingOptions {
  vertResizeBottom = 0, vertResizeHeight, vertResizeTop, vertResizeCenter,
  vertResizeRelative
}
 
- Static Public Attributes inherited from GuiControl
static GuiEditCtrlsmEditorHandle = NULL
 
static S32 smCursorChanged = -1
 Has this control modified the cursor? -1 or type. More...
 
static bool smDesignTime = false
 
static GuiControlsmPrevResponder = NULL
 
static GuiControlsmCurResponder = NULL
 
- Protected Types inherited from SimObject
enum  SimObjectNSLinkType { LinkClassName = BIT(0), LinkSuperClassName = BIT(1) }
 
- Static Protected Member Functions inherited from SimObject
static bool setClass (void *obj, const char *data)
 
static bool setSuperClass (void *obj, const char *data)
 
static bool writeCanSaveDynamicFields (void *obj, StringTableEntry pFieldName)
 
static bool writeInternalName (void *obj, StringTableEntry pFieldName)
 
static bool setParentGroup (void *obj, const char *data)
 
static bool writeParentGroup (void *obj, StringTableEntry pFieldName)
 
static bool writeSuperclass (void *obj, StringTableEntry pFieldName)
 
static bool writeClass (void *obj, StringTableEntry pFieldName)
 
static SimObject::NotifyallocNotify ()
 Get a free Notify structure. More...
 
static void freeNotify (SimObject::Notify *)
 Mark a Notify structure as free. More...
 
- Static Protected Attributes inherited from SimObject
static SimObject::NotifymNotifyFreeList = NULL
 

Member Enumeration Documentation

anonymous enum
protected
Enumerator
MaxIcons 
enum BmpIndices
protected
Enumerator
BmpDunno 
BmpLastChild 
BmpChild 
BmpExp 
BmpExpN 
BmpExpP 
BmpExpPN 
BmpCon 
BmpConN 
BmpConP 
BmpConPN 
BmpLine 
BmpGlow 
enum HitFlags
protected
Enumerator
OnIndent 
OnImage 
OnText 
OnRow 
enum Icons
protected
Enumerator
Default1 
SimGroup1 
SimGroup2 
SimGroup3 
SimGroup4 
Audio 
Camera 
Hidden 
Lock1 
Lock2 
Default 
Icon31 
Icon32 
enum mDragMidPointFlags
protected
Enumerator
NomDragMidPoint 
AbovemDragMidPoint 
BelowmDragMidPoint 
enum TreeState
Enumerator
RebuildVisible 

Temporary flag, we have to rebuild the tree.

IsInspector 

We are mapping a SimObject hierarchy.

IsEditable 

We allow items to be moved around.

ShowTreeLines 

Should we render tree lines or just icons?

BuildingVisTree 

We are currently building the visible tree (prevent recursion)

Constructor & Destructor Documentation

~GuiTreeViewCtrl ( )
virtual

Member Function Documentation

void addInspectorDataItem ( Item parent,
SimObject obj 
)
protected
void addSelection ( S32  itemId)
bool buildIconTable ( const char *  icons)
void buildItem ( Item item,
U32  tabLevel,
bool  bForceFullUpdate = false 
)
protected
void buildVisibleTree ( bool  bForceFullUpdate = false)
bool childSearch ( Item item,
SimObject obj,
bool  yourBaby 
)

Returns false if the object is a child of one of the inner items.

void clearSelection ( )
GuiTreeViewCtrl::Item * createItem ( S32  icon)
DECLARE_CONOBJECT ( GuiTreeViewCtrl  )
void deleteItem ( Item item)
protected
void deleteSelection ( )
void destroyChildren ( Item item,
Item parent 
)
protected
void destroyItem ( Item item)
protected
void destroyTree ( )
protected
bool editItem ( S32  itemId,
const char *  newText,
const char *  newValue 
)
S32 findItemByName ( const char *  name)
S32 findItemByObjectId ( S32  iObjId)
S32 getChildItem ( S32  itemId)
const S32 getFirstRootItem ( ) const
S32 getIcon ( const char *  iconString)
GuiTreeViewCtrl::Item * getItem ( S32  itemId)
S32 getItemCount ( )
const char * getItemText ( S32  itemId)
const char * getItemValue ( S32  itemId)
S32 getNextSiblingItem ( S32  itemId)
S32 getParentItem ( S32  itemId)
S32 getPrevSiblingItem ( S32  itemId)
S32 getSelectedItem ( )
S32 getSelectedItem ( S32  index)
S32 getSelectedItemsCount ( )
inline
StringTableEntry getTextToRoot ( S32  itemId,
const char *  delimiter = "" 
)
void hideSelection ( bool  hide)
bool hitTest ( const Point2I pnt,
Item *&  item,
BitSet32 flags 
)
protected
void initPersistFields ( void  )
static
S32 insertItem ( S32  parentId,
const char *  text,
const char *  value = "",
const char *  iconString = "",
S16  normalImage = 0,
S16  expandedImage = 1 
)
void inspectObject ( SimObject obj,
bool  okToEdit 
)
void inspectorSearch ( Item item,
Item parent,
SimSet parentSet,
SimSet newParentSet 
)

Find immediately available inspector items (eg ones that aren't children of other inspector items) and then update their sets

void lockSelection ( bool  lock)
void moveItemDown ( S32  itemId)
void moveItemUp ( S32  itemId)
void onItemSelected ( Item item)
protectedvirtual
bool onKeyDown ( const GuiEvent event)
virtual

Happens when a key is depressed

Parameters
eventEvent descriptor (which contains the key)

Reimplemented from GuiArrayCtrl.

void onMiddleMouseDown ( const GuiEvent event)
virtual

Reimplemented from GuiControl.

void onMouseDown ( const GuiEvent event)
virtual

Reimplemented from GuiArrayCtrl.

void onMouseDragged ( const GuiEvent event)
virtual

Reimplemented from GuiArrayCtrl.

void onMouseEnter ( const GuiEvent event)
virtual

Reimplemented from GuiArrayCtrl.

void onMouseLeave ( const GuiEvent event)
virtual

Reimplemented from GuiArrayCtrl.

void onMouseMove ( const GuiEvent event)
virtual

Reimplemented from GuiArrayCtrl.

void onMouseUp ( const GuiEvent event)
virtual

Reimplemented from GuiControl.

void onPreRender ( )
virtual

Do special pre-render proecessing.

Reimplemented from GuiControl.

void onRender ( Point2I  offset,
const RectI updateRect 
)
virtual

Called when this control is to render itself

Parameters
offsetThe location this control is to begin rendering
updateRectThe screen area this control has drawing access to

Reimplemented from GuiArrayCtrl.

void onRenderCell ( Point2I  offset,
Point2I  cell,
bool  ,
bool   
)
virtual

Reimplemented from GuiArrayCtrl.

void onRightMouseDown ( const GuiEvent event)
virtual

Reimplemented from GuiArrayCtrl.

void onSleep ( )
virtual

Called when this object is asked to sleep.

Reimplemented from GuiArrayCtrl.

bool onVirtualParentBuild ( Item item,
bool  bForceFullUpdate = false 
)
protectedvirtual
bool onVirtualParentCollapse ( Item item)
protectedvirtual
bool onVirtualParentExpand ( Item item)
protectedvirtual
bool onWake ( )
virtual

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

Reimplemented from GuiArrayCtrl.

void removeAllChildren ( S32  itemId)
bool removeItem ( S32  itemId)
void removeSelection ( S32  itemId)

Should use addSelection and removeSelection when calling from script instead of setItemSelected. Use setItemSelected when you want to select something in the treeview as it has script call backs.

bool scrollVisible ( Item item)
bool scrollVisible ( S32  itemId)
bool scrollVisibleByObjectId ( S32  objID)
Initial value:
{
return(object->findItemByObjectId(dAtoi(argv[2])))
void setInstantGroup ( SimObject obj)
bool setItemExpanded ( S32  itemId,
bool  expand 
)
bool setItemSelected ( S32  itemId,
bool  select 
)

Sets the flag of the item with the matching itemId.

bool setItemValue ( S32  itemId,
StringTableEntry  Value 
)
void syncSelection ( )

Used for syncing the mSelected and mSelectedItems lists.

void unlinkItem ( Item item)

Member Data Documentation

ColorI mAltFontColor
protected
ColorI mAltFontColorHL
protected
ColorI mAltFontColorSE
protected
StringTableEntry mBitmapBase
protected
S32 mCurrentDragCell
protected
bool mDebug
protected
bool mDeleteObjectAllowed
protected
bool mDestroyOnSleep
protected
S32 mDraggedToItem
S32 mDragMidPoint
protected
bool mDragToItemAllowed
protected
BitSet32 mFlags
bool mFullRowSelect
protected
TextureHandle mIconTable[MaxIcons]
protected
S32 mInstantGroup
S32 mItemCount
Item* mItemFreeList
We do our own free list, as we

we want to be able to recycle item ids and do some other clever things.

S32 mItemHeight
protected
Vector<Item*> mItems
S32 mMaxWidth
bool mMouseDragged
protected
bool mMultipleSelections
protected
S32 mOldDragY
protected
S32 mPreviousDragCell
protected
Item* mRoot
SimObjectPtr<SimObject> mRootObject
protected
Vector<S32> mSelected
Used for tracking stuff that was

selected, but may not have been created at time of selection

S32 mSelectedItem
Vector<Item*> mSelectedItems
S32 mStart
bool mSupportMouseDragging
protected
S32 mTabSize
protected
S32 mTempItem
TextureHandle mTexRollover
protected
TextureHandle mTexSelected
protected
S32 mTextOffset
protected
S32 mTicksPassed
protected
S32 mTreeRefreshInterval
protected
Vector<Item*> mVisibleItems

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