Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > b3a1f4d91c26f535919e39e25606614a > files > 2225

wt-doc-3.2.3-1.fc18.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Wt: Wt::WTreeView Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Wt
   &#160;<span id="projectnumber">3.2.3</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="namespaceWt.html">Wt</a>      </li>
      <li class="navelem"><a class="el" href="classWt_1_1WTreeView.html">WTreeView</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">Wt::WTreeView Class Reference<div class="ingroups"><a class="el" href="group__modelview.html">Model/view system</a></div></div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="Wt::WTreeView" --><!-- doxytag: inherits="Wt::WAbstractItemView" -->
<p>A view class that displays a model as a tree or tree table.  
 <a href="classWt_1_1WTreeView.html#details">More...</a></p>

<p><code>#include &lt;Wt/WTreeView&gt;</code></p>
<div class="dynheader">
Inheritance diagram for Wt::WTreeView:</div>
<div class="dyncontent">
<div class="center"><img src="classWt_1_1WTreeView__inherit__graph.png" border="0" usemap="#Wt_1_1WTreeView_inherit__map" alt="Inheritance graph"/></div>
<map name="Wt_1_1WTreeView_inherit__map" id="Wt_1_1WTreeView_inherit__map">
<area shape="rect" href="classWt_1_1WAbstractItemView.html" title="An abstract base class for item Views." alt="" coords="7,229,167,256"/><area shape="rect" href="classWt_1_1WCompositeWidget.html" title="A widget that hides the implementation of composite widgets." alt="" coords="5,155,168,181"/><area shape="rect" href="classWt_1_1WWidget.html" title="The abstract base class for a user&#45;interface component." alt="" coords="37,80,136,107"/><area shape="rect" href="classWt_1_1WObject.html" title="A base class for objects that participate in the signal/slot system." alt="" coords="39,5,135,32"/></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="classWt_1_1WTreeView-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa6555aa2d53557340824faa314b318f2"></a><!-- doxytag: member="Wt::WTreeView::WTreeView" ref="aa6555aa2d53557340824faa314b318f2" args="(WContainerWidget *parent=0)" -->
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WTreeView.html#aa6555aa2d53557340824faa314b318f2">WTreeView</a> (<a class="el" href="classWt_1_1WContainerWidget.html">WContainerWidget</a> *parent=0)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new tree view. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WTreeView.html#a8b8bfc22f30f0edfe8fe2de37a5fefc4">setColumnFormat</a> (int column, const <a class="el" href="classWt_1_1WString.html">WString</a> &amp;format)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the column format string (<b>deprecated</b>).  <a href="#a8b8bfc22f30f0edfe8fe2de37a5fefc4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classWt_1_1WString.html">WString</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WTreeView.html#aab731f1046a7c0b602678171af9dc33e">columnFormat</a> (int column) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the column format string (<b>deprecated</b>).  <a href="#aab731f1046a7c0b602678171af9dc33e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WTreeView.html#a49566dd5cc8d1d0d95bad4783dd4e11a">setExpanded</a> (const <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> &amp;, bool expanded)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Expands or collapses a node.  <a href="#a49566dd5cc8d1d0d95bad4783dd4e11a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WTreeView.html#a48eac450ec46ac1eea41822bfd227e9b">isExpanded</a> (const <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> &amp;index) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns whether a node is expanded.  <a href="#a48eac450ec46ac1eea41822bfd227e9b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WTreeView.html#abe1b839fc999634806df030301422411">collapse</a> (const <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> &amp;index)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Collapses a node.  <a href="#abe1b839fc999634806df030301422411"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WTreeView.html#a03cd862e9c5dbbfbc126ac627b48592a">expand</a> (const <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> &amp;index)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Expands a node.  <a href="#a03cd862e9c5dbbfbc126ac627b48592a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WTreeView.html#add40d3e05352ae094f6fe2b9c879c2c7">expandToDepth</a> (int depth)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Expands all nodes to a depth.  <a href="#add40d3e05352ae094f6fe2b9c879c2c7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WTreeView.html#aef8576ebdf2089edc259362a15e2f750">setRootIsDecorated</a> (bool show)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets whether toplevel items are decorated.  <a href="#aef8576ebdf2089edc259362a15e2f750"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WTreeView.html#ac6e70d3de6623882f70219934d5f8253">rootIsDecorated</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns whether toplevel items are decorated.  <a href="#ac6e70d3de6623882f70219934d5f8253"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WTreeView.html#a482314306c8404d7ed941fd986e32623">resize</a> (const <a class="el" href="classWt_1_1WLength.html">WLength</a> &amp;width, const <a class="el" href="classWt_1_1WLength.html">WLength</a> &amp;height)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Resizes the widget.  <a href="#a482314306c8404d7ed941fd986e32623"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classWt_1_1Signal.html">Signal</a>&lt; <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WTreeView.html#a8d014f2cd6637f5f842d7fe2fff00418">collapsed</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Signal emitted when a node is collapsed.  <a href="#a8d014f2cd6637f5f842d7fe2fff00418"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classWt_1_1Signal.html">Signal</a>&lt; <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WTreeView.html#a96586671660b0e81cc2ae99fff284909">expanded</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Signal emitted when a node is expanded.  <a href="#a96586671660b0e81cc2ae99fff284909"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classWt_1_1WWidget.html">WWidget</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WTreeView.html#a715b95a8fe1338eed25e369a8a4d6027">itemWidget</a> (const <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> &amp;index) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the widget that renders an item.  <a href="#a715b95a8fe1338eed25e369a8a4d6027"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WTreeView.html#a390300f766472476e6a0df5aefaa2ef0">setModel</a> (<a class="el" href="classWt_1_1WAbstractItemModel.html">WAbstractItemModel</a> *model)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the model.  <a href="#a390300f766472476e6a0df5aefaa2ef0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WTreeView.html#a33ba5111945bc0ec4745a536d52adec5">setColumnWidth</a> (int column, const <a class="el" href="classWt_1_1WLength.html">WLength</a> &amp;width)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the column width.  <a href="#a33ba5111945bc0ec4745a536d52adec5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WTreeView.html#a48f74194ae6bd63c08a6ff76ecb3e39c">setAlternatingRowColors</a> (bool enable)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets if alternating row colors are to be used.  <a href="#a48f74194ae6bd63c08a6ff76ecb3e39c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WTreeView.html#a849f805206bd1bc83e6bc411f208031d">setRowHeight</a> (const <a class="el" href="classWt_1_1WLength.html">WLength</a> &amp;rowHeight)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the row height.  <a href="#a849f805206bd1bc83e6bc411f208031d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WTreeView.html#a4d0967483ed31b26a16a5c7620cb5d7c">setHeaderHeight</a> (const <a class="el" href="classWt_1_1WLength.html">WLength</a> &amp;height)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the header height.  <a href="#a4d0967483ed31b26a16a5c7620cb5d7c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WTreeView.html#adba2dc39faa8d427e8adb241b067ebf2">setColumnBorder</a> (const <a class="el" href="classWt_1_1WColor.html">WColor</a> &amp;color)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the column border color.  <a href="#adba2dc39faa8d427e8adb241b067ebf2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WTreeView.html#a3c9e6152cb98150b6be007b3bf4d829b">setColumnHidden</a> (int column, bool hidden)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Changes the visibility of a column.  <a href="#a3c9e6152cb98150b6be007b3bf4d829b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WTreeView.html#a433e3733220fdacf2b1b287588545031">setRowHeaderCount</a> (int count)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Configures the number of columns that are used as row headers.  <a href="#a433e3733220fdacf2b1b287588545031"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WTreeView.html#a807eeda7ff799fb5b711e52acd93b6bd">pageCount</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of pages.  <a href="#a807eeda7ff799fb5b711e52acd93b6bd"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WTreeView.html#abc0ec2c9c5a82d0389900c3a3082ac91">pageSize</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the page size.  <a href="#abc0ec2c9c5a82d0389900c3a3082ac91"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WTreeView.html#a9a62d0d6e27692c9231165ae9599c85b">currentPage</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the current page.  <a href="#a9a62d0d6e27692c9231165ae9599c85b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WTreeView.html#a09a5d3d9e37fd502e56edbb0c387d21c">setCurrentPage</a> (int page)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the current page.  <a href="#a09a5d3d9e37fd502e56edbb0c387d21c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WTreeView.html#a0542edb8a45b90c7f8dffb929649755f">scrollTo</a> (const <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> &amp;index, <a class="el" href="classWt_1_1WAbstractItemView.html#af1f29928f9ba120153db2588b464730f">ScrollHint</a> hint=EnsureVisible)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Scrolls the view to an item.  <a href="#a0542edb8a45b90c7f8dffb929649755f"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WTreeView.html#a11f8eb2390ce4585b99344e540fef8b1">enableAjax</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Progresses to an Ajax-enabled widget.  <a href="#a11f8eb2390ce4585b99344e540fef8b1"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>A view class that displays a model as a tree or tree table. </p>
<p>The view displays data from a <a class="el" href="classWt_1_1WAbstractItemModel.html" title="An abstract model for use with Wt&#39;s view classes.">WAbstractItemModel</a> in a tree or tree table. It provides incremental rendering, allowing the display of data models of any size efficiently, without excessive use of client- or serverside resources.</p>
<p>The rendering (and editing) of items is handled by a <a class="el" href="classWt_1_1WAbstractItemDelegate.html" title="Abstract delegate class for rendering an item in an item view.">WAbstractItemDelegate</a>, by default it uses <a class="el" href="classWt_1_1WItemDelegate.html" title="Standard delegate class for rendering a view item.">WItemDelegate</a> which renders data of all predefined roles (see also <a class="el" href="group__modelview.html#ga0ae864e12320f9f89172735e075ed068" title="Enumeration that indicates a role for a data item.">Wt::ItemDataRole</a>), including text, icons, checkboxes, and tooltips.</p>
<p>The view may support editing of items, if the model indicates support (see the <a class="el" href="group__modelview.html#gga1d77c4de293aebfacbdde124de06b8b0a8664c482d721bbcb73539a924c7a9fab" title="Item can be edited.">Wt::ItemIsEditable</a> flag). You can define triggers that initiate editing of an item using <a class="el" href="classWt_1_1WAbstractItemView.html#a93d2efc8642a6b9c55b35b7665a13da5" title="Configures what actions should trigger editing.">setEditTriggers()</a>. The actual editing is provided by the item delegate (you can set an appropriate delegate for one column using <a class="el" href="classWt_1_1WAbstractItemView.html#a574bc36ec752012ba4a613e0e11e064e" title="Sets the delegate for a column.">setItemDelegateForColumn()</a>). Using <a class="el" href="classWt_1_1WAbstractItemView.html#a9a5506e031a514696c4050ccc1521b6c" title="Configures editing options.">setEditOptions()</a> you can customize if and how the view deals with multiple editors.</p>
<p>By default, all but the first columns are given a width of 150px, and the first column takes the remaining size. <b>Note that this may have as consequence that the first column's size is reduced to 0.</b> Column widths of all columns, including the first column, can be set through the API method <a class="el" href="classWt_1_1WTreeView.html#a33ba5111945bc0ec4745a536d52adec5" title="Sets the column width.">setColumnWidth()</a>, and also by the user using handles provided in the header.</p>
<p>Optionally, the treeview may be configured so that the first column is always visible while scrolling through the other columns, which may be convenient if you wish to display a model with many columns. Use <a class="el" href="classWt_1_1WAbstractItemView.html#a714e455f9881ef17b779713f6bba295a" title="Configures whether horizontal scrolling includes the first column (deprecated)">setColumn1Fixed()</a> to enable this behaviour.</p>
<p>If the model supports sorting (<a class="el" href="classWt_1_1WAbstractItemModel.html#a133931424d4daa8422bcdea911cda713" title="Sorts the model according to a particular column.">WAbstractItemModel::sort()</a>), such as the <a class="el" href="classWt_1_1WStandardItemModel.html" title="A standard data model, which stores its data in memory.">WStandardItemModel</a>, then you can enable sorting buttons in the header, using <a class="el" href="classWt_1_1WAbstractItemView.html#ae1c86a0f37f97f63aed3b00fd8ffad7c" title="Enables or disables sorting for all columns.">setSortingEnabled()</a>.</p>
<p>You can allow selection on row or item level (using <a class="el" href="classWt_1_1WAbstractItemView.html#ad59b47cf9a1c5a65c5adc3e1900ceb5c" title="Changes the selection behaviour.">setSelectionBehavior()</a>), and selection of single or multiple items (using <a class="el" href="classWt_1_1WAbstractItemView.html#af6fcd9761e2f7a3b497d3563c849d320" title="Sets the selection mode.">setSelectionMode()</a>), and listen for changes in the selection using the <a class="el" href="classWt_1_1WAbstractItemView.html#ada37ffbe2d470dd227c8714645f150f0" title="Signal emitted when the selection is changed.">selectionChanged()</a> signal.</p>
<p>You may enable drag &amp; drop support for this view, whith awareness of the items in the model. When enabling dragging (see <a class="el" href="classWt_1_1WAbstractItemView.html#a0ca99b835708d990b90000917045738e" title="Enables the selection to be dragged (drag &amp; drop).">setDragEnabled()</a>), the current selection may be dragged, but only when all items in the selection indicate support for dragging (controlled by the <a class="el" href="group__modelview.html#gga1d77c4de293aebfacbdde124de06b8b0a2b0edddfd15d67a84723c9043479ced1">ItemIsDragEnabled</a> flag), and if the model indicates a mime-type (controlled by <a class="el" href="classWt_1_1WAbstractItemModel.html#a4c62d2cc18d133d7926a91b4f2eebe62" title="Returns a mime-type for dragging a set of indexes.">WAbstractItemModel::mimeType()</a>). Likewise, by enabling support for dropping (see <a class="el" href="classWt_1_1WAbstractItemView.html#a1eda46c8e9a21af7f6281e7096af8fbe" title="Enables drop operations (drag &amp; drop).">setDropsEnabled()</a>), the treeview may receive a drop event on a particular item, at least if the item indicates support for drops (controlled by the <a class="el" href="group__modelview.html#gga1d77c4de293aebfacbdde124de06b8b0a95d23063251001545d4bfab1308879a3">ItemIsDropEnabled</a> flag).</p>
<p>You may also react to mouse click events on any item, by connecting to one of the <a class="el" href="classWt_1_1WAbstractItemView.html#a3b72d5f8e5b0afdea83e224354d3e91b" title="Signal emitted when an item is clicked.">clicked()</a> or <a class="el" href="classWt_1_1WAbstractItemView.html#a14ac099f58621d66834aa5674ea8ecb5" title="Signal emitted when an item is double clicked.">doubleClicked()</a> signals.</p>
<p>Usage example: </p>
<div class="fragment"><pre class="fragment"> <span class="comment">// WTreeView will display the data of a model</span>
 <a class="code" href="classWt_1_1WAbstractItemModel.html" title="An abstract model for use with Wt&#39;s view classes.">Wt::WAbstractItemModel</a> *model = ...

 <span class="comment">// Create the WTreeView</span>
 <a class="code" href="classWt_1_1WTreeView.html" title="A view class that displays a model as a tree or tree table.">Wt::WTreeView</a> *gitView = <span class="keyword">new</span> <a class="code" href="classWt_1_1WTreeView.html#aa6555aa2d53557340824faa314b318f2" title="Creates a new tree view.">Wt::WTreeView</a>();
 gitView-&gt;<a class="code" href="classWt_1_1WTreeView.html#a482314306c8404d7ed941fd986e32623" title="Resizes the widget.">resize</a>(300, <a class="code" href="classWt_1_1WLength.html#a0cf39ca4225776879d56ade60320c31a" title="An &#39;auto&#39; length.">Wt::WLength::Auto</a>);
 gitView-&gt;<a class="code" href="classWt_1_1WAbstractItemView.html#ae1c86a0f37f97f63aed3b00fd8ffad7c" title="Enables or disables sorting for all columns.">setSortingEnabled</a>(<span class="keyword">false</span>);
 gitView-&gt;<a class="code" href="classWt_1_1WTreeView.html#a390300f766472476e6a0df5aefaa2ef0" title="Sets the model.">setModel</a>(model);
 gitView-&gt;<a class="code" href="classWt_1_1WAbstractItemView.html#af6fcd9761e2f7a3b497d3563c849d320" title="Sets the selection mode.">setSelectionMode</a>(<a class="code" href="namespaceWt.html#a74b3f7eb1689a3cbf0ea514ffd20bccca4fd3c5ba6ce5289a1e732d85f002882a" title="Single selection only.">SingleSelection</a>);
</pre></div><h3>Graceful degradation</h3>
<p>The view provides a virtual scrolling behavior which relies on Ajax availability. When Ajax is not available, a page navigation bar is used instead, see <a class="el" href="classWt_1_1WAbstractItemView.html#a22303f489d5081d70b5bb8e8ff059948" title="Returns a page navigation widget.">createPageNavigationBar()</a>. In that case, the widget needs to be given an explicit height using <a class="el" href="classWt_1_1WTreeView.html#a482314306c8404d7ed941fd986e32623" title="Resizes the widget.">resize()</a> which determines the number of rows that are displayed at a time.</p>
<h3>CSS</h3>
<p>The treeview is styled by the current CSS theme. The look can be overridden using the <code>Wt-treeview</code> CSS class and the following selectors.</p>
<p>Selectors that apply to the body </p>
<div class="fragment"><pre class="fragment">
 .Wt-treeview .Wt-pagingbar        : paging bar
 </pre></div><p> Selectors that apply to the header: </p>
<div class="fragment"><pre class="fragment">
.Wt-treeview .Wt-headerdiv         : header (background)
.Wt-treeview .Wt-header .Wt-label  : header label
.Wt-treeview .Wt-tv-rh             : column resize handle
.Wt-treeview .Wt-tv-sh-none        : column sort handle, no sorting
.Wt-treeview .Wt-tv-sh-up          : column sort handle, sort up
.Wt-treeview .Wt-tv-sh-down        : column sort handle, sort down
.Wt-treeview .Wt-tv-br             : header border
</pre></div><p> Selectors that apply to the tree decoration: </p>
<div class="fragment"><pre class="fragment">
.Wt-treeview .Wt-trunk          : vertical line, trunk
.Wt-treeview .Wt-end            : vertical line, last item
.Wt-treeview .Wt-collapse       : collapse icon
.Wt-treeview .Wt-expand         : expand icon
.Wt-treeview .Wt-noexpand       : leaf icon
</pre></div><p> Selectors that apply to the table contents: </p>
<div class="fragment"><pre class="fragment">
.Wt-treeview .Wt-spacer         : spacer for non-loaded content
.Wt-treeview .Wt-selected       : selected item
.Wt-treeview .Wt-drop-site      : possible drop site
</pre></div><p> Selectors that apply to the table borders (which must be 1 pixel wide) </p>
<div class="fragment"><pre class="fragment">
.Wt-treeview .Wt-tv-row .Wt-tv-c      : border-right property of cells
.Wt-treeview .Wt-header .Wt-tv-row,
  .Wt-treeview .Wt-tv-node .Wt-tv-row : border-left property of cells
</pre></div><p>A snapshot of the <a class="el" href="classWt_1_1WTreeView.html" title="A view class that displays a model as a tree or tree table.">WTreeView</a>: </p>
<div class="image">
<img src="WTreeView-default-1.png" alt="WTreeView-default-1.png"/>
<div class="caption">
WTreeView example (default)</div></div>
 <div class="image">
<img src="WTreeView-polished-1.png" alt="WTreeView-polished-1.png"/>
<div class="caption">
WTreeView example (polished)</div></div>
</div><hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="abe1b839fc999634806df030301422411"></a><!-- doxytag: member="Wt::WTreeView::collapse" ref="abe1b839fc999634806df030301422411" args="(const WModelIndex &amp;index)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::WTreeView::collapse </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> &amp;&#160;</td>
          <td class="paramname"><em>index</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Collapses a node. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WTreeView.html#a49566dd5cc8d1d0d95bad4783dd4e11a" title="Expands or collapses a node.">setExpanded()</a>, <a class="el" href="classWt_1_1WTreeView.html#a03cd862e9c5dbbfbc126ac627b48592a" title="Expands a node.">expand()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a8d014f2cd6637f5f842d7fe2fff00418"></a><!-- doxytag: member="Wt::WTreeView::collapsed" ref="a8d014f2cd6637f5f842d7fe2fff00418" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classWt_1_1Signal.html">Signal</a>&lt;<a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a>&gt;&amp; Wt::WTreeView::collapsed </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Signal emitted when a node is collapsed. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WTreeView.html#a49566dd5cc8d1d0d95bad4783dd4e11a" title="Expands or collapses a node.">setExpanded()</a>, <a class="el" href="classWt_1_1WTreeView.html#a96586671660b0e81cc2ae99fff284909" title="Signal emitted when a node is expanded.">expanded()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="aab731f1046a7c0b602678171af9dc33e"></a><!-- doxytag: member="Wt::WTreeView::columnFormat" ref="aab731f1046a7c0b602678171af9dc33e" args="(int column) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classWt_1_1WString.html">WString</a> Wt::WTreeView::columnFormat </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>column</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the column format string (<b>deprecated</b>). </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WTreeView.html#a8b8bfc22f30f0edfe8fe2de37a5fefc4" title="Sets the column format string (deprecated).">setColumnFormat()</a></dd></dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000059">Deprecated:</a></b></dt><dd>use <a class="el" href="classWt_1_1WAbstractItemView.html#a8d3d37b13cc684248e06700c40dd7672" title="Returns the delegate that was set for a column.">itemDelegateForColumn()</a> to customize the formatting. This method will try to cast the <a class="el" href="classWt_1_1WAbstractItemView.html#a8d3d37b13cc684248e06700c40dd7672" title="Returns the delegate that was set for a column.">itemDelegateForColumn()</a> to a <a class="el" href="classWt_1_1WItemDelegate.html" title="Standard delegate class for rendering a view item.">WItemDelegate</a> and return the format. </dd></dl>

</div>
</div>
<a class="anchor" id="a9a62d0d6e27692c9231165ae9599c85b"></a><!-- doxytag: member="Wt::WTreeView::currentPage" ref="a9a62d0d6e27692c9231165ae9599c85b" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual int Wt::WTreeView::currentPage </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the current page. </p>
<p>When Ajax/JavaScript is not available, the view will use a paging navigation bar to allow scrolling through the data. This returns the current page (between 0 and <a class="el" href="classWt_1_1WTreeView.html#a807eeda7ff799fb5b711e52acd93b6bd" title="Returns the number of pages.">pageCount()</a> - 1).</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WAbstractItemView.html#a22303f489d5081d70b5bb8e8ff059948" title="Returns a page navigation widget.">createPageNavigationBar()</a>, <a class="el" href="classWt_1_1WAbstractItemView.html#a419257bb553d44423d4d4d5325d61ec7" title="Signal emitted when page information was updated.">pageChanged()</a> </dd></dl>

<p>Implements <a class="el" href="classWt_1_1WAbstractItemView.html#a66b3bd22b9d57d9c466280a2f96b44c3">Wt::WAbstractItemView</a>.</p>

</div>
</div>
<a class="anchor" id="a11f8eb2390ce4585b99344e540fef8b1"></a><!-- doxytag: member="Wt::WTreeView::enableAjax" ref="a11f8eb2390ce4585b99344e540fef8b1" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void Wt::WTreeView::enableAjax </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Progresses to an Ajax-enabled widget. </p>
<p>This method is called when the progressive bootstrap method is used, and support for AJAX has been detected. The default behavior will upgrade the widget's event handling to use AJAX instead of full page reloads, and propagate the call to its children.</p>
<p>You may want to reimplement this method if you want to make changes to widget when AJAX is enabled. You should always call the base implementation.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WApplication.html#a78016406c4746c56b2c2ffce7c5e181f" title="Progresses to an Ajax-enabled user interface.">WApplication::enableAjax()</a> </dd></dl>

<p>Reimplemented from <a class="el" href="classWt_1_1WCompositeWidget.html#a90e07c1bb6c48732ed4b5d98f91cfda0">Wt::WCompositeWidget</a>.</p>

</div>
</div>
<a class="anchor" id="a03cd862e9c5dbbfbc126ac627b48592a"></a><!-- doxytag: member="Wt::WTreeView::expand" ref="a03cd862e9c5dbbfbc126ac627b48592a" args="(const WModelIndex &amp;index)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::WTreeView::expand </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> &amp;&#160;</td>
          <td class="paramname"><em>index</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Expands a node. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WTreeView.html#a49566dd5cc8d1d0d95bad4783dd4e11a" title="Expands or collapses a node.">setExpanded()</a>, <a class="el" href="classWt_1_1WTreeView.html#abe1b839fc999634806df030301422411" title="Collapses a node.">collapse()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a96586671660b0e81cc2ae99fff284909"></a><!-- doxytag: member="Wt::WTreeView::expanded" ref="a96586671660b0e81cc2ae99fff284909" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classWt_1_1Signal.html">Signal</a>&lt;<a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a>&gt;&amp; Wt::WTreeView::expanded </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Signal emitted when a node is expanded. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WTreeView.html#a49566dd5cc8d1d0d95bad4783dd4e11a" title="Expands or collapses a node.">setExpanded()</a>, <a class="el" href="classWt_1_1WTreeView.html#a8d014f2cd6637f5f842d7fe2fff00418" title="Signal emitted when a node is collapsed.">collapsed()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="add40d3e05352ae094f6fe2b9c879c2c7"></a><!-- doxytag: member="Wt::WTreeView::expandToDepth" ref="add40d3e05352ae094f6fe2b9c879c2c7" args="(int depth)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::WTreeView::expandToDepth </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>depth</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Expands all nodes to a depth. </p>
<p>Expands all nodes to the given <code>depth</code>. A depth of 1 corresponds to the top level nodes.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WTreeView.html#a03cd862e9c5dbbfbc126ac627b48592a" title="Expands a node.">expand()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a48eac450ec46ac1eea41822bfd227e9b"></a><!-- doxytag: member="Wt::WTreeView::isExpanded" ref="a48eac450ec46ac1eea41822bfd227e9b" args="(const WModelIndex &amp;index) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Wt::WTreeView::isExpanded </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> &amp;&#160;</td>
          <td class="paramname"><em>index</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns whether a node is expanded. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WTreeView.html#a49566dd5cc8d1d0d95bad4783dd4e11a" title="Expands or collapses a node.">setExpanded()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a715b95a8fe1338eed25e369a8a4d6027"></a><!-- doxytag: member="Wt::WTreeView::itemWidget" ref="a715b95a8fe1338eed25e369a8a4d6027" args="(const WModelIndex &amp;index) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classWt_1_1WWidget.html">WWidget</a>* Wt::WTreeView::itemWidget </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> &amp;&#160;</td>
          <td class="paramname"><em>index</em></td><td>)</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the widget that renders an item. </p>
<p>This returns the widget that renders the given item. This may return 0 if the item is currently not rendered.</p>
<p>This widget has been created by an item delegate, and usually an item delegate is involved when updating it. </p>

<p>Implements <a class="el" href="classWt_1_1WAbstractItemView.html#a5b7d40b94b5254b52417f5cf2200ec30">Wt::WAbstractItemView</a>.</p>

</div>
</div>
<a class="anchor" id="a807eeda7ff799fb5b711e52acd93b6bd"></a><!-- doxytag: member="Wt::WTreeView::pageCount" ref="a807eeda7ff799fb5b711e52acd93b6bd" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual int Wt::WTreeView::pageCount </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the number of pages. </p>
<p>When Ajax/JavaScript is not available, the view will use a paging navigation bar to allow scrolling through the data. This returns the number of pages currently shown.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WAbstractItemView.html#a22303f489d5081d70b5bb8e8ff059948" title="Returns a page navigation widget.">createPageNavigationBar()</a>, <a class="el" href="classWt_1_1WAbstractItemView.html#a419257bb553d44423d4d4d5325d61ec7" title="Signal emitted when page information was updated.">pageChanged()</a> </dd></dl>

<p>Implements <a class="el" href="classWt_1_1WAbstractItemView.html#a370beb06a2e6c82659756ba63a516b14">Wt::WAbstractItemView</a>.</p>

</div>
</div>
<a class="anchor" id="abc0ec2c9c5a82d0389900c3a3082ac91"></a><!-- doxytag: member="Wt::WTreeView::pageSize" ref="abc0ec2c9c5a82d0389900c3a3082ac91" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual int Wt::WTreeView::pageSize </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the page size. </p>
<p>When Ajax/JavaScript is not available, the view will use a paging navigation bar to allow scrolling through the data. This returns the number of items per page.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WAbstractItemView.html#a22303f489d5081d70b5bb8e8ff059948" title="Returns a page navigation widget.">createPageNavigationBar()</a>, <a class="el" href="classWt_1_1WAbstractItemView.html#a419257bb553d44423d4d4d5325d61ec7" title="Signal emitted when page information was updated.">pageChanged()</a> </dd></dl>

<p>Implements <a class="el" href="classWt_1_1WAbstractItemView.html#a2cc5d8f54c95a4d8d45c86ea85b428e9">Wt::WAbstractItemView</a>.</p>

</div>
</div>
<a class="anchor" id="a482314306c8404d7ed941fd986e32623"></a><!-- doxytag: member="Wt::WTreeView::resize" ref="a482314306c8404d7ed941fd986e32623" args="(const WLength &amp;width, const WLength &amp;height)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void Wt::WTreeView::resize </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classWt_1_1WLength.html">WLength</a> &amp;&#160;</td>
          <td class="paramname"><em>width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classWt_1_1WLength.html">WLength</a> &amp;&#160;</td>
          <td class="paramname"><em>height</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Resizes the widget. </p>
<p>Specifies a fixed size for this widget, setting CSS <code>width</code> and <code>height</code> properties. By default a widget has automatic width and height, which sets a size for the widget following CSS rules.</p>
<p>When the widget is not managed by a layout manager, the automatic (natural) size of a widget depends on whether they widget is a <em>block</em> or <em>inline</em> widget:</p>
<ul>
<li>a <em>block</em> widget takes by default the width of the parent, and the height that it needs based on its contents</li>
<li>an <em>inline</em> widget takes the width and height that it needs based on its contents (possibly wrapping over multiple lines). The width and height of an inline widget cannot be changed (by the letter of CSS, although most browsers will react to it in varying ways).</li>
</ul>
<p>When inserted in a layout manager, the size set will be used as a widget's preferred size, but the widget may be given a different size by the layout manager based on available space and stretch factors. The actual size given by a layout manager may be retrieved by making the widget "layout size aware", using <a class="el" href="classWt_1_1WWidget.html#a4f83592912a7f8fa4fd35dadde78ee74" title="Sets the widget to be aware of its size set by a layout manager.">setLayoutSizeAware()</a>. If you have defined a <code>"wtResize()"</code> JavaScript method for the widget, then this method will also be called.</p>
<p>The default width and height of a widget is <a class="el" href="classWt_1_1WLength.html#a0cf39ca4225776879d56ade60320c31a" title="An &#39;auto&#39; length.">WLength::Auto</a>.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WCompositeWidget.html#a3358bb9a93e5c7999c4f6d39d9880c8f" title="Returns the width.">width()</a>, <a class="el" href="classWt_1_1WCompositeWidget.html#ab20c559ba960c80be16572293df7fd96" title="Returns the height.">height()</a> </dd></dl>

<p>Reimplemented from <a class="el" href="classWt_1_1WCompositeWidget.html#a976e94e38c7a9cc0f212e13a9792912e">Wt::WCompositeWidget</a>.</p>

</div>
</div>
<a class="anchor" id="ac6e70d3de6623882f70219934d5f8253"></a><!-- doxytag: member="Wt::WTreeView::rootIsDecorated" ref="ac6e70d3de6623882f70219934d5f8253" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Wt::WTreeView::rootIsDecorated </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns whether toplevel items are decorated. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WTreeView.html#aef8576ebdf2089edc259362a15e2f750" title="Sets whether toplevel items are decorated.">setRootIsDecorated()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a0542edb8a45b90c7f8dffb929649755f"></a><!-- doxytag: member="Wt::WTreeView::scrollTo" ref="a0542edb8a45b90c7f8dffb929649755f" args="(const WModelIndex &amp;index, ScrollHint hint=EnsureVisible)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void Wt::WTreeView::scrollTo </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> &amp;&#160;</td>
          <td class="paramname"><em>index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classWt_1_1WAbstractItemView.html#af1f29928f9ba120153db2588b464730f">ScrollHint</a>&#160;</td>
          <td class="paramname"><em>hint</em> = <code>EnsureVisible</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Scrolls the view to an item. </p>
<p>Scrolls the view to ensure that the item which represents the provided <code>index</code> is visible. A <code>hint</code> may indicate how the item should appear in the viewport (if possible).</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Currently only implemented to scroll to the correct row, not taking into account the column. </dd></dl>

<p>Implements <a class="el" href="classWt_1_1WAbstractItemView.html#a027a8ad4967a0e269bdabbffca15f489">Wt::WAbstractItemView</a>.</p>

</div>
</div>
<a class="anchor" id="a48f74194ae6bd63c08a6ff76ecb3e39c"></a><!-- doxytag: member="Wt::WTreeView::setAlternatingRowColors" ref="a48f74194ae6bd63c08a6ff76ecb3e39c" args="(bool enable)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void Wt::WTreeView::setAlternatingRowColors </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>enable</em></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets if alternating row colors are to be used. </p>
<p>Configure whether rows get alternating background colors, defined by the current CSS theme.</p>
<p>The default value is <code>false</code>. </p>

<p>Reimplemented from <a class="el" href="classWt_1_1WAbstractItemView.html#a9d22f8c92ddf7259f32496f55d9d50ec">Wt::WAbstractItemView</a>.</p>

</div>
</div>
<a class="anchor" id="adba2dc39faa8d427e8adb241b067ebf2"></a><!-- doxytag: member="Wt::WTreeView::setColumnBorder" ref="adba2dc39faa8d427e8adb241b067ebf2" args="(const WColor &amp;color)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void Wt::WTreeView::setColumnBorder </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classWt_1_1WColor.html">WColor</a> &amp;&#160;</td>
          <td class="paramname"><em>color</em></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the column border color. </p>
<p>The default border color is defined by the CSS theme. </p>

<p>Implements <a class="el" href="classWt_1_1WAbstractItemView.html#a6b58e9040dfbe9547cb737c7d5e71e0f">Wt::WAbstractItemView</a>.</p>

</div>
</div>
<a class="anchor" id="a8b8bfc22f30f0edfe8fe2de37a5fefc4"></a><!-- doxytag: member="Wt::WTreeView::setColumnFormat" ref="a8b8bfc22f30f0edfe8fe2de37a5fefc4" args="(int column, const WString &amp;format)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::WTreeView::setColumnFormat </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>column</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classWt_1_1WString.html">WString</a> &amp;&#160;</td>
          <td class="paramname"><em>format</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the column format string (<b>deprecated</b>). </p>
<p>The DisplayRole data for that column is converted to a string using <a class="el" href="group__modelview.html#ga57b5cadd177847f51eaeb0cee23782c1" title="Interprets a boost::any as a string value.">asString()</a>, with the given format.</p>
<p>The default value is "".</p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000058">Deprecated:</a></b></dt><dd>use <a class="el" href="classWt_1_1WAbstractItemView.html#a8d3d37b13cc684248e06700c40dd7672" title="Returns the delegate that was set for a column.">itemDelegateForColumn()</a> to customize the formatting. This method will create a new <a class="el" href="classWt_1_1WItemDelegate.html" title="Standard delegate class for rendering a view item.">WItemDelegate</a> for the column, and configure its format. </dd></dl>

</div>
</div>
<a class="anchor" id="a3c9e6152cb98150b6be007b3bf4d829b"></a><!-- doxytag: member="Wt::WTreeView::setColumnHidden" ref="a3c9e6152cb98150b6be007b3bf4d829b" args="(int column, bool hidden)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void Wt::WTreeView::setColumnHidden </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>column</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>hide</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Changes the visibility of a column. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WAbstractItemView.html#ac7cd89d9f08ab3fa6493cae2b9f596fc" title="Returns if a column is hidden.">isColumnHidden()</a> </dd></dl>

<p>Reimplemented from <a class="el" href="classWt_1_1WAbstractItemView.html#a120156dc59eaf3608916b679d937c5b8">Wt::WAbstractItemView</a>.</p>

</div>
</div>
<a class="anchor" id="a33ba5111945bc0ec4745a536d52adec5"></a><!-- doxytag: member="Wt::WTreeView::setColumnWidth" ref="a33ba5111945bc0ec4745a536d52adec5" args="(int column, const WLength &amp;width)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void Wt::WTreeView::setColumnWidth </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>column</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classWt_1_1WLength.html">WLength</a> &amp;&#160;</td>
          <td class="paramname"><em>width</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the column width. </p>
<p>For a model with <a class="el" href="classWt_1_1WAbstractItemModel.html#abcf7912a95a0a60f8e9b1c37d30b8383">columnCount()</a> == <code>N</code>, the initial width of columns 1..<code>N</code> is set to 150 pixels, and column 0 will take all remaining space.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>The actual space occupied by each column is the column width augmented by 7 pixels for internal padding and a border.</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WTreeView.html#a849f805206bd1bc83e6bc411f208031d" title="Sets the row height.">setRowHeight()</a> </dd></dl>

<p>Implements <a class="el" href="classWt_1_1WAbstractItemView.html#aa80794ca5438e2b9971e8f85919353fd">Wt::WAbstractItemView</a>.</p>

</div>
</div>
<a class="anchor" id="a09a5d3d9e37fd502e56edbb0c387d21c"></a><!-- doxytag: member="Wt::WTreeView::setCurrentPage" ref="a09a5d3d9e37fd502e56edbb0c387d21c" args="(int page)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void Wt::WTreeView::setCurrentPage </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>page</em></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the current page. </p>
<p>When Ajax/JavaScript is not available, the view will use a paging navigation bar to allow scrolling through the data. This method can be used to change the current page.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WAbstractItemView.html#a22303f489d5081d70b5bb8e8ff059948" title="Returns a page navigation widget.">createPageNavigationBar()</a>, <a class="el" href="classWt_1_1WAbstractItemView.html#a419257bb553d44423d4d4d5325d61ec7" title="Signal emitted when page information was updated.">pageChanged()</a> </dd></dl>

<p>Implements <a class="el" href="classWt_1_1WAbstractItemView.html#a71585006c31128c3d606cc976b865008">Wt::WAbstractItemView</a>.</p>

</div>
</div>
<a class="anchor" id="a49566dd5cc8d1d0d95bad4783dd4e11a"></a><!-- doxytag: member="Wt::WTreeView::setExpanded" ref="a49566dd5cc8d1d0d95bad4783dd4e11a" args="(const WModelIndex &amp;, bool expanded)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::WTreeView::setExpanded </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> &amp;&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>expanded</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Expands or collapses a node. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WTreeView.html#a03cd862e9c5dbbfbc126ac627b48592a" title="Expands a node.">expand()</a>, <a class="el" href="classWt_1_1WTreeView.html#abe1b839fc999634806df030301422411" title="Collapses a node.">collapse()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a4d0967483ed31b26a16a5c7620cb5d7c"></a><!-- doxytag: member="Wt::WTreeView::setHeaderHeight" ref="a4d0967483ed31b26a16a5c7620cb5d7c" args="(const WLength &amp;height)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void Wt::WTreeView::setHeaderHeight </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classWt_1_1WLength.html">WLength</a> &amp;&#160;</td>
          <td class="paramname"><em>height</em></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the header height. </p>
<p>The default value is 20 pixels. </p>

<p>Reimplemented from <a class="el" href="classWt_1_1WAbstractItemView.html#a0ab90f396e9cdb563e45a9a35f7dfc8a">Wt::WAbstractItemView</a>.</p>

</div>
</div>
<a class="anchor" id="a390300f766472476e6a0df5aefaa2ef0"></a><!-- doxytag: member="Wt::WTreeView::setModel" ref="a390300f766472476e6a0df5aefaa2ef0" args="(WAbstractItemModel *model)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void Wt::WTreeView::setModel </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classWt_1_1WAbstractItemModel.html">WAbstractItemModel</a> *&#160;</td>
          <td class="paramname"><em>model</em></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the model. </p>
<p>The View will display data of the given <code>model</code> and changes in the model are reflected by the View.</p>
<p>The initial model is <code>0</code>.</p>
<p>Ownership of the model is not transferred (and thus the previously set model is not deleted). A model may not be deleted as long as a view exists for it.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WAbstractItemView.html#a3f8ecef3dac343faa00efc801e4e4c1f" title="Sets the root index.">setRootIndex()</a> </dd></dl>

<p>Reimplemented from <a class="el" href="classWt_1_1WAbstractItemView.html#ab6a137595a1c6ddb9406d328a3cbf261">Wt::WAbstractItemView</a>.</p>

</div>
</div>
<a class="anchor" id="aef8576ebdf2089edc259362a15e2f750"></a><!-- doxytag: member="Wt::WTreeView::setRootIsDecorated" ref="aef8576ebdf2089edc259362a15e2f750" args="(bool show)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::WTreeView::setRootIsDecorated </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>show</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets whether toplevel items are decorated. </p>
<p>By default, top level nodes have expand/collapse and other lines to display their linkage and offspring, like any node.</p>
<p>By setting <code>show</code> to <code>false</code>, you can hide these decorations for root nodes, and in this way mimic a plain list. You could also consider using a <a class="el" href="classWt_1_1WTableView.html" title="An MVC View widget for tabular data.">WTableView</a> instead. </p>

</div>
</div>
<a class="anchor" id="a433e3733220fdacf2b1b287588545031"></a><!-- doxytag: member="Wt::WTreeView::setRowHeaderCount" ref="a433e3733220fdacf2b1b287588545031" args="(int count)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void Wt::WTreeView::setRowHeaderCount </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>count</em></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Configures the number of columns that are used as row headers. </p>
<p>An item view does not use the vertical header data from the model in any way, but instead you can configure data in the first column(s) to be used as a row headers.</p>
<p>These columns will not scroll horizontally together with the rest of the model.</p>
<p>The default value is 0.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Currently, this property must be set before any other settings of the view and only a value of 0 or 1 is supported. </dd></dl>

<p>Reimplemented from <a class="el" href="classWt_1_1WAbstractItemView.html#adf338c1002ce189de836de6f5d445cc4">Wt::WAbstractItemView</a>.</p>

</div>
</div>
<a class="anchor" id="a849f805206bd1bc83e6bc411f208031d"></a><!-- doxytag: member="Wt::WTreeView::setRowHeight" ref="a849f805206bd1bc83e6bc411f208031d" args="(const WLength &amp;rowHeight)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void Wt::WTreeView::setRowHeight </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classWt_1_1WLength.html">WLength</a> &amp;&#160;</td>
          <td class="paramname"><em>rowHeight</em></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the row height. </p>
<p>The view renders all rows with a same height. This method configures this row height.</p>
<p>The default value is 20 pixels.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>The height must be specified in <a class="el" href="classWt_1_1WLength.html#a908caf5d6be7e244e24598e6d22cd4c0a0b1fa4c1bd7adb92e1a04d62b96d30ba" title="Pixel, relative to canvas resolution.">WLength::Pixel</a> units.</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WTreeView.html#a33ba5111945bc0ec4745a536d52adec5" title="Sets the column width.">setColumnWidth()</a> </dd></dl>

<p>Reimplemented from <a class="el" href="classWt_1_1WAbstractItemView.html#a7ffe86a3f0b58272125abc2a20b997ad">Wt::WAbstractItemView</a>.</p>

</div>
</div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr size="1"><address style="text-align: right; margin: 3px"><small>
Generated on Thu Nov 1 2012 for <a href="http://www.webtoolkit.eu/wt">the
C++ Web Toolkit (Wt)</a> by&nbsp;<a
href="http://www.doxygen.org/index.html"><img src="doxygen.png"
alt="doxygen" border="0" style="vertical-align: middle; display:
inline-block; height: 2em"></a> 1.7.5.1</small></address>
</body>
</html>