GuiTreeViewCtrl Class Reference#include <guiTreeViewCtrl.h>
Inheritance diagram for GuiTreeViewCtrl:
[legend]
|
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,
fxFoliageReplicator,
fxLight,
fxShapeReplicator,
fxSunLight,
Hidden,
Interior,
Lightning,
Lock1,
Lock2,
MissionArea,
Particle,
Path,
Pathmarker,
PhysicalArea,
Precipitation,
Shape,
Sky,
StaticShape,
Sun,
Terrain,
Trigger,
Water,
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
} |
Public Member Functions |
| GuiTreeViewCtrl () |
virtual | ~GuiTreeViewCtrl () |
void | syncSelection () |
| Used for syncing the mSelected and mSelectedItems lists.
|
void | lockSelection (bool lock) |
void | hideSelection (bool hide) |
void | addSelection (S32 itemId) |
void | removeSelection (S32 itemId) |
| Should use addSelection and removeSelection when calling from script instead of setItemSelected.
|
bool | setItemSelected (S32 itemId, bool select) |
| Sets the flag of the item with the matching itemId.
|
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="") |
Item * | getItem (S32 itemId) |
Item * | createItem (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) |
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.
|
void | onSleep () |
| Called when this object is asked to sleep.
|
void | onPreRender () |
| Do special pre-render proecessing.
|
bool | onKeyDown (const GuiEvent &event) |
| Happens when a key is depressed.
|
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.
|
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 | onRenderCell (Point2I offset, Point2I cell, bool, bool) |
void | onRender (Point2I offset, const RectI &updateRect) |
| Called when this control is to render itself.
|
void | inspectObject (SimObject *obj, bool okToEdit) |
void | buildVisibleTree (bool bForceFullUpdate=false) |
| DECLARE_CONOBJECT (GuiTreeViewCtrl) |
Static Public Member Functions |
static void | initPersistFields () |
| Register dynamic fields in a subclass of ConsoleObject.
|
Data Fields |
Vector< Item * > | mItems |
Vector< Item * > | mVisibleItems |
Vector< Item * > | mSelectedItems |
Vector< S32 > | mSelected |
| Used for tracking stuff that was selected, but may not have been created at time of selection.
|
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.
|
Item * | mRoot |
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 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< SimObject > | mRootObject |
Private Types |
typedef GuiArrayCtrl | Parent |
Data Structures |
struct | Item |
Member Typedef Documentation
Member Enumeration Documentation
- 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). |
anonymous enum [protected] |
- Enumerator:
-
Default1 |
|
SimGroup1 |
|
SimGroup2 |
|
SimGroup3 |
|
SimGroup4 |
|
Audio |
|
Camera |
|
fxFoliageReplicator |
|
fxLight |
|
fxShapeReplicator |
|
fxSunLight |
|
Hidden |
|
Interior |
|
Lightning |
|
Lock1 |
|
Lock2 |
|
MissionArea |
|
Particle |
|
Path |
|
Pathmarker |
|
PhysicalArea |
|
Precipitation |
|
Shape |
|
Sky |
|
StaticShape |
|
Sun |
|
Terrain |
|
Trigger |
|
Water |
|
Default |
|
Icon31 |
|
Icon32 |
|
- Enumerator:
-
NomDragMidPoint |
|
AbovemDragMidPoint |
|
BelowmDragMidPoint |
|
- Enumerator:
-
OnIndent |
|
OnImage |
|
OnText |
|
OnRow |
|
- Enumerator:
-
BmpDunno |
|
BmpLastChild |
|
BmpChild |
|
BmpExp |
|
BmpExpN |
|
BmpExpP |
|
BmpExpPN |
|
BmpCon |
|
BmpConN |
|
BmpConP |
|
BmpConPN |
|
BmpLine |
|
BmpGlow |
|
Constructor & Destructor Documentation
GuiTreeViewCtrl::GuiTreeViewCtrl |
( |
|
) |
|
virtual GuiTreeViewCtrl::~GuiTreeViewCtrl |
( |
|
) |
[virtual] |
Member Function Documentation
void GuiTreeViewCtrl::destroyChildren |
( |
Item * |
item, |
|
|
Item * |
parent | |
|
) |
| | [protected] |
void GuiTreeViewCtrl::destroyItem |
( |
Item * |
item |
) |
[protected] |
void GuiTreeViewCtrl::destroyTree |
( |
|
) |
[protected] |
void GuiTreeViewCtrl::deleteItem |
( |
Item * |
item |
) |
[protected] |
void GuiTreeViewCtrl::buildItem |
( |
Item * |
item, |
|
|
U32 |
tabLevel, |
|
|
bool |
bForceFullUpdate = false | |
|
) |
| | [protected] |
bool GuiTreeViewCtrl::hitTest |
( |
const Point2I & |
pnt, |
|
|
Item *& |
item, |
|
|
BitSet32 & |
flags | |
|
) |
| | [protected] |
virtual bool GuiTreeViewCtrl::onVirtualParentBuild |
( |
Item * |
item, |
|
|
bool |
bForceFullUpdate = false | |
|
) |
| | [protected, virtual] |
virtual bool GuiTreeViewCtrl::onVirtualParentExpand |
( |
Item * |
item |
) |
[protected, virtual] |
virtual bool GuiTreeViewCtrl::onVirtualParentCollapse |
( |
Item * |
item |
) |
[protected, virtual] |
virtual void GuiTreeViewCtrl::onItemSelected |
( |
Item * |
item |
) |
[protected, virtual] |
void GuiTreeViewCtrl::addInspectorDataItem |
( |
Item * |
parent, |
|
|
SimObject * |
obj | |
|
) |
| | [protected] |
void GuiTreeViewCtrl::syncSelection |
( |
|
) |
|
Used for syncing the mSelected and mSelectedItems lists.
void GuiTreeViewCtrl::lockSelection |
( |
bool |
lock |
) |
|
void GuiTreeViewCtrl::hideSelection |
( |
bool |
hide |
) |
|
void GuiTreeViewCtrl::addSelection |
( |
S32 |
itemId |
) |
|
void GuiTreeViewCtrl::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 GuiTreeViewCtrl::setItemSelected |
( |
S32 |
itemId, |
|
|
bool |
select | |
|
) |
| | |
Sets the flag of the item with the matching itemId.
bool GuiTreeViewCtrl::setItemExpanded |
( |
S32 |
itemId, |
|
|
bool |
expand | |
|
) |
| | |
const char* GuiTreeViewCtrl::getItemText |
( |
S32 |
itemId |
) |
|
const char* GuiTreeViewCtrl::getItemValue |
( |
S32 |
itemId |
) |
|
Item* GuiTreeViewCtrl::getItem |
( |
S32 |
itemId |
) |
|
Item* GuiTreeViewCtrl::createItem |
( |
S32 |
icon |
) |
|
bool GuiTreeViewCtrl::editItem |
( |
S32 |
itemId, |
|
|
const char * |
newText, |
|
|
const char * |
newValue | |
|
) |
| | |
void GuiTreeViewCtrl::unlinkItem |
( |
Item * |
item |
) |
|
S32 GuiTreeViewCtrl::insertItem |
( |
S32 |
parentId, |
|
|
const char * |
text, |
|
|
const char * |
value = "" , |
|
|
const char * |
iconString = "" , |
|
|
S16 |
normalImage = 0 , |
|
|
S16 |
expandedImage = 1 | |
|
) |
| | |
bool GuiTreeViewCtrl::removeItem |
( |
S32 |
itemId |
) |
|
void GuiTreeViewCtrl::removeAllChildren |
( |
S32 |
itemId |
) |
|
bool GuiTreeViewCtrl::buildIconTable |
( |
const char * |
icons |
) |
|
S32 GuiTreeViewCtrl::getIcon |
( |
const char * |
iconString |
) |
|
const S32 GuiTreeViewCtrl::getFirstRootItem |
( |
|
) |
const |
S32 GuiTreeViewCtrl::getChildItem |
( |
S32 |
itemId |
) |
|
S32 GuiTreeViewCtrl::getParentItem |
( |
S32 |
itemId |
) |
|
S32 GuiTreeViewCtrl::getNextSiblingItem |
( |
S32 |
itemId |
) |
|
S32 GuiTreeViewCtrl::getPrevSiblingItem |
( |
S32 |
itemId |
) |
|
S32 GuiTreeViewCtrl::getItemCount |
( |
|
) |
|
S32 GuiTreeViewCtrl::getSelectedItem |
( |
|
) |
|
S32 GuiTreeViewCtrl::getSelectedItem |
( |
S32 |
index |
) |
|
S32 GuiTreeViewCtrl::getSelectedItemsCount |
( |
|
) |
[inline] |
void GuiTreeViewCtrl::moveItemUp |
( |
S32 |
itemId |
) |
|
void GuiTreeViewCtrl::moveItemDown |
( |
S32 |
itemId |
) |
|
bool GuiTreeViewCtrl::scrollVisible |
( |
Item * |
item |
) |
|
bool GuiTreeViewCtrl::scrollVisible |
( |
S32 |
itemId |
) |
|
void GuiTreeViewCtrl::deleteSelection |
( |
|
) |
|
void GuiTreeViewCtrl::clearSelection |
( |
|
) |
|
S32 GuiTreeViewCtrl::findItemByName |
( |
const char * |
name |
) |
|
S32 GuiTreeViewCtrl::findItemByObjectId |
( |
S32 |
iObjId |
) |
|
bool GuiTreeViewCtrl::onWake |
( |
|
) |
[virtual] |
Called when this object is asked to wake up returns true if it's actually awake at the end.
Reimplemented from GuiArrayCtrl.
Reimplemented in GuiDirectoryTreeCtrl.
void GuiTreeViewCtrl::onSleep |
( |
|
) |
[virtual] |
Called when this object is asked to sleep.
Reimplemented from GuiArrayCtrl.
void GuiTreeViewCtrl::onPreRender |
( |
|
) |
[virtual] |
Do special pre-render proecessing.
Reimplemented from GuiControl.
bool GuiTreeViewCtrl::onKeyDown |
( |
const GuiEvent & |
event |
) |
[virtual] |
Happens when a key is depressed.
- Parameters:
-
| event | Event descriptor (which contains the key) |
Reimplemented from GuiArrayCtrl.
void GuiTreeViewCtrl::onMouseDown |
( |
const GuiEvent & |
event |
) |
[virtual] |
void GuiTreeViewCtrl::onMiddleMouseDown |
( |
const GuiEvent & |
event |
) |
[virtual] |
void GuiTreeViewCtrl::onMouseMove |
( |
const GuiEvent & |
event |
) |
[virtual] |
void GuiTreeViewCtrl::onMouseEnter |
( |
const GuiEvent & |
event |
) |
[virtual] |
void GuiTreeViewCtrl::onMouseLeave |
( |
const GuiEvent & |
event |
) |
[virtual] |
void GuiTreeViewCtrl::onRightMouseDown |
( |
const GuiEvent & |
event |
) |
[virtual] |
void GuiTreeViewCtrl::onMouseDragged |
( |
const GuiEvent & |
event |
) |
[virtual] |
void GuiTreeViewCtrl::onMouseUp |
( |
const GuiEvent & |
event |
) |
[virtual] |
bool GuiTreeViewCtrl::childSearch |
( |
Item * |
item, |
|
|
SimObject * |
obj, |
|
|
bool |
yourBaby | |
|
) |
| | |
Returns false if the object is a child of one of the inner items.
Find immediately available inspector items (eg ones that aren't children of other inspector items) and then update their sets.
void GuiTreeViewCtrl::onRenderCell |
( |
Point2I |
offset, |
|
|
Point2I |
cell, |
|
|
bool |
, |
|
|
bool |
| |
|
) |
| | [virtual] |
void GuiTreeViewCtrl::onRender |
( |
Point2I |
offset, |
|
|
const RectI & |
updateRect | |
|
) |
| | [virtual] |
Called when this control is to render itself.
- Parameters:
-
| offset | The location this control is to begin rendering |
| updateRect | The screen area this control has drawing access to |
Reimplemented from GuiArrayCtrl.
static void GuiTreeViewCtrl::initPersistFields |
( |
|
) |
[static] |
void GuiTreeViewCtrl::inspectObject |
( |
SimObject * |
obj, |
|
|
bool |
okToEdit | |
|
) |
| | |
void GuiTreeViewCtrl::buildVisibleTree |
( |
bool |
bForceFullUpdate = false |
) |
|
Field Documentation
Used for tracking stuff that was selected, but may not have been created at time of selection.
We do our own free list, as we we want to be able to recycle item ids and do some other clever things.
|