Go to the documentation of this file.
10 #include <Wt/WCompositeWidget>
68 TreeNode(
const std::string labelText,
69 Wt::TextFormat labelFormat,
70 IconPair *labelIcon, Wt::WContainerWidget *parent = 0);
148 #endif // WTREENODE_H_
void addChildNode(TreeNode *node)
Adds a child node.
Wt::WImage * noExpandIcon_
The single image shown instead of the expand/collapse icon when no children.
Wt::WContainerWidget * expandedContent_
The container in which the children are managed.
void collapse()
Collapses this node.
static std::string imagePlus_[]
Wt::WText * labelText_
The label.
TreeNode(const std::string labelText, Wt::TextFormat labelFormat, IconPair *labelIcon, Wt::WContainerWidget *parent=0)
Construct a tree node with the given label.
Example implementation of a single tree list node.
void expand()
Expands this node.
ImageIndex
Two sets of images, for a normal node, and for the last node.
IconPair * expandIcon_
The icon for expanding or collapsing.
An icon pair (identical to WIconPair)
Wt::WText * childCountLabel_
The children count '(x)' for x children.
const std::vector< TreeNode * > & childNodes() const
Returns the list of children.
static std::string imageMin_[]
void removeChildNode(TreeNode *node)
Removes a child node.
void adjustExpandIcon()
Adjust the expand icon.
void childNodesChanged()
Rerender when children have changed.
Wt::WTable * layout_
Layout (2x2 table).
TreeNode * parentNode_
The parent node.
static std::string imageLine_[]
std::vector< TreeNode * > childNodes_
List of child nodes.
IconPair * labelIcon_
The icon next to the label.
void undoCollapse()
Undo function for prelearning collapse()
bool isLastChildNode() const
Returns if is the last child within its parent (is rendered differently)
void undoExpand()
Undo function for prelearning expand()
bool wasCollapsed_
Was collapsed (for undo of prelearned collapse() and expand() slots.
Generated on Mon Sep 5 2022 for the
C++ Web Toolkit (Wt) by
1.8.17