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
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Wt examples: TreeNode Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.6 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main Page</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>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>TreeNode Class Reference<br>
<small>
[<a class="el" href="group__treelist.html">Treelist example</a>]</small>
</h1><!-- doxytag: class="TreeNode" --><!-- doxytag: inherits="Wt::WCompositeWidget" -->Example implementation of a single tree list node.
<a href="#_details">More...</a>
<p>
<code>#include <<a class="el" href="TreeNode_8h-source.html">TreeNode.h</a>></code>
<p>
<div class="dynheader">
Inheritance diagram for TreeNode:</div>
<div class="dynsection">
<p><center><img src="classTreeNode__inherit__graph.png" border="0" usemap="#TreeNode__inherit__map" alt="Inheritance graph"></center>
<map name="TreeNode__inherit__map">
<area shape="rect" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WCompositeWidget.html" title="Wt::WCompositeWidget" alt="" coords="5,155,165,181"><area shape="rect" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WWidget.html" title="Wt::WWidget" alt="" coords="37,80,133,107"><area shape="rect" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WObject.html" title="Wt::WObject" alt="" coords="37,5,133,32"></map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>
<p>
<a href="classTreeNode-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Slots</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classTreeNode.html#7c38a975e8b3a31932b8409fa4231bc4">collapse</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Collapse this node. <a href="#7c38a975e8b3a31932b8409fa4231bc4"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classTreeNode.html#bac0f39de477ab6f8d3373ae9f900652">expand</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Expand this node. <a href="#bac0f39de477ab6f8d3373ae9f900652"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classTreeNode.html#ed275ce59686bd08fdabaaea3488e4db">TreeNode</a> (const std::string labelText, <a class="elRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/namespaceWt.html#140dea437d52d3d7c438ea3bd16a1480">Wt::TextFormat</a> labelFormat, <a class="el" href="classIconPair.html">IconPair</a> *labelIcon, <a class="elRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WContainerWidget.html">Wt::WContainerWidget</a> *<a class="elRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WWidget.html#3461e31818c4d2f516641bdaf508312a">parent</a>=0)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct a tree node with the given label. <a href="#ed275ce59686bd08fdabaaea3488e4db"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classTreeNode.html#a3bca1b27d9cbb05b0fa13504498179e">addChildNode</a> (<a class="el" href="classTreeNode.html">TreeNode</a> *node)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Add a child node. <a href="#a3bca1b27d9cbb05b0fa13504498179e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classTreeNode.html#a772a12f5220a2256247048a1edcc581">removeChildNode</a> (<a class="el" href="classTreeNode.html">TreeNode</a> *node)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Remove a child node. <a href="#a772a12f5220a2256247048a1edcc581"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const std::vector< <a class="el" href="classTreeNode.html">TreeNode</a> * > & </td><td class="memItemRight" valign="bottom"><a class="el" href="classTreeNode.html#73afc6b5f7587505a5c1ba1cf2a51341">childNodes</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the list of children. <a href="#73afc6b5f7587505a5c1ba1cf2a51341"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Private Types</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="classTreeNode.html#8ec244c77c2d4cd7335340dead3ff6e5">ImageIndex</a> { <a class="el" href="classTreeNode.html#8ec244c77c2d4cd7335340dead3ff6e5c16e3d1c45f2863648cd9332dc464ec7">Middle</a> = 0,
<a class="el" href="classTreeNode.html#8ec244c77c2d4cd7335340dead3ff6e5a9495647920a84019492819c907b9b0c">Last</a> = 1
}</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Two sets of images, for a normal node, and for the last node. <a href="classTreeNode.html#8ec244c77c2d4cd7335340dead3ff6e5">More...</a><br></td></tr>
<tr><td colspan="2"><br><h2>Private Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classTreeNode.html#daba65c9268249f665d548082d94b930">adjustExpandIcon</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Adjust the expand icon. <a href="#daba65c9268249f665d548082d94b930"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classTreeNode.html#bc3819da4ca51204db2f9528d0ea1c73">isLastChildNode</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns if is the last child within its parent (is rendered differently). <a href="#bc3819da4ca51204db2f9528d0ea1c73"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classTreeNode.html#3e45cd3a50ee872dcff38b27c41b42fb">childNodesChanged</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Rerender when children have changed. <a href="#3e45cd3a50ee872dcff38b27c41b42fb"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classTreeNode.html#0dadb29c855289ba6adaabed4ba86990">undoCollapse</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Undo function for prelearning <a class="el" href="classTreeNode.html#7c38a975e8b3a31932b8409fa4231bc4" title="Collapse this node.">collapse()</a>. <a href="#0dadb29c855289ba6adaabed4ba86990"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classTreeNode.html#353196fdcb63d58e6a1a007a81bb81ee">undoExpand</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Undo function for prelearning <a class="el" href="classTreeNode.html#bac0f39de477ab6f8d3373ae9f900652" title="Expand this node.">expand()</a>. <a href="#353196fdcb63d58e6a1a007a81bb81ee"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">std::vector< <a class="el" href="classTreeNode.html">TreeNode</a> * > </td><td class="memItemRight" valign="bottom"><a class="el" href="classTreeNode.html#34d25e9f0be4f1ed6535d3f47dbec443">childNodes_</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">List of child nodes. <a href="#34d25e9f0be4f1ed6535d3f47dbec443"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classTreeNode.html">TreeNode</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classTreeNode.html#cbb1649a75a11ed3dee8022bfdf53b6c">parentNode_</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">The parent node. <a href="#cbb1649a75a11ed3dee8022bfdf53b6c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="elRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WTable.html">Wt::WTable</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classTreeNode.html#37660f20c29ac82614c35b41356e30e1">layout_</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Layout (2x2 table). <a href="#37660f20c29ac82614c35b41356e30e1"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classIconPair.html">IconPair</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classTreeNode.html#61266475f7f53fa8e43410f0fdb96fc0">expandIcon_</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">The icon for expanding or collapsing. <a href="#61266475f7f53fa8e43410f0fdb96fc0"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="elRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WImage.html">Wt::WImage</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classTreeNode.html#9eea36d4c2abeec8829cd6e94a0c8da2">noExpandIcon_</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">The single image shown instead of the expand/collapse icon when no children. <a href="#9eea36d4c2abeec8829cd6e94a0c8da2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classIconPair.html">IconPair</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classTreeNode.html#eb5228e3bfb5f8f210ef7ff62da5ec7f">labelIcon_</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">The icon next to the label. <a href="#eb5228e3bfb5f8f210ef7ff62da5ec7f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="elRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WText.html">Wt::WText</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classTreeNode.html#9bd2202cc1f44ce4cf21943cc64e3bd2">labelText_</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">The label. <a href="#9bd2202cc1f44ce4cf21943cc64e3bd2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="elRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WText.html">Wt::WText</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classTreeNode.html#6d5140f032f5b24b3398ccdcdba03ca0">childCountLabel_</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">The children count '(x)' for x children. <a href="#6d5140f032f5b24b3398ccdcdba03ca0"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="elRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WContainerWidget.html">Wt::WContainerWidget</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classTreeNode.html#1aef899199fbedac9990f7902fa7fc23">expandedContent_</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">The container in which the children are managed. <a href="#1aef899199fbedac9990f7902fa7fc23"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classTreeNode.html#650686b10a2f2cdb815462dbf030c204">wasCollapsed_</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Was collapsed (for undo of prelearned <a class="el" href="classTreeNode.html#7c38a975e8b3a31932b8409fa4231bc4" title="Collapse this node.">collapse()</a> and <a class="el" href="classTreeNode.html#bac0f39de477ab6f8d3373ae9f900652" title="Expand this node.">expand()</a> slots. <a href="#650686b10a2f2cdb815462dbf030c204"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Static Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classTreeNode.html#55d4c04fb9c147448963b149e8fc8cb6">imageLine_</a> []</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classTreeNode.html#75675ae3d29018b6bc5d3bb614ed494b">imagePlus_</a> []</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classTreeNode.html#b404df187e81ce5f216eb815572f11b6">imageMin_</a> []</td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Example implementation of a single tree list node.
<p>
<em>This is an example of a basic treelist implementation. As of version 1.1.8, a more flexible treenode implementation is included as part of the library: WTreeNode.</em><p>
A tree list is constructed by nesting <a class="el" href="classTreeNode.html" title="Example implementation of a single tree list node.">TreeNode</a> objects in a tree hierarchy.<p>
A <a class="el" href="classTreeNode.html" title="Example implementation of a single tree list node.">TreeNode</a> has a label, and optionally a two-state label icon, which defines a different image depending on the state of the node (expanded or collapsed). When the node has any children, a child count is also indicated.<p>
Next to the icons, two style classes determine the look of a <a class="el" href="classTreeNode.html" title="Example implementation of a single tree list node.">TreeNode</a>: the label has style "treenodelabel", and the child count has as style "treenodechildcount".<p>
Use CSS nested selectors to apply different styles to different treenodes. For example, to style the treenode with style class "mynode":<p>
The behaviour of the tree node is to collapse all children when the node is expanded (this is similar to how most tree node implementations work).<p>
The widget uses a number of images which must be available in an "icons/" folder (see the Wt treelist examples).<p>
This widget is part of the Wt treelist example.
<p>Definition at line <a class="el" href="TreeNode_8h-source.html#l00055">55</a> of file <a class="el" href="TreeNode_8h-source.html">TreeNode.h</a>.</p>
<hr><h2>Member Enumeration Documentation</h2>
<a class="anchor" name="8ec244c77c2d4cd7335340dead3ff6e5"></a><!-- doxytag: member="TreeNode::ImageIndex" ref="8ec244c77c2d4cd7335340dead3ff6e5" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="classTreeNode.html#8ec244c77c2d4cd7335340dead3ff6e5">TreeNode::ImageIndex</a><code> [private]</code> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Two sets of images, for a normal node, and for the last node.
<p>
<dl compact><dt><b>Enumerator: </b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" name="8ec244c77c2d4cd7335340dead3ff6e5c16e3d1c45f2863648cd9332dc464ec7"></a><!-- doxytag: member="Middle" ref="8ec244c77c2d4cd7335340dead3ff6e5c16e3d1c45f2863648cd9332dc464ec7" args="" -->Middle</em> </td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" name="8ec244c77c2d4cd7335340dead3ff6e5a9495647920a84019492819c907b9b0c"></a><!-- doxytag: member="Last" ref="8ec244c77c2d4cd7335340dead3ff6e5a9495647920a84019492819c907b9b0c" args="" -->Last</em> </td><td>
</td></tr>
</table>
</dl>
<p>Definition at line <a class="el" href="TreeNode_8h-source.html#l00140">140</a> of file <a class="el" href="TreeNode_8h-source.html">TreeNode.h</a>.</p>
<div class="fragment"><pre class="fragment"><a name="l00140"></a>00140 { <a class="code" href="classTreeNode.html#8ec244c77c2d4cd7335340dead3ff6e5c16e3d1c45f2863648cd9332dc464ec7">Middle</a> = 0, <a class="code" href="classTreeNode.html#8ec244c77c2d4cd7335340dead3ff6e5a9495647920a84019492819c907b9b0c">Last</a> = 1 };
</pre></div>
<p>
</div>
</div><p>
<hr><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" name="ed275ce59686bd08fdabaaea3488e4db"></a><!-- doxytag: member="TreeNode::TreeNode" ref="ed275ce59686bd08fdabaaea3488e4db" args="(const std::string labelText, Wt::TextFormat labelFormat, IconPair *labelIcon, Wt::WContainerWidget *parent=0)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">TreeNode::TreeNode </td>
<td>(</td>
<td class="paramtype">const std::string </td>
<td class="paramname"> <em>labelText</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="elRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/namespaceWt.html#140dea437d52d3d7c438ea3bd16a1480">Wt::TextFormat</a> </td>
<td class="paramname"> <em>labelFormat</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classIconPair.html">IconPair</a> * </td>
<td class="paramname"> <em>labelIcon</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="elRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WContainerWidget.html">Wt::WContainerWidget</a> * </td>
<td class="paramname"> <em>parent</em> = <code>0</code></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Construct a tree node with the given label.
<p>
The label is formatted in a WText with the given formatting. The labelIcon (if not 0) will appear next to the label and its state will reflect the expand/collapse state of the node.<p>
Optionally, a userContent widget may be associated with the node. When expanded, this widget will be shown below the widget, but above any of the children nodes.
<p>Definition at line <a class="el" href="TreeNode_8C-source.html#l00025">25</a> of file <a class="el" href="TreeNode_8C-source.html">TreeNode.C</a>.</p>
<div class="fragment"><pre class="fragment"><a name="l00029"></a>00029 : <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WCompositeWidget.html">Wt::WCompositeWidget</a>(parent),
<a name="l00030"></a>00030 <a class="code" href="classTreeNode.html#cbb1649a75a11ed3dee8022bfdf53b6c" title="The parent node.">parentNode_</a>(0),
<a name="l00031"></a>00031 <a class="code" href="classTreeNode.html#eb5228e3bfb5f8f210ef7ff62da5ec7f" title="The icon next to the label.">labelIcon_</a>(labelIcon)
<a name="l00032"></a>00032 {
<a name="l00033"></a>00033 <span class="comment">// pre-learned stateless implementations ...</span>
<a name="l00034"></a>00034 <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WObject.html#c00d775170f47e715894b24de6b869da">implementStateless</a>(&<a class="code" href="classTreeNode.html#bac0f39de477ab6f8d3373ae9f900652" title="Expand this node.">TreeNode::expand</a>, &<a class="code" href="classTreeNode.html#353196fdcb63d58e6a1a007a81bb81ee" title="Undo function for prelearning expand().">TreeNode::undoExpand</a>);
<a name="l00035"></a>00035 <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WObject.html#c00d775170f47e715894b24de6b869da">implementStateless</a>(&<a class="code" href="classTreeNode.html#7c38a975e8b3a31932b8409fa4231bc4" title="Collapse this node.">TreeNode::collapse</a>, &<a class="code" href="classTreeNode.html#0dadb29c855289ba6adaabed4ba86990" title="Undo function for prelearning collapse().">TreeNode::undoCollapse</a>);
<a name="l00036"></a>00036
<a name="l00037"></a>00037 <span class="comment">// ... or auto-learned stateless implementations</span>
<a name="l00038"></a>00038 <span class="comment">// which do not need undo functions</span>
<a name="l00039"></a>00039 <span class="comment">//implementStateless(&TreeNode::expand);</span>
<a name="l00040"></a>00040 <span class="comment">//implementStateless(&TreeNode::collapse);</span>
<a name="l00041"></a>00041
<a name="l00042"></a>00042 <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WCompositeWidget.html#a5a3e93a551fd41b180c6b28fa169946">setImplementation</a>(<a class="code" href="classTreeNode.html#37660f20c29ac82614c35b41356e30e1" title="Layout (2x2 table).">layout_</a> = <span class="keyword">new</span> <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WTable.html">Wt::WTable</a>());
<a name="l00043"></a>00043
<a name="l00044"></a>00044 <a class="code" href="classTreeNode.html#61266475f7f53fa8e43410f0fdb96fc0" title="The icon for expanding or collapsing.">expandIcon_</a> = <span class="keyword">new</span> <a class="code" href="classIconPair.html" title="An icon pair (identical to WIconPair).">IconPair</a>(<a class="code" href="classTreeNode.html#75675ae3d29018b6bc5d3bb614ed494b">imagePlus_</a>[<a class="code" href="classTreeNode.html#8ec244c77c2d4cd7335340dead3ff6e5a9495647920a84019492819c907b9b0c">Last</a>], <a class="code" href="classTreeNode.html#b404df187e81ce5f216eb815572f11b6">imageMin_</a>[Last]);
<a name="l00045"></a>00045 <a class="code" href="classTreeNode.html#61266475f7f53fa8e43410f0fdb96fc0" title="The icon for expanding or collapsing.">expandIcon_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WWidget.html#0825c3ccbd4999afc1a88fafa6aa6fc7">hide</a>();
<a name="l00046"></a>00046 <a class="code" href="classTreeNode.html#9eea36d4c2abeec8829cd6e94a0c8da2" title="The single image shown instead of the expand/collapse icon when no children.">noExpandIcon_</a> = <span class="keyword">new</span> <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WImage.html">Wt::WImage</a>(<a class="code" href="classTreeNode.html#55d4c04fb9c147448963b149e8fc8cb6">imageLine_</a>[<a class="code" href="classTreeNode.html#8ec244c77c2d4cd7335340dead3ff6e5a9495647920a84019492819c907b9b0c">Last</a>]);
<a name="l00047"></a>00047
<a name="l00048"></a>00048 <a class="code" href="classTreeNode.html#1aef899199fbedac9990f7902fa7fc23" title="The container in which the children are managed.">expandedContent_</a> = <span class="keyword">new</span> <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WContainerWidget.html">Wt::WContainerWidget</a>();
<a name="l00049"></a>00049 <a class="code" href="classTreeNode.html#1aef899199fbedac9990f7902fa7fc23" title="The container in which the children are managed.">expandedContent_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WWidget.html#0825c3ccbd4999afc1a88fafa6aa6fc7">hide</a>();
<a name="l00050"></a>00050
<a name="l00051"></a>00051 <a class="code" href="classTreeNode.html#9bd2202cc1f44ce4cf21943cc64e3bd2" title="The label.">labelText_</a> = <span class="keyword">new</span> <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WText.html">Wt::WText</a>(labelText);
<a name="l00052"></a>00052 <a class="code" href="classTreeNode.html#9bd2202cc1f44ce4cf21943cc64e3bd2" title="The label.">labelText_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WText.html#f22c64c4c5fed3d2aef0915a7e5c5866">setTextFormat</a>(labelFormat);
<a name="l00053"></a>00053 <a class="code" href="classTreeNode.html#9bd2202cc1f44ce4cf21943cc64e3bd2" title="The label.">labelText_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WWebWidget.html#6fd43dced1a62f7e79bc3522eeb16216">setStyleClass</a>(<span class="stringliteral">"treenodelabel"</span>);
<a name="l00054"></a>00054 <a class="code" href="classTreeNode.html#6d5140f032f5b24b3398ccdcdba03ca0" title="The children count &#39;(x)&#39; for x children.">childCountLabel_</a> = <span class="keyword">new</span> <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WText.html">Wt::WText</a>();
<a name="l00055"></a>00055 <a class="code" href="classTreeNode.html#6d5140f032f5b24b3398ccdcdba03ca0" title="The children count &#39;(x)&#39; for x children.">childCountLabel_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WWebWidget.html#07719d06da0dd17af2381c663e8fb0b7">setMargin</a>(7, <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/namespaceWt.html#5a6f4636bcc6ab3c075165d249b3a5a36568fecac7c7d7223afaed240bcfdd9e">Wt::Left</a>);
<a name="l00056"></a>00056 <a class="code" href="classTreeNode.html#6d5140f032f5b24b3398ccdcdba03ca0" title="The children count &#39;(x)&#39; for x children.">childCountLabel_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WWebWidget.html#6fd43dced1a62f7e79bc3522eeb16216">setStyleClass</a>(<span class="stringliteral">"treenodechildcount"</span>);
<a name="l00057"></a>00057
<a name="l00058"></a>00058 <a class="code" href="classTreeNode.html#37660f20c29ac82614c35b41356e30e1" title="Layout (2x2 table).">layout_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WTable.html#c4b59af9a44e185edb14e7f1f439d6c4">elementAt</a>(0, 0)->addWidget(<a class="code" href="classTreeNode.html#61266475f7f53fa8e43410f0fdb96fc0" title="The icon for expanding or collapsing.">expandIcon_</a>);
<a name="l00059"></a>00059 <a class="code" href="classTreeNode.html#37660f20c29ac82614c35b41356e30e1" title="Layout (2x2 table).">layout_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WTable.html#c4b59af9a44e185edb14e7f1f439d6c4">elementAt</a>(0, 0)->addWidget(<a class="code" href="classTreeNode.html#9eea36d4c2abeec8829cd6e94a0c8da2" title="The single image shown instead of the expand/collapse icon when no children.">noExpandIcon_</a>);
<a name="l00060"></a>00060
<a name="l00061"></a>00061 <span class="keywordflow">if</span> (<a class="code" href="classTreeNode.html#eb5228e3bfb5f8f210ef7ff62da5ec7f" title="The icon next to the label.">labelIcon_</a>) {
<a name="l00062"></a>00062 <a class="code" href="classTreeNode.html#37660f20c29ac82614c35b41356e30e1" title="Layout (2x2 table).">layout_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WTable.html#c4b59af9a44e185edb14e7f1f439d6c4">elementAt</a>(0, 1)->addWidget(<a class="code" href="classTreeNode.html#eb5228e3bfb5f8f210ef7ff62da5ec7f" title="The icon next to the label.">labelIcon_</a>);
<a name="l00063"></a>00063 <a class="code" href="classTreeNode.html#eb5228e3bfb5f8f210ef7ff62da5ec7f" title="The icon next to the label.">labelIcon_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WCompositeWidget.html#f548a47d09382c9413a688c0eb65df14">setVerticalAlignment</a>(<a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/namespaceWt.html#b8f772c69bc8180c31f9e4f4593b143f2ed90f01dbf74049f428d33769d48e3f">Wt::AlignMiddle</a>);
<a name="l00064"></a>00064 }
<a name="l00065"></a>00065 <a class="code" href="classTreeNode.html#37660f20c29ac82614c35b41356e30e1" title="Layout (2x2 table).">layout_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WTable.html#c4b59af9a44e185edb14e7f1f439d6c4">elementAt</a>(0, 1)->addWidget(<a class="code" href="classTreeNode.html#9bd2202cc1f44ce4cf21943cc64e3bd2" title="The label.">labelText_</a>);
<a name="l00066"></a>00066 <a class="code" href="classTreeNode.html#37660f20c29ac82614c35b41356e30e1" title="Layout (2x2 table).">layout_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WTable.html#c4b59af9a44e185edb14e7f1f439d6c4">elementAt</a>(0, 1)->addWidget(<a class="code" href="classTreeNode.html#6d5140f032f5b24b3398ccdcdba03ca0" title="The children count &#39;(x)&#39; for x children.">childCountLabel_</a>);
<a name="l00067"></a>00067
<a name="l00068"></a>00068 <a class="code" href="classTreeNode.html#37660f20c29ac82614c35b41356e30e1" title="Layout (2x2 table).">layout_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WTable.html#c4b59af9a44e185edb14e7f1f439d6c4">elementAt</a>(1, 1)->addWidget(<a class="code" href="classTreeNode.html#1aef899199fbedac9990f7902fa7fc23" title="The container in which the children are managed.">expandedContent_</a>);
<a name="l00069"></a>00069
<a name="l00070"></a>00070 <a class="code" href="classTreeNode.html#37660f20c29ac82614c35b41356e30e1" title="Layout (2x2 table).">layout_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WTable.html#c4b59af9a44e185edb14e7f1f439d6c4">elementAt</a>(0, 0)->setContentAlignment(<a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/namespaceWt.html#b8f772c69bc8180c31f9e4f4593b143f58fe5182bd266132c59718c6d30945a9">Wt::AlignTop</a>);
<a name="l00071"></a>00071 <a class="code" href="classTreeNode.html#37660f20c29ac82614c35b41356e30e1" title="Layout (2x2 table).">layout_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WTable.html#c4b59af9a44e185edb14e7f1f439d6c4">elementAt</a>(0, 1)->setContentAlignment(<a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/namespaceWt.html#b8f772c69bc8180c31f9e4f4593b143f2ed90f01dbf74049f428d33769d48e3f">Wt::AlignMiddle</a>);
<a name="l00072"></a>00072
<a name="l00073"></a>00073 <a class="code" href="classTreeNode.html#61266475f7f53fa8e43410f0fdb96fc0" title="The icon for expanding or collapsing.">expandIcon_</a>-><a class="code" href="classIconPair.html#dd2ab8e518f79ef40d8000f32bc004dc" title="Signal emitted when clicked while in state 0 (icon 1 is shown).">icon1Clicked</a>.<a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1EventSignal.html#6efcb92576b5aa846a3354dd26918a9f">connect</a>(SLOT(<span class="keyword">this</span>, <a class="code" href="classTreeNode.html#bac0f39de477ab6f8d3373ae9f900652" title="Expand this node.">TreeNode::expand</a>));
<a name="l00074"></a>00074 <a class="code" href="classTreeNode.html#61266475f7f53fa8e43410f0fdb96fc0" title="The icon for expanding or collapsing.">expandIcon_</a>-><a class="code" href="classIconPair.html#aa5a73811e71280dcdf2ce4e9efc540a" title="Signal emitted when clicked while in state 1 (icon 2 is shown).">icon2Clicked</a>.<a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1EventSignal.html#6efcb92576b5aa846a3354dd26918a9f">connect</a>(SLOT(<span class="keyword">this</span>, <a class="code" href="classTreeNode.html#7c38a975e8b3a31932b8409fa4231bc4" title="Collapse this node.">TreeNode::collapse</a>));
<a name="l00075"></a>00075 } <span class="comment">//</span>
</pre></div>
<p>
</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="a3bca1b27d9cbb05b0fa13504498179e"></a><!-- doxytag: member="TreeNode::addChildNode" ref="a3bca1b27d9cbb05b0fa13504498179e" args="(TreeNode *node)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void TreeNode::addChildNode </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classTreeNode.html">TreeNode</a> * </td>
<td class="paramname"> <em>node</em> </td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Add a child node.
<p>
<p>Definition at line <a class="el" href="TreeNode_8C-source.html#l00085">85</a> of file <a class="el" href="TreeNode_8C-source.html">TreeNode.C</a>.</p>
<div class="fragment"><pre class="fragment"><a name="l00086"></a>00086 {
<a name="l00087"></a>00087 <a class="code" href="classTreeNode.html#34d25e9f0be4f1ed6535d3f47dbec443" title="List of child nodes.">childNodes_</a>.push_back(node);
<a name="l00088"></a>00088 node-><a class="code" href="classTreeNode.html#cbb1649a75a11ed3dee8022bfdf53b6c" title="The parent node.">parentNode_</a> = <span class="keyword">this</span>;
<a name="l00089"></a>00089
<a name="l00090"></a>00090 <a class="code" href="classTreeNode.html#1aef899199fbedac9990f7902fa7fc23" title="The container in which the children are managed.">expandedContent_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WContainerWidget.html#2cfe66d9b62940f889e99538a9f478d2">addWidget</a>(node);
<a name="l00091"></a>00091
<a name="l00092"></a>00092 <a class="code" href="classTreeNode.html#3e45cd3a50ee872dcff38b27c41b42fb" title="Rerender when children have changed.">childNodesChanged</a>();
<a name="l00093"></a>00093 }
</pre></div>
<p>
</div>
</div><p>
<a class="anchor" name="a772a12f5220a2256247048a1edcc581"></a><!-- doxytag: member="TreeNode::removeChildNode" ref="a772a12f5220a2256247048a1edcc581" args="(TreeNode *node)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void TreeNode::removeChildNode </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classTreeNode.html">TreeNode</a> * </td>
<td class="paramname"> <em>node</em> </td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Remove a child node.
<p>
<p>Definition at line <a class="el" href="TreeNode_8C-source.html#l00095">95</a> of file <a class="el" href="TreeNode_8C-source.html">TreeNode.C</a>.</p>
<div class="fragment"><pre class="fragment"><a name="l00096"></a>00096 {
<a name="l00097"></a>00097 <a class="code" href="classTreeNode.html#34d25e9f0be4f1ed6535d3f47dbec443" title="List of child nodes.">childNodes_</a>.erase(std::find(<a class="code" href="classTreeNode.html#34d25e9f0be4f1ed6535d3f47dbec443" title="List of child nodes.">childNodes_</a>.begin(), <a class="code" href="classTreeNode.html#34d25e9f0be4f1ed6535d3f47dbec443" title="List of child nodes.">childNodes_</a>.end(), node));
<a name="l00098"></a>00098
<a name="l00099"></a>00099 node-><a class="code" href="classTreeNode.html#cbb1649a75a11ed3dee8022bfdf53b6c" title="The parent node.">parentNode_</a> = 0;
<a name="l00100"></a>00100
<a name="l00101"></a>00101 <a class="code" href="classTreeNode.html#1aef899199fbedac9990f7902fa7fc23" title="The container in which the children are managed.">expandedContent_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WContainerWidget.html#4292867b1872bd31c7d0c3346d988470">removeWidget</a>(node);
<a name="l00102"></a>00102
<a name="l00103"></a>00103 <a class="code" href="classTreeNode.html#3e45cd3a50ee872dcff38b27c41b42fb" title="Rerender when children have changed.">childNodesChanged</a>();
<a name="l00104"></a>00104 } <span class="comment">//</span>
</pre></div>
<p>
</div>
</div><p>
<a class="anchor" name="73afc6b5f7587505a5c1ba1cf2a51341"></a><!-- doxytag: member="TreeNode::childNodes" ref="73afc6b5f7587505a5c1ba1cf2a51341" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const std::vector<<a class="el" href="classTreeNode.html">TreeNode</a> *>& TreeNode::childNodes </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Get the list of children.
<p>
<p>Definition at line <a class="el" href="TreeNode_8h-source.html#l00082">82</a> of file <a class="el" href="TreeNode_8h-source.html">TreeNode.h</a>.</p>
<div class="fragment"><pre class="fragment"><a name="l00082"></a>00082 { <span class="keywordflow">return</span> <a class="code" href="classTreeNode.html#34d25e9f0be4f1ed6535d3f47dbec443" title="List of child nodes.">childNodes_</a>; }
</pre></div>
<p>
</div>
</div><p>
<a class="anchor" name="7c38a975e8b3a31932b8409fa4231bc4"></a><!-- doxytag: member="TreeNode::collapse" ref="7c38a975e8b3a31932b8409fa4231bc4" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void TreeNode::collapse </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td><code> [slot]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Collapse this node.
<p>
<p>Definition at line <a class="el" href="TreeNode_8C-source.html#l00123">123</a> of file <a class="el" href="TreeNode_8C-source.html">TreeNode.C</a>.</p>
<div class="fragment"><pre class="fragment"><a name="l00124"></a>00124 {
<a name="l00125"></a>00125 <a class="code" href="classTreeNode.html#650686b10a2f2cdb815462dbf030c204" title="Was collapsed (for undo of prelearned collapse() and expand() slots.">wasCollapsed_</a> = <a class="code" href="classTreeNode.html#1aef899199fbedac9990f7902fa7fc23" title="The container in which the children are managed.">expandedContent_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WWebWidget.html#594cbc1789cb8e2123bc5d968aa320ea">isHidden</a>();
<a name="l00126"></a>00126
<a name="l00127"></a>00127 <a class="code" href="classTreeNode.html#61266475f7f53fa8e43410f0fdb96fc0" title="The icon for expanding or collapsing.">expandIcon_</a>-><a class="code" href="classIconPair.html#349d74977ef2174b64bab37e2b9a27ea" title="Set which icon should be visible.">setState</a>(0);
<a name="l00128"></a>00128 <a class="code" href="classTreeNode.html#1aef899199fbedac9990f7902fa7fc23" title="The container in which the children are managed.">expandedContent_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WWidget.html#0825c3ccbd4999afc1a88fafa6aa6fc7">hide</a>();
<a name="l00129"></a>00129 <span class="keywordflow">if</span> (<a class="code" href="classTreeNode.html#eb5228e3bfb5f8f210ef7ff62da5ec7f" title="The icon next to the label.">labelIcon_</a>)
<a name="l00130"></a>00130 <a class="code" href="classTreeNode.html#eb5228e3bfb5f8f210ef7ff62da5ec7f" title="The icon next to the label.">labelIcon_</a>-><a class="code" href="classIconPair.html#349d74977ef2174b64bab37e2b9a27ea" title="Set which icon should be visible.">setState</a>(0);
<a name="l00131"></a>00131 } <span class="comment">//</span>
</pre></div>
<p>
</div>
</div><p>
<a class="anchor" name="bac0f39de477ab6f8d3373ae9f900652"></a><!-- doxytag: member="TreeNode::expand" ref="bac0f39de477ab6f8d3373ae9f900652" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void TreeNode::expand </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td><code> [slot]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Expand this node.
<p>
<p>Definition at line <a class="el" href="TreeNode_8C-source.html#l00133">133</a> of file <a class="el" href="TreeNode_8C-source.html">TreeNode.C</a>.</p>
<div class="fragment"><pre class="fragment"><a name="l00134"></a>00134 {
<a name="l00135"></a>00135 <a class="code" href="classTreeNode.html#650686b10a2f2cdb815462dbf030c204" title="Was collapsed (for undo of prelearned collapse() and expand() slots.">wasCollapsed_</a> = <a class="code" href="classTreeNode.html#1aef899199fbedac9990f7902fa7fc23" title="The container in which the children are managed.">expandedContent_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WWebWidget.html#594cbc1789cb8e2123bc5d968aa320ea">isHidden</a>();
<a name="l00136"></a>00136
<a name="l00137"></a>00137 <a class="code" href="classTreeNode.html#61266475f7f53fa8e43410f0fdb96fc0" title="The icon for expanding or collapsing.">expandIcon_</a>-><a class="code" href="classIconPair.html#349d74977ef2174b64bab37e2b9a27ea" title="Set which icon should be visible.">setState</a>(1);
<a name="l00138"></a>00138 <a class="code" href="classTreeNode.html#1aef899199fbedac9990f7902fa7fc23" title="The container in which the children are managed.">expandedContent_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WWidget.html#52dcef5a385ddfa0a8c3e6c20000f181">show</a>();
<a name="l00139"></a>00139 <span class="keywordflow">if</span> (<a class="code" href="classTreeNode.html#eb5228e3bfb5f8f210ef7ff62da5ec7f" title="The icon next to the label.">labelIcon_</a>)
<a name="l00140"></a>00140 <a class="code" href="classTreeNode.html#eb5228e3bfb5f8f210ef7ff62da5ec7f" title="The icon next to the label.">labelIcon_</a>-><a class="code" href="classIconPair.html#349d74977ef2174b64bab37e2b9a27ea" title="Set which icon should be visible.">setState</a>(1);
<a name="l00141"></a>00141
<a name="l00142"></a>00142 <span class="comment">/*</span>
<a name="l00143"></a>00143 <span class="comment"> * collapse all children</span>
<a name="l00144"></a>00144 <span class="comment"> */</span>
<a name="l00145"></a>00145 <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> i = 0; i < <a class="code" href="classTreeNode.html#34d25e9f0be4f1ed6535d3f47dbec443" title="List of child nodes.">childNodes_</a>.size(); ++i)
<a name="l00146"></a>00146 <a class="code" href="classTreeNode.html#34d25e9f0be4f1ed6535d3f47dbec443" title="List of child nodes.">childNodes_</a>[i]-><a class="code" href="classTreeNode.html#7c38a975e8b3a31932b8409fa4231bc4" title="Collapse this node.">collapse</a>();
<a name="l00147"></a>00147 } <span class="comment">//</span>
</pre></div>
<p>
</div>
</div><p>
<a class="anchor" name="daba65c9268249f665d548082d94b930"></a><!-- doxytag: member="TreeNode::adjustExpandIcon" ref="daba65c9268249f665d548082d94b930" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void TreeNode::adjustExpandIcon </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td><code> [private]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Adjust the expand icon.
<p>
<p>Definition at line <a class="el" href="TreeNode_8C-source.html#l00177">177</a> of file <a class="el" href="TreeNode_8C-source.html">TreeNode.C</a>.</p>
<div class="fragment"><pre class="fragment"><a name="l00178"></a>00178 {
<a name="l00179"></a>00179 <a class="code" href="classTreeNode.html#8ec244c77c2d4cd7335340dead3ff6e5" title="Two sets of images, for a normal node, and for the last node.">ImageIndex</a> index = <a class="code" href="classTreeNode.html#bc3819da4ca51204db2f9528d0ea1c73" title="Returns if is the last child within its parent (is rendered differently).">isLastChildNode</a>() ? <a class="code" href="classTreeNode.html#8ec244c77c2d4cd7335340dead3ff6e5a9495647920a84019492819c907b9b0c">Last</a> : <a class="code" href="classTreeNode.html#8ec244c77c2d4cd7335340dead3ff6e5c16e3d1c45f2863648cd9332dc464ec7">Middle</a>;
<a name="l00180"></a>00180
<a name="l00181"></a>00181 <span class="keywordflow">if</span> (<a class="code" href="classTreeNode.html#61266475f7f53fa8e43410f0fdb96fc0" title="The icon for expanding or collapsing.">expandIcon_</a>-><a class="code" href="classIconPair.html#faed887865e6069e3c4689feed6cf43a" title="Get the first icon image.">icon1</a>()-><a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WImage.html#e3a7a79cd15e7aa7e4e7c3a72873bc68">imageRef</a>() != <a class="code" href="classTreeNode.html#75675ae3d29018b6bc5d3bb614ed494b">imagePlus_</a>[index])
<a name="l00182"></a>00182 <a class="code" href="classTreeNode.html#61266475f7f53fa8e43410f0fdb96fc0" title="The icon for expanding or collapsing.">expandIcon_</a>-><a class="code" href="classIconPair.html#faed887865e6069e3c4689feed6cf43a" title="Get the first icon image.">icon1</a>()-><a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WImage.html#cea9ce518f4eec6b19fd4bacc44a52e8">setImageRef</a>(<a class="code" href="classTreeNode.html#75675ae3d29018b6bc5d3bb614ed494b">imagePlus_</a>[index]);
<a name="l00183"></a>00183 <span class="keywordflow">if</span> (<a class="code" href="classTreeNode.html#61266475f7f53fa8e43410f0fdb96fc0" title="The icon for expanding or collapsing.">expandIcon_</a>-><a class="code" href="classIconPair.html#a7fcead5a40120b8765213c217351cda" title="Get the second icon image.">icon2</a>()-><a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WImage.html#e3a7a79cd15e7aa7e4e7c3a72873bc68">imageRef</a>() != <a class="code" href="classTreeNode.html#b404df187e81ce5f216eb815572f11b6">imageMin_</a>[index])
<a name="l00184"></a>00184 <a class="code" href="classTreeNode.html#61266475f7f53fa8e43410f0fdb96fc0" title="The icon for expanding or collapsing.">expandIcon_</a>-><a class="code" href="classIconPair.html#a7fcead5a40120b8765213c217351cda" title="Get the second icon image.">icon2</a>()-><a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WImage.html#cea9ce518f4eec6b19fd4bacc44a52e8">setImageRef</a>(<a class="code" href="classTreeNode.html#b404df187e81ce5f216eb815572f11b6">imageMin_</a>[index]);
<a name="l00185"></a>00185 <span class="keywordflow">if</span> (<a class="code" href="classTreeNode.html#9eea36d4c2abeec8829cd6e94a0c8da2" title="The single image shown instead of the expand/collapse icon when no children.">noExpandIcon_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WImage.html#e3a7a79cd15e7aa7e4e7c3a72873bc68">imageRef</a>() != <a class="code" href="classTreeNode.html#55d4c04fb9c147448963b149e8fc8cb6">imageLine_</a>[index])
<a name="l00186"></a>00186 <a class="code" href="classTreeNode.html#9eea36d4c2abeec8829cd6e94a0c8da2" title="The single image shown instead of the expand/collapse icon when no children.">noExpandIcon_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WImage.html#cea9ce518f4eec6b19fd4bacc44a52e8">setImageRef</a>(<a class="code" href="classTreeNode.html#55d4c04fb9c147448963b149e8fc8cb6">imageLine_</a>[index]);
<a name="l00187"></a>00187
<a name="l00188"></a>00188 <span class="keywordflow">if</span> (index == <a class="code" href="classTreeNode.html#8ec244c77c2d4cd7335340dead3ff6e5a9495647920a84019492819c907b9b0c">Last</a>) {
<a name="l00189"></a>00189 <a class="code" href="classTreeNode.html#37660f20c29ac82614c35b41356e30e1" title="Layout (2x2 table).">layout_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WTable.html#c4b59af9a44e185edb14e7f1f439d6c4">elementAt</a>(0, 0)
<a name="l00190"></a>00190 ->decorationStyle().setBackgroundImage(<span class="stringliteral">""</span>);
<a name="l00191"></a>00191 <a class="code" href="classTreeNode.html#37660f20c29ac82614c35b41356e30e1" title="Layout (2x2 table).">layout_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WTable.html#c4b59af9a44e185edb14e7f1f439d6c4">elementAt</a>(1, 0)
<a name="l00192"></a>00192 ->decorationStyle().setBackgroundImage(<span class="stringliteral">""</span>);
<a name="l00193"></a>00193 } <span class="keywordflow">else</span> {
<a name="l00194"></a>00194 <a class="code" href="classTreeNode.html#37660f20c29ac82614c35b41356e30e1" title="Layout (2x2 table).">layout_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WTable.html#c4b59af9a44e185edb14e7f1f439d6c4">elementAt</a>(0, 0)
<a name="l00195"></a>00195 ->decorationStyle().setBackgroundImage(<span class="stringliteral">"icons/line-trunk.gif"</span>,
<a name="l00196"></a>00196 <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WCssDecorationStyle.html#6110934e7bf757aa4b2235137027b23a0aeb307a9966be9867e8cfb44dadeff6">Wt::WCssDecorationStyle::RepeatY</a>);
<a name="l00197"></a>00197 <a class="code" href="classTreeNode.html#37660f20c29ac82614c35b41356e30e1" title="Layout (2x2 table).">layout_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WTable.html#c4b59af9a44e185edb14e7f1f439d6c4">elementAt</a>(1, 0)
<a name="l00198"></a>00198 ->decorationStyle().setBackgroundImage(<span class="stringliteral">"icons/line-trunk.gif"</span>,
<a name="l00199"></a>00199 <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WCssDecorationStyle.html#6110934e7bf757aa4b2235137027b23a0aeb307a9966be9867e8cfb44dadeff6">Wt::WCssDecorationStyle::RepeatY</a>);
<a name="l00200"></a>00200 } <span class="comment">//</span>
<a name="l00201"></a>00201
<a name="l00202"></a>00202 <span class="keywordflow">if</span> (<a class="code" href="classTreeNode.html#34d25e9f0be4f1ed6535d3f47dbec443" title="List of child nodes.">childNodes_</a>.empty()) {
<a name="l00203"></a>00203 <span class="keywordflow">if</span> (<a class="code" href="classTreeNode.html#9eea36d4c2abeec8829cd6e94a0c8da2" title="The single image shown instead of the expand/collapse icon when no children.">noExpandIcon_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WWebWidget.html#594cbc1789cb8e2123bc5d968aa320ea">isHidden</a>()) {
<a name="l00204"></a>00204 <a class="code" href="classTreeNode.html#9eea36d4c2abeec8829cd6e94a0c8da2" title="The single image shown instead of the expand/collapse icon when no children.">noExpandIcon_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WWidget.html#52dcef5a385ddfa0a8c3e6c20000f181">show</a>();
<a name="l00205"></a>00205 <a class="code" href="classTreeNode.html#61266475f7f53fa8e43410f0fdb96fc0" title="The icon for expanding or collapsing.">expandIcon_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WWidget.html#0825c3ccbd4999afc1a88fafa6aa6fc7">hide</a>();
<a name="l00206"></a>00206 }
<a name="l00207"></a>00207 } <span class="keywordflow">else</span> {
<a name="l00208"></a>00208 <span class="keywordflow">if</span> (<a class="code" href="classTreeNode.html#61266475f7f53fa8e43410f0fdb96fc0" title="The icon for expanding or collapsing.">expandIcon_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WCompositeWidget.html#c22140fb020018e0d855ad524c6effff">isHidden</a>()) {
<a name="l00209"></a>00209 <a class="code" href="classTreeNode.html#9eea36d4c2abeec8829cd6e94a0c8da2" title="The single image shown instead of the expand/collapse icon when no children.">noExpandIcon_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WWidget.html#0825c3ccbd4999afc1a88fafa6aa6fc7">hide</a>();
<a name="l00210"></a>00210 <a class="code" href="classTreeNode.html#61266475f7f53fa8e43410f0fdb96fc0" title="The icon for expanding or collapsing.">expandIcon_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WWidget.html#52dcef5a385ddfa0a8c3e6c20000f181">show</a>();
<a name="l00211"></a>00211 }
<a name="l00212"></a>00212 }
<a name="l00213"></a>00213 } <span class="comment">//</span>
</pre></div>
<p>
</div>
</div><p>
<a class="anchor" name="bc3819da4ca51204db2f9528d0ea1c73"></a><!-- doxytag: member="TreeNode::isLastChildNode" ref="bc3819da4ca51204db2f9528d0ea1c73" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool TreeNode::isLastChildNode </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td> const<code> [private]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Returns if is the last child within its parent (is rendered differently).
<p>
<p>Definition at line <a class="el" href="TreeNode_8C-source.html#l00077">77</a> of file <a class="el" href="TreeNode_8C-source.html">TreeNode.C</a>.</p>
<div class="fragment"><pre class="fragment"><a name="l00078"></a>00078 {
<a name="l00079"></a>00079 <span class="keywordflow">if</span> (<a class="code" href="classTreeNode.html#cbb1649a75a11ed3dee8022bfdf53b6c" title="The parent node.">parentNode_</a>) {
<a name="l00080"></a>00080 <span class="keywordflow">return</span> <a class="code" href="classTreeNode.html#cbb1649a75a11ed3dee8022bfdf53b6c" title="The parent node.">parentNode_</a>-><a class="code" href="classTreeNode.html#34d25e9f0be4f1ed6535d3f47dbec443" title="List of child nodes.">childNodes_</a>.back() == <span class="keyword">this</span>;
<a name="l00081"></a>00081 } <span class="keywordflow">else</span>
<a name="l00082"></a>00082 <span class="keywordflow">return</span> <span class="keyword">true</span>;
<a name="l00083"></a>00083 }
</pre></div>
<p>
</div>
</div><p>
<a class="anchor" name="3e45cd3a50ee872dcff38b27c41b42fb"></a><!-- doxytag: member="TreeNode::childNodesChanged" ref="3e45cd3a50ee872dcff38b27c41b42fb" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void TreeNode::childNodesChanged </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td><code> [private]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Rerender when children have changed.
<p>
<p>Definition at line <a class="el" href="TreeNode_8C-source.html#l00106">106</a> of file <a class="el" href="TreeNode_8C-source.html">TreeNode.C</a>.</p>
<div class="fragment"><pre class="fragment"><a name="l00107"></a>00107 {
<a name="l00108"></a>00108 <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> i = 0; i < <a class="code" href="classTreeNode.html#34d25e9f0be4f1ed6535d3f47dbec443" title="List of child nodes.">childNodes_</a>.size(); ++i)
<a name="l00109"></a>00109 <a class="code" href="classTreeNode.html#34d25e9f0be4f1ed6535d3f47dbec443" title="List of child nodes.">childNodes_</a>[i]-><a class="code" href="classTreeNode.html#daba65c9268249f665d548082d94b930" title="Adjust the expand icon.">adjustExpandIcon</a>();
<a name="l00110"></a>00110
<a name="l00111"></a>00111 <a class="code" href="classTreeNode.html#daba65c9268249f665d548082d94b930" title="Adjust the expand icon.">adjustExpandIcon</a>();
<a name="l00112"></a>00112
<a name="l00113"></a>00113 <span class="keywordflow">if</span> (<a class="code" href="classTreeNode.html#34d25e9f0be4f1ed6535d3f47dbec443" title="List of child nodes.">childNodes_</a>.size())
<a name="l00114"></a>00114 <a class="code" href="classTreeNode.html#6d5140f032f5b24b3398ccdcdba03ca0" title="The children count &#39;(x)&#39; for x children.">childCountLabel_</a>
<a name="l00115"></a>00115 ->setText(<span class="stringliteral">"("</span> + boost::lexical_cast<std::string>(<a class="code" href="classTreeNode.html#34d25e9f0be4f1ed6535d3f47dbec443" title="List of child nodes.">childNodes_</a>.size())
<a name="l00116"></a>00116 + <span class="stringliteral">")"</span>);
<a name="l00117"></a>00117 <span class="keywordflow">else</span>
<a name="l00118"></a>00118 <a class="code" href="classTreeNode.html#6d5140f032f5b24b3398ccdcdba03ca0" title="The children count &#39;(x)&#39; for x children.">childCountLabel_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WText.html#2f788aa524d51b3962642c9f565e66e6">setText</a>(<span class="stringliteral">""</span>);
<a name="l00119"></a>00119
<a name="l00120"></a>00120 <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WObject.html#92d8b00edc79b7a60d41d7c088f50436">resetLearnedSlots</a>();
<a name="l00121"></a>00121 } <span class="comment">//</span>
</pre></div>
<p>
</div>
</div><p>
<a class="anchor" name="0dadb29c855289ba6adaabed4ba86990"></a><!-- doxytag: member="TreeNode::undoCollapse" ref="0dadb29c855289ba6adaabed4ba86990" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void TreeNode::undoCollapse </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td><code> [private]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Undo function for prelearning <a class="el" href="classTreeNode.html#7c38a975e8b3a31932b8409fa4231bc4" title="Collapse this node.">collapse()</a>.
<p>
<p>Definition at line <a class="el" href="TreeNode_8C-source.html#l00149">149</a> of file <a class="el" href="TreeNode_8C-source.html">TreeNode.C</a>.</p>
<div class="fragment"><pre class="fragment"><a name="l00150"></a>00150 {
<a name="l00151"></a>00151 <span class="keywordflow">if</span> (!<a class="code" href="classTreeNode.html#650686b10a2f2cdb815462dbf030c204" title="Was collapsed (for undo of prelearned collapse() and expand() slots.">wasCollapsed_</a>) {
<a name="l00152"></a>00152 <span class="comment">// re-expand</span>
<a name="l00153"></a>00153 <a class="code" href="classTreeNode.html#61266475f7f53fa8e43410f0fdb96fc0" title="The icon for expanding or collapsing.">expandIcon_</a>-><a class="code" href="classIconPair.html#349d74977ef2174b64bab37e2b9a27ea" title="Set which icon should be visible.">setState</a>(1);
<a name="l00154"></a>00154 <a class="code" href="classTreeNode.html#1aef899199fbedac9990f7902fa7fc23" title="The container in which the children are managed.">expandedContent_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WWidget.html#52dcef5a385ddfa0a8c3e6c20000f181">show</a>();
<a name="l00155"></a>00155 <span class="keywordflow">if</span> (<a class="code" href="classTreeNode.html#eb5228e3bfb5f8f210ef7ff62da5ec7f" title="The icon next to the label.">labelIcon_</a>)
<a name="l00156"></a>00156 <a class="code" href="classTreeNode.html#eb5228e3bfb5f8f210ef7ff62da5ec7f" title="The icon next to the label.">labelIcon_</a>-><a class="code" href="classIconPair.html#349d74977ef2174b64bab37e2b9a27ea" title="Set which icon should be visible.">setState</a>(1);
<a name="l00157"></a>00157 }
<a name="l00158"></a>00158 }
</pre></div>
<p>
</div>
</div><p>
<a class="anchor" name="353196fdcb63d58e6a1a007a81bb81ee"></a><!-- doxytag: member="TreeNode::undoExpand" ref="353196fdcb63d58e6a1a007a81bb81ee" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void TreeNode::undoExpand </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td><code> [private]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Undo function for prelearning <a class="el" href="classTreeNode.html#bac0f39de477ab6f8d3373ae9f900652" title="Expand this node.">expand()</a>.
<p>
<p>Definition at line <a class="el" href="TreeNode_8C-source.html#l00160">160</a> of file <a class="el" href="TreeNode_8C-source.html">TreeNode.C</a>.</p>
<div class="fragment"><pre class="fragment"><a name="l00161"></a>00161 {
<a name="l00162"></a>00162 <span class="keywordflow">if</span> (<a class="code" href="classTreeNode.html#650686b10a2f2cdb815462dbf030c204" title="Was collapsed (for undo of prelearned collapse() and expand() slots.">wasCollapsed_</a>) {
<a name="l00163"></a>00163 <span class="comment">// re-collapse</span>
<a name="l00164"></a>00164 <a class="code" href="classTreeNode.html#61266475f7f53fa8e43410f0fdb96fc0" title="The icon for expanding or collapsing.">expandIcon_</a>-><a class="code" href="classIconPair.html#349d74977ef2174b64bab37e2b9a27ea" title="Set which icon should be visible.">setState</a>(0);
<a name="l00165"></a>00165 <a class="code" href="classTreeNode.html#1aef899199fbedac9990f7902fa7fc23" title="The container in which the children are managed.">expandedContent_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WWidget.html#0825c3ccbd4999afc1a88fafa6aa6fc7">hide</a>();
<a name="l00166"></a>00166 <span class="keywordflow">if</span> (<a class="code" href="classTreeNode.html#eb5228e3bfb5f8f210ef7ff62da5ec7f" title="The icon next to the label.">labelIcon_</a>)
<a name="l00167"></a>00167 <a class="code" href="classTreeNode.html#eb5228e3bfb5f8f210ef7ff62da5ec7f" title="The icon next to the label.">labelIcon_</a>-><a class="code" href="classIconPair.html#349d74977ef2174b64bab37e2b9a27ea" title="Set which icon should be visible.">setState</a>(0);
<a name="l00168"></a>00168 }
<a name="l00169"></a>00169
<a name="l00170"></a>00170 <span class="comment">/*</span>
<a name="l00171"></a>00171 <span class="comment"> * undo collapse of children</span>
<a name="l00172"></a>00172 <span class="comment"> */</span>
<a name="l00173"></a>00173 <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> i = 0; i < <a class="code" href="classTreeNode.html#34d25e9f0be4f1ed6535d3f47dbec443" title="List of child nodes.">childNodes_</a>.size(); ++i)
<a name="l00174"></a>00174 <a class="code" href="classTreeNode.html#34d25e9f0be4f1ed6535d3f47dbec443" title="List of child nodes.">childNodes_</a>[i]-><a class="code" href="classTreeNode.html#0dadb29c855289ba6adaabed4ba86990" title="Undo function for prelearning collapse().">undoCollapse</a>();
<a name="l00175"></a>00175 } <span class="comment">//</span>
</pre></div>
<p>
</div>
</div><p>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="34d25e9f0be4f1ed6535d3f47dbec443"></a><!-- doxytag: member="TreeNode::childNodes_" ref="34d25e9f0be4f1ed6535d3f47dbec443" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::vector<<a class="el" href="classTreeNode.html">TreeNode</a> *> <a class="el" href="classTreeNode.html#34d25e9f0be4f1ed6535d3f47dbec443">TreeNode::childNodes_</a><code> [private]</code> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
List of child nodes.
<p>
<p>Definition at line <a class="el" href="TreeNode_8h-source.html#l00095">95</a> of file <a class="el" href="TreeNode_8h-source.html">TreeNode.h</a>.</p>
</div>
</div><p>
<a class="anchor" name="cbb1649a75a11ed3dee8022bfdf53b6c"></a><!-- doxytag: member="TreeNode::parentNode_" ref="cbb1649a75a11ed3dee8022bfdf53b6c" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classTreeNode.html">TreeNode</a>* <a class="el" href="classTreeNode.html#cbb1649a75a11ed3dee8022bfdf53b6c">TreeNode::parentNode_</a><code> [private]</code> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
The parent node.
<p>
<p>Definition at line <a class="el" href="TreeNode_8h-source.html#l00098">98</a> of file <a class="el" href="TreeNode_8h-source.html">TreeNode.h</a>.</p>
</div>
</div><p>
<a class="anchor" name="37660f20c29ac82614c35b41356e30e1"></a><!-- doxytag: member="TreeNode::layout_" ref="37660f20c29ac82614c35b41356e30e1" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="elRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WTable.html">Wt::WTable</a>* <a class="el" href="classTreeNode.html#37660f20c29ac82614c35b41356e30e1">TreeNode::layout_</a><code> [private]</code> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Layout (2x2 table).
<p>
<p>Definition at line <a class="el" href="TreeNode_8h-source.html#l00101">101</a> of file <a class="el" href="TreeNode_8h-source.html">TreeNode.h</a>.</p>
</div>
</div><p>
<a class="anchor" name="61266475f7f53fa8e43410f0fdb96fc0"></a><!-- doxytag: member="TreeNode::expandIcon_" ref="61266475f7f53fa8e43410f0fdb96fc0" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classIconPair.html">IconPair</a>* <a class="el" href="classTreeNode.html#61266475f7f53fa8e43410f0fdb96fc0">TreeNode::expandIcon_</a><code> [private]</code> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
The icon for expanding or collapsing.
<p>
<p>Definition at line <a class="el" href="TreeNode_8h-source.html#l00104">104</a> of file <a class="el" href="TreeNode_8h-source.html">TreeNode.h</a>.</p>
</div>
</div><p>
<a class="anchor" name="9eea36d4c2abeec8829cd6e94a0c8da2"></a><!-- doxytag: member="TreeNode::noExpandIcon_" ref="9eea36d4c2abeec8829cd6e94a0c8da2" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="elRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WImage.html">Wt::WImage</a>* <a class="el" href="classTreeNode.html#9eea36d4c2abeec8829cd6e94a0c8da2">TreeNode::noExpandIcon_</a><code> [private]</code> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
The single image shown instead of the expand/collapse icon when no children.
<p>
<p>Definition at line <a class="el" href="TreeNode_8h-source.html#l00107">107</a> of file <a class="el" href="TreeNode_8h-source.html">TreeNode.h</a>.</p>
</div>
</div><p>
<a class="anchor" name="eb5228e3bfb5f8f210ef7ff62da5ec7f"></a><!-- doxytag: member="TreeNode::labelIcon_" ref="eb5228e3bfb5f8f210ef7ff62da5ec7f" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classIconPair.html">IconPair</a>* <a class="el" href="classTreeNode.html#eb5228e3bfb5f8f210ef7ff62da5ec7f">TreeNode::labelIcon_</a><code> [private]</code> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
The icon next to the label.
<p>
<p>Definition at line <a class="el" href="TreeNode_8h-source.html#l00110">110</a> of file <a class="el" href="TreeNode_8h-source.html">TreeNode.h</a>.</p>
</div>
</div><p>
<a class="anchor" name="9bd2202cc1f44ce4cf21943cc64e3bd2"></a><!-- doxytag: member="TreeNode::labelText_" ref="9bd2202cc1f44ce4cf21943cc64e3bd2" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="elRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WText.html">Wt::WText</a>* <a class="el" href="classTreeNode.html#9bd2202cc1f44ce4cf21943cc64e3bd2">TreeNode::labelText_</a><code> [private]</code> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
The label.
<p>
<p>Definition at line <a class="el" href="TreeNode_8h-source.html#l00113">113</a> of file <a class="el" href="TreeNode_8h-source.html">TreeNode.h</a>.</p>
</div>
</div><p>
<a class="anchor" name="6d5140f032f5b24b3398ccdcdba03ca0"></a><!-- doxytag: member="TreeNode::childCountLabel_" ref="6d5140f032f5b24b3398ccdcdba03ca0" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="elRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WText.html">Wt::WText</a>* <a class="el" href="classTreeNode.html#6d5140f032f5b24b3398ccdcdba03ca0">TreeNode::childCountLabel_</a><code> [private]</code> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
The children count '(x)' for x children.
<p>
<p>Definition at line <a class="el" href="TreeNode_8h-source.html#l00116">116</a> of file <a class="el" href="TreeNode_8h-source.html">TreeNode.h</a>.</p>
</div>
</div><p>
<a class="anchor" name="1aef899199fbedac9990f7902fa7fc23"></a><!-- doxytag: member="TreeNode::expandedContent_" ref="1aef899199fbedac9990f7902fa7fc23" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="elRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WContainerWidget.html">Wt::WContainerWidget</a>* <a class="el" href="classTreeNode.html#1aef899199fbedac9990f7902fa7fc23">TreeNode::expandedContent_</a><code> [private]</code> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
The container in which the children are managed.
<p>
<p>Definition at line <a class="el" href="TreeNode_8h-source.html#l00119">119</a> of file <a class="el" href="TreeNode_8h-source.html">TreeNode.h</a>.</p>
</div>
</div><p>
<a class="anchor" name="650686b10a2f2cdb815462dbf030c204"></a><!-- doxytag: member="TreeNode::wasCollapsed_" ref="650686b10a2f2cdb815462dbf030c204" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool <a class="el" href="classTreeNode.html#650686b10a2f2cdb815462dbf030c204">TreeNode::wasCollapsed_</a><code> [private]</code> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Was collapsed (for undo of prelearned <a class="el" href="classTreeNode.html#7c38a975e8b3a31932b8409fa4231bc4" title="Collapse this node.">collapse()</a> and <a class="el" href="classTreeNode.html#bac0f39de477ab6f8d3373ae9f900652" title="Expand this node.">expand()</a> slots.
<p>
<p>Definition at line <a class="el" href="TreeNode_8h-source.html#l00131">131</a> of file <a class="el" href="TreeNode_8h-source.html">TreeNode.h</a>.</p>
</div>
</div><p>
<a class="anchor" name="55d4c04fb9c147448963b149e8fc8cb6"></a><!-- doxytag: member="TreeNode::imageLine_" ref="55d4c04fb9c147448963b149e8fc8cb6" args="[]" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::string <a class="el" href="classTreeNode.html#55d4c04fb9c147448963b149e8fc8cb6">TreeNode::imageLine_</a><code> [static, private]</code> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<b>Initial value:</b><div class="fragment"><pre class="fragment"> { <span class="stringliteral">"icons/line-middle.gif"</span>,
<span class="stringliteral">"icons/line-last.gif"</span> }
</pre></div>
<p>Definition at line <a class="el" href="TreeNode_8h-source.html#l00142">142</a> of file <a class="el" href="TreeNode_8h-source.html">TreeNode.h</a>.</p>
</div>
</div><p>
<a class="anchor" name="75675ae3d29018b6bc5d3bb614ed494b"></a><!-- doxytag: member="TreeNode::imagePlus_" ref="75675ae3d29018b6bc5d3bb614ed494b" args="[]" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::string <a class="el" href="classTreeNode.html#75675ae3d29018b6bc5d3bb614ed494b">TreeNode::imagePlus_</a><code> [static, private]</code> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<b>Initial value:</b><div class="fragment"><pre class="fragment"> { <span class="stringliteral">"icons/nav-plus-line-middle.gif"</span>,
<span class="stringliteral">"icons/nav-plus-line-last.gif"</span> }
</pre></div>
<p>Definition at line <a class="el" href="TreeNode_8h-source.html#l00143">143</a> of file <a class="el" href="TreeNode_8h-source.html">TreeNode.h</a>.</p>
</div>
</div><p>
<a class="anchor" name="b404df187e81ce5f216eb815572f11b6"></a><!-- doxytag: member="TreeNode::imageMin_" ref="b404df187e81ce5f216eb815572f11b6" args="[]" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::string <a class="el" href="classTreeNode.html#b404df187e81ce5f216eb815572f11b6">TreeNode::imageMin_</a><code> [static, private]</code> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<b>Initial value:</b><div class="fragment"><pre class="fragment"> { <span class="stringliteral">"icons/nav-minus-line-middle.gif"</span>,
<span class="stringliteral">"icons/nav-minus-line-last.gif"</span> }
</pre></div>
<p>Definition at line <a class="el" href="TreeNode_8h-source.html#l00144">144</a> of file <a class="el" href="TreeNode_8h-source.html">TreeNode.h</a>.</p>
</div>
</div><p>
<hr>The documentation for this class was generated from the following files:<ul>
<li>/home/koen/project/wt/public-git/wt/examples/treelist/<a class="el" href="TreeNode_8h-source.html">TreeNode.h</a><li>/home/koen/project/wt/public-git/wt/examples/treelist/<a class="el" href="TreeNode_8C-source.html">TreeNode.C</a></ul>
</div>
<hr size="1"><address style="align: right;"><small>
Generated on Fri Mar 26 17:12:12 2010 for <a href="http://www.webtoolkit.eu/wt/">Wt</a> by <a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6</small></address>
</body>
</html>
|