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 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910
|
<!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
 <span id="projectnumber">3.2.1</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 Page</span></a></li>
<li><a href="pages.html"><span>Related 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 List</span></a></li>
<li><a href="inherits.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class 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> |
<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 <Wt/WTreeView></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-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)" -->
 </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"> </td><td class="mdescRight">Creates a new tree view. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </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> &format)</td></tr>
<tr><td class="mdescLeft"> </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> </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"> </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 </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> &, bool expanded)</td></tr>
<tr><td class="mdescLeft"> </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 </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> &index) const </td></tr>
<tr><td class="mdescLeft"> </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 </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> &index)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Collapses a node. <a href="#abe1b839fc999634806df030301422411"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </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> &index)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Expands a node. <a href="#a03cd862e9c5dbbfbc126ac627b48592a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </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"> </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 </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"> </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 </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WTreeView.html#ac6e70d3de6623882f70219934d5f8253">rootIsDecorated</a> () const </td></tr>
<tr><td class="mdescLeft"> </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 </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> &width, const <a class="el" href="classWt_1_1WLength.html">WLength</a> &height)</td></tr>
<tr><td class="mdescLeft"> </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>< <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> > & </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WTreeView.html#a8d014f2cd6637f5f842d7fe2fff00418">collapsed</a> ()</td></tr>
<tr><td class="mdescLeft"> </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>< <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> > & </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WTreeView.html#a96586671660b0e81cc2ae99fff284909">expanded</a> ()</td></tr>
<tr><td class="mdescLeft"> </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> * </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> &index) const </td></tr>
<tr><td class="mdescLeft"> </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 </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"> </td><td class="mdescRight">Sets the model. <a href="#a390300f766472476e6a0df5aefaa2ef0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </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> &width)</td></tr>
<tr><td class="mdescLeft"> </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 </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"> </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 </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> &rowHeight)</td></tr>
<tr><td class="mdescLeft"> </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 </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> &height)</td></tr>
<tr><td class="mdescLeft"> </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 </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> &color)</td></tr>
<tr><td class="mdescLeft"> </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 </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"> </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 </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"> </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 </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WTreeView.html#a807eeda7ff799fb5b711e52acd93b6bd">pageCount</a> () const </td></tr>
<tr><td class="mdescLeft"> </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 </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WTreeView.html#abc0ec2c9c5a82d0389900c3a3082ac91">pageSize</a> () const </td></tr>
<tr><td class="mdescLeft"> </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 </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WTreeView.html#a9a62d0d6e27692c9231165ae9599c85b">currentPage</a> () const </td></tr>
<tr><td class="mdescLeft"> </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 </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"> </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 </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> &index, <a class="el" href="classWt_1_1WAbstractItemView.html#af1f29928f9ba120153db2588b464730f">ScrollHint</a> hint=EnsureVisible)</td></tr>
<tr><td class="mdescLeft"> </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 </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WTreeView.html#a11f8eb2390ce4585b99344e540fef8b1">enableAjax</a> ()</td></tr>
<tr><td class="mdescLeft"> </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'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 & 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 & 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 & 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'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-><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 'auto' length.">Wt::WLength::Auto</a>);
gitView-><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-><a class="code" href="classWt_1_1WTreeView.html#a390300f766472476e6a0df5aefaa2ef0" title="Sets the model.">setModel</a>(model);
gitView-><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 &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> & </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><<a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a>>& 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 </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#_deprecated000056">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 &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> & </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><<a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a>>& 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 </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 &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> & </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 &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> & </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 &width, const WLength &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> & </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> & </td>
<td class="paramname"><em>height</em> </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>Specify a new size for this widget, by specifying width and height. By default a widget has automatic width and height, see <a class="el" href="classWt_1_1WLength.html#ab4c9733029342fdbc1dee34a523ee40d" title="Returns whether the length is 'auto'.">WLength::isAuto()</a>.</p>
<p>This applies to CSS-based layout, and only <a class="el" href="classWt_1_1WCompositeWidget.html#a96100109e775da87bfb3c5848c3c6a82">block</a> widgets can be given a size reliably.</p>
<p>When inserted in a layout manager, the widget may be informed about its current size 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. operation.</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 &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> & </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> </td>
<td class="paramname"><em>hint</em> = <code>EnsureVisible</code> </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 </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 &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> & </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 &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 </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> & </td>
<td class="paramname"><em>format</em> </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#_deprecated000055">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 </td>
<td class="paramname"><em>column</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"><em>hide</em> </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 &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 </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> & </td>
<td class="paramname"><em>width</em> </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 </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 &, 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> & </td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"><em>expanded</em> </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 &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> & </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> * </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 </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 </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 &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> & </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"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </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 Fri Mar 30 2012 for <a href="http://www.webtoolkit.eu/wt">the
C++ Web Toolkit (Wt)</a> by <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>
|