/usr/include/Wt/WTreeTableNode is in libwt-dev 3.3.3+dfsg-4.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | // This may look like C code, but it's really -*- C++ -*-
/*
 * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
 *
 * See the LICENSE file for terms of use.
 */
#ifndef WTREETABLENODE_H_
#define WTREETABLENODE_H_
#include <Wt/WTreeNode>
namespace Wt {
class WTreeTable;
/*! \class WTreeTableNode Wt/WTreeTableNode Wt/WTreeTableNode
 *  \brief A specialized tree node which allows additional data to be
 *         associated with each node.
 *
 * Additional data for each column can be set using setColumnWidget().
 *
 * \sa WTreeNode, WTreeTable
 */
class WT_API WTreeTableNode : public WTreeNode
{
public:
  /*! \brief Creates a new tree table node.
   *
   * \sa WTreeNode::WTreeNode()
   */
  WTreeTableNode(const WString& labelText,
		 WIconPair *labelIcon = 0,
		 WTreeTableNode *parentNode = 0);
  /*! \brief 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 setColumnWidget(int column, WWidget *item);
  /*! \brief Returns the widget set for a column.
   *
   * Returns the widget set previously using setColumnWidget(), or \c 0
   * if no widget was previously set.
   */
  WWidget *columnWidget(int column);
  /*! \brief Returns the table for this node.
   *
   * \sa WTreeTableNode::setTable()
   */
  WTreeTable *table() const { return table_; }
  virtual void insertChildNode(int index, WTreeNode *node);
protected:
  /*! \brief 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.
   *
   * \sa WTreeTableNode::table()
   */
  virtual void setTable(WTreeTable *table);
private:
  WTreeTable                               *table_;
  WContainerWidget                         *row_;
  struct ColumnWidget {
    WWidget *widget;
    bool     isSet;
    ColumnWidget(WWidget *aWidget, bool set)
      : widget(aWidget), isSet(set) { }
  };
  std::vector<ColumnWidget> columnWidgets_;
  /*
   * the number of columns, besides the the tree itself
   */
  void                      createExtraColumns(int numColumns);
  /*
   * The width for the column, counting from 1
   */
  WLength                  columnWidth(int column);
  friend class WTreeTable;
};
}
#endif // WTREETABLENODE_H_
 |