Wt examples  4.0.0
Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
TreeNode Class Reference

Example implementation of a single tree list node. More...

#include <TreeNode.h>

Inheritance diagram for TreeNode:
Inheritance graph
[legend]

Public Member Functions

 TreeNode (const std::string labelText, TextFormat labelFormat, std::unique_ptr< IconPair > labelIcon)
 Construct a tree node with the given label. More...
 
void addChildNode (std::unique_ptr< TreeNode > node)
 Adds a child node. More...
 
void removeChildNode (TreeNode *node, int index)
 Removes a child node. More...
 
const std::vector< TreeNode * > & childNodes () const
 Returns the list of children. More...
 
void collapse ()
 Collapses this node. More...
 
void expand ()
 Expands this node. More...
 
- Public Member Functions inherited from Wt::WCompositeWidget
 WCompositeWidget ()
 
 WCompositeWidget (std::unique_ptr< WWidget > implementation)
 
virtual std::vector< WWidget * > children () const override
 
virtual std::unique_ptr< WWidgetremoveWidget (WWidget *widget) override
 
virtual void setObjectName (const std::string &name) override
 
virtual std::string objectName () const override
 
virtual const std::string id () const override
 
virtual void setPositionScheme (PositionScheme scheme) override
 
virtual PositionScheme positionScheme () const override
 
virtual void setOffsets (const WLength &offset, WFlags< Side > sides=AllSides) override
 
virtual WLength offset (Side s) const override
 
virtual void resize (const WLength &width, const WLength &height) override
 
virtual WLength width () const override
 
virtual WLength height () const override
 
virtual void setMinimumSize (const WLength &width, const WLength &height) override
 
virtual WLength minimumWidth () const override
 
virtual WLength minimumHeight () const override
 
virtual void setMaximumSize (const WLength &width, const WLength &height) override
 
virtual WLength maximumWidth () const override
 
virtual WLength maximumHeight () const override
 
virtual void setLineHeight (const WLength &height) override
 
virtual WLength lineHeight () const override
 
virtual void setFloatSide (Side s) override
 
virtual Side floatSide () const override
 
virtual void setClearSides (WFlags< Side > sides) override
 
virtual WFlags< SideclearSides () const override
 
virtual void setMargin (const WLength &margin, WFlags< Side > sides=AllSides) override
 
virtual WLength margin (Side side) const override
 
virtual void setHiddenKeepsGeometry (bool enabled) override
 
virtual bool hiddenKeepsGeometry () const override
 
virtual void setHidden (bool hidden, const WAnimation &animation=WAnimation()) override
 
virtual bool isHidden () const override
 
virtual bool isVisible () const override
 
virtual void setDisabled (bool disabled) override
 
virtual bool isDisabled () const override
 
virtual bool isEnabled () const override
 
virtual void setPopup (bool popup) override
 
virtual bool isPopup () const override
 
virtual void setInline (bool isInline) override
 
virtual bool isInline () const override
 
virtual void setDecorationStyle (const WCssDecorationStyle &style) override
 
virtual WCssDecorationStyledecorationStyle () override
 
virtual void setStyleClass (const WString &styleClass) override
 
virtual WString styleClass () const override
 
virtual void addStyleClass (const WString &styleClass, bool force=false) override
 
virtual void removeStyleClass (const WString &styleClass, bool force=false) override
 
virtual bool hasStyleClass (const WString &styleClass) const override
 
virtual void setVerticalAlignment (AlignmentFlag alignment, const WLength &length=WLength::Auto) override
 
virtual AlignmentFlag verticalAlignment () const override
 
virtual WLength verticalAlignmentLength () const override
 
virtual void setToolTip (const WString &text, TextFormat textFormat=TextFormat::Plain) override
 
virtual WString toolTip () const override
 
virtual void setDeferredToolTip (bool enable, TextFormat textFormat=TextFormat::Plain) override
 
virtual void refresh () override
 
virtual void setAttributeValue (const std::string &name, const WString &value) override
 
virtual WString attributeValue (const std::string &name) const override
 
virtual void setJavaScriptMember (const std::string &name, const std::string &value) override
 
virtual std::string javaScriptMember (const std::string &name) const override
 
virtual void callJavaScriptMember (const std::string &name, const std::string &args) override
 
virtual void load () override
 
virtual bool loaded () const override
 
virtual void setCanReceiveFocus (bool enabled) override
 
virtual bool canReceiveFocus () const override
 
virtual void setFocus (bool focus) override
 
virtual bool setFirstFocus () override
 
virtual bool hasFocus () const override
 
virtual void setTabIndex (int index) override
 
virtual int tabIndex () const override
 
virtual void setId (const std::string &id) override
 
virtual WWidgetfind (const std::string &name) override
 
virtual WWidgetfindById (const std::string &name) override
 
virtual void setSelectable (bool selectable) override
 
virtual void doJavaScript (const std::string &js) override
 
virtual void propagateSetEnabled (bool enabled) override
 
virtual bool scrollVisibilityEnabled () const finaloverride
 
virtual void setScrollVisibilityEnabled (bool enabled) finaloverride
 
virtual int scrollVisibilityMargin () const finaloverride
 
virtual void setScrollVisibilityMargin (int margin) finaloverride
 
virtual Signal< bool > & scrollVisibilityChanged () finaloverride
 
virtual bool isScrollVisible () const finaloverride
 
virtual void setThemeStyleEnabled (bool enabled) finaloverride
 
virtual bool isThemeStyleEnabled () const finaloverride
 
- Public Member Functions inherited from Wt::WWidget
virtual ~WWidget ()
 
WWidgetparent () const
 
std::unique_ptr< WWidgetremoveFromParent ()
 
void setWidth (const WLength &width)
 
void setHeight (const WLength &height)
 
virtual void positionAt (const WWidget *widget, Orientation orientation=Orientation::Vertical)
 
virtual void toggleStyleClass (const WString &styleClass, bool add, bool force=false)
 
std::string jsRef () const
 
void setFocus ()
 
virtual void acceptDrops (const std::string &mimeType, const WString &hoverStyleClass=WString())
 
virtual void stopAcceptDrops (const std::string &mimeType)
 
virtual void htmlText (std::ostream &out)
 
bool isRendered () const
 
void hide ()
 
void animateHide (const WAnimation &animation)
 
void show ()
 
void animateShow (const WAnimation &animation)
 
void enable ()
 
void disable ()
 
bool layoutSizeAware () const
 
- Public Member Functions inherited from Wt::WObject
void addChild (std::unique_ptr< WObject > child)
 
Child * addChild (std::unique_ptr< Child > child)
 
std::unique_ptr< WObjectremoveChild (WObject *child)
 
void resetLearnedSlots ()
 
void resetLearnedSlot (void(T::*method)())
 
WStatelessSlot * implementStateless (void(T::*method)())
 
WStatelessSlot * implementStateless (void(T::*method)(), void(T::*undoMethod)())
 
void isNotStateless ()
 
WStatelessSlot * implementJavaScript (void(T::*method)(), const std::string &jsCode)
 
- Public Member Functions inherited from Wt::Core::observable
 observable ()
 
virtual ~observable ()
 
auto bindSafe (void(C::*method)(Args...))
 
auto bindSafe (void(C::*method)(Args...) const) const
 
auto bindSafe (const Function &function)
 

Private Types

enum  ImageIndex { Middle = 0, Last = 1 }
 Two sets of images, for a normal node, and for the last node. More...
 

Private Member Functions

void adjustExpandIcon ()
 Adjust the expand icon. More...
 
bool isLastChildNode () const
 Returns if is the last child within its parent (is rendered differently) More...
 
void childNodesChanged ()
 Rerender when children have changed. More...
 
void undoCollapse ()
 Undo function for prelearning collapse() More...
 
void undoExpand ()
 Undo function for prelearning expand() More...
 

Private Attributes

std::vector< TreeNode * > childNodes_
 List of child nodes. More...
 
TreeNodeparentNode_
 The parent node. More...
 
WTablelayout_
 Layout (2x2 table). More...
 
IconPairexpandIcon_
 The icon for expanding or collapsing. More...
 
WImage * noExpandIcon_
 The single image shown instead of the expand/collapse icon when no children. More...
 
IconPairlabelIcon_
 The icon next to the label. More...
 
std::unique_ptr< WTextlabelText_
 The label. More...
 
WTextchildCountLabel_
 The children count '(x)' for x children. More...
 
WContainerWidgetexpandedContent_
 The container in which the children are managed. More...
 
bool wasCollapsed_
 Was collapsed (for undo of prelearned collapse() and expand() slots. More...
 

Static Private Attributes

static std::string imageLine_ []
 
static std::string imagePlus_ []
 
static std::string imageMin_ []
 

Additional Inherited Members

- Public Types inherited from Wt::WObject
typedef void(WObject::* Method) ()
 
- Static Public Member Functions inherited from Wt::WWidget
static WString tr (const char *key)
 
- Protected Member Functions inherited from Wt::WCompositeWidget
virtual void enableAjax () override
 
void setImplementation (std::unique_ptr< WWidget > widget)
 
WWidgetimplementation ()
 
virtual int boxPadding (Orientation orientation) const override
 
virtual int boxBorder (Orientation orientation) const override
 
virtual void render (WFlags< RenderFlag > flags) override
 
- Protected Member Functions inherited from Wt::WWidget
void setLayoutSizeAware (bool sizeAware)
 
virtual void layoutSizeChanged (int width, int height)
 
 WWidget ()
 
virtual void dropEvent (WDropEvent dropEvent)
 
void scheduleRender (WFlags< RepaintFlag > flags=None)
 
virtual WStatelessSlot * getStateless (Method method) override
 

Detailed Description

Example implementation of a single tree list node.

This is an example of a basic treelist implementation. As of version 1.1.8, a more flexible treenode implementation is included as part of the library: WTreeNode.

A tree list is constructed by nesting TreeNode objects in a tree hierarchy.

A TreeNode has a label, and optionally a two-state label icon, which defines a different image depending on the state of the node (expanded or collapsed). When the node has any children, a child count is also indicated.

Next to the icons, two style classes determine the look of a TreeNode: the label has style "treenodelabel", and the child count has as style "treenodechildcount".

Use CSS nested selectors to apply different styles to different treenodes. For example, to style the treenode with style class "mynode":

The behaviour of the tree node is to collapse all children when the node is expanded (this is similar to how most tree node implementations work).

The widget uses a number of images which must be available in an "icons/" folder (see the Wt treelist examples).

This widget is part of the Wt treelist example.

Definition at line 57 of file TreeNode.h.

Member Enumeration Documentation

enum TreeNode::ImageIndex
private

Two sets of images, for a normal node, and for the last node.

Enumerator
Middle 
Last 

Definition at line 141 of file TreeNode.h.

141 { Middle = 0, Last = 1 };

Constructor & Destructor Documentation

TreeNode::TreeNode ( const std::string  labelText,
TextFormat  labelFormat,
std::unique_ptr< IconPair labelIcon 
)

Construct a tree node with the given label.

The label is formatted in a WText with the given formatting. The labelIcon (if not 0) will appear next to the label and its state will reflect the expand/collapse state of the node.

Optionally, a userContent widget may be associated with the node. When expanded, this widget will be shown below the widget, but above any of the children nodes.

Definition at line 26 of file TreeNode.C.

29  : WCompositeWidget(),
30  parentNode_(nullptr),
31  labelIcon_(labelIcon.get())
32 {
33  // pre-learned stateless implementations ...
36 
37  // ... or auto-learned stateless implementations
38  // which do not need undo functions
39  //implementStateless(&TreeNode::expand);
40  //implementStateless(&TreeNode::collapse);
41 
42  auto layout = cpp14::make_unique<WTable>();
43  layout_ = layout.get();
44  setImplementation(std::move(layout));
45 
46  auto expandIcon =
47  cpp14::make_unique<IconPair>(imagePlus_[Last], imageMin_[Last]);
48  expandIcon_ = expandIcon.get();
49  expandIcon_->hide();
50 
51  auto noExpandIcon =
52  cpp14::make_unique<WImage>(imageLine_[Last]);
53 
54  noExpandIcon_ = noExpandIcon.get();
55 
56  auto expandedContent = cpp14::make_unique<WContainerWidget>();
57  expandedContent_ = expandedContent.get();
58  expandedContent_->hide();
59 
60  labelText_ = cpp14::make_unique<WText>(labelText);
61  labelText_->setTextFormat(labelFormat);
62  labelText_->setStyleClass("treenodelabel");
63 
64  auto childCountLabel = cpp14::make_unique<WText>();
65  childCountLabel_ = childCountLabel.get();
66  childCountLabel_->setMargin(7, Side::Left);
67  childCountLabel_->setStyleClass("treenodechildcount");
68 
69  layout_->elementAt(0, 0)->addWidget(std::move(expandIcon));
70  layout_->elementAt(0, 0)->addWidget(std::move(noExpandIcon));
71 
72  if (labelIcon) {
73  layout_->elementAt(0, 1)->addWidget(std::move(labelIcon));
74  labelIcon_->setVerticalAlignment(AlignmentFlag::Middle);
75  }
76  layout_->elementAt(0, 1)->addWidget(std::move(labelText_));
77  layout_->elementAt(0, 1)->addWidget(std::move(childCountLabel));
78 
79  layout_->elementAt(1, 1)->addWidget(std::move(expandedContent));
80 
81  layout_->elementAt(0, 0)->setContentAlignment(AlignmentFlag::Top);
82  layout_->elementAt(0, 1)->setContentAlignment(AlignmentFlag::Middle);
83 
84  expandIcon_->icon1Clicked.connect(this, &TreeNode::expand);
85  expandIcon_->icon2Clicked.connect(this, &TreeNode::collapse);
86 }
WContainerWidget * expandedContent_
The container in which the children are managed.
Definition: TreeNode.h:120
void undoExpand()
Undo function for prelearning expand()
Definition: TreeNode.C:171
void undoCollapse()
Undo function for prelearning collapse()
Definition: TreeNode.C:160
virtual void setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength::Auto) override
void expand()
Expands this node.
Definition: TreeNode.C:144
TreeNode * parentNode_
The parent node.
Definition: TreeNode.h:99
WStatelessSlot * implementStateless(void(T::*method)())
WText * childCountLabel_
The children count &#39;(x)&#39; for x children.
Definition: TreeNode.h:117
virtual void setMargin(const WLength &margin, WFlags< Side > sides=AllSides) override
static std::string imageMin_[]
Definition: TreeNode.h:145
IconPair * labelIcon_
The icon next to the label.
Definition: TreeNode.h:111
void setImplementation(std::unique_ptr< WWidget > widget)
IconPair * expandIcon_
The icon for expanding or collapsing.
Definition: TreeNode.h:105
static std::string imageLine_[]
Definition: TreeNode.h:143
static std::string imagePlus_[]
Definition: TreeNode.h:144
WTable * layout_
Layout (2x2 table).
Definition: TreeNode.h:102
WImage * noExpandIcon_
The single image shown instead of the expand/collapse icon when no children.
Definition: TreeNode.h:108
std::unique_ptr< WText > labelText_
The label.
Definition: TreeNode.h:114
void collapse()
Collapses this node.
Definition: TreeNode.C:134

Member Function Documentation

void TreeNode::addChildNode ( std::unique_ptr< TreeNode node)

Adds a child node.

Definition at line 96 of file TreeNode.C.

97 {
98  childNodes_.push_back(node.get());
99  node->parentNode_ = this;
100 
101  expandedContent_->addWidget(std::move(node));
102 
104 }
WContainerWidget * expandedContent_
The container in which the children are managed.
Definition: TreeNode.h:120
std::vector< TreeNode * > childNodes_
List of child nodes.
Definition: TreeNode.h:96
void childNodesChanged()
Rerender when children have changed.
Definition: TreeNode.C:117
virtual void addWidget(std::unique_ptr< WWidget > widget)
void TreeNode::adjustExpandIcon ( )
private

Adjust the expand icon.

Definition at line 188 of file TreeNode.C.

189 {
190  ImageIndex index = isLastChildNode() ? Last : Middle;
191 
192  if (expandIcon_->icon1()->imageLink().url() != imagePlus_[index])
193  expandIcon_->icon1()->setImageLink(imagePlus_[index]);
194  if (expandIcon_->icon2()->imageLink().url() != imageMin_[index])
195  expandIcon_->icon2()->setImageLink(imageMin_[index]);
196  if (noExpandIcon_->imageLink().url() != imageLine_[index])
197  noExpandIcon_->setImageLink(imageLine_[index]);
198 
199  if (index == Last) {
200  layout_->elementAt(0, 0)
202  layout_->elementAt(1, 0)
204  } else {
205  layout_->elementAt(0, 0)
206  ->decorationStyle().setBackgroundImage("icons/line-trunk.gif",
207  Orientation::Vertical);
208  layout_->elementAt(1, 0)
209  ->decorationStyle().setBackgroundImage("icons/line-trunk.gif",
210  Orientation::Vertical);
211  }
212 
213  if (childNodes_.empty()) {
214  if (noExpandIcon_->isHidden()) {
215  noExpandIcon_->show();
216  expandIcon_->hide();
217  }
218  } else {
219  if (expandIcon_->isHidden()) {
220  noExpandIcon_->hide();
221  expandIcon_->show();
222  }
223  }
224 }
virtual WCssDecorationStyle & decorationStyle() override
ImageIndex
Two sets of images, for a normal node, and for the last node.
Definition: TreeNode.h:141
WImage * icon1() const
Get the first icon image.
Definition: IconPair.h:63
virtual bool isHidden() const override
void setBackgroundImage(const WLink &link, WFlags< Orientation > repeat=Orientation::Horizontal|Orientation::Vertical, WFlags< Side > sides=None)
WImage * icon2() const
Get the second icon image.
Definition: IconPair.h:67
std::vector< TreeNode * > childNodes_
List of child nodes.
Definition: TreeNode.h:96
static std::string imageMin_[]
Definition: TreeNode.h:145
WTableCell * elementAt(int row, int column)
bool isLastChildNode() const
Returns if is the last child within its parent (is rendered differently)
Definition: TreeNode.C:88
IconPair * expandIcon_
The icon for expanding or collapsing.
Definition: TreeNode.h:105
static std::string imageLine_[]
Definition: TreeNode.h:143
static std::string imagePlus_[]
Definition: TreeNode.h:144
WTable * layout_
Layout (2x2 table).
Definition: TreeNode.h:102
WImage * noExpandIcon_
The single image shown instead of the expand/collapse icon when no children.
Definition: TreeNode.h:108
const std::vector<TreeNode *>& TreeNode::childNodes ( ) const
inline

Returns the list of children.

Definition at line 84 of file TreeNode.h.

84 { return childNodes_; }
std::vector< TreeNode * > childNodes_
List of child nodes.
Definition: TreeNode.h:96
void TreeNode::childNodesChanged ( )
private

Rerender when children have changed.

Definition at line 117 of file TreeNode.C.

118 {
119  for (auto node : childNodes_)
120  node->adjustExpandIcon();
121 
123 
124  if (childNodes_.size())
126  ->setText("(" + std::to_string(childNodes_.size())
127  + ")");
128  else
130 
132 }
bool setText(const WString &text)
WText * childCountLabel_
The children count &#39;(x)&#39; for x children.
Definition: TreeNode.h:117
std::vector< TreeNode * > childNodes_
List of child nodes.
Definition: TreeNode.h:96
void resetLearnedSlots()
void adjustExpandIcon()
Adjust the expand icon.
Definition: TreeNode.C:188
void TreeNode::collapse ( )

Collapses this node.

Definition at line 134 of file TreeNode.C.

135 {
137 
138  expandIcon_->setState(0);
140  if (labelIcon_)
141  labelIcon_->setState(0);
142 }
WContainerWidget * expandedContent_
The container in which the children are managed.
Definition: TreeNode.h:120
void setState(int num)
Set which icon should be visible.
Definition: IconPair.C:43
IconPair * labelIcon_
The icon next to the label.
Definition: TreeNode.h:111
bool wasCollapsed_
Was collapsed (for undo of prelearned collapse() and expand() slots.
Definition: TreeNode.h:132
IconPair * expandIcon_
The icon for expanding or collapsing.
Definition: TreeNode.h:105
virtual bool isHidden() const override
void TreeNode::expand ( )

Expands this node.

Definition at line 144 of file TreeNode.C.

145 {
147 
148  expandIcon_->setState(1);
150  if (labelIcon_)
151  labelIcon_->setState(1);
152 
153  /*
154  * collapse all children
155  */
156  for (auto node : childNodes_)
157  node->collapse();
158 }
WContainerWidget * expandedContent_
The container in which the children are managed.
Definition: TreeNode.h:120
void setState(int num)
Set which icon should be visible.
Definition: IconPair.C:43
std::vector< TreeNode * > childNodes_
List of child nodes.
Definition: TreeNode.h:96
IconPair * labelIcon_
The icon next to the label.
Definition: TreeNode.h:111
bool wasCollapsed_
Was collapsed (for undo of prelearned collapse() and expand() slots.
Definition: TreeNode.h:132
IconPair * expandIcon_
The icon for expanding or collapsing.
Definition: TreeNode.h:105
virtual bool isHidden() const override
bool TreeNode::isLastChildNode ( ) const
private

Returns if is the last child within its parent (is rendered differently)

Definition at line 88 of file TreeNode.C.

89 {
90  if (parentNode_) {
91  return parentNode_->childNodes_.back() == this;
92  } else
93  return true;
94 }
TreeNode * parentNode_
The parent node.
Definition: TreeNode.h:99
std::vector< TreeNode * > childNodes_
List of child nodes.
Definition: TreeNode.h:96
void TreeNode::removeChildNode ( TreeNode node,
int  index 
)

Removes a child node.

Definition at line 106 of file TreeNode.C.

107 {
108  childNodes_.erase(childNodes_.begin() + index);
109 
110  node->parentNode_ = nullptr;
111 
113 
115 }
WContainerWidget * expandedContent_
The container in which the children are managed.
Definition: TreeNode.h:120
TreeNode * parentNode_
The parent node.
Definition: TreeNode.h:99
std::vector< TreeNode * > childNodes_
List of child nodes.
Definition: TreeNode.h:96
virtual std::unique_ptr< WWidget > removeWidget(WWidget *widget) override
void childNodesChanged()
Rerender when children have changed.
Definition: TreeNode.C:117
void TreeNode::undoCollapse ( )
private

Undo function for prelearning collapse()

Definition at line 160 of file TreeNode.C.

161 {
162  if (!wasCollapsed_) {
163  // re-expand
164  expandIcon_->setState(1);
166  if (labelIcon_)
167  labelIcon_->setState(1);
168  }
169 }
WContainerWidget * expandedContent_
The container in which the children are managed.
Definition: TreeNode.h:120
void setState(int num)
Set which icon should be visible.
Definition: IconPair.C:43
IconPair * labelIcon_
The icon next to the label.
Definition: TreeNode.h:111
bool wasCollapsed_
Was collapsed (for undo of prelearned collapse() and expand() slots.
Definition: TreeNode.h:132
IconPair * expandIcon_
The icon for expanding or collapsing.
Definition: TreeNode.h:105
void TreeNode::undoExpand ( )
private

Undo function for prelearning expand()

Definition at line 171 of file TreeNode.C.

172 {
173  if (wasCollapsed_) {
174  // re-collapse
175  expandIcon_->setState(0);
177  if (labelIcon_)
178  labelIcon_->setState(0);
179  }
180 
181  /*
182  * undo collapse of children
183  */
184  for (auto node : childNodes_)
185  node->undoCollapse();
186 }
WContainerWidget * expandedContent_
The container in which the children are managed.
Definition: TreeNode.h:120
void setState(int num)
Set which icon should be visible.
Definition: IconPair.C:43
std::vector< TreeNode * > childNodes_
List of child nodes.
Definition: TreeNode.h:96
IconPair * labelIcon_
The icon next to the label.
Definition: TreeNode.h:111
bool wasCollapsed_
Was collapsed (for undo of prelearned collapse() and expand() slots.
Definition: TreeNode.h:132
IconPair * expandIcon_
The icon for expanding or collapsing.
Definition: TreeNode.h:105

Member Data Documentation

WText* TreeNode::childCountLabel_
private

The children count '(x)' for x children.

Definition at line 117 of file TreeNode.h.

std::vector<TreeNode *> TreeNode::childNodes_
private

List of child nodes.

Definition at line 96 of file TreeNode.h.

WContainerWidget* TreeNode::expandedContent_
private

The container in which the children are managed.

Definition at line 120 of file TreeNode.h.

IconPair* TreeNode::expandIcon_
private

The icon for expanding or collapsing.

Definition at line 105 of file TreeNode.h.

std::string TreeNode::imageLine_
staticprivate
Initial value:
= { "icons/line-middle.gif",
"icons/line-last.gif" }

Definition at line 143 of file TreeNode.h.

std::string TreeNode::imageMin_
staticprivate
Initial value:
= { "icons/nav-minus-line-middle.gif",
"icons/nav-minus-line-last.gif" }

Definition at line 145 of file TreeNode.h.

std::string TreeNode::imagePlus_
staticprivate
Initial value:
= { "icons/nav-plus-line-middle.gif",
"icons/nav-plus-line-last.gif" }

Definition at line 144 of file TreeNode.h.

IconPair* TreeNode::labelIcon_
private

The icon next to the label.

Definition at line 111 of file TreeNode.h.

std::unique_ptr<WText> TreeNode::labelText_
private

The label.

Definition at line 114 of file TreeNode.h.

WTable* TreeNode::layout_
private

Layout (2x2 table).

Definition at line 102 of file TreeNode.h.

WImage* TreeNode::noExpandIcon_
private

The single image shown instead of the expand/collapse icon when no children.

Definition at line 108 of file TreeNode.h.

TreeNode* TreeNode::parentNode_
private

The parent node.

Definition at line 99 of file TreeNode.h.

bool TreeNode::wasCollapsed_
private

Was collapsed (for undo of prelearned collapse() and expand() slots.

Definition at line 132 of file TreeNode.h.


The documentation for this class was generated from the following files:

Generated on Mon Sep 4 2017 for the C++ Web Toolkit (Wt) by doxygen 1.8.11