torque Torque Game Engine Documentation
TGE Version 1.5.2

GuiTreeViewCtrl::Item Struct Reference

#include <guiTreeViewCtrl.h>


Detailed Description

Introduction


Get Methods

const S8 getNormalImage () const
const S8 getExpandedImage () const
char * getText ()
char * getValue ()
const S16 getID () const
SimObjectgetObject ()
const U32 getDisplayTextLength ()
const S32 getDisplayTextWidth (GFont *font)
void getDisplayText (U32 bufLen, char *buf)

Set Methods

void setExpanded (const bool f)
 Set whether an item is expanded or not (showing children or having them hidden).
void setExpandedImage (const S8 id)
 Set the image to display when an item IS expanded.
void setNormalImage (const S8 id)
 Set the image to display when an item is NOT expanded.
void setObject (SimObject *obj)
 Assign a SimObject pointer to an inspector data item.
void setText (char *txt)
 Set the items displayable text (caption).
void setValue (const char *val)
 Set the items script value (data).
void setVirtualParent (bool value)
 Set the items virtual parent flag.

State Retrieval

const bool isExpanded () const
 Returns true if this item is expanded.
const bool isInspectorData () const
 Returns true if an item is inspector data or false if it's just an item.
const bool isParent () const
 Returns true if we should show the expand art and make the item interact with the mouse as if it were a parent.

Searching Methods

ItemfindChildByValue (const SimObject *obj)
 Find an inspector data item by it's SimObject pointer.
ItemfindChildByValue (StringTableEntry Value)
 Find a regular data item by it's script value.

Public Types

enum  ItemState {
  Selected = BIT(0),
  Expanded = BIT(1),
  Focus = BIT(2),
  MouseOverBmp = BIT(3),
  MouseOverText = BIT(4),
  InspectorData = BIT(5),
  VirtualParent = BIT(6)
}

Public Member Functions

 Item (GuiControlProfile *pProfile)
 this stores the pixel width needed to render the item's data in the onRenderCell function to optimize for speed.
 ~Item ()

Data Fields

BitSet32 mState
SimObjectPtr< GuiControlProfilemProfile
S16 mId
U16 mTabLevel
ItemmParent
ItemmChild
ItemmNext
ItemmPrevious
S32 mIcon
S32 mDataRenderWidth
GuiTreeViewCtrl::Item::ScriptTag mScriptInfo
GuiTreeViewCtrl::Item::InspectorTag mInspectorInfo

Data Structures

struct  InspectorTag
struct  ScriptTag


Member Enumeration Documentation

Enumerator:
Selected 
Expanded 
Focus 
MouseOverBmp 
MouseOverText 
InspectorData  Set if we're representing some inspector info (ie, use mInspectorInfo, not mScriptInfo).
VirtualParent  This indicates that we should be rendered as a parent even though we don't have any children.

This is useful for preventing scenarios where we might want to create thousands of Items that might never be shown (for instance if we're browsing the object hierarchy in Torque, which might have thousands of objects).


Constructor & Destructor Documentation

GuiTreeViewCtrl::Item::Item ( GuiControlProfile pProfile  ) 

this stores the pixel width needed to render the item's data in the onRenderCell function to optimize for speed.

GuiTreeViewCtrl::Item::~Item (  ) 


Member Function Documentation

const S8 GuiTreeViewCtrl::Item::getNormalImage (  )  const

const S8 GuiTreeViewCtrl::Item::getExpandedImage (  )  const

char* GuiTreeViewCtrl::Item::getText (  ) 

char* GuiTreeViewCtrl::Item::getValue (  ) 

const S16 GuiTreeViewCtrl::Item::getID (  )  const [inline]

SimObject* GuiTreeViewCtrl::Item::getObject (  ) 

const U32 GuiTreeViewCtrl::Item::getDisplayTextLength (  ) 

const S32 GuiTreeViewCtrl::Item::getDisplayTextWidth ( GFont font  ) 

void GuiTreeViewCtrl::Item::getDisplayText ( U32  bufLen,
char *  buf 
)

void GuiTreeViewCtrl::Item::setExpanded ( const bool  f  ) 

Set whether an item is expanded or not (showing children or having them hidden).

void GuiTreeViewCtrl::Item::setExpandedImage ( const S8  id  ) 

Set the image to display when an item IS expanded.

void GuiTreeViewCtrl::Item::setNormalImage ( const S8  id  ) 

Set the image to display when an item is NOT expanded.

void GuiTreeViewCtrl::Item::setObject ( SimObject obj  ) 

Assign a SimObject pointer to an inspector data item.

void GuiTreeViewCtrl::Item::setText ( char *  txt  ) 

Set the items displayable text (caption).

void GuiTreeViewCtrl::Item::setValue ( const char *  val  ) 

Set the items script value (data).

void GuiTreeViewCtrl::Item::setVirtualParent ( bool  value  ) 

Set the items virtual parent flag.

const bool GuiTreeViewCtrl::Item::isExpanded (  )  const

Returns true if this item is expanded.

For inspector objects, the expansion is stored on the SimObject, for other things we use our bit vector.

const bool GuiTreeViewCtrl::Item::isInspectorData (  )  const [inline]

Returns true if an item is inspector data or false if it's just an item.

const bool GuiTreeViewCtrl::Item::isParent (  )  const

Returns true if we should show the expand art and make the item interact with the mouse as if it were a parent.

Item* GuiTreeViewCtrl::Item::findChildByValue ( const SimObject obj  ) 

Find an inspector data item by it's SimObject pointer.

Item* GuiTreeViewCtrl::Item::findChildByValue ( StringTableEntry  Value  ) 

Find a regular data item by it's script value.


Field Documentation




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