gtk3/docs/reference/gtk/html/GtkExpander.html
2022-06-01 16:13:05 +01:00

1210 lines
59 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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.33.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_proto_type">
<col class="functions_proto_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">
<span class="returnvalue">gboolean</span>
</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">
<span class="returnvalue">gint</span>
</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 <span class="returnvalue">gchar</span> *
</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">
<span class="returnvalue">gboolean</span>
</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">
<span class="returnvalue">gboolean</span>
</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">
<span class="returnvalue">gboolean</span>
</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">
<span class="returnvalue">gboolean</span>
</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"><span class="type">gboolean</span></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">
<span class="type">char</span> *</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"><span class="type">gboolean</span></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"><span class="type">gboolean</span></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"><span class="type">int</span></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"><span class="type">gboolean</span></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"><span class="type">gboolean</span></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"><span class="type">int</span></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"><span class="type">int</span></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="signal_proto_type">
<col width="300px" class="signal_proto_name">
<col width="200px" class="signal_proto_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">Action</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="other_proto_type">
<col class="other_proto_name">
</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"> GObject
<span class="lineart">╰──</span> GInitiallyUnowned
<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 &lt;gtk/gtk.h&gt;
</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
25
26
27
28</pre></td>
<td class="listing_code"><pre class="programlisting"><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"></span>
<span class="nf">expander_callback</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">object</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="n">GParamSpec</span><span class="w"> </span><span class="o">*</span><span class="n">param_spec</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span><span class="w"></span>
<span class="p">{</span><span class="w"></span>
<span class="w"> </span><span class="n">GtkExpander</span><span class="w"> </span><span class="o">*</span><span class="n">expander</span><span class="p">;</span><span class="w"></span>
<span class="w"> </span><span class="n">expander</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GTK_EXPANDER</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">);</span><span class="w"></span>
<span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_expander_get_expanded</span><span class="w"> </span><span class="p">(</span><span class="n">expander</span><span class="p">))</span><span class="w"></span>
<span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w"> </span><span class="c1">// Show or create widgets</span>
<span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="w"> </span><span class="k">else</span><span class="w"></span>
<span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w"> </span><span class="c1">// Hide or destroy widgets</span>
<span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
<span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"></span>
<span class="nf">create_expander</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="w"></span>
<span class="p">{</span><span class="w"></span>
<span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">expander</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_expander_new_with_mnemonic</span><span class="w"> </span><span class="p">(</span><span class="s">&quot;_More Options&quot;</span><span class="p">);</span><span class="w"></span>
<span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">expander</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;notify::expanded&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">expander_callback</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span><span class="w"></span>
<span class="w"> </span><span class="c1">// ...</span>
<span class="p">}</span><span class="w"></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 <code class="literal">&lt;child&gt;</code> element. A normal content child can be
specified without specifying a <code class="literal">&lt;child&gt;</code> 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="o">&lt;</span><span class="n">object</span><span class="w"> </span><span class="n">class</span><span class="o">=</span><span class="s">&quot;GtkExpander&quot;</span><span class="o">&gt;</span><span class="w"></span>
<span class="w"> </span><span class="o">&lt;</span><span class="n">child</span><span class="w"> </span><span class="n">type</span><span class="o">=</span><span class="s">&quot;label&quot;</span><span class="o">&gt;</span><span class="w"></span>
<span class="w"> </span><span class="o">&lt;</span><span class="n">object</span><span class="w"> </span><span class="n">class</span><span class="o">=</span><span class="s">&quot;GtkLabel&quot;</span><span class="w"> </span><span class="n">id</span><span class="o">=</span><span class="s">&quot;expander-label&quot;</span><span class="o">/&gt;</span><span class="w"></span>
<span class="w"> </span><span class="o">&lt;/</span><span class="n">child</span><span class="o">&gt;</span><span class="w"></span>
<span class="w"> </span><span class="o">&lt;</span><span class="n">child</span><span class="o">&gt;</span><span class="w"></span>
<span class="w"> </span><span class="o">&lt;</span><span class="n">object</span><span class="w"> </span><span class="n">class</span><span class="o">=</span><span class="s">&quot;GtkEntry&quot;</span><span class="w"> </span><span class="n">id</span><span class="o">=</span><span class="s">&quot;expander-content&quot;</span><span class="o">/&gt;</span><span class="w"></span>
<span class="w"> </span><span class="o">&lt;/</span><span class="n">child</span><span class="o">&gt;</span><span class="w"></span>
<span class="o">&lt;/</span><span class="n">object</span><span class="o">&gt;</span><span class="w"></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"><span class="n">expander</span><span class="w"></span>
<span class="err">├──</span><span class="w"> </span><span class="n">title</span><span class="w"></span>
<span class="err"></span><span class="w"> </span><span class="err">├──</span><span class="w"> </span><span class="n">arrow</span><span class="w"></span>
<span class="err"></span><span class="w"> </span><span class="err">╰──</span><span class="w"> </span><span class="o">&lt;</span><span class="n">label</span><span class="w"> </span><span class="n">widget</span><span class="o">&gt;</span><span class="w"></span>
<span class="err">╰──</span><span class="w"> </span><span class="o">&lt;</span><span class="n">child</span><span class="o">&gt;</span><span class="w"></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. The arrow of an
expander that is showing its child gets the :checked pseudoclass added to it.</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 <span class="type">gchar</span> *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"><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>]</span></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 <span class="type">gchar</span> *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 may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</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><span class="type">gboolean</span> expanded</code></em>);</pre>
<p>Sets the state of the expander. Set to <code class="literal">TRUE</code>, if you want
the child widget to be revealed, and <code class="literal">FALSE</code> 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"><span class="returnvalue">gboolean</span>
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 <code class="literal">TRUE</code>
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><span class="type">gint</span> 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"><span class="returnvalue">gint</span>
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 <span class="type">gchar</span> *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 may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</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 <span class="returnvalue">gchar</span> *
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 <code class="literal">NULL</code>. 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>
<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>]</span></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><span class="type">gboolean</span> 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><code class="literal">TRUE</code> 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"><span class="returnvalue">gboolean</span>
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> <code class="literal">TRUE</code> 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><span class="type">gboolean</span> use_markup</code></em>);</pre>
<p>Sets whether the text of the label contains markup in
Pangos 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><code class="literal">TRUE</code> if the labels 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"><span class="returnvalue">gboolean</span>
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 labels 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> <code class="literal">TRUE</code> if the labels 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 may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</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 <code class="literal">NULL</code> 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="The data is owned by the callee, which is responsible of freeing it."><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><span class="type">gboolean</span> 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>
<p>Note that this function has no effect since 3.20.</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><code class="literal">TRUE</code> 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"><span class="returnvalue">gboolean</span>
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> <code class="literal">TRUE</code> 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><span class="type">gboolean</span> 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"><span class="returnvalue">gboolean</span>
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” <span class="type">gboolean</span></pre>
<p>Whether the expander has been opened to reveal the child widget.</p>
<p>Owner: GtkExpander</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” <span class="type">char</span> *</pre>
<p>Text of the expander's label.</p>
<p>Owner: GtkExpander</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” <span class="type">gboolean</span></pre>
<p>Whether the label widget should fill all available horizontal space.</p>
<p>Note that this property is ignored since 3.20.</p>
<p>Owner: GtkExpander</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>Owner: GtkExpander</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” <span class="type">gboolean</span></pre>
<p>When this property is <code class="literal">TRUE</code>, the expander will resize the toplevel
widget containing the expander upon expanding and collapsing.</p>
<p>Owner: GtkExpander</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” <span class="type">int</span></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>Owner: GtkExpander</p>
<p>Flags: Read / Write</p>
<p>Allowed values: &gt;= 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” <span class="type">gboolean</span></pre>
<p>The text of the label includes XML markup. See pango_parse_markup().</p>
<p>Owner: GtkExpander</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” <span class="type">gboolean</span></pre>
<p>If set, an underline in the text indicates the next character should be used for the mnemonic accelerator key.</p>
<p>Owner: GtkExpander</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” <span class="type">int</span></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>Owner: GtkExpander</p>
<p>Flags: Read</p>
<p>Allowed values: &gt;= 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” <span class="type">int</span></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>Owner: GtkExpander</p>
<p>Flags: Read</p>
<p>Allowed values: &gt;= 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,
<span class="type">gpointer</span> user_data)</pre>
<p>Flags: Action</p>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.33.1</div>
</body>
</html>