1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GtkBox: GTK+ 3 Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="GTK+ 3 Reference Manual">
<link rel="up" href="LayoutContainers.html" title="Layout Containers">
<link rel="prev" href="LayoutContainers.html" title="Layout Containers">
<link rel="next" href="GtkGrid.html" title="GtkGrid">
<meta name="generator" content="GTK-Doc V1.25.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
<a href="#GtkBox.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span>
<a href="#GtkBox.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_interfaces"> <span class="dim">|</span>
<a href="#GtkBox.implemented-interfaces" class="shortcut">Implemented Interfaces</a></span><span id="nav_properties"> <span class="dim">|</span>
<a href="#GtkBox.properties" class="shortcut">Properties</a></span><span id="nav_child_properties"> <span class="dim">|</span>
<a href="#GtkBox.child-properties" class="shortcut">Child Properties</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="LayoutContainers.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="LayoutContainers.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="GtkGrid.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="GtkBox"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GtkBox.top_of_page"></a>GtkBox</span></h2>
<p>GtkBox — A container box</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="GtkBox.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
</td>
<td class="function_name">
<a class="link" href="GtkBox.html#gtk-box-new" title="gtk_box_new ()">gtk_box_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkBox.html#gtk-box-pack-start" title="gtk_box_pack_start ()">gtk_box_pack_start</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkBox.html#gtk-box-pack-end" title="gtk_box_pack_end ()">gtk_box_pack_end</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="GtkBox.html#gtk-box-get-homogeneous" title="gtk_box_get_homogeneous ()">gtk_box_get_homogeneous</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkBox.html#gtk-box-set-homogeneous" title="gtk_box_set_homogeneous ()">gtk_box_set_homogeneous</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
</td>
<td class="function_name">
<a class="link" href="GtkBox.html#gtk-box-get-spacing" title="gtk_box_get_spacing ()">gtk_box_get_spacing</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkBox.html#gtk-box-set-spacing" title="gtk_box_set_spacing ()">gtk_box_set_spacing</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkBox.html#gtk-box-reorder-child" title="gtk_box_reorder_child ()">gtk_box_reorder_child</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkBox.html#gtk-box-query-child-packing" title="gtk_box_query_child_packing ()">gtk_box_query_child_packing</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkBox.html#gtk-box-set-child-packing" title="gtk_box_set_child_packing ()">gtk_box_set_child_packing</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gtk3-Standard-Enumerations.html#GtkBaselinePosition" title="enum GtkBaselinePosition"><span class="returnvalue">GtkBaselinePosition</span></a>
</td>
<td class="function_name">
<a class="link" href="GtkBox.html#gtk-box-get-baseline-position" title="gtk_box_get_baseline_position ()">gtk_box_get_baseline_position</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkBox.html#gtk-box-set-baseline-position" title="gtk_box_set_baseline_position ()">gtk_box_set_baseline_position</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
</td>
<td class="function_name">
<a class="link" href="GtkBox.html#gtk-box-get-center-widget" title="gtk_box_get_center_widget ()">gtk_box_get_center_widget</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkBox.html#gtk-box-set-center-widget" title="gtk_box_set_center_widget ()">gtk_box_set_center_widget</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkBox.properties"></a><h2>Properties</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="properties_type">
<col width="300px" class="properties_name">
<col width="200px" class="properties_flags">
</colgroup>
<tbody>
<tr>
<td class="property_type"><a class="link" href="gtk3-Standard-Enumerations.html#GtkBaselinePosition" title="enum GtkBaselinePosition"><span class="type">GtkBaselinePosition</span></a></td>
<td class="property_name"><a class="link" href="GtkBox.html#GtkBox--baseline-position" title="The “baseline-position” property">baseline-position</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
<td class="property_name"><a class="link" href="GtkBox.html#GtkBox--homogeneous" title="The “homogeneous” property">homogeneous</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td>
<td class="property_name"><a class="link" href="GtkBox.html#GtkBox--spacing" title="The “spacing” property">spacing</a></td>
<td class="property_flags">Read / Write</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkBox.child-properties"></a><h2>Child Properties</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="child_properties_type">
<col width="300px" class="child_properties_name">
<col width="200px" class="child_properties_flags">
</colgroup>
<tbody>
<tr>
<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
<td class="property_name"><a class="link" href="GtkBox.html#GtkBox--c-expand" title="The “expand” child property">expand</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
<td class="property_name"><a class="link" href="GtkBox.html#GtkBox--c-fill" title="The “fill” child property">fill</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><a class="link" href="gtk3-Standard-Enumerations.html#GtkPackType" title="enum GtkPackType"><span class="type">GtkPackType</span></a></td>
<td class="property_name"><a class="link" href="GtkBox.html#GtkBox--c-pack-type" title="The “pack-type” child property">pack-type</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td>
<td class="property_name"><a class="link" href="GtkBox.html#GtkBox--c-padding" title="The “padding” child property">padding</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td>
<td class="property_name"><a class="link" href="GtkBox.html#GtkBox--c-position" title="The “position” child property">position</a></td>
<td class="property_flags">Read / Write</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkBox.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="GtkBox.html#GtkBox-struct" title="struct GtkBox">GtkBox</a></td>
</tr>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="GtkBox.html#GtkBoxClass" title="struct GtkBoxClass">GtkBoxClass</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkBox.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen"> <a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#GObject-struct">GObject</a>
<span class="lineart">╰──</span> <a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>
<span class="lineart">╰──</span> <a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>
<span class="lineart">╰──</span> <a class="link" href="GtkContainer.html" title="GtkContainer">GtkContainer</a>
<span class="lineart">╰──</span> GtkBox
<span class="lineart">├──</span> <a class="link" href="GtkAppChooserWidget.html" title="GtkAppChooserWidget">GtkAppChooserWidget</a>
<span class="lineart">├──</span> <a class="link" href="GtkButtonBox.html" title="GtkButtonBox">GtkButtonBox</a>
<span class="lineart">├──</span> <a class="link" href="GtkColorChooserWidget.html" title="GtkColorChooserWidget">GtkColorChooserWidget</a>
<span class="lineart">├──</span> <a class="link" href="GtkColorSelection.html" title="GtkColorSelection">GtkColorSelection</a>
<span class="lineart">├──</span> <a class="link" href="GtkFileChooserButton.html" title="GtkFileChooserButton">GtkFileChooserButton</a>
<span class="lineart">├──</span> <a class="link" href="GtkFileChooserWidget.html" title="GtkFileChooserWidget">GtkFileChooserWidget</a>
<span class="lineart">├──</span> <a class="link" href="GtkFontChooserWidget.html" title="GtkFontChooserWidget">GtkFontChooserWidget</a>
<span class="lineart">├──</span> <a class="link" href="GtkFontSelection.html" title="GtkFontSelection">GtkFontSelection</a>
<span class="lineart">├──</span> <a class="link" href="GtkHBox.html" title="GtkHBox">GtkHBox</a>
<span class="lineart">├──</span> <a class="link" href="GtkInfoBar.html" title="GtkInfoBar">GtkInfoBar</a>
<span class="lineart">├──</span> <a class="link" href="GtkRecentChooserWidget.html" title="GtkRecentChooserWidget">GtkRecentChooserWidget</a>
<span class="lineart">├──</span> <a class="link" href="GtkShortcutsSection.html" title="GtkShortcutsSection">GtkShortcutsSection</a>
<span class="lineart">├──</span> <a class="link" href="GtkShortcutsGroup.html" title="GtkShortcutsGroup">GtkShortcutsGroup</a>
<span class="lineart">├──</span> <a class="link" href="GtkShortcutsShortcut.html" title="GtkShortcutsShortcut">GtkShortcutsShortcut</a>
<span class="lineart">├──</span> <a class="link" href="GtkStackSwitcher.html" title="GtkStackSwitcher">GtkStackSwitcher</a>
<span class="lineart">├──</span> <a class="link" href="GtkStatusbar.html" title="GtkStatusbar">GtkStatusbar</a>
<span class="lineart">╰──</span> <a class="link" href="GtkVBox.html" title="GtkVBox">GtkVBox</a>
</pre>
</div>
<div class="refsect1">
<a name="GtkBox.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
<p>
GtkBox implements
AtkImplementorIface, <a class="link" href="GtkBuildable.html" title="GtkBuildable">GtkBuildable</a> and <a class="link" href="gtk3-Orientable.html#GtkOrientable">GtkOrientable</a>.</p>
</div>
<div class="refsect1">
<a name="GtkBox.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include <gtk/gtk.h>
</pre>
</div>
<div class="refsect1">
<a name="GtkBox.description"></a><h2>Description</h2>
<p>The GtkBox widget organizes child widgets into a rectangular area.</p>
<p>The rectangular area of a GtkBox is organized into either a single row
or a single column of child widgets depending upon the orientation.
Thus, all children of a GtkBox are allocated one dimension in common,
which is the height of a row, or the width of a column.</p>
<p>GtkBox uses a notion of packing. Packing refers
to adding widgets with reference to a particular position in a
<a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a>. For a GtkBox, there are two reference positions: the
start and the end of the box.
For a vertical <a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a>, the start is defined as the top of the box and
the end is defined as the bottom. For a horizontal <a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a> the start
is defined as the left side and the end is defined as the right side.</p>
<p>Use repeated calls to <a class="link" href="GtkBox.html#gtk-box-pack-start" title="gtk_box_pack_start ()"><code class="function">gtk_box_pack_start()</code></a> to pack widgets into a
GtkBox from start to end. Use <a class="link" href="GtkBox.html#gtk-box-pack-end" title="gtk_box_pack_end ()"><code class="function">gtk_box_pack_end()</code></a> to add widgets from
end to start. You may intersperse these calls and add widgets from
both ends of the same GtkBox.</p>
<p>Because GtkBox is a <a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a>, you may also use <a class="link" href="GtkContainer.html#gtk-container-add" title="gtk_container_add ()"><code class="function">gtk_container_add()</code></a>
to insert widgets into the box, and they will be packed with the default
values for expand and fill child properties. Use <a class="link" href="GtkContainer.html#gtk-container-remove" title="gtk_container_remove ()"><code class="function">gtk_container_remove()</code></a>
to remove widgets from the GtkBox.</p>
<p>Use <a class="link" href="GtkBox.html#gtk-box-set-homogeneous" title="gtk_box_set_homogeneous ()"><code class="function">gtk_box_set_homogeneous()</code></a> to specify whether or not all children
of the GtkBox are forced to get the same amount of space.</p>
<p>Use <a class="link" href="GtkBox.html#gtk-box-set-spacing" title="gtk_box_set_spacing ()"><code class="function">gtk_box_set_spacing()</code></a> to determine how much space will be
minimally placed between all children in the GtkBox. Note that
spacing is added between the children, while
padding added by <a class="link" href="GtkBox.html#gtk-box-pack-start" title="gtk_box_pack_start ()"><code class="function">gtk_box_pack_start()</code></a> or <a class="link" href="GtkBox.html#gtk-box-pack-end" title="gtk_box_pack_end ()"><code class="function">gtk_box_pack_end()</code></a> is added
on either side of the widget it belongs to.</p>
<p>Use <a class="link" href="GtkBox.html#gtk-box-reorder-child" title="gtk_box_reorder_child ()"><code class="function">gtk_box_reorder_child()</code></a> to move a GtkBox child to a different
place in the box.</p>
<p>Use <a class="link" href="GtkBox.html#gtk-box-set-child-packing" title="gtk_box_set_child_packing ()"><code class="function">gtk_box_set_child_packing()</code></a> to reset the expand,
fill and padding child properties.
Use <a class="link" href="GtkBox.html#gtk-box-query-child-packing" title="gtk_box_query_child_packing ()"><code class="function">gtk_box_query_child_packing()</code></a> to query these fields.</p>
<p>Note that a single-row or single-column <a class="link" href="GtkGrid.html" title="GtkGrid"><span class="type">GtkGrid</span></a> provides exactly
the same functionality as <a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a>.</p>
<div class="refsect2">
<a name="id-1.3.7.2.10.12"></a><h3>CSS nodes</h3>
<p>GtkBox uses a single CSS node with name box.</p>
<p>In horizontal orientation, the nodes of the children are always arranged
from left to right. So :first-child will always select the leftmost child,
regardless of text direction.</p>
</div>
</div>
<div class="refsect1">
<a name="GtkBox.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gtk-box-new"></a><h3>gtk_box_new ()</h3>
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
gtk_box_new (<em class="parameter"><code><a class="link" href="gtk3-Standard-Enumerations.html#GtkOrientation" title="enum GtkOrientation"><span class="type">GtkOrientation</span></a> orientation</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> spacing</code></em>);</pre>
<p>Creates a new <a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a>.</p>
<div class="refsect3">
<a name="gtk-box-new.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>orientation</p></td>
<td class="parameter_description"><p>the box’s orientation.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>spacing</p></td>
<td class="parameter_description"><p>the number of pixels to place by default between children.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-box-new.returns"></a><h4>Returns</h4>
<p> a new <a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a>.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-0.html#api-index-3.0">3.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-box-pack-start"></a><h3>gtk_box_pack_start ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_box_pack_start (<em class="parameter"><code><a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a> *box</code></em>,
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *child</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> expand</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> fill</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> padding</code></em>);</pre>
<p>Adds <em class="parameter"><code>child</code></em>
to <em class="parameter"><code>box</code></em>
, packed with reference to the start of <em class="parameter"><code>box</code></em>
.
The <em class="parameter"><code>child</code></em>
is packed after any other child packed with reference
to the start of <em class="parameter"><code>box</code></em>
.</p>
<div class="refsect3">
<a name="gtk-box-pack-start.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>box</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>child</p></td>
<td class="parameter_description"><p>the <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> to be added to <em class="parameter"><code>box</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>expand</p></td>
<td class="parameter_description"><p><a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the new child is to be given extra space allocated
to <em class="parameter"><code>box</code></em>
. The extra space will be divided evenly between all children
that use this option</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>fill</p></td>
<td class="parameter_description"><p><a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if space given to <em class="parameter"><code>child</code></em>
by the <em class="parameter"><code>expand</code></em>
option is
actually allocated to <em class="parameter"><code>child</code></em>
, rather than just padding it. This
parameter has no effect if <em class="parameter"><code>expand</code></em>
is set to <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>. A child is
always allocated the full height of a horizontal <a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a> and the full width
of a vertical <a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a>. This option affects the other dimension</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>padding</p></td>
<td class="parameter_description"><p>extra space in pixels to put between this child and its
neighbors, over and above the global amount specified by
<a class="link" href="GtkBox.html#GtkBox--spacing" title="The “spacing” property"><span class="type">“spacing”</span></a> property. If <em class="parameter"><code>child</code></em>
is a widget at one of the
reference ends of <em class="parameter"><code>box</code></em>
, then <em class="parameter"><code>padding</code></em>
pixels are also put between
<em class="parameter"><code>child</code></em>
and the reference edge of <em class="parameter"><code>box</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-box-pack-end"></a><h3>gtk_box_pack_end ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_box_pack_end (<em class="parameter"><code><a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a> *box</code></em>,
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *child</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> expand</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> fill</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> padding</code></em>);</pre>
<p>Adds <em class="parameter"><code>child</code></em>
to <em class="parameter"><code>box</code></em>
, packed with reference to the end of <em class="parameter"><code>box</code></em>
.
The <em class="parameter"><code>child</code></em>
is packed after (away from end of) any other child
packed with reference to the end of <em class="parameter"><code>box</code></em>
.</p>
<div class="refsect3">
<a name="gtk-box-pack-end.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>box</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>child</p></td>
<td class="parameter_description"><p>the <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> to be added to <em class="parameter"><code>box</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>expand</p></td>
<td class="parameter_description"><p><a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the new child is to be given extra space allocated
to <em class="parameter"><code>box</code></em>
. The extra space will be divided evenly between all children
of <em class="parameter"><code>box</code></em>
that use this option</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>fill</p></td>
<td class="parameter_description"><p><a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if space given to <em class="parameter"><code>child</code></em>
by the <em class="parameter"><code>expand</code></em>
option is
actually allocated to <em class="parameter"><code>child</code></em>
, rather than just padding it. This
parameter has no effect if <em class="parameter"><code>expand</code></em>
is set to <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>. A child is
always allocated the full height of a horizontal <a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a> and the full width
of a vertical <a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a>. This option affects the other dimension</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>padding</p></td>
<td class="parameter_description"><p>extra space in pixels to put between this child and its
neighbors, over and above the global amount specified by
<a class="link" href="GtkBox.html#GtkBox--spacing" title="The “spacing” property"><span class="type">“spacing”</span></a> property. If <em class="parameter"><code>child</code></em>
is a widget at one of the
reference ends of <em class="parameter"><code>box</code></em>
, then <em class="parameter"><code>padding</code></em>
pixels are also put between
<em class="parameter"><code>child</code></em>
and the reference edge of <em class="parameter"><code>box</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-box-get-homogeneous"></a><h3>gtk_box_get_homogeneous ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gtk_box_get_homogeneous (<em class="parameter"><code><a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a> *box</code></em>);</pre>
<p>Returns whether the box is homogeneous (all children are the
same size). See <a class="link" href="GtkBox.html#gtk-box-set-homogeneous" title="gtk_box_set_homogeneous ()"><code class="function">gtk_box_set_homogeneous()</code></a>.</p>
<div class="refsect3">
<a name="gtk-box-get-homogeneous.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>box</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-box-get-homogeneous.returns"></a><h4>Returns</h4>
<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the box is homogeneous.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-box-set-homogeneous"></a><h3>gtk_box_set_homogeneous ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_box_set_homogeneous (<em class="parameter"><code><a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a> *box</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> homogeneous</code></em>);</pre>
<p>Sets the <a class="link" href="GtkBox.html#GtkBox--homogeneous" title="The “homogeneous” property"><span class="type">“homogeneous”</span></a> property of <em class="parameter"><code>box</code></em>
, controlling
whether or not all children of <em class="parameter"><code>box</code></em>
are given equal space
in the box.</p>
<div class="refsect3">
<a name="gtk-box-set-homogeneous.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>box</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>homogeneous</p></td>
<td class="parameter_description"><p>a boolean value, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to create equal allotments,
<a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> for variable allotments</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-box-get-spacing"></a><h3>gtk_box_get_spacing ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
gtk_box_get_spacing (<em class="parameter"><code><a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a> *box</code></em>);</pre>
<p>Gets the value set by <a class="link" href="GtkBox.html#gtk-box-set-spacing" title="gtk_box_set_spacing ()"><code class="function">gtk_box_set_spacing()</code></a>.</p>
<div class="refsect3">
<a name="gtk-box-get-spacing.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>box</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-box-get-spacing.returns"></a><h4>Returns</h4>
<p> spacing between children</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-box-set-spacing"></a><h3>gtk_box_set_spacing ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_box_set_spacing (<em class="parameter"><code><a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a> *box</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> spacing</code></em>);</pre>
<p>Sets the <a class="link" href="GtkBox.html#GtkBox--spacing" title="The “spacing” property"><span class="type">“spacing”</span></a> property of <em class="parameter"><code>box</code></em>
, which is the
number of pixels to place between children of <em class="parameter"><code>box</code></em>
.</p>
<div class="refsect3">
<a name="gtk-box-set-spacing.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>box</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>spacing</p></td>
<td class="parameter_description"><p>the number of pixels to put between children</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-box-reorder-child"></a><h3>gtk_box_reorder_child ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_box_reorder_child (<em class="parameter"><code><a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a> *box</code></em>,
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *child</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> position</code></em>);</pre>
<p>Moves <em class="parameter"><code>child</code></em>
to a new <em class="parameter"><code>position</code></em>
in the list of <em class="parameter"><code>box</code></em>
children.
The list contains widgets packed <a class="link" href="gtk3-Standard-Enumerations.html#GTK-PACK-START:CAPS"><span class="type">GTK_PACK_START</span></a>
as well as widgets packed <a class="link" href="gtk3-Standard-Enumerations.html#GTK-PACK-END:CAPS"><span class="type">GTK_PACK_END</span></a>, in the order that these
widgets were added to <em class="parameter"><code>box</code></em>
.</p>
<p>A widget’s position in the <em class="parameter"><code>box</code></em>
children list determines where
the widget is packed into <em class="parameter"><code>box</code></em>
. A child widget at some position
in the list will be packed just after all other widgets of the
same packing type that appear earlier in the list.</p>
<div class="refsect3">
<a name="gtk-box-reorder-child.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>box</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>child</p></td>
<td class="parameter_description"><p>the <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> to move</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>position</p></td>
<td class="parameter_description"><p>the new position for <em class="parameter"><code>child</code></em>
in the list of children
of <em class="parameter"><code>box</code></em>
, starting from 0. If negative, indicates the end of
the list</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-box-query-child-packing"></a><h3>gtk_box_query_child_packing ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_box_query_child_packing (<em class="parameter"><code><a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a> *box</code></em>,
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *child</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> *expand</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> *fill</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *padding</code></em>,
<em class="parameter"><code><a class="link" href="gtk3-Standard-Enumerations.html#GtkPackType" title="enum GtkPackType"><span class="type">GtkPackType</span></a> *pack_type</code></em>);</pre>
<p>Obtains information about how <em class="parameter"><code>child</code></em>
is packed into <em class="parameter"><code>box</code></em>
.</p>
<div class="refsect3">
<a name="gtk-box-query-child-packing.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>box</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>child</p></td>
<td class="parameter_description"><p>the <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> of the child to query</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>expand</p></td>
<td class="parameter_description"><p> pointer to return location for expand child
property. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>fill</p></td>
<td class="parameter_description"><p> pointer to return location for fill child
property. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>padding</p></td>
<td class="parameter_description"><p> pointer to return location for padding
child property. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>pack_type</p></td>
<td class="parameter_description"><p> pointer to return location for pack-type
child property. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-box-set-child-packing"></a><h3>gtk_box_set_child_packing ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_box_set_child_packing (<em class="parameter"><code><a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a> *box</code></em>,
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *child</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> expand</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> fill</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> padding</code></em>,
<em class="parameter"><code><a class="link" href="gtk3-Standard-Enumerations.html#GtkPackType" title="enum GtkPackType"><span class="type">GtkPackType</span></a> pack_type</code></em>);</pre>
<p>Sets the way <em class="parameter"><code>child</code></em>
is packed into <em class="parameter"><code>box</code></em>
.</p>
<div class="refsect3">
<a name="gtk-box-set-child-packing.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>box</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>child</p></td>
<td class="parameter_description"><p>the <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> of the child to set</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>expand</p></td>
<td class="parameter_description"><p>the new value of the expand child property</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>fill</p></td>
<td class="parameter_description"><p>the new value of the fill child property</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>padding</p></td>
<td class="parameter_description"><p>the new value of the padding child property</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>pack_type</p></td>
<td class="parameter_description"><p>the new value of the pack-type child property</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-box-get-baseline-position"></a><h3>gtk_box_get_baseline_position ()</h3>
<pre class="programlisting"><a class="link" href="gtk3-Standard-Enumerations.html#GtkBaselinePosition" title="enum GtkBaselinePosition"><span class="returnvalue">GtkBaselinePosition</span></a>
gtk_box_get_baseline_position (<em class="parameter"><code><a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a> *box</code></em>);</pre>
<p>Gets the value set by <a class="link" href="GtkBox.html#gtk-box-set-baseline-position" title="gtk_box_set_baseline_position ()"><code class="function">gtk_box_set_baseline_position()</code></a>.</p>
<div class="refsect3">
<a name="gtk-box-get-baseline-position.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>box</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-box-get-baseline-position.returns"></a><h4>Returns</h4>
<p> the baseline position</p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-10.html#api-index-3.10">3.10</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-box-set-baseline-position"></a><h3>gtk_box_set_baseline_position ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_box_set_baseline_position (<em class="parameter"><code><a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a> *box</code></em>,
<em class="parameter"><code><a class="link" href="gtk3-Standard-Enumerations.html#GtkBaselinePosition" title="enum GtkBaselinePosition"><span class="type">GtkBaselinePosition</span></a> position</code></em>);</pre>
<p>Sets the baseline position of a box. This affects
only horizontal boxes with at least one baseline aligned
child. If there is more vertical space available than requested,
and the baseline is not allocated by the parent then
<em class="parameter"><code>position</code></em>
is used to allocate the baseline wrt the
extra space available.</p>
<div class="refsect3">
<a name="gtk-box-set-baseline-position.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>box</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>position</p></td>
<td class="parameter_description"><p>a <a class="link" href="gtk3-Standard-Enumerations.html#GtkBaselinePosition" title="enum GtkBaselinePosition"><span class="type">GtkBaselinePosition</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-3-10.html#api-index-3.10">3.10</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-box-get-center-widget"></a><h3>gtk_box_get_center_widget ()</h3>
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
gtk_box_get_center_widget (<em class="parameter"><code><a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a> *box</code></em>);</pre>
<p>Retrieves the center widget of the box.</p>
<div class="refsect3">
<a name="gtk-box-get-center-widget.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>box</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-box-get-center-widget.returns"></a><h4>Returns</h4>
<p> the center widget
or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> in case no center widget is set. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-12.html#api-index-3.12">3.12</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-box-set-center-widget"></a><h3>gtk_box_set_center_widget ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_box_set_center_widget (<em class="parameter"><code><a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a> *box</code></em>,
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>);</pre>
<p>Sets a center widget; that is a child widget that will be
centered with respect to the full width of the box, even
if the children at either side take up different amounts
of space.</p>
<div class="refsect3">
<a name="gtk-box-set-center-widget.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>box</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>widget</p></td>
<td class="parameter_description"><p> the widget to center. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-3-12.html#api-index-3.12">3.12</a></p>
</div>
</div>
<div class="refsect1">
<a name="GtkBox.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GtkBox-struct"></a><h3>struct GtkBox</h3>
<pre class="programlisting">struct GtkBox;</pre>
</div>
<hr>
<div class="refsect2">
<a name="GtkBoxClass"></a><h3>struct GtkBoxClass</h3>
<pre class="programlisting">struct GtkBoxClass {
GtkContainerClass parent_class;
};
</pre>
<div class="refsect3">
<a name="GtkBoxClass.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>
<tbody></tbody>
</table></div>
</div>
</div>
</div>
<div class="refsect1">
<a name="GtkBox.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="GtkBox--baseline-position"></a><h3>The <code class="literal">“baseline-position”</code> property</h3>
<pre class="programlisting"> “baseline-position” <a class="link" href="gtk3-Standard-Enumerations.html#GtkBaselinePosition" title="enum GtkBaselinePosition"><span class="type">GtkBaselinePosition</span></a></pre>
<p>The position of the baseline aligned widgets if extra space is available.</p>
<p>Flags: Read / Write</p>
<p>Default value: GTK_BASELINE_POSITION_CENTER</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkBox--homogeneous"></a><h3>The <code class="literal">“homogeneous”</code> property</h3>
<pre class="programlisting"> “homogeneous” <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
<p>Whether the children should all be the same size.</p>
<p>Flags: Read / Write</p>
<p>Default value: FALSE</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkBox--spacing"></a><h3>The <code class="literal">“spacing”</code> property</h3>
<pre class="programlisting"> “spacing” <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre>
<p>The amount of space between children.</p>
<p>Flags: Read / Write</p>
<p>Allowed values: >= 0</p>
<p>Default value: 0</p>
</div>
</div>
<div class="refsect1">
<a name="GtkBox.child-property-details"></a><h2>Child Property Details</h2>
<div class="refsect2">
<a name="GtkBox--c-expand"></a><h3>The <code class="literal">“expand”</code> child property</h3>
<pre class="programlisting"> “expand” <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
<p>Whether the child should receive extra space when the parent grows.</p>
<p>Note that the default value for this property is <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> for GtkBox,
but <a class="link" href="GtkHBox.html" title="GtkHBox"><span class="type">GtkHBox</span></a>, <a class="link" href="GtkVBox.html" title="GtkVBox"><span class="type">GtkVBox</span></a> and other subclasses use the old default
of <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>.</p>
<p>Note that the <a class="link" href="GtkWidget.html#GtkWidget--halign" title="The “halign” property"><span class="type">“halign”</span></a>, <a class="link" href="GtkWidget.html#GtkWidget--valign" title="The “valign” property"><span class="type">“valign”</span></a>, <a class="link" href="GtkWidget.html#GtkWidget--hexpand" title="The “hexpand” property"><span class="type">“hexpand”</span></a>
and <a class="link" href="GtkWidget.html#GtkWidget--vexpand" title="The “vexpand” property"><span class="type">“vexpand”</span></a> properties are the preferred way to influence
child size allocation in containers.</p>
<p>In contrast to <a class="link" href="GtkWidget.html#GtkWidget--hexpand" title="The “hexpand” property"><span class="type">“hexpand”</span></a>, the expand child property does
not cause the box to expand itself.</p>
<p>Flags: Read / Write</p>
<p>Default value: FALSE</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkBox--c-fill"></a><h3>The <code class="literal">“fill”</code> child property</h3>
<pre class="programlisting"> “fill” <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
<p>Whether the child should receive extra space when the parent grows.</p>
<p>Note that the <a class="link" href="GtkWidget.html#GtkWidget--halign" title="The “halign” property"><span class="type">“halign”</span></a>, <a class="link" href="GtkWidget.html#GtkWidget--valign" title="The “valign” property"><span class="type">“valign”</span></a>, <a class="link" href="GtkWidget.html#GtkWidget--hexpand" title="The “hexpand” property"><span class="type">“hexpand”</span></a>
and <a class="link" href="GtkWidget.html#GtkWidget--vexpand" title="The “vexpand” property"><span class="type">“vexpand”</span></a> properties are the preferred way to influence
child size allocation in containers.</p>
<p>Flags: Read / Write</p>
<p>Default value: TRUE</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkBox--c-pack-type"></a><h3>The <code class="literal">“pack-type”</code> child property</h3>
<pre class="programlisting"> “pack-type” <a class="link" href="gtk3-Standard-Enumerations.html#GtkPackType" title="enum GtkPackType"><span class="type">GtkPackType</span></a></pre>
<p>A GtkPackType indicating whether the child is packed with reference to the start or end of the parent.</p>
<p>Flags: Read / Write</p>
<p>Default value: GTK_PACK_START</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkBox--c-padding"></a><h3>The <code class="literal">“padding”</code> child property</h3>
<pre class="programlisting"> “padding” <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
<p>Extra space to put between the child and its neighbors, in pixels.</p>
<p>Flags: Read / Write</p>
<p>Allowed values: <= G_MAXINT</p>
<p>Default value: 0</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkBox--c-position"></a><h3>The <code class="literal">“position”</code> child property</h3>
<pre class="programlisting"> “position” <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre>
<p>The index of the child in the parent.</p>
<p>Flags: Read / Write</p>
<p>Allowed values: >= -1</p>
<p>Default value: 0</p>
</div>
</div>
<div class="refsect1">
<a name="GtkBox.see-also"></a><h2>See Also</h2>
<p><a class="link" href="GtkFrame.html" title="GtkFrame"><span class="type">GtkFrame</span></a>, <a class="link" href="GtkGrid.html" title="GtkGrid"><span class="type">GtkGrid</span></a>, <a class="link" href="GtkLayout.html" title="GtkLayout"><span class="type">GtkLayout</span></a></p>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.25.1</div>
</body>
</html>
|