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 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GtkExpander: 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="GtkNotebook.html" title="GtkNotebook">
<link rel="next" href="gtk3-Orientable.html" title="GtkOrientable">
<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="#GtkExpander.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span>
<a href="#GtkExpander.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_interfaces"> <span class="dim">|</span>
<a href="#GtkExpander.implemented-interfaces" class="shortcut">Implemented Interfaces</a></span><span id="nav_properties"> <span class="dim">|</span>
<a href="#GtkExpander.properties" class="shortcut">Properties</a></span><span id="nav_style_properties"> <span class="dim">|</span>
<a href="#GtkExpander.style-properties" class="shortcut">Style Properties</a></span><span id="nav_signals"> <span class="dim">|</span>
<a href="#GtkExpander.signals" class="shortcut">Signals</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="GtkNotebook.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="gtk3-Orientable.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="GtkExpander"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GtkExpander.top_of_page"></a>GtkExpander</span></h2>
<p>GtkExpander — A container which can hide its child</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="GtkExpander.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="GtkExpander.html#gtk-expander-new" title="gtk_expander_new ()">gtk_expander_new</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="GtkExpander.html#gtk-expander-new-with-mnemonic" title="gtk_expander_new_with_mnemonic ()">gtk_expander_new_with_mnemonic</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="GtkExpander.html#gtk-expander-set-expanded" title="gtk_expander_set_expanded ()">gtk_expander_set_expanded</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="GtkExpander.html#gtk-expander-get-expanded" title="gtk_expander_get_expanded ()">gtk_expander_get_expanded</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="GtkExpander.html#gtk-expander-set-spacing" title="gtk_expander_set_spacing ()">gtk_expander_set_spacing</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="GtkExpander.html#gtk-expander-get-spacing" title="gtk_expander_get_spacing ()">gtk_expander_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="GtkExpander.html#gtk-expander-set-label" title="gtk_expander_set_label ()">gtk_expander_set_label</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="GtkExpander.html#gtk-expander-get-label" title="gtk_expander_get_label ()">gtk_expander_get_label</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="GtkExpander.html#gtk-expander-set-use-underline" title="gtk_expander_set_use_underline ()">gtk_expander_set_use_underline</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="GtkExpander.html#gtk-expander-get-use-underline" title="gtk_expander_get_use_underline ()">gtk_expander_get_use_underline</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="GtkExpander.html#gtk-expander-set-use-markup" title="gtk_expander_set_use_markup ()">gtk_expander_set_use_markup</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="GtkExpander.html#gtk-expander-get-use-markup" title="gtk_expander_get_use_markup ()">gtk_expander_get_use_markup</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="GtkExpander.html#gtk-expander-set-label-widget" title="gtk_expander_set_label_widget ()">gtk_expander_set_label_widget</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="GtkExpander.html#gtk-expander-get-label-widget" title="gtk_expander_get_label_widget ()">gtk_expander_get_label_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="GtkExpander.html#gtk-expander-set-label-fill" title="gtk_expander_set_label_fill ()">gtk_expander_set_label_fill</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="GtkExpander.html#gtk-expander-get-label-fill" title="gtk_expander_get_label_fill ()">gtk_expander_get_label_fill</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="GtkExpander.html#gtk-expander-set-resize-toplevel" title="gtk_expander_set_resize_toplevel ()">gtk_expander_set_resize_toplevel</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="GtkExpander.html#gtk-expander-get-resize-toplevel" title="gtk_expander_get_resize_toplevel ()">gtk_expander_get_resize_toplevel</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkExpander.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 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="GtkExpander.html#GtkExpander--expanded" title="The “expanded” property">expanded</a></td>
<td class="property_flags">Read / Write / Construct</td>
</tr>
<tr>
<td class="property_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</td>
<td class="property_name"><a class="link" href="GtkExpander.html#GtkExpander--label" title="The “label” property">label</a></td>
<td class="property_flags">Read / Write / Construct</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="GtkExpander.html#GtkExpander--label-fill" title="The “label-fill” property">label-fill</a></td>
<td class="property_flags">Read / Write / Construct</td>
</tr>
<tr>
<td class="property_type">
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *</td>
<td class="property_name"><a class="link" href="GtkExpander.html#GtkExpander--label-widget" title="The “label-widget” property">label-widget</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="GtkExpander.html#GtkExpander--resize-toplevel" title="The “resize-toplevel” property">resize-toplevel</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="GtkExpander.html#GtkExpander--spacing" title="The “spacing” property">spacing</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="GtkExpander.html#GtkExpander--use-markup" title="The “use-markup” property">use-markup</a></td>
<td class="property_flags">Read / Write / Construct</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="GtkExpander.html#GtkExpander--use-underline" title="The “use-underline” property">use-underline</a></td>
<td class="property_flags">Read / Write / Construct</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkExpander.style-properties"></a><h2>Style Properties</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="style_properties_type">
<col width="300px" class="style_properties_name">
<col width="200px" class="style_properties_flags">
</colgroup>
<tbody>
<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="GtkExpander.html#GtkExpander--s-expander-size" title="The “expander-size” style property">expander-size</a></td>
<td class="property_flags">Read</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="GtkExpander.html#GtkExpander--s-expander-spacing" title="The “expander-spacing” style property">expander-spacing</a></td>
<td class="property_flags">Read</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkExpander.signals"></a><h2>Signals</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="signals_return">
<col width="300px" class="signals_name">
<col width="200px" class="signals_flags">
</colgroup>
<tbody><tr>
<td class="signal_type"><span class="returnvalue">void</span></td>
<td class="signal_name"><a class="link" href="GtkExpander.html#GtkExpander-activate" title="The “activate” signal">activate</a></td>
<td class="signal_flags"><a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-ACTION:CAPS">Action</a></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkExpander.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="GtkExpander.html#GtkExpander-struct" title="struct GtkExpander">GtkExpander</a></td>
</tr>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="GtkExpander.html#GtkExpanderClass" title="struct GtkExpanderClass">GtkExpanderClass</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkExpander.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> <a class="link" href="GtkBin.html" title="GtkBin">GtkBin</a>
<span class="lineart">╰──</span> GtkExpander
</pre>
</div>
<div class="refsect1">
<a name="GtkExpander.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
<p>
GtkExpander implements
AtkImplementorIface and <a class="link" href="GtkBuildable.html" title="GtkBuildable">GtkBuildable</a>.</p>
</div>
<div class="refsect1">
<a name="GtkExpander.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include <gtk/gtk.h>
</pre>
</div>
<div class="refsect1">
<a name="GtkExpander.description"></a><h2>Description</h2>
<p>A <a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> allows the user to hide or show its child by clicking
on an expander triangle similar to the triangles used in a <a class="link" href="GtkTreeView.html" title="GtkTreeView"><span class="type">GtkTreeView</span></a>.</p>
<p>Normally you use an expander as you would use any other descendant
of <a class="link" href="GtkBin.html" title="GtkBin"><span class="type">GtkBin</span></a>; you create the child widget and use <a class="link" href="GtkContainer.html#gtk-container-add" title="gtk_container_add ()"><code class="function">gtk_container_add()</code></a>
to add it to the expander. When the expander is toggled, it will take
care of showing and hiding the child automatically.</p>
<div class="refsect2">
<a name="id-1.3.7.17.11.4"></a><h3>Special Usage</h3>
<p>There are situations in which you may prefer to show and hide the
expanded widget yourself, such as when you want to actually create
the widget at expansion time. In this case, create a <a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a>
but do not add a child to it. The expander widget has an
<a class="link" href="GtkExpander.html#GtkExpander--expanded" title="The “expanded” property"><span class="type">“expanded”</span></a> property which can be used to monitor
its expansion state. You should watch this property with a signal
connection as follows:</p>
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24</pre></td>
<td class="listing_code"><pre class="programlisting">expander <span class="gtkdoc opt">=</span> <span class="function"><a href="GtkExpander.html#gtk-expander-new-with-mnemonic">gtk_expander_new_with_mnemonic</a></span> <span class="gtkdoc opt">(</span><span class="string">"_More Options"</span><span class="gtkdoc opt">);</span>
<span class="function"><a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#g-signal-connect">g_signal_connect</a></span> <span class="gtkdoc opt">(</span>expander<span class="gtkdoc opt">,</span> <span class="string">"notify::expanded"</span><span class="gtkdoc opt">,</span>
<span class="function"><a href="https://developer.gnome.org/gobject/unstable/gobject-Closures.html#G-CALLBACK:CAPS">G_CALLBACK</a></span> <span class="gtkdoc opt">(</span>expander_callback<span class="gtkdoc opt">),</span> NULL<span class="gtkdoc opt">);</span>
<span class="gtkdoc opt">...</span>
<span class="gtkdoc kwb">static void</span>
<span class="function">expander_callback</span> <span class="gtkdoc opt">(</span>GObject <span class="gtkdoc opt">*</span>object<span class="gtkdoc opt">,</span>
GParamSpec <span class="gtkdoc opt">*</span>param_spec<span class="gtkdoc opt">,</span>
gpointer user_data<span class="gtkdoc opt">)</span>
<span class="gtkdoc opt">{</span>
GtkExpander <span class="gtkdoc opt">*</span>expander<span class="gtkdoc opt">;</span>
expander <span class="gtkdoc opt">=</span> <span class="function">GTK_EXPANDER</span> <span class="gtkdoc opt">(</span>object<span class="gtkdoc opt">);</span>
<span class="keyword">if</span> <span class="gtkdoc opt">(</span><span class="function"><a href="GtkExpander.html#gtk-expander-get-expanded">gtk_expander_get_expanded</a></span> <span class="gtkdoc opt">(</span>expander<span class="gtkdoc opt">))</span>
<span class="gtkdoc opt">{</span>
<span class="gtkdoc slc">// Show or create widgets</span>
<span class="gtkdoc opt">}</span>
<span class="keyword">else</span>
<span class="gtkdoc opt">{</span>
<span class="gtkdoc slc">// Hide or destroy widgets</span>
<span class="gtkdoc opt">}</span>
<span class="gtkdoc opt">}</span></pre></td>
</tr>
</tbody>
</table>
</div>
<p></p>
</div>
<hr>
<div class="refsect2">
<a name="id-1.3.7.17.11.5"></a><h3>GtkExpander as GtkBuildable</h3>
<p>The GtkExpander implementation of the GtkBuildable interface supports
placing a child in the label position by specifying “label” as the
“type” attribute of a <child> element. A normal content child can be
specified without specifying a <child> type attribute.</p>
<p>An example of a UI definition fragment with GtkExpander:</p>
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8</pre></td>
<td class="listing_code"><pre class="programlisting"><span class="gtkdoc opt"><</span>object <span class="gtkdoc kwc">class</span><span class="gtkdoc opt">=</span><span class="string">"GtkExpander"</span><span class="gtkdoc opt">></span>
<span class="gtkdoc opt"><</span>child type<span class="gtkdoc opt">=</span><span class="string">"label"</span><span class="gtkdoc opt">></span>
<span class="gtkdoc opt"><</span>object <span class="gtkdoc kwc">class</span><span class="gtkdoc opt">=</span><span class="string">"GtkLabel"</span> id<span class="gtkdoc opt">=</span><span class="string">"expander-label"</span><span class="gtkdoc opt">/></span>
<span class="gtkdoc opt"></</span>child<span class="gtkdoc opt">></span>
<span class="gtkdoc opt"><</span>child<span class="gtkdoc opt">></span>
<span class="gtkdoc opt"><</span>object <span class="gtkdoc kwc">class</span><span class="gtkdoc opt">=</span><span class="string">"GtkEntry"</span> id<span class="gtkdoc opt">=</span><span class="string">"expander-content"</span><span class="gtkdoc opt">/></span>
<span class="gtkdoc opt"></</span>child<span class="gtkdoc opt">></span>
<span class="gtkdoc opt"></</span>object<span class="gtkdoc opt">></span></pre></td>
</tr>
</tbody>
</table>
</div>
<p></p>
</div>
<hr>
<div class="refsect2">
<a name="id-1.3.7.17.11.6"></a><h3>CSS nodes</h3>
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1
2
3
4
5</pre></td>
<td class="listing_code"><pre class="programlisting">expander
├── title
│ ├── arrow
│ ╰── <span class="gtkdoc opt"><</span>label widget<span class="gtkdoc opt">></span>
╰── <span class="gtkdoc opt"><</span>child<span class="gtkdoc opt">></span></pre></td>
</tr>
</tbody>
</table>
</div>
<p></p>
<p>GtkExpander has three CSS nodes, the main node with the name expander,
a subnode with name title and node below it with name arrow. Neither of
them is using any style classes.</p>
</div>
</div>
<div class="refsect1">
<a name="GtkExpander.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gtk-expander-new"></a><h3>gtk_expander_new ()</h3>
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
gtk_expander_new (<em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *label</code></em>);</pre>
<p>Creates a new expander using <em class="parameter"><code>label</code></em>
as the text of the label.</p>
<div class="refsect3">
<a name="gtk-expander-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>label</p></td>
<td class="parameter_description"><p>the text of the label</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-expander-new.returns"></a><h4>Returns</h4>
<p> a new <a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> widget.</p>
</div>
<p class="since">Since: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-expander-new-with-mnemonic"></a><h3>gtk_expander_new_with_mnemonic ()</h3>
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
gtk_expander_new_with_mnemonic (<em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *label</code></em>);</pre>
<p>Creates a new expander using <em class="parameter"><code>label</code></em>
as the text of the label.
If characters in <em class="parameter"><code>label</code></em>
are preceded by an underscore, they are underlined.
If you need a literal underscore character in a label, use “__” (two
underscores). The first underlined character represents a keyboard
accelerator called a mnemonic.
Pressing Alt and that key activates the button.</p>
<div class="refsect3">
<a name="gtk-expander-new-with-mnemonic.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>label</p></td>
<td class="parameter_description"><p> the text of the label with an underscore
in front of the mnemonic character. </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>
<div class="refsect3">
<a name="gtk-expander-new-with-mnemonic.returns"></a><h4>Returns</h4>
<p> a new <a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> widget.</p>
</div>
<p class="since">Since: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-expander-set-expanded"></a><h3>gtk_expander_set_expanded ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_expander_set_expanded (<em class="parameter"><code><a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> *expander</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> expanded</code></em>);</pre>
<p>Sets the state of the expander. Set to <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, if you want
the child widget to be revealed, and <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if you want the
child widget to be hidden.</p>
<div class="refsect3">
<a name="gtk-expander-set-expanded.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>expander</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>expanded</p></td>
<td class="parameter_description"><p>whether the child widget is revealed</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-expander-get-expanded"></a><h3>gtk_expander_get_expanded ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gtk_expander_get_expanded (<em class="parameter"><code><a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> *expander</code></em>);</pre>
<p>Queries a <a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> and returns its current state. Returns <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>
if the child widget is revealed.</p>
<p>See <a class="link" href="GtkExpander.html#gtk-expander-set-expanded" title="gtk_expander_set_expanded ()"><code class="function">gtk_expander_set_expanded()</code></a>.</p>
<div class="refsect3">
<a name="gtk-expander-get-expanded.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>expander</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-expander-get-expanded.returns"></a><h4>Returns</h4>
<p> the current state of the expander</p>
</div>
<p class="since">Since: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-expander-set-spacing"></a><h3>gtk_expander_set_spacing ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_expander_set_spacing (<em class="parameter"><code><a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> *expander</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>
<div class="warning">
<p><code class="literal">gtk_expander_set_spacing</code> has been deprecated since version 3.20 and should not be used in newly-written code.</p>
<p>Use margins on the child instead.</p>
</div>
<p>Sets the spacing field of <em class="parameter"><code>expander</code></em>
, which is the number of
pixels to place between expander and the child.</p>
<div class="refsect3">
<a name="gtk-expander-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>expander</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>spacing</p></td>
<td class="parameter_description"><p>distance between the expander and child in pixels</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-expander-get-spacing"></a><h3>gtk_expander_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_expander_get_spacing (<em class="parameter"><code><a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> *expander</code></em>);</pre>
<div class="warning">
<p><code class="literal">gtk_expander_get_spacing</code> has been deprecated since version 3.20 and should not be used in newly-written code.</p>
<p>Use margins on the child instead.</p>
</div>
<p>Gets the value set by <a class="link" href="GtkExpander.html#gtk-expander-set-spacing" title="gtk_expander_set_spacing ()"><code class="function">gtk_expander_set_spacing()</code></a>.</p>
<div class="refsect3">
<a name="gtk-expander-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>expander</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-expander-get-spacing.returns"></a><h4>Returns</h4>
<p> spacing between the expander and child</p>
</div>
<p class="since">Since: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-expander-set-label"></a><h3>gtk_expander_set_label ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_expander_set_label (<em class="parameter"><code><a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> *expander</code></em>,
<em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *label</code></em>);</pre>
<p>Sets the text of the label of the expander to <em class="parameter"><code>label</code></em>
.</p>
<p>This will also clear any previously set labels.</p>
<div class="refsect3">
<a name="gtk-expander-set-label.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>expander</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>label</p></td>
<td class="parameter_description"><p> a string. </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: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-expander-get-label"></a><h3>gtk_expander_get_label ()</h3>
<pre class="programlisting">const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gtk_expander_get_label (<em class="parameter"><code><a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> *expander</code></em>);</pre>
<p>Fetches the text from a label widget including any embedded
underlines indicating mnemonics and Pango markup, as set by
<a class="link" href="GtkExpander.html#gtk-expander-set-label" title="gtk_expander_set_label ()"><code class="function">gtk_expander_set_label()</code></a>. If the label text has not been set the
return value will be <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. This will be the case if you create an
empty button with <a class="link" href="GtkButton.html#gtk-button-new" title="gtk_button_new ()"><code class="function">gtk_button_new()</code></a> to use as a container.</p>
<p>Note that this function behaved differently in versions prior to
2.14 and used to return the label text stripped of embedded
underlines indicating mnemonics and Pango markup. This problem can
be avoided by fetching the label text directly from the label
widget.</p>
<div class="refsect3">
<a name="gtk-expander-get-label.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>expander</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-expander-get-label.returns"></a><h4>Returns</h4>
<p> The text of the label widget. This string is owned
by the widget and must not be modified or freed.</p>
</div>
<p class="since">Since: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-expander-set-use-underline"></a><h3>gtk_expander_set_use_underline ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_expander_set_use_underline (<em class="parameter"><code><a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> *expander</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> use_underline</code></em>);</pre>
<p>If true, an underline in the text of the expander label indicates
the next character should be used for the mnemonic accelerator key.</p>
<div class="refsect3">
<a name="gtk-expander-set-use-underline.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>expander</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>use_underline</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 underlines in the text indicate mnemonics</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-expander-get-use-underline"></a><h3>gtk_expander_get_use_underline ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gtk_expander_get_use_underline (<em class="parameter"><code><a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> *expander</code></em>);</pre>
<p>Returns whether an embedded underline in the expander label
indicates a mnemonic. See <a class="link" href="GtkExpander.html#gtk-expander-set-use-underline" title="gtk_expander_set_use_underline ()"><code class="function">gtk_expander_set_use_underline()</code></a>.</p>
<div class="refsect3">
<a name="gtk-expander-get-use-underline.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>expander</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-expander-get-use-underline.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 an embedded underline in the expander
label indicates the mnemonic accelerator keys</p>
</div>
<p class="since">Since: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-expander-set-use-markup"></a><h3>gtk_expander_set_use_markup ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_expander_set_use_markup (<em class="parameter"><code><a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> *expander</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> use_markup</code></em>);</pre>
<p>Sets whether the text of the label contains markup in
Pango’s text markup language.
See <a class="link" href="GtkLabel.html#gtk-label-set-markup" title="gtk_label_set_markup ()"><code class="function">gtk_label_set_markup()</code></a>.</p>
<div class="refsect3">
<a name="gtk-expander-set-use-markup.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>expander</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>use_markup</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 label’s text should be parsed for markup</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-expander-get-use-markup"></a><h3>gtk_expander_get_use_markup ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gtk_expander_get_use_markup (<em class="parameter"><code><a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> *expander</code></em>);</pre>
<p>Returns whether the label’s text is interpreted as marked up with
the Pango text markup language.
See <a class="link" href="GtkExpander.html#gtk-expander-set-use-markup" title="gtk_expander_set_use_markup ()"><code class="function">gtk_expander_set_use_markup()</code></a>.</p>
<div class="refsect3">
<a name="gtk-expander-get-use-markup.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>expander</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-expander-get-use-markup.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 label’s text will be parsed for markup</p>
</div>
<p class="since">Since: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-expander-set-label-widget"></a><h3>gtk_expander_set_label_widget ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_expander_set_label_widget (<em class="parameter"><code><a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> *expander</code></em>,
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *label_widget</code></em>);</pre>
<p>Set the label widget for the expander. This is the widget
that will appear embedded alongside the expander arrow.</p>
<div class="refsect3">
<a name="gtk-expander-set-label-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>expander</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>label_widget</p></td>
<td class="parameter_description"><p> the new label widget. </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: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-expander-get-label-widget"></a><h3>gtk_expander_get_label_widget ()</h3>
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
gtk_expander_get_label_widget (<em class="parameter"><code><a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> *expander</code></em>);</pre>
<p>Retrieves the label widget for the frame. See
<a class="link" href="GtkExpander.html#gtk-expander-set-label-widget" title="gtk_expander_set_label_widget ()"><code class="function">gtk_expander_set_label_widget()</code></a>.</p>
<div class="refsect3">
<a name="gtk-expander-get-label-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>expander</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-expander-get-label-widget.returns"></a><h4>Returns</h4>
<p> the label widget,
or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if there is none. </p>
<p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-expander-set-label-fill"></a><h3>gtk_expander_set_label_fill ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_expander_set_label_fill (<em class="parameter"><code><a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> *expander</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> label_fill</code></em>);</pre>
<p>Sets whether the label widget should fill all available
horizontal space allocated to <em class="parameter"><code>expander</code></em>
.</p>
<div class="refsect3">
<a name="gtk-expander-set-label-fill.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>expander</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>label_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 the label should should fill
all available horizontal space</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2.22</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-expander-get-label-fill"></a><h3>gtk_expander_get_label_fill ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gtk_expander_get_label_fill (<em class="parameter"><code><a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> *expander</code></em>);</pre>
<p>Returns whether the label widget will fill all available
horizontal space allocated to <em class="parameter"><code>expander</code></em>
.</p>
<div class="refsect3">
<a name="gtk-expander-get-label-fill.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>expander</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-expander-get-label-fill.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 label widget will fill all
available horizontal space</p>
</div>
<p class="since">Since: 2.22</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-expander-set-resize-toplevel"></a><h3>gtk_expander_set_resize_toplevel ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_expander_set_resize_toplevel (<em class="parameter"><code><a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> *expander</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> resize_toplevel</code></em>);</pre>
<p>Sets whether the expander will resize the toplevel widget
containing the expander upon resizing and collpasing.</p>
<div class="refsect3">
<a name="gtk-expander-set-resize-toplevel.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>expander</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>resize_toplevel</p></td>
<td class="parameter_description"><p>whether to resize the toplevel</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-3-2.html#api-index-3.2">3.2</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-expander-get-resize-toplevel"></a><h3>gtk_expander_get_resize_toplevel ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gtk_expander_get_resize_toplevel (<em class="parameter"><code><a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> *expander</code></em>);</pre>
<p>Returns whether the expander will resize the toplevel widget
containing the expander upon resizing and collpasing.</p>
<div class="refsect3">
<a name="gtk-expander-get-resize-toplevel.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>expander</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-expander-get-resize-toplevel.returns"></a><h4>Returns</h4>
<p> the “resize toplevel” setting.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-2.html#api-index-3.2">3.2</a></p>
</div>
</div>
<div class="refsect1">
<a name="GtkExpander.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GtkExpander-struct"></a><h3>struct GtkExpander</h3>
<pre class="programlisting">struct GtkExpander;</pre>
</div>
<hr>
<div class="refsect2">
<a name="GtkExpanderClass"></a><h3>struct GtkExpanderClass</h3>
<pre class="programlisting">struct GtkExpanderClass {
GtkBinClass parent_class;
/* Key binding signal; to get notification on the expansion
* state connect to notify:expanded.
*/
void (* activate) (GtkExpander *expander);
};
</pre>
<div class="refsect3">
<a name="GtkExpanderClass.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><tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GtkExpanderClass.activate"></a>activate</code></em> ()</p></td>
<td class="struct_member_description"><p>Keybinding signal is emitted when the user hits the Enter key.</p></td>
<td class="struct_member_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
</div>
<div class="refsect1">
<a name="GtkExpander.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="GtkExpander--expanded"></a><h3>The <code class="literal">“expanded”</code> property</h3>
<pre class="programlisting"> “expanded” <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
<p>Whether the expander has been opened to reveal the child widget.</p>
<p>Flags: Read / Write / Construct</p>
<p>Default value: FALSE</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkExpander--label"></a><h3>The <code class="literal">“label”</code> property</h3>
<pre class="programlisting"> “label” <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</pre>
<p>Text of the expander's label.</p>
<p>Flags: Read / Write / Construct</p>
<p>Default value: NULL</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkExpander--label-fill"></a><h3>The <code class="literal">“label-fill”</code> property</h3>
<pre class="programlisting"> “label-fill” <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
<p>Whether the label widget should fill all available horizontal space.</p>
<p>Flags: Read / Write / Construct</p>
<p>Default value: FALSE</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkExpander--label-widget"></a><h3>The <code class="literal">“label-widget”</code> property</h3>
<pre class="programlisting"> “label-widget” <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *</pre>
<p>A widget to display in place of the usual expander label.</p>
<p>Flags: Read / Write</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkExpander--resize-toplevel"></a><h3>The <code class="literal">“resize-toplevel”</code> property</h3>
<pre class="programlisting"> “resize-toplevel” <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
<p>When this property is <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, the expander will resize the toplevel
widget containing the expander upon expanding and collapsing.</p>
<p>Flags: Read / Write</p>
<p>Default value: FALSE</p>
<p class="since">Since: <a class="link" href="api-index-3-2.html#api-index-3.2">3.2</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GtkExpander--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>Space to put between the label and the child when the
expander is expanded.</p>
<div class="warning">
<p><code class="literal">GtkExpander:spacing</code> has been deprecated since version 3.20 and should not be used in newly-written code.</p>
<p>This property is deprecated and ignored.
Use margins on the child instead.</p>
</div>
<p>Flags: Read / Write</p>
<p>Allowed values: >= 0</p>
<p>Default value: 0</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkExpander--use-markup"></a><h3>The <code class="literal">“use-markup”</code> property</h3>
<pre class="programlisting"> “use-markup” <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
<p>The text of the label includes XML markup. See pango_parse_markup().</p>
<p>Flags: Read / Write / Construct</p>
<p>Default value: FALSE</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkExpander--use-underline"></a><h3>The <code class="literal">“use-underline”</code> property</h3>
<pre class="programlisting"> “use-underline” <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
<p>If set, an underline in the text indicates the next character should be used for the mnemonic accelerator key.</p>
<p>Flags: Read / Write / Construct</p>
<p>Default value: FALSE</p>
</div>
</div>
<div class="refsect1">
<a name="GtkExpander.style-property-details"></a><h2>Style Property Details</h2>
<div class="refsect2">
<a name="GtkExpander--s-expander-size"></a><h3>The <code class="literal">“expander-size”</code> style property</h3>
<pre class="programlisting"> “expander-size” <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre>
<p>The size of the expander arrow.</p>
<div class="warning">
<p><code class="literal">GtkExpander:expander-size</code> has been deprecated since version 3.20 and should not be used in newly-written code.</p>
<p>Use CSS min-width and min-height instead.</p>
</div>
<p>Flags: Read</p>
<p>Allowed values: >= 0</p>
<p>Default value: 10</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkExpander--s-expander-spacing"></a><h3>The <code class="literal">“expander-spacing”</code> style property</h3>
<pre class="programlisting"> “expander-spacing” <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre>
<p>Spaing around the expander arrow.</p>
<div class="warning">
<p><code class="literal">GtkExpander:expander-spacing</code> has been deprecated since version 3.20 and should not be used in newly-written code.</p>
<p>Use CSS margins instead, the value of this
style property is ignored.</p>
</div>
<p>Flags: Read</p>
<p>Allowed values: >= 0</p>
<p>Default value: 2</p>
</div>
</div>
<div class="refsect1">
<a name="GtkExpander.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2">
<a name="GtkExpander-activate"></a><h3>The <code class="literal">“activate”</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
user_function (<a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> *expander,
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data)</pre>
<p>Flags: <a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-ACTION:CAPS">Action</a></p>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.25.1</div>
</body>
</html>
|