Wt: Wt::WTreeTableNode Class Reference

Wt 3.3.0

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions
Wt::WTreeTableNode Class Reference

A specialized tree node which allows additional data to be associated with each node. More...

`#include <Wt/WTreeTableNode>`

Inheritance diagram for Wt::WTreeTableNode:
[legend]

List of all members.

## Public Member Functions
| WTreeTableNode (const WString &labelText, WIconPair *labelIcon=0, WTreeTableNode *parentNode=0)
| Creates a new tree table node.
void | setColumnWidget (int column, WWidget *item)
| Sets a widget to be displayed in the given column for this node.
WWidget * | columnWidget (int column)
| Returns the widget set for a column.
WTreeTable * | table () const
| Returns the table for this node.
virtual void | insertChildNode (int index, WTreeNode *node)
| Inserts a child node.
## Protected Member Functions
virtual void | setTable (WTreeTable *table)
| Sets the table for this node.

## Detailed Description

A specialized tree node which allows additional data to be associated with each node.

Additional data for each column can be set using setColumnWidget().

See also:
  WTreeNode, WTreeTable

## Constructor & Destructor Documentation

Wt::WTreeTableNode::WTreeTableNode | ( | const WString & | labelText,
|  | WIconPair * | labelIcon = `0`,
|  | WTreeTableNode * | parentNode = `0`
| ) |  |

Creates a new tree table node.

See also:
  WTreeNode::WTreeNode()

## Member Function Documentation

WWidget * Wt::WTreeTableNode::columnWidget | ( | int | column | ) |

Returns the widget set for a column.

Returns the widget set previously using setColumnWidget(), or `0` if no widget was previously set.

void Wt::WTreeTableNode::insertChildNode | ( | int | index,
|  | WTreeNode * | node
| ) |  | `[virtual]`

Inserts a child node.

Inserts the node `node` at index `index`.

Reimplemented from Wt::WTreeNode.

void Wt::WTreeTableNode::setColumnWidget | ( | int | column,
|  | WWidget * | item
| ) |  |

Sets a widget to be displayed in the given column for this node.

Columns are counted starting from 0 for the tree list itself, and 1 for the first additional column.

The node label (in column 0) is not considered a column widget. To set a custom widget in column 0, you can add a widget to the labelArea().

void Wt::WTreeTableNode::setTable | ( | WTreeTable * | table | ) | `[protected, virtual]`

Sets the table for this node.

This method is called when the node is inserted, directly, or indirectly into a table.

You may want to reimplement this method if you wish to customize the behaviour of the node depending on table properties. For example to only associate data with the node when the tree list is actually used inside a table.

See also:
  WTreeTableNode::table()

WTreeTable* Wt::WTreeTableNode::table | ( |  | ) | const

Returns the table for this node.

See also:
  WTreeTableNode::setTable()

All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator