csTreeItem Class Reference
[Tree box]
This class encapsulates a tree item.
More...
#include <csws/cstree.h>
Inheritance diagram for csTreeItem:

Public Member Functions | |
csTreeItem (csComponent *iParent, const char *iText, int iID=0, csTreeItemStyle iStyle=cstisNormal) | |
Tree item constructor: text item with optional style. | |
virtual | ~csTreeItem () |
Tree item destructor. | |
virtual bool | HandleEvent (iEvent &Event) |
Handle input events. | |
virtual void | Draw () |
Draw the tree item. | |
virtual void | SetState (int mask, bool enable) |
Handle additional state flags. | |
virtual bool | SetFocused (csComponent *comp) |
Invalidate ourselves when the focus goes to one of our children. | |
virtual void | Insert (csComponent *comp) |
Tell parent to re-position items. | |
virtual void | Delete (csComponent *comp) |
Tell parent to re-position items. | |
virtual void | SuggestSize (int &w, int &h) |
Report the minimal size of tree item. | |
void | SuggestTotalSize (int &w, int &h, int &totw, int &toth) |
Report the minimal size of tree item and total size with children. | |
void | SetBitmap (csPixmap *iBitmap, csPixmap *iBitmapOpen=0, bool iDelete=true) |
Set tree item image (possibly for open state too). | |
void | SetChildOffset (int ihOffset) |
Set horizontal offset of child items. | |
int | Toggle (int iAction=2) |
Toggle the open state of the branch: 0: collapse, 1: expand, other: toggle. | |
csTreeItem * | ForEachItem (bool(*func)(csTreeItem *child, void *param), void *param=0, bool iOnlyOpen=false) |
For each subtree item call a function with a optional arg Function returns the first child on which func returnes 'true' Optionally you can pass an "only for opened branches" flag, so that only visible branches will be handled. | |
void | ResetButton () |
Force a reset of button size & position. | |
Friends | |
class | csTreeBox |
Detailed Description
This class encapsulates a tree item.The tree item always contains an "expand/collapse" button, optionally contains two pixmaps (shown depending on the expanded state), and a text string. The button is displayed only if tree has child items. Also the tree item can contain any number of child (subordinate) tree items. Note that the tree item can contain ONLY other csTreeItem's and their derivates; the only exception is the button component which is handled specialy. Inserting something other than a csTreeItem into another csTreeItem will crash, since csTreeItem often does unconditional typecasts to csTreeItem.
Definition at line 249 of file cstree.h.
Constructor & Destructor Documentation
|
Tree item constructor: text item with optional style.
|
|
Tree item destructor.
|
Member Function Documentation
|
Tell parent to re-position items.
Reimplemented from csComponent. |
|
Draw the tree item.
Reimplemented from csComponent. |
|
For each subtree item call a function with a optional arg Function returns the first child on which func returnes 'true' Optionally you can pass an "only for opened branches" flag, so that only visible branches will be handled.
|
|
Handle input events.
Reimplemented from csComponent. |
|
Tell parent to re-position items.
Reimplemented from csComponent. |
|
Force a reset of button size & position.
Definition at line 326 of file cstree.h. References cscmdTreeItemSizeChangeNotify, csComponent::SendCommand(), and csComponent::SetRect(). |
|
Set tree item image (possibly for open state too).
|
|
Set horizontal offset of child items.
|
|
Invalidate ourselves when the focus goes to one of our children.
Reimplemented from csComponent. |
|
Handle additional state flags.
Reimplemented from csComponent. |
|
Report the minimal size of tree item.
Reimplemented from csComponent. |
|
Report the minimal size of tree item and total size with children.
|
|
Toggle the open state of the branch: 0: collapse, 1: expand, other: toggle.
|
The documentation for this class was generated from the following file:
- csws/cstree.h
Generated for Crystal Space by doxygen 1.3.9.1