Inheritance diagram for os::TreeView:
Public Member Functions | |
TreeView (const Rect &cFrame, const String &cTitle, uint32 nModeFlags=F_MULTI_SELECT|F_RENDER_BORDER, uint32 nResizeMask=CF_FOLLOW_LEFT|CF_FOLLOW_TOP, uint32 nFlags=WID_WILL_DRAW|WID_FULL_UPDATE_ON_RESIZE) | |
~TreeView () | |
void | InsertNode (TreeViewNode *pcNode, bool bUpdate=true) |
Insert a node at the end. | |
void | InsertNode (int nPos, TreeViewNode *pcNode, bool bUpdate=true) |
Insert a node at a certain position. | |
TreeViewNode * | RemoveNode (int nIndex, bool bUpdate=true) |
Remove a node. | |
ListViewRow * | RemoveRow (int nIndex, bool bUpdate=true) |
Remove a row. | |
void | Clear () |
Clear list. | |
void | Expand (TreeViewNode *pcNode) |
Expand a node. | |
void | Collapse (TreeViewNode *pcNode) |
Collapse a node. | |
bool | HasChildren (TreeViewNode *pcRow) |
Find out if a node has sub nodes. | |
TreeViewNode * | GetParent (TreeViewNode *pcNode=NULL) |
Get parent node. | |
TreeViewNode * | GetChild (TreeViewNode *pcNode=NULL) |
Get child node. | |
TreeViewNode * | GetNext (TreeViewNode *pcNode=NULL) |
Get next sibling. | |
TreeViewNode * | GetPrev (TreeViewNode *pcNode=NULL) |
Get previous sibling. | |
void | GetChildren (std::vector< TreeViewNode * > &cvecChildren, TreeViewNode *pcNode=NULL) |
Get subnodes. | |
void | GetSiblings (std::vector< TreeViewNode * > &cvecSiblings, TreeViewNode *pcNode=NULL) |
Get sibling nodes. | |
void | SetExpandedMessage (Message *pcMsg) |
Set expand/collapse message. | |
Message * | GetExpandedMessage () const |
Set expand/collapse message. | |
void | SetExpandedImage (Image *pcImage) |
Set expander image when expanded. | |
void | SetCollapsedImage (Image *pcImage) |
Set expander image when collapsed. | |
Image * | GetExpandedImage () const |
Get expander image when expanded. | |
Image * | GetCollapsedImage () const |
Get expander image when expanded. | |
bool | GetDrawExpanderBox () const |
Draw box around expander image. | |
void | SetDrawExpanderBox (const bool bDraw) |
Draw box around expander image. | |
uint | GetIndentWidth () const |
Get indentation width. | |
void | SetIndentWidth (uint nIndentWidth) |
Set indentation width. | |
bool | GetDrawTrunk () const |
Draw tree trunk. | |
void | SetDrawTrunk (bool bDraw) |
Draw tree trunk. | |
const Rect & | GetExpanderImageBounds () const |
Get max size of expander image. | |
virtual void | SortRows (std::vector< ListViewRow * > *pcRows, int nColumn) |
Sort rows. | |
virtual void | Paint (const Rect &cUpdateRect) |
Called by the system update "damaged" areas of the view. | |
Classes | |
class | Private |
TreeView::TreeView | ( | const Rect & | cFrame, | |
const String & | cTitle, | |||
uint32 | nModeFlags = F_MULTI_SELECT|F_RENDER_BORDER , |
|||
uint32 | nResizeMask = CF_FOLLOW_LEFT|CF_FOLLOW_TOP , |
|||
uint32 | nFlags = WID_WILL_DRAW|WID_FULL_UPDATE_ON_RESIZE | |||
) |
TreeView::~TreeView | ( | ) |
void TreeView::InsertNode | ( | TreeViewNode * | pcNode, | |
bool | bUpdate = true | |||
) |
nPos | Zero-based index to insert position. | |
pcNode | Pointer to node to insert. | |
bUpdate | Set to true to refresh TreeView. |
void TreeView::InsertNode | ( | int | nPos, | |
TreeViewNode * | pcNode, | |||
bool | bUpdate = true | |||
) |
nPos | Zero-based index to insert position. | |
pcNode | Pointer to node to insert. | |
bUpdate | Set to true to refresh TreeView. |
TreeViewNode * TreeView::RemoveNode | ( | int | nIndex, | |
bool | bUpdate = true | |||
) |
ListViewRow * TreeView::RemoveRow | ( | int | nIndex, | |
bool | bUpdate = true | |||
) |
nIndex | Row index. | |
bUpdate | Update display. If many operations are performed, often only the last one need to update the display. |
Reimplemented from os::ListView.
void TreeView::Clear | ( | ) |
void TreeView::Expand | ( | TreeViewNode * | pcNode | ) |
pcNode | Pointer to node to expand. |
void TreeView::Collapse | ( | TreeViewNode * | pcNode | ) |
pcNode | Pointer to node to collapse. |
bool TreeView::HasChildren | ( | TreeViewNode * | pcNode | ) |
pcNode | Pointer to node. |
TreeViewNode * TreeView::GetParent | ( | TreeViewNode * | pcNode = NULL |
) |
pcNode | Pointer to node. |
TreeViewNode * TreeView::GetChild | ( | TreeViewNode * | pcNode = NULL |
) |
pcNode | Pointer to node. |
TreeViewNode * TreeView::GetNext | ( | TreeViewNode * | pcNode = NULL |
) |
pcNode | Pointer to node. |
TreeViewNode * TreeView::GetPrev | ( | TreeViewNode * | pcNode = NULL |
) |
pcNode | Pointer to node. |
void TreeView::GetChildren | ( | std::vector< TreeViewNode * > & | cvecChildren, | |
TreeViewNode * | pcNode = NULL | |||
) |
cvecChildren | std::vector to be filled with pointers to nodes. | |
pcNode | Pointer to node to examine or NULL for selected node. |
void TreeView::GetSiblings | ( | std::vector< TreeViewNode * > & | cvecSiblings, | |
TreeViewNode * | pcNode = NULL | |||
) |
cvecSibling | std::vector to be filled with pointers to nodes. | |
pcNode | Pointer to node to examine or NULL for selected node. |
void TreeView::SetExpandedMessage | ( | Message * | pcMsg | ) |
pcMsg | Pointer to message to send. |
Message * TreeView::GetExpandedMessage | ( | ) | const |
void TreeView::SetExpandedImage | ( | Image * | pcImage | ) |
pcImage | Pointer to image to use for expander image. |
void TreeView::SetCollapsedImage | ( | Image * | pcImage | ) |
pcImage | Pointer to image to use for expander image. |
Image * TreeView::GetExpandedImage | ( | ) | const |
Image * TreeView::GetCollapsedImage | ( | ) | const |
bool TreeView::GetDrawExpanderBox | ( | ) | const |
void TreeView::SetDrawExpanderBox | ( | const bool | bDraw | ) |
uint TreeView::GetIndentWidth | ( | ) | const |
void TreeView::SetIndentWidth | ( | uint | nIndentWidth | ) |
bool TreeView::GetDrawTrunk | ( | ) | const |
void TreeView::SetDrawTrunk | ( | bool | bDraw | ) |
const Rect & TreeView::GetExpanderImageBounds | ( | ) | const |
void TreeView::SortRows | ( | std::vector< ListViewRow * > * | pcRows, | |
int | nColumn | |||
) | [virtual] |
pcRows | std::vector of ListViewRows to be sorted. | |
nColumn | The column to sort by. |
Reimplemented from os::ListView.
void TreeView::Paint | ( | const Rect & | cUpdateRect | ) | [virtual] |
cUpdateRect | A rectangle enclosing all damaged areas. This is just a rough "worst-case", further fine-grained clipping will be performed by the Application Server to avoid updating non-damaged pixels and make the update as fast and flicker-free as possible. |
Reimplemented from os::ListView.