Wt::WTree Class Reference

A widget that represents a navigatable tree. More...

#include <Wt/WTree>

Inheritance diagram for Wt::WTree:

Inheritance graph
[legend]

List of all members.

Public Types

typedef std::set
< WTreeNode * > 
WTreeNodeSet
 Typedef for a set of WTreeNode's.

Public Member Functions

 WTree (WContainerWidget *parent=0)
 Create a new tree.
void setTreeRoot (WTreeNode *root)
 Set the tree root node.
WTreeNodetreeRoot () const
 Get the root node.
void setSelectionMode (SelectionMode mode)
 Set the selection mode.
SelectionMode selectionMode () const
 Get the selection mode.
const WTreeNodeSetselectedNodes () const
 Get the set of selected tree nodes.
void select (const WTreeNodeSet &nodes)
 Set a selection of tree nodes.
void select (WTreeNode *node, bool selected=true)
 Select or unselect the given node.
bool isSelected (WTreeNode *node) const
 Return if the given node is currently selected.
void clearSelection ()
 Clear the current selection.

Public Attributes

Signal itemSelectionChanged
 Signal that is emitted when the selection changes.


Detailed Description

A widget that represents a navigatable tree.

WTree provides a tree widget, and coordinates selection functionality. The tree is implemented as a hierarchy of WTreeNode objects.

Selection is rendered by calling WTreeNode::renderSelected(bool). Only tree nodes that are selectable may participate in the selection.

See also:
WTreeNode

Member Function Documentation

void Wt::WTree::setTreeRoot ( WTreeNode root  ) 

Set the tree root node.

See also:
treeRoot()

WTreeNode* Wt::WTree::treeRoot (  )  const [inline]

Get the root node.

See also:
setTreeRoot(WTreeNode *)

void Wt::WTree::setSelectionMode ( SelectionMode  mode  ) 

Set the selection mode.

The default selection mode is Wt::NoSelection.


Generated on Fri Jul 25 17:56:38 2008 for Wt by doxygen 1.5.3