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

VCF::TreeControl Class Reference

#include <vcf/ApplicationKit/TreeControl.h>

Inheritance diagram for VCF::TreeControl:

VCF::Control VCF::Component VCF::AbstractView VCF::ObjectWithEvents VCF::View VCF::Object List of all members.

Public Types

enum  TreeControlEvents { ITEM_STATECHANGE_REQUESTED = CUSTOM_EVENT_TYPES + ITEM_CONST + 10 }

Public Member Functions

 TreeControl ()
virtual ~TreeControl ()
virtual void handleEvent (Event *event)
 This gets called by the ControlPeer for any windowing system mouse events, as well as for any windowing system keyboard events and for any windowing system events like size changes, position changes, etc.
double getItemIndent ()
void setItemIndent (const double &indent)
void setTreeModel (TreeModel *model)
TreeModelgetTreeModel ()
ImageListgetImageList ()
ImageListgetStateImageList ()
void setImageList (ImageList *imageList)
void setStateImageList (ImageList *imageList)
virtual void paint (GraphicsContext *context)
 Paints the control.
void init ()
 This is going to be removed from the bext release.
TreeItemfindItem (Point *pt)
void addItem (TreeItem *parent, TreeItem *item)
TreeItemaddItem (TreeItem *parent, const String &caption=L"", const uint32 imageIndex=0)
void removeItem (TreeItem *item)
TreeItemgetSelectedItem ()
Rect getItemImageRect (TreeItem *item)
Rect getItemRect (TreeItem *item)
bool getAllowLabelEditing ()
void setAllowLabelEditing (const bool &allowLabelEditing)

Public Attributes

VCF::Delegate ItemSelected
VCF::Delegate ItemStateChangeRequested
VCF::Delegate ItemExpanded

Protected Member Functions

TreeItemhitTestForItem (Point *pt, TreeItem *item)
void onTreeItemPaint (ItemEvent *event)
void onTreeRootNodeChanged (TreeModelEvent *event)
void onTreeNodeAdded (TreeModelEvent *event)
void onTreeNodeDeleted (TreeModelEvent *event)
void onModelEmptied (ModelEvent *event)

Protected Attributes

TreePeertreePeer_
ImageListimageList_
ImageListstateImageList_
TreeModeltreeModel_
TreeItemcurrentSelectedItem_

Member Enumeration Documentation

enum VCF::TreeControl::TreeControlEvents
 

Enumerator:
ITEM_STATECHANGE_REQUESTED 


Constructor & Destructor Documentation

VCF::TreeControl::TreeControl  ) 
 

virtual VCF::TreeControl::~TreeControl  )  [virtual]
 


Member Function Documentation

TreeItem* VCF::TreeControl::addItem TreeItem parent,
const String caption = L"",
const uint32  imageIndex = 0
 

void VCF::TreeControl::addItem TreeItem parent,
TreeItem item
 

TreeItem* VCF::TreeControl::findItem Point pt  ) 
 

bool VCF::TreeControl::getAllowLabelEditing  ) 
 

ImageList* VCF::TreeControl::getImageList  ) 
 

Rect VCF::TreeControl::getItemImageRect TreeItem item  ) 
 

double VCF::TreeControl::getItemIndent  ) 
 

Rect VCF::TreeControl::getItemRect TreeItem item  ) 
 

TreeItem* VCF::TreeControl::getSelectedItem  ) 
 

ImageList* VCF::TreeControl::getStateImageList  ) 
 

TreeModel* VCF::TreeControl::getTreeModel  ) 
 

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

This gets called by the ControlPeer for any windowing system mouse events, as well as for any windowing system keyboard events and for any windowing system events like size changes, position changes, etc.

Once inside the event the Control determines the type, and behaves accordingly, as well as notifying any appropriate listeners.

Reimplemented from VCF::Control.

TreeItem* VCF::TreeControl::hitTestForItem Point pt,
TreeItem item
[protected]
 

void VCF::TreeControl::init  ) 
 

This is going to be removed from the bext release.

Deprecated:

Reimplemented from VCF::Object.

void VCF::TreeControl::onModelEmptied ModelEvent event  )  [protected]
 

void VCF::TreeControl::onTreeItemPaint ItemEvent event  )  [protected]
 

void VCF::TreeControl::onTreeNodeAdded TreeModelEvent event  )  [protected]
 

void VCF::TreeControl::onTreeNodeDeleted TreeModelEvent event  )  [protected]
 

void VCF::TreeControl::onTreeRootNodeChanged TreeModelEvent event  )  [protected]
 

virtual void VCF::TreeControl::paint GraphicsContext context  )  [virtual]
 

Paints the control.

Called by the underlying windowing system whenever the control needs to be painted. Note that in some cases the GraphicsContext passed in to this method may not be the same pointer as the GraphicsContext that the control holds itself. During the paint() method you should only use the context value for all your drawing and not the one returned in getContext(). The value returned by getContext() should be used for drawing that takes place outside of the paint() method.

If the control allows paint notification, then the framework will fire an event to the BeforeControlPainted delegate prior to calling the control's paint() method. After the paint() method has returned, if the control allows paint notification, the framework will fire an event to the AfterControlPainted delegate. This allows outside observers to take part in the paint cycle, but beware that this does come at a bit of a cost, so use this feature sparingly.

Note: This should NEVER be called by programmers using the VCF, it will be called for you during the course of your applications native event loop, and is only here for providing custom drawing routines for controls. In other words: you implement it, you never call it yourself.

See also:
getAllowPaintNotification

Implements VCF::Control.

void VCF::TreeControl::removeItem TreeItem item  ) 
 

void VCF::TreeControl::setAllowLabelEditing const bool &  allowLabelEditing  ) 
 

void VCF::TreeControl::setImageList ImageList imageList  ) 
 

void VCF::TreeControl::setItemIndent const double &  indent  ) 
 

void VCF::TreeControl::setStateImageList ImageList imageList  ) 
 

void VCF::TreeControl::setTreeModel TreeModel model  ) 
 


Member Data Documentation

TreeItem* VCF::TreeControl::currentSelectedItem_ [protected]
 

ImageList* VCF::TreeControl::imageList_ [protected]
 

VCF::Delegate VCF::TreeControl::ItemExpanded
 

VCF::Delegate VCF::TreeControl::ItemSelected
 

VCF::Delegate VCF::TreeControl::ItemStateChangeRequested
 

ImageList* VCF::TreeControl::stateImageList_ [protected]
 

TreeModel* VCF::TreeControl::treeModel_ [protected]
 

TreePeer* VCF::TreeControl::treePeer_ [protected]
 


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