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
|
<!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: Wt::WBoxLayout 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="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>
</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 class="navpath"><a class="el" href="namespaceWt.html">Wt</a>::<a class="el" href="classWt_1_1WBoxLayout.html">WBoxLayout</a>
</div>
</div>
<div class="contents">
<h1>Wt::WBoxLayout Class Reference</h1><!-- doxytag: class="Wt::WBoxLayout" --><!-- doxytag: inherits="Wt::WLayout" -->A layout manager which arranges widgets horizontally or vertically.
<a href="#_details">More...</a>
<p>
<code>#include <Wt/WBoxLayout></code>
<p>
<div class="dynheader">
Inheritance diagram for Wt::WBoxLayout:</div>
<div class="dynsection">
<p><center><img src="classWt_1_1WBoxLayout__inherit__graph.png" border="0" usemap="#Wt_1_1WBoxLayout__inherit__map" alt="Inheritance graph"></center>
<map name="Wt_1_1WBoxLayout__inherit__map">
<area shape="rect" href="classWt_1_1WHBoxLayout.html" title="A layout manager which arranges widgets horizontally." alt="" coords="5,229,133,256"><area shape="rect" href="classWt_1_1WVBoxLayout.html" title="A layout manager which arranges widgets vertically." alt="" coords="157,229,285,256"><area shape="rect" href="classWt_1_1WLayout.html" title="An abstract base class for layout managers." alt="" coords="97,80,193,107"><area shape="rect" href="classWt_1_1WLayoutItem.html" title="An abstract base class for items that can participate in a layout." alt="" coords="17,5,140,32"><area shape="rect" href="classWt_1_1WObject.html" title="A base class for objects that participate in the signal/slot system." alt="" coords="164,5,260,32"></map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>
<p>
<a href="classWt_1_1WBoxLayout-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 Types</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WBoxLayout.html#ddc4cd1f8b1158dcf16eb10d429803ec">Direction</a> { <a class="el" href="classWt_1_1WBoxLayout.html#ddc4cd1f8b1158dcf16eb10d429803ec174fcc4fd0b807e60c838385be19e1f9">LeftToRight</a>,
<a class="el" href="classWt_1_1WBoxLayout.html#ddc4cd1f8b1158dcf16eb10d429803eca4a4afece8c59ddaf384c08b276aa70f">RightToLeft</a>,
<a class="el" href="classWt_1_1WBoxLayout.html#ddc4cd1f8b1158dcf16eb10d429803ecf705eddcc1a4639aeb1908f1c7acface">TopToBottom</a>,
<a class="el" href="classWt_1_1WBoxLayout.html#ddc4cd1f8b1158dcf16eb10d429803ecf25be1e7bbefae032ceb333e67bda5f2">BottomToTop</a>
}</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Enumeration of the direction in which widgets are layed out. <a href="classWt_1_1WBoxLayout.html#ddc4cd1f8b1158dcf16eb10d429803ec">More...</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="classWt_1_1WBoxLayout.html#9472dd446911a6a6d33b019a34a0c4fc">WBoxLayout</a> (<a class="el" href="classWt_1_1WBoxLayout.html#ddc4cd1f8b1158dcf16eb10d429803ec">Direction</a> dir, <a class="el" href="classWt_1_1WWidget.html">WWidget</a> *parent=0)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Creates a new box layout. <a href="#9472dd446911a6a6d33b019a34a0c4fc"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WBoxLayout.html#2932a804ac01e0b314408bf4d366385d">addItem</a> (<a class="el" href="classWt_1_1WLayoutItem.html">WLayoutItem</a> *item)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Adds a layout <em>item</em>. <a href="#2932a804ac01e0b314408bf4d366385d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WBoxLayout.html#a01f05c0f40fa89e418b802f78f2870c">removeItem</a> (<a class="el" href="classWt_1_1WLayoutItem.html">WLayoutItem</a> *item)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Removes a layout <em>item</em> (widget or nested layout). <a href="#a01f05c0f40fa89e418b802f78f2870c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classWt_1_1WLayoutItem.html">WLayoutItem</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WBoxLayout.html#ad2ec4be48cb11a7802b3e6d7cb8f0fd">itemAt</a> (int index) const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the layout item at a specific <em>index</em>. <a href="#ad2ec4be48cb11a7802b3e6d7cb8f0fd"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WBoxLayout.html#961fe311fd07adbf7b60b571ef7a8278">count</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the number of items in this layout. <a href="#961fe311fd07adbf7b60b571ef7a8278"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WBoxLayout.html#f669ef9fbcdb8954d1cfa7bb9e47b90f">setDirection</a> (<a class="el" href="classWt_1_1WBoxLayout.html#ddc4cd1f8b1158dcf16eb10d429803ec">Direction</a> direction)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the layout direction. <a href="#f669ef9fbcdb8954d1cfa7bb9e47b90f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classWt_1_1WBoxLayout.html#ddc4cd1f8b1158dcf16eb10d429803ec">Direction</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WBoxLayout.html#a101f33971e037bed0e4bfea164cf0dc">direction</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the layout direction. <a href="#a101f33971e037bed0e4bfea164cf0dc"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WBoxLayout.html#34d544a1a2bd8beffa6b8e5e84fbc19b">setSpacing</a> (int size)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets spacing between each item. <a href="#34d544a1a2bd8beffa6b8e5e84fbc19b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WBoxLayout.html#a9d0d7ef4ea1753f898d6d71ad8e9b22">spacing</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the spacing between each item. <a href="#a9d0d7ef4ea1753f898d6d71ad8e9b22"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WBoxLayout.html#7c1ec58e25d0b7add93f5f4342844db6">addWidget</a> (<a class="el" href="classWt_1_1WWidget.html">WWidget</a> *widget, int stretch=0, WFlags< <a class="el" href="namespaceWt.html#b8f772c69bc8180c31f9e4f4593b143f">AlignmentFlag</a> > alignment=0)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Adds a widget to the layout. <a href="#7c1ec58e25d0b7add93f5f4342844db6"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WBoxLayout.html#062d26b432841995a0be7b7d7aac6413">addLayout</a> (<a class="el" href="classWt_1_1WLayout.html">WLayout</a> *layout, int stretch=0, WFlags< <a class="el" href="namespaceWt.html#b8f772c69bc8180c31f9e4f4593b143f">AlignmentFlag</a> > alignment=0)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Adds a nested layout to the layout. <a href="#062d26b432841995a0be7b7d7aac6413"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WBoxLayout.html#3cbd78251252e724d01937e2f6cc803d">addSpacing</a> (const <a class="el" href="classWt_1_1WLength.html">WLength</a> &size)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Adds extra spacing. <a href="#3cbd78251252e724d01937e2f6cc803d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WBoxLayout.html#811708ce9336d753c20aaedc14b00d5f">addStretch</a> (int stretch=0)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Adds a stretch element. <a href="#811708ce9336d753c20aaedc14b00d5f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WBoxLayout.html#9ebc82bb4cc8f0bbb4e272df6ab4c02f">insertWidget</a> (int index, <a class="el" href="classWt_1_1WWidget.html">WWidget</a> *widget, int stretch=0, WFlags< <a class="el" href="namespaceWt.html#b8f772c69bc8180c31f9e4f4593b143f">AlignmentFlag</a> > alignment=0)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Inserts a widget in the layout. <a href="#9ebc82bb4cc8f0bbb4e272df6ab4c02f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WBoxLayout.html#8ab8fd1d8b5f3634eac9b559605e4ced">insertLayout</a> (int index, <a class="el" href="classWt_1_1WLayout.html">WLayout</a> *layout, int stretch=0, WFlags< <a class="el" href="namespaceWt.html#b8f772c69bc8180c31f9e4f4593b143f">AlignmentFlag</a> > alignment=0)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Inserts a nested layout in the layout. <a href="#8ab8fd1d8b5f3634eac9b559605e4ced"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WBoxLayout.html#0d5d6a9e408c6bc7e25020f8c85cb4cf">insertSpacing</a> (int index, const <a class="el" href="classWt_1_1WLength.html">WLength</a> &size)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Inserts extra spacing in the layout. <a href="#0d5d6a9e408c6bc7e25020f8c85cb4cf"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WBoxLayout.html#0174de2ae36e2992b7209cf789d85271">insertStretch</a> (int index, int stretch=0)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Inserts a stretch element in the layout. <a href="#0174de2ae36e2992b7209cf789d85271"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WBoxLayout.html#47182ea3c459afdadb3cc03232a8d110">setStretchFactor</a> (<a class="el" href="classWt_1_1WLayout.html">WLayout</a> *layout, int stretch)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the stretch factor for a nested layout. <a href="#47182ea3c459afdadb3cc03232a8d110"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WBoxLayout.html#f5ce73d289874c80e88ed6fd9934bb39">setStretchFactor</a> (<a class="el" href="classWt_1_1WWidget.html">WWidget</a> *widget, int stretch)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the stretch factor for a nested layout. <a href="#f5ce73d289874c80e88ed6fd9934bb39"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WBoxLayout.html#00bdfb4d442bd8e8ad9c33b72692763f">setResizable</a> (int index, bool enabled=true)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets whether the use may drag a particular border. <a href="#00bdfb4d442bd8e8ad9c33b72692763f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WBoxLayout.html#bec500f70e659fa0ecd7d5277ff3fd39">isResizable</a> (int row) const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns whether the user may drag a particular border. <a href="#bec500f70e659fa0ecd7d5277ff3fd39"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
A layout manager which arranges widgets horizontally or vertically.
<p>
This layout manager arranges widgets horizontally or vertically inside the parent container. The space is divided so that each widgets is given its minimum size, and remaining space is divided according to stretch factors among the widgets. The widget minimum height or width is used for sizing each widget, whose default values may be overridden using <a class="el" href="classWt_1_1WWidget.html#092c7d1ecfde7f004ef120389d91775d" title="Sets a minimum size.">WWidget::setMinimumSize()</a>.<p>
If you want to use the layout manager for a container which does not have a height that is constrained somehow, you need to specify AlignTop in the alignment flags of <a class="el" href="classWt_1_1WContainerWidget.html#1c84e0ffe330d4798f0ce217f75be08c" title="Sets a layout manager for the container.">WContainerWidget::setLayout()</a>. Otherwise the behavior is undefined (the parent container will continue to increase in size as it tries to satisfy the constraints assuming a contrained height).<p>
You can use <a class="el" href="classWt_1_1WContainerWidget.html#e269f870992c5843d3097a63795b10d6">WContainerWidget::setOverflow(OverflowAuto) </a> to automatically show scrollbars on a container widget inserted in the layout. In some cases, you will want to wrap another widget (like a <a class="el" href="classWt_1_1WTable.html" title="A container widget which provides layout of children in a table grid.">WTable</a>) into <a class="el" href="classWt_1_1WContainerWidget.html" title="A widget that holds and manages child widgets.">WContainerWidget</a> to have the scrollbars, since not all widgets allow for scrollbars.<p>
A layout manager may provide resize handles between items which allow the user to change the automatic layout provided by the layout manager (see <a class="el" href="classWt_1_1WBoxLayout.html#00bdfb4d442bd8e8ad9c33b72692763f" title="Sets whether the use may drag a particular border.">setResizable()</a>). Resize handles between rows for a vertically oriented box layout only work when the layout fills the parent vertical space (i.e. is not aligned to the top). Likewise, resize handles between columns for a horizontally oriented box layout only work when the layout fills the parent horiziontal space (i.e. is not aligned left, right or centered).<p>
Each item is separated using a constant spacing, which defaults to 6 pixels, and can be changed using <a class="el" href="classWt_1_1WBoxLayout.html#34d544a1a2bd8beffa6b8e5e84fbc19b" title="Sets spacing between each item.">setSpacing()</a>. In addition, when this layout is a top-level layout (i.e. is not nested inside another layout), a margin is set around the contents, which thus replaces padding defined for the container. This margin defaults to 9 pixels, and can be changed using <a class="el" href="classWt_1_1WLayout.html#f18bae8c743c9f9a5cabee58826ffb45" title="Set contents margins (in pixels).">setContentsMargins()</a>. It is not allowed to define padding for the container widget using its CSS 'padding' property or the <a class="el" href="classWt_1_1WContainerWidget.html#fa5f6800e2170ae2f4586a25c72f8c34" title="Sets padding inside the widget.">WContainerWidget::setPadding()</a>. You can add more space between two widgets using <a class="el" href="classWt_1_1WBoxLayout.html#3cbd78251252e724d01937e2f6cc803d" title="Adds extra spacing.">addSpacing()</a>.<p>
For each item a stretch factor may be defined, which controls how remaining space is used. Each item is stretched using the stretch factor to fill the remaining space.<p>
Usage example: <div class="fragment"><pre class="fragment"> <a class="code" href="classWt_1_1WContainerWidget.html" title="A widget that holds and manages child widgets.">Wt::WContainerWidget</a> *w = <span class="keyword">new</span> <a class="code" href="classWt_1_1WContainerWidget.html" title="A widget that holds and manages child widgets.">Wt::WContainerWidget</a>(<span class="keyword">this</span>);
w-><a class="code" href="classWt_1_1WWebWidget.html#e1b84e31581405358b6d57ec14505234" title="Resizes the widget.">resize</a>(WLength(), 600);
<a class="code" href="classWt_1_1WBoxLayout.html" title="A layout manager which arranges widgets horizontally or vertically.">Wt::WBoxLayout</a> *layout = <span class="keyword">new</span> <a class="code" href="classWt_1_1WBoxLayout.html" title="A layout manager which arranges widgets horizontally or vertically.">Wt::WBoxLayout</a>(<a class="code" href="classWt_1_1WBoxLayout.html#ddc4cd1f8b1158dcf16eb10d429803ecf705eddcc1a4639aeb1908f1c7acface" title="Vertical layout, widgets are arranged from top to bottom.">Wt::WBoxLayout::TopToBottom</a>);
layout-><a class="code" href="classWt_1_1WBoxLayout.html#7c1ec58e25d0b7add93f5f4342844db6" title="Adds a widget to the layout.">addWidget</a>(<span class="keyword">new</span> <a class="code" href="classWt_1_1WText.html" title="A widget that renders (XHTML) text.">Wt::WText</a>(<span class="stringliteral">"One"</span>));
layout-><a class="code" href="classWt_1_1WBoxLayout.html#7c1ec58e25d0b7add93f5f4342844db6" title="Adds a widget to the layout.">addWidget</a>(<span class="keyword">new</span> <a class="code" href="classWt_1_1WText.html" title="A widget that renders (XHTML) text.">Wt::WText</a>(<span class="stringliteral">"Two"</span>));
layout-><a class="code" href="classWt_1_1WBoxLayout.html#7c1ec58e25d0b7add93f5f4342844db6" title="Adds a widget to the layout.">addWidget</a>(<span class="keyword">new</span> <a class="code" href="classWt_1_1WText.html" title="A widget that renders (XHTML) text.">Wt::WText</a>(<span class="stringliteral">"Three"</span>));
layout-><a class="code" href="classWt_1_1WBoxLayout.html#7c1ec58e25d0b7add93f5f4342844db6" title="Adds a widget to the layout.">addWidget</a>(<span class="keyword">new</span> <a class="code" href="classWt_1_1WText.html" title="A widget that renders (XHTML) text.">Wt::WText</a>(<span class="stringliteral">"Four"</span>));
w-><a class="code" href="classWt_1_1WContainerWidget.html#1c84e0ffe330d4798f0ce217f75be08c" title="Sets a layout manager for the container.">setLayout</a>(layout);
</pre></div><p>
<dl class="note" compact><dt><b>Note:</b></dt><dd>This layout manager is applicable only to <a class="el" href="classWt_1_1WContainerWidget.html" title="A widget that holds and manages child widgets.">WContainerWidget</a> container widgets. You may use it within an <a class="el" href="classWt_1_1Ext_1_1Container.html" title="A container class which manages its contents using layout managers.">Ext::Container</a> indirectly by first setting a <a class="el" href="classWt_1_1WContainerWidget.html" title="A widget that holds and manages child widgets.">WContainerWidget</a> using a <a class="el" href="classWt_1_1WFitLayout.html" title="A layout manager which spans a single widget to all available space.">WFitLayout</a>.<p>
When JavaScript support is not available, only Safari and Firefox properly implement this box layout. For other browsers, only the horizontal layout is properly implemented, while vertically all widgets use their minimum size.<p>
When set on a <a class="el" href="classWt_1_1WContainerWidget.html" title="A widget that holds and manages child widgets.">WContainerWidget</a>, this layout manager accepts the following hints (see <a class="el" href="classWt_1_1WLayout.html#c8fa1927e7c9b15e3e673cbf6a473c34" title="Provides a hint to the layout implementation.">setLayoutHint()</a>): <ul>
<li>
"table-layout" with possible values "auto" (default) or "fixed".<br>
Use "fixed" to prevent nested tables from overflowing the layout. In that case, you will need to specify a width (in CSS or otherwise) for at least one item in every column that has no stretch factor. </li>
</ul>
</dd></dl>
<hr><h2>Member Enumeration Documentation</h2>
<a class="anchor" name="ddc4cd1f8b1158dcf16eb10d429803ec"></a><!-- doxytag: member="Wt::WBoxLayout::Direction" ref="ddc4cd1f8b1158dcf16eb10d429803ec" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="classWt_1_1WBoxLayout.html#ddc4cd1f8b1158dcf16eb10d429803ec">Wt::WBoxLayout::Direction</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Enumeration of the direction in which widgets are layed out.
<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="ddc4cd1f8b1158dcf16eb10d429803ec174fcc4fd0b807e60c838385be19e1f9"></a><!-- doxytag: member="LeftToRight" ref="ddc4cd1f8b1158dcf16eb10d429803ec174fcc4fd0b807e60c838385be19e1f9" args="" -->LeftToRight</em> </td><td>
Horizontal layout, widgets are arranged from left to right. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="ddc4cd1f8b1158dcf16eb10d429803eca4a4afece8c59ddaf384c08b276aa70f"></a><!-- doxytag: member="RightToLeft" ref="ddc4cd1f8b1158dcf16eb10d429803eca4a4afece8c59ddaf384c08b276aa70f" args="" -->RightToLeft</em> </td><td>
Horizontal layout, widgets are arranged from right to left. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="ddc4cd1f8b1158dcf16eb10d429803ecf705eddcc1a4639aeb1908f1c7acface"></a><!-- doxytag: member="TopToBottom" ref="ddc4cd1f8b1158dcf16eb10d429803ecf705eddcc1a4639aeb1908f1c7acface" args="" -->TopToBottom</em> </td><td>
Vertical layout, widgets are arranged from top to bottom. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="ddc4cd1f8b1158dcf16eb10d429803ecf25be1e7bbefae032ceb333e67bda5f2"></a><!-- doxytag: member="BottomToTop" ref="ddc4cd1f8b1158dcf16eb10d429803ecf25be1e7bbefae032ceb333e67bda5f2" args="" -->BottomToTop</em> </td><td>
Vertical layout, widgets are arranged from bottom to top. </td></tr>
</table>
</dl>
</div>
</div><p>
<hr><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" name="9472dd446911a6a6d33b019a34a0c4fc"></a><!-- doxytag: member="Wt::WBoxLayout::WBoxLayout" ref="9472dd446911a6a6d33b019a34a0c4fc" args="(Direction dir, WWidget *parent=0)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Wt::WBoxLayout::WBoxLayout </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classWt_1_1WBoxLayout.html#ddc4cd1f8b1158dcf16eb10d429803ec">Direction</a> </td>
<td class="paramname"> <em>dir</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classWt_1_1WWidget.html">WWidget</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>
Creates a new box layout.
<p>
This constructor is rarely used. Instead, use the convenient constructors of the specialized <a class="el" href="classWt_1_1WHBoxLayout.html" title="A layout manager which arranges widgets horizontally.">WHBoxLayout</a> or <a class="el" href="classWt_1_1WVBoxLayout.html" title="A layout manager which arranges widgets vertically.">WVBoxLayout</a> classes.<p>
Use <code>parent</code> = <code>0</code> to created a layout manager that can be nested inside other layout managers.
</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="2932a804ac01e0b314408bf4d366385d"></a><!-- doxytag: member="Wt::WBoxLayout::addItem" ref="2932a804ac01e0b314408bf4d366385d" args="(WLayoutItem *item)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WBoxLayout::addItem </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classWt_1_1WLayoutItem.html">WLayoutItem</a> * </td>
<td class="paramname"> <em>item</em> </td>
<td> ) </td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Adds a layout <em>item</em>.
<p>
The item may be a widget or nested layout.<p>
How the item is layed out with respect to siblings is implementation specific to the layout manager. In some cases, a layout manager will overload this method with extra arguments that specify layout options.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WBoxLayout.html#a01f05c0f40fa89e418b802f78f2870c" title="Removes a layout item (widget or nested layout).">removeItem(WLayoutItem *)</a>, <a class="el" href="classWt_1_1WLayout.html#886d2ec4b6b97524ba3dff93252e6540" title="Adds the given widget to the layout.">addWidget(WWidget *)</a> </dd></dl>
<p>Implements <a class="el" href="classWt_1_1WLayout.html#d4a778298c01d290692afc77e441c629">Wt::WLayout</a>.</p>
</div>
</div><p>
<a class="anchor" name="a01f05c0f40fa89e418b802f78f2870c"></a><!-- doxytag: member="Wt::WBoxLayout::removeItem" ref="a01f05c0f40fa89e418b802f78f2870c" args="(WLayoutItem *item)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WBoxLayout::removeItem </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classWt_1_1WLayoutItem.html">WLayoutItem</a> * </td>
<td class="paramname"> <em>item</em> </td>
<td> ) </td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Removes a layout <em>item</em> (widget or nested layout).
<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WBoxLayout.html#2932a804ac01e0b314408bf4d366385d" title="Adds a layout item.">addItem(WLayoutItem *)</a>, <a class="el" href="classWt_1_1WLayout.html#3f5e0f62a0deb8f2473e52c5270128d5" title="Removes the given widget from the layout.">removeWidget(WWidget *)</a> </dd></dl>
<p>Implements <a class="el" href="classWt_1_1WLayout.html#8c8d94070a51e669f8077249b67742ae">Wt::WLayout</a>.</p>
</div>
</div><p>
<a class="anchor" name="ad2ec4be48cb11a7802b3e6d7cb8f0fd"></a><!-- doxytag: member="Wt::WBoxLayout::itemAt" ref="ad2ec4be48cb11a7802b3e6d7cb8f0fd" args="(int index) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classWt_1_1WLayoutItem.html">WLayoutItem</a> * Wt::WBoxLayout::itemAt </td>
<td>(</td>
<td class="paramtype">int </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 layout item at a specific <em>index</em>.
<p>
If there is no item at the <code>index</code>, <code>0</code> is returned.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WLayout.html#fecba709ae19b93ef9bbe167650dbc5c" title="Returns the index of a given item.">indexOf(WLayoutItem *) const</a>, <a class="el" href="classWt_1_1WBoxLayout.html#961fe311fd07adbf7b60b571ef7a8278" title="Returns the number of items in this layout.">count()</a> </dd></dl>
<p>Implements <a class="el" href="classWt_1_1WLayout.html#3d48e5e4f56ad5d1b0e60180ebc91442">Wt::WLayout</a>.</p>
</div>
</div><p>
<a class="anchor" name="961fe311fd07adbf7b60b571ef7a8278"></a><!-- doxytag: member="Wt::WBoxLayout::count" ref="961fe311fd07adbf7b60b571ef7a8278" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int Wt::WBoxLayout::count </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 items in this layout.
<p>
This may be a theoretical number, which is greater than the actual number of items. It can be used to iterate over the items in the layout, in conjunction with <a class="el" href="classWt_1_1WBoxLayout.html#ad2ec4be48cb11a7802b3e6d7cb8f0fd" title="Returns the layout item at a specific index.">itemAt()</a>.
<p>Implements <a class="el" href="classWt_1_1WLayout.html#799b3cce5c1717b18e54c14471e84033">Wt::WLayout</a>.</p>
</div>
</div><p>
<a class="anchor" name="f669ef9fbcdb8954d1cfa7bb9e47b90f"></a><!-- doxytag: member="Wt::WBoxLayout::setDirection" ref="f669ef9fbcdb8954d1cfa7bb9e47b90f" args="(Direction direction)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WBoxLayout::setDirection </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classWt_1_1WBoxLayout.html#ddc4cd1f8b1158dcf16eb10d429803ec">Direction</a> </td>
<td class="paramname"> <em>direction</em> </td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Sets the layout direction.
<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WBoxLayout.html#a101f33971e037bed0e4bfea164cf0dc" title="Returns the layout direction.">direction()</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="a101f33971e037bed0e4bfea164cf0dc"></a><!-- doxytag: member="Wt::WBoxLayout::direction" ref="a101f33971e037bed0e4bfea164cf0dc" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classWt_1_1WBoxLayout.html#ddc4cd1f8b1158dcf16eb10d429803ec">Direction</a> Wt::WBoxLayout::direction </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Returns the layout direction.
<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WBoxLayout.html#f669ef9fbcdb8954d1cfa7bb9e47b90f" title="Sets the layout direction.">setDirection()</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="34d544a1a2bd8beffa6b8e5e84fbc19b"></a><!-- doxytag: member="Wt::WBoxLayout::setSpacing" ref="34d544a1a2bd8beffa6b8e5e84fbc19b" args="(int size)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WBoxLayout::setSpacing </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"> <em>size</em> </td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Sets spacing between each item.
<p>
The default spacing is 6 pixels.
</div>
</div><p>
<a class="anchor" name="a9d0d7ef4ea1753f898d6d71ad8e9b22"></a><!-- doxytag: member="Wt::WBoxLayout::spacing" ref="a9d0d7ef4ea1753f898d6d71ad8e9b22" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int Wt::WBoxLayout::spacing </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Returns the spacing between each item.
<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WBoxLayout.html#34d544a1a2bd8beffa6b8e5e84fbc19b" title="Sets spacing between each item.">setSpacing()</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="7c1ec58e25d0b7add93f5f4342844db6"></a><!-- doxytag: member="Wt::WBoxLayout::addWidget" ref="7c1ec58e25d0b7add93f5f4342844db6" args="(WWidget *widget, int stretch=0, WFlags< AlignmentFlag > alignment=0)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WBoxLayout::addWidget </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classWt_1_1WWidget.html">WWidget</a> * </td>
<td class="paramname"> <em>widget</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"> <em>stretch</em> = <code>0</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">WFlags< <a class="el" href="namespaceWt.html#b8f772c69bc8180c31f9e4f4593b143f">AlignmentFlag</a> > </td>
<td class="paramname"> <em>alignment</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>
Adds a widget to the layout.
<p>
Adds a widget to the layout, with given <code>stretch</code> factor. The <code>alignemnt</code> parameter is a combination of a horizontal and/or a vertical AlignmentFlag OR'ed together.<p>
The <code>alignment</code> specifies the vertical and horizontal alignment of the item. The default value 0 indicates that the item is stretched to fill the entire column or row. The alignment can be specified as a logical combination of a horizontal alignment (<a class="el" href="namespaceWt.html#b8f772c69bc8180c31f9e4f4593b143fd033ef69b45d0b75633be34168c9b606" title="Align to the left.">Wt::AlignLeft</a>, <a class="el" href="namespaceWt.html#b8f772c69bc8180c31f9e4f4593b143f121104cdbb5db77c7d038813a93998e5" title="Align horizontally in the center.">Wt::AlignCenter</a>, or <a class="el" href="namespaceWt.html#b8f772c69bc8180c31f9e4f4593b143fb250310385383f0b2f68d4e0ad5567e1" title="Align to the right.">Wt::AlignRight</a>) and a vertical alignment (<a class="el" href="namespaceWt.html#b8f772c69bc8180c31f9e4f4593b143f58fe5182bd266132c59718c6d30945a9" title="Align top of widget with top of tallest sibling widget.">Wt::AlignTop</a>, <a class="el" href="namespaceWt.html#b8f772c69bc8180c31f9e4f4593b143f2ed90f01dbf74049f428d33769d48e3f" title="Align vertically the middle to the middle of the parent widget.">Wt::AlignMiddle</a>, or <a class="el" href="namespaceWt.html#b8f772c69bc8180c31f9e4f4593b143f4f2aa4abba8500e25651bf8db5f0c162" title="Align bottom of widget to the bottom of the lowest sigling widget.">Wt::AlignBottom</a>).<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WBoxLayout.html#062d26b432841995a0be7b7d7aac6413" title="Adds a nested layout to the layout.">addLayout()</a>, <a class="el" href="classWt_1_1WBoxLayout.html#9ebc82bb4cc8f0bbb4e272df6ab4c02f" title="Inserts a widget in the layout.">insertWidget()</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="062d26b432841995a0be7b7d7aac6413"></a><!-- doxytag: member="Wt::WBoxLayout::addLayout" ref="062d26b432841995a0be7b7d7aac6413" args="(WLayout *layout, int stretch=0, WFlags< AlignmentFlag > alignment=0)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WBoxLayout::addLayout </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classWt_1_1WLayout.html">WLayout</a> * </td>
<td class="paramname"> <em>layout</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"> <em>stretch</em> = <code>0</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">WFlags< <a class="el" href="namespaceWt.html#b8f772c69bc8180c31f9e4f4593b143f">AlignmentFlag</a> > </td>
<td class="paramname"> <em>alignment</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>
Adds a nested layout to the layout.
<p>
Adds a nested layout, with given <code>stretch</code> factor.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WBoxLayout.html#7c1ec58e25d0b7add93f5f4342844db6" title="Adds a widget to the layout.">addWidget(WWidget *, int, WFlags<AlignmentFlag>)</a>, <a class="el" href="classWt_1_1WBoxLayout.html#8ab8fd1d8b5f3634eac9b559605e4ced" title="Inserts a nested layout in the layout.">insertLayout()</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="3cbd78251252e724d01937e2f6cc803d"></a><!-- doxytag: member="Wt::WBoxLayout::addSpacing" ref="3cbd78251252e724d01937e2f6cc803d" args="(const WLength &size)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WBoxLayout::addSpacing </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classWt_1_1WLength.html">WLength</a> & </td>
<td class="paramname"> <em>size</em> </td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Adds extra spacing.
<p>
Adds extra spacing to the layout.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WBoxLayout.html#811708ce9336d753c20aaedc14b00d5f" title="Adds a stretch element.">addStretch()</a>, <a class="el" href="classWt_1_1WBoxLayout.html#0174de2ae36e2992b7209cf789d85271" title="Inserts a stretch element in the layout.">insertStretch()</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="811708ce9336d753c20aaedc14b00d5f"></a><!-- doxytag: member="Wt::WBoxLayout::addStretch" ref="811708ce9336d753c20aaedc14b00d5f" args="(int stretch=0)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WBoxLayout::addStretch </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"> <em>stretch</em> = <code>0</code> </td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Adds a stretch element.
<p>
Adds a stretch element to the layout. This adds an empty space that stretches as needed.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WBoxLayout.html#3cbd78251252e724d01937e2f6cc803d" title="Adds extra spacing.">addSpacing()</a>, <a class="el" href="classWt_1_1WBoxLayout.html#0174de2ae36e2992b7209cf789d85271" title="Inserts a stretch element in the layout.">insertStretch()</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="9ebc82bb4cc8f0bbb4e272df6ab4c02f"></a><!-- doxytag: member="Wt::WBoxLayout::insertWidget" ref="9ebc82bb4cc8f0bbb4e272df6ab4c02f" args="(int index, WWidget *widget, int stretch=0, WFlags< AlignmentFlag > alignment=0)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WBoxLayout::insertWidget </td>
<td>(</td>
<td class="paramtype">int </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_1WWidget.html">WWidget</a> * </td>
<td class="paramname"> <em>widget</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"> <em>stretch</em> = <code>0</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">WFlags< <a class="el" href="namespaceWt.html#b8f772c69bc8180c31f9e4f4593b143f">AlignmentFlag</a> > </td>
<td class="paramname"> <em>alignment</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>
Inserts a widget in the layout.
<p>
Inserts a widget in the layout at position <code>index</code>, with given <code>stretch</code> factor.<p>
The <code>alignment</code> specifies the vertical and horizontal alignment of the item. The default value 0 indicates that the item is stretched to fill the entire column or row. The alignment can be specified as a logical combination of a horizontal alignment (<a class="el" href="namespaceWt.html#b8f772c69bc8180c31f9e4f4593b143fd033ef69b45d0b75633be34168c9b606" title="Align to the left.">Wt::AlignLeft</a>, <a class="el" href="namespaceWt.html#b8f772c69bc8180c31f9e4f4593b143f121104cdbb5db77c7d038813a93998e5" title="Align horizontally in the center.">Wt::AlignCenter</a>, or <a class="el" href="namespaceWt.html#b8f772c69bc8180c31f9e4f4593b143fb250310385383f0b2f68d4e0ad5567e1" title="Align to the right.">Wt::AlignRight</a>) and a vertical alignment (<a class="el" href="namespaceWt.html#b8f772c69bc8180c31f9e4f4593b143f58fe5182bd266132c59718c6d30945a9" title="Align top of widget with top of tallest sibling widget.">Wt::AlignTop</a>, <a class="el" href="namespaceWt.html#b8f772c69bc8180c31f9e4f4593b143f2ed90f01dbf74049f428d33769d48e3f" title="Align vertically the middle to the middle of the parent widget.">Wt::AlignMiddle</a>, or <a class="el" href="namespaceWt.html#b8f772c69bc8180c31f9e4f4593b143f4f2aa4abba8500e25651bf8db5f0c162" title="Align bottom of widget to the bottom of the lowest sigling widget.">Wt::AlignBottom</a>).<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WBoxLayout.html#8ab8fd1d8b5f3634eac9b559605e4ced" title="Inserts a nested layout in the layout.">insertLayout()</a>, <a class="el" href="classWt_1_1WBoxLayout.html#7c1ec58e25d0b7add93f5f4342844db6" title="Adds a widget to the layout.">addWidget(WWidget *, int, WFlags<AlignmentFlag>)</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="8ab8fd1d8b5f3634eac9b559605e4ced"></a><!-- doxytag: member="Wt::WBoxLayout::insertLayout" ref="8ab8fd1d8b5f3634eac9b559605e4ced" args="(int index, WLayout *layout, int stretch=0, WFlags< AlignmentFlag > alignment=0)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WBoxLayout::insertLayout </td>
<td>(</td>
<td class="paramtype">int </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_1WLayout.html">WLayout</a> * </td>
<td class="paramname"> <em>layout</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"> <em>stretch</em> = <code>0</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">WFlags< <a class="el" href="namespaceWt.html#b8f772c69bc8180c31f9e4f4593b143f">AlignmentFlag</a> > </td>
<td class="paramname"> <em>alignment</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>
Inserts a nested layout in the layout.
<p>
Inserts a nested layout in the layout at position<code>index</code>, with given <code>stretch</code> factor.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WBoxLayout.html#9ebc82bb4cc8f0bbb4e272df6ab4c02f" title="Inserts a widget in the layout.">insertWidget()</a>, <a class="el" href="classWt_1_1WBoxLayout.html#062d26b432841995a0be7b7d7aac6413" title="Adds a nested layout to the layout.">addLayout()</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="0d5d6a9e408c6bc7e25020f8c85cb4cf"></a><!-- doxytag: member="Wt::WBoxLayout::insertSpacing" ref="0d5d6a9e408c6bc7e25020f8c85cb4cf" args="(int index, const WLength &size)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WBoxLayout::insertSpacing </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"> <em>index</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>size</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Inserts extra spacing in the layout.
<p>
Inserts extra spacing in the layout at position <code>index</code>.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WBoxLayout.html#0174de2ae36e2992b7209cf789d85271" title="Inserts a stretch element in the layout.">insertStretch()</a>, <a class="el" href="classWt_1_1WBoxLayout.html#3cbd78251252e724d01937e2f6cc803d" title="Adds extra spacing.">addSpacing()</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="0174de2ae36e2992b7209cf789d85271"></a><!-- doxytag: member="Wt::WBoxLayout::insertStretch" ref="0174de2ae36e2992b7209cf789d85271" args="(int index, int stretch=0)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WBoxLayout::insertStretch </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"> <em>index</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"> <em>stretch</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>
Inserts a stretch element in the layout.
<p>
Inserts a stretch element in the layout at position <code>index</code>. This adds an empty space that stretches as needed.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WBoxLayout.html#0d5d6a9e408c6bc7e25020f8c85cb4cf" title="Inserts extra spacing in the layout.">insertSpacing()</a>, <a class="el" href="classWt_1_1WBoxLayout.html#811708ce9336d753c20aaedc14b00d5f" title="Adds a stretch element.">addStretch()</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="47182ea3c459afdadb3cc03232a8d110"></a><!-- doxytag: member="Wt::WBoxLayout::setStretchFactor" ref="47182ea3c459afdadb3cc03232a8d110" args="(WLayout *layout, int stretch)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool Wt::WBoxLayout::setStretchFactor </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classWt_1_1WLayout.html">WLayout</a> * </td>
<td class="paramname"> <em>layout</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"> <em>stretch</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Sets the stretch factor for a nested layout.
<p>
The <code>layout</code> must have previously been added to this layout using <a class="el" href="classWt_1_1WBoxLayout.html#8ab8fd1d8b5f3634eac9b559605e4ced" title="Inserts a nested layout in the layout.">insertLayout()</a> or <a class="el" href="classWt_1_1WBoxLayout.html#062d26b432841995a0be7b7d7aac6413" title="Adds a nested layout to the layout.">addLayout()</a>.<p>
Returns whether the <code>stretch</code> could be set.
</div>
</div><p>
<a class="anchor" name="f5ce73d289874c80e88ed6fd9934bb39"></a><!-- doxytag: member="Wt::WBoxLayout::setStretchFactor" ref="f5ce73d289874c80e88ed6fd9934bb39" args="(WWidget *widget, int stretch)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool Wt::WBoxLayout::setStretchFactor </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classWt_1_1WWidget.html">WWidget</a> * </td>
<td class="paramname"> <em>widget</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"> <em>stretch</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Sets the stretch factor for a nested layout.
<p>
The <code>widget</code> must have previously been added to this layout using <a class="el" href="classWt_1_1WBoxLayout.html#9ebc82bb4cc8f0bbb4e272df6ab4c02f" title="Inserts a widget in the layout.">insertWidget()</a> or <a class="el" href="classWt_1_1WBoxLayout.html#7c1ec58e25d0b7add93f5f4342844db6" title="Adds a widget to the layout.">addWidget()</a>.<p>
Returns whether the <code>stretch</code> could be set.
</div>
</div><p>
<a class="anchor" name="00bdfb4d442bd8e8ad9c33b72692763f"></a><!-- doxytag: member="Wt::WBoxLayout::setResizable" ref="00bdfb4d442bd8e8ad9c33b72692763f" args="(int index, bool enabled=true)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WBoxLayout::setResizable </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"> <em>index</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"> <em>enabled</em> = <code>true</code></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Sets whether the use may drag a particular border.
<p>
This method sets whether the border that separates item <em>index</em> from the next item may be resized by the user, depending on the value of <em>enabled</em>.<p>
The default value is <em>false</em>.
</div>
</div><p>
<a class="anchor" name="bec500f70e659fa0ecd7d5277ff3fd39"></a><!-- doxytag: member="Wt::WBoxLayout::isResizable" ref="bec500f70e659fa0ecd7d5277ff3fd39" args="(int row) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool Wt::WBoxLayout::isResizable </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"> <em>row</em> </td>
<td> ) </td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Returns whether the user may drag a particular border.
<p>
This method returns whether the border that separates item <em>index</em> from the next item may be resized by the user.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WBoxLayout.html#00bdfb4d442bd8e8ad9c33b72692763f" title="Sets whether the use may drag a particular border.">setResizable()</a> </dd></dl>
</div>
</div><p>
</div>
<hr size="1"><address style="align: right;"><small>
Generated on Fri Mar 26 17:12:06 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>
|