Sourceforge.net - The VCF's Project Host
   The VCF Website Home   |   Online Discussion Forums   |   Sourceforge.net Project Page   

VCF::TreeItem Class Reference

#include <vcf/ApplicationKit/TreeItem.h>

Inheritance diagram for VCF::TreeItem:

VCF::Item VCF::UIComponent VCF::Component VCF::ObjectWithCallbacks VCF::Object List of all members.

Public Types

enum  TreeItemState { tisNone = 0, tisExpanded = 0x0100, tisFocused = 0x0200 }
enum  TreeItemEvent { tieBase = CUSTOM_EVENT_TYPES + 81000, tieExpanding }

Public Member Functions

 TreeItem ()
virtual ~TreeItem ()
virtual void setSelected (const bool &selected)
TreeModelgetTreeModel ()
TreeControllergetController ()
void setKey (TreeModel::Key val)
TreeModel::Key getKey ()
bool isLeaf ()
bool isRoot ()
bool isExpanded ()
void expand (const bool &val)
void expandAllChildren (const bool &isExpanded)
TreeItemgetParent ()
void setParent (TreeItem *parent)
TreeItemgetNextChildNodeItem ()
TreeItemgetPrevChildNodeItem ()
bool getChildren (std::vector< TreeItem * > &children)
String getCaption ()
uint32 getLevel ()
void setCaption (const String &caption)
uint32 getChildCount ()
void addChild (TreeItem *child)
void removeChild (TreeItem *child)
void clearChildren ()
int32 getSelectedImageIndex ()
void setSelectedImageIndex (const int32 &selectedImageIndex)
int32 getExpandedImageIndex ()
void setExpandedImageIndex (const int32 &expandedImageIndex)
virtual int32 getStateImageIndex () const
 This image index represents the state of an particular item separate from whether or not it is selected.
virtual void setStateImageIndex (const int32 &index)
TreeSubItemaddSubItem (const String &caption, void *data)
void addSubItem (TreeSubItem *subItem)
void removeSubItem (const uint32 &index)
bool getSubItems (std::vector< TreeSubItem * > &subItems)
TreeSubItemgetSubItem (const uint32 &index)
uint32 getSubItemCount ()
virtual void subItemChanged (TreeSubItem *item)
virtual uint64 sizeOf () const
 Returns the size of this instance.
virtual void handleEvent (Event *event)
 generic handler method for events.

Protected Attributes

TreeModel::Key key_
int32 selectedImageIndex_
int32 expandedImageIndex_
int32 stateImageIndex_
bool internalChange_

Member Enumeration Documentation

enum VCF::TreeItem::TreeItemEvent
 

Enumerator:
tieBase 
tieExpanding 

enum VCF::TreeItem::TreeItemState
 

Enumerator:
tisNone 
tisExpanded 
tisFocused 


Constructor & Destructor Documentation

VCF::TreeItem::TreeItem  ) 
 

virtual VCF::TreeItem::~TreeItem  )  [virtual]
 


Member Function Documentation

void VCF::TreeItem::addChild TreeItem child  ) 
 

void VCF::TreeItem::addSubItem TreeSubItem subItem  ) 
 

TreeSubItem* VCF::TreeItem::addSubItem const String caption,
void *  data
 

void VCF::TreeItem::clearChildren  ) 
 

void VCF::TreeItem::expand const bool &  val  ) 
 

void VCF::TreeItem::expandAllChildren const bool &  isExpanded  ) 
 

String VCF::TreeItem::getCaption  ) 
 

uint32 VCF::TreeItem::getChildCount  ) 
 

bool VCF::TreeItem::getChildren std::vector< TreeItem * > &  children  ) 
 

TreeController* VCF::TreeItem::getController  )  [inline]
 

int32 VCF::TreeItem::getExpandedImageIndex  )  [inline]
 

TreeModel::Key VCF::TreeItem::getKey  )  [inline]
 

uint32 VCF::TreeItem::getLevel  ) 
 

TreeItem* VCF::TreeItem::getNextChildNodeItem  ) 
 

TreeItem* VCF::TreeItem::getParent  ) 
 

TreeItem* VCF::TreeItem::getPrevChildNodeItem  ) 
 

int32 VCF::TreeItem::getSelectedImageIndex  )  [inline]
 

virtual int32 VCF::TreeItem::getStateImageIndex  )  const [inline, virtual]
 

This image index represents the state of an particular item separate from whether or not it is selected.

Typically it is offset horizontally from the regular image that getImageIndex() represents. This image is frequently used to represent check marks for things like tree or list controls.

Reimplemented from VCF::Item.

TreeSubItem* VCF::TreeItem::getSubItem const uint32 index  ) 
 

uint32 VCF::TreeItem::getSubItemCount  ) 
 

bool VCF::TreeItem::getSubItems std::vector< TreeSubItem * > &  subItems  ) 
 

TreeModel* VCF::TreeItem::getTreeModel  )  [inline]
 

virtual void VCF::TreeItem::handleEvent Event event  )  [virtual]
 

generic handler method for events.

All UI events are sent here and then dispatched accordingly to a more specific event handler. If an Application class is present, then it is given a chance to "see" the event first before delegating it to the Component.

All events are dispatched by their type so it is important to correctly identify the event objects type if you would like it to be dispatched correctly. The method will call the appropriate component method, like afterCreate(), beforeDestroy(), etc.

Parameters:
Event based on the value returned by Event::getType(),

Reimplemented from VCF::UIComponent.

bool VCF::TreeItem::isExpanded  )  [inline]
 

bool VCF::TreeItem::isLeaf  )  [inline]
 

bool VCF::TreeItem::isRoot  )  [inline]
 

void VCF::TreeItem::removeChild TreeItem child  ) 
 

void VCF::TreeItem::removeSubItem const uint32 index  ) 
 

void VCF::TreeItem::setCaption const String caption  ) 
 

void VCF::TreeItem::setExpandedImageIndex const int32 expandedImageIndex  ) 
 

void VCF::TreeItem::setKey TreeModel::Key  val  ) 
 

void VCF::TreeItem::setParent TreeItem parent  ) 
 

virtual void VCF::TreeItem::setSelected const bool &  selected  )  [virtual]
 

Reimplemented from VCF::Item.

void VCF::TreeItem::setSelectedImageIndex const int32 selectedImageIndex  ) 
 

virtual void VCF::TreeItem::setStateImageIndex const int32 index  )  [inline, virtual]
 

Reimplemented from VCF::Item.

virtual uint64 VCF::TreeItem::sizeOf  )  const [virtual]
 

Returns the size of this instance.

This may be signifigantly bigger than, say, sizeof(Object). For example, if your class derives from Object, and has list of other objects, (such as a Component), and various other bits, then these may not all show up in the value returned by sizeof(). Take a vector, a vector of ints or a vector of Object uses up 16 bytes, as reported by sizeof(). But the actual memory used will be quite different, partially dependent on how many items are in the vector. Hence the existence of this function, which allows people to implement something that does a better job of reporting how much memory the object in quest is actually using. The default implementation simply returns sizeof(Object).

Reimplemented from VCF::Object.

virtual void VCF::TreeItem::subItemChanged TreeSubItem item  )  [virtual]
 


Member Data Documentation

int32 VCF::TreeItem::expandedImageIndex_ [protected]
 

bool VCF::TreeItem::internalChange_ [protected]
 

TreeModel::Key VCF::TreeItem::key_ [protected]
 

int32 VCF::TreeItem::selectedImageIndex_ [protected]
 

int32 VCF::TreeItem::stateImageIndex_ [protected]
 


The documentation for this class was generated from the following file:
   Comments or Suggestions?    License Information