8
8
<link rel="up" href="ButtonWidgets.html" title="Buttons and Toggles">
9
9
<link rel="prev" href="GtkRadioButton.html" title="GtkRadioButton">
10
10
<link rel="next" href="GtkLinkButton.html" title="GtkLinkButton">
11
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
11
<meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
14
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
51
51
struct <a class="link" href="GtkToggleButton.html#GtkToggleButton-struct" title="struct GtkToggleButton">GtkToggleButton</a>;
52
52
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> * <a class="link" href="GtkToggleButton.html#gtk-toggle-button-new" title="gtk_toggle_button_new ()">gtk_toggle_button_new</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
53
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> * <a class="link" href="GtkToggleButton.html#gtk-toggle-button-new-with-label" title="gtk_toggle_button_new_with_label ()">gtk_toggle_button_new_with_label</a> (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *label</code></em>);
54
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> * <a class="link" href="GtkToggleButton.html#gtk-toggle-button-new-with-mnemonic" title="gtk_toggle_button_new_with_mnemonic ()">gtk_toggle_button_new_with_mnemonic</a> (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *label</code></em>);
53
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> * <a class="link" href="GtkToggleButton.html#gtk-toggle-button-new-with-label" title="gtk_toggle_button_new_with_label ()">gtk_toggle_button_new_with_label</a> (<em class="parameter"><code>const <span class="type">gchar</span> *label</code></em>);
54
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> * <a class="link" href="GtkToggleButton.html#gtk-toggle-button-new-with-mnemonic" title="gtk_toggle_button_new_with_mnemonic ()">gtk_toggle_button_new_with_mnemonic</a> (<em class="parameter"><code>const <span class="type">gchar</span> *label</code></em>);
55
55
<span class="returnvalue">void</span> <a class="link" href="GtkToggleButton.html#gtk-toggle-button-set-mode" title="gtk_toggle_button_set_mode ()">gtk_toggle_button_set_mode</a> (<em class="parameter"><code><a class="link" href="GtkToggleButton.html" title="GtkToggleButton"><span class="type">GtkToggleButton</span></a> *toggle_button</code></em>,
56
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> draw_indicator</code></em>);
57
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GtkToggleButton.html#gtk-toggle-button-get-mode" title="gtk_toggle_button_get_mode ()">gtk_toggle_button_get_mode</a> (<em class="parameter"><code><a class="link" href="GtkToggleButton.html" title="GtkToggleButton"><span class="type">GtkToggleButton</span></a> *toggle_button</code></em>);
56
<em class="parameter"><code><span class="type">gboolean</span> draw_indicator</code></em>);
57
<span class="returnvalue">gboolean</span> <a class="link" href="GtkToggleButton.html#gtk-toggle-button-get-mode" title="gtk_toggle_button_get_mode ()">gtk_toggle_button_get_mode</a> (<em class="parameter"><code><a class="link" href="GtkToggleButton.html" title="GtkToggleButton"><span class="type">GtkToggleButton</span></a> *toggle_button</code></em>);
58
58
#define <a class="link" href="GtkToggleButton.html#gtk-toggle-button-set-state" title="gtk_toggle_button_set_state">gtk_toggle_button_set_state</a>
59
59
<span class="returnvalue">void</span> <a class="link" href="GtkToggleButton.html#gtk-toggle-button-toggled" title="gtk_toggle_button_toggled ()">gtk_toggle_button_toggled</a> (<em class="parameter"><code><a class="link" href="GtkToggleButton.html" title="GtkToggleButton"><span class="type">GtkToggleButton</span></a> *toggle_button</code></em>);
60
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GtkToggleButton.html#gtk-toggle-button-get-active" title="gtk_toggle_button_get_active ()">gtk_toggle_button_get_active</a> (<em class="parameter"><code><a class="link" href="GtkToggleButton.html" title="GtkToggleButton"><span class="type">GtkToggleButton</span></a> *toggle_button</code></em>);
60
<span class="returnvalue">gboolean</span> <a class="link" href="GtkToggleButton.html#gtk-toggle-button-get-active" title="gtk_toggle_button_get_active ()">gtk_toggle_button_get_active</a> (<em class="parameter"><code><a class="link" href="GtkToggleButton.html" title="GtkToggleButton"><span class="type">GtkToggleButton</span></a> *toggle_button</code></em>);
61
61
<span class="returnvalue">void</span> <a class="link" href="GtkToggleButton.html#gtk-toggle-button-set-active" title="gtk_toggle_button_set_active ()">gtk_toggle_button_set_active</a> (<em class="parameter"><code><a class="link" href="GtkToggleButton.html" title="GtkToggleButton"><span class="type">GtkToggleButton</span></a> *toggle_button</code></em>,
62
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> is_active</code></em>);
63
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GtkToggleButton.html#gtk-toggle-button-get-inconsistent" title="gtk_toggle_button_get_inconsistent ()">gtk_toggle_button_get_inconsistent</a> (<em class="parameter"><code><a class="link" href="GtkToggleButton.html" title="GtkToggleButton"><span class="type">GtkToggleButton</span></a> *toggle_button</code></em>);
62
<em class="parameter"><code><span class="type">gboolean</span> is_active</code></em>);
63
<span class="returnvalue">gboolean</span> <a class="link" href="GtkToggleButton.html#gtk-toggle-button-get-inconsistent" title="gtk_toggle_button_get_inconsistent ()">gtk_toggle_button_get_inconsistent</a> (<em class="parameter"><code><a class="link" href="GtkToggleButton.html" title="GtkToggleButton"><span class="type">GtkToggleButton</span></a> *toggle_button</code></em>);
64
64
<span class="returnvalue">void</span> <a class="link" href="GtkToggleButton.html#gtk-toggle-button-set-inconsistent" title="gtk_toggle_button_set_inconsistent ()">gtk_toggle_button_set_inconsistent</a> (<em class="parameter"><code><a class="link" href="GtkToggleButton.html" title="GtkToggleButton"><span class="type">GtkToggleButton</span></a> *toggle_button</code></em>,
65
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> setting</code></em>);
65
<em class="parameter"><code><span class="type">gboolean</span> setting</code></em>);
68
68
<div class="refsect1">
88
88
<div class="refsect1">
89
89
<a name="GtkToggleButton.properties"></a><h2>Properties</h2>
90
90
<pre class="synopsis">
91
"<a class="link" href="GtkToggleButton.html#GtkToggleButton--active" title='The "active" property'>active</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write
92
"<a class="link" href="GtkToggleButton.html#GtkToggleButton--draw-indicator" title='The "draw-indicator" property'>draw-indicator</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write
93
"<a class="link" href="GtkToggleButton.html#GtkToggleButton--inconsistent" title='The "inconsistent" property'>inconsistent</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write
91
"<a class="link" href="GtkToggleButton.html#GtkToggleButton--active" title='The "active" property'>active</a>" <span class="type">gboolean</span> : Read / Write
92
"<a class="link" href="GtkToggleButton.html#GtkToggleButton--draw-indicator" title='The "draw-indicator" property'>draw-indicator</a>" <span class="type">gboolean</span> : Read / Write
93
"<a class="link" href="GtkToggleButton.html#GtkToggleButton--inconsistent" title='The "inconsistent" property'>inconsistent</a>" <span class="type">gboolean</span> : Read / Write
96
96
<div class="refsect1">
149
149
<span class="normal"> dialog </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="GtkDialog.html#gtk-dialog-new">gtk_dialog_new</a></span><span class="normal"> </span><span class="symbol">();</span>
150
150
<span class="normal"> toggle1 </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="GtkToggleButton.html#gtk-toggle-button-new-with-label">gtk_toggle_button_new_with_label</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"Hi, i'm a toggle button."</span><span class="symbol">);</span>
151
151
<span class="normal"> </span><span class="comment">/* Makes this toggle button invisible */</span>
152
<span class="normal"> </span><span class="function"><a href="GtkToggleButton.html#gtk-toggle-button-set-mode">gtk_toggle_button_set_mode</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function">GTK_TOGGLE_BUTTON</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">toggle1</span><span class="symbol">),</span><span class="normal"> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS">TRUE</a></span><span class="symbol">);</span>
152
<span class="normal"> </span><span class="function"><a href="GtkToggleButton.html#gtk-toggle-button-set-mode">gtk_toggle_button_set_mode</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function">GTK_TOGGLE_BUTTON</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">toggle1</span><span class="symbol">),</span><span class="normal"> TRUE</span><span class="symbol">);</span>
153
153
<span class="normal"> </span><span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#g-signal-connect">g_signal_connect</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">toggle1</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"toggled"</span><span class="symbol">,</span>
154
<span class="normal"> </span><span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Closures.html#G-CALLBACK:CAPS">G_CALLBACK</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">output_state</span><span class="symbol">),</span><span class="normal"> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span>
154
<span class="normal"> </span><span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Closures.html#G-CALLBACK:CAPS">G_CALLBACK</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">output_state</span><span class="symbol">),</span><span class="normal"> <a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS">NULL</a></span><span class="symbol">);</span>
155
155
<span class="normal"> </span><span class="function"><a href="GtkBox.html#gtk-box-pack-start">gtk_box_pack_start</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function">GTK_BOX</span><span class="normal"> </span><span class="symbol">(</span><span class="function">GTK_DIALOG</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">dialog</span><span class="symbol">)-></span><span class="normal">action_area</span><span class="symbol">),</span>
156
<span class="normal"> toggle1</span><span class="symbol">,</span><span class="normal"> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS">FALSE</a></span><span class="symbol">,</span><span class="normal"> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS">FALSE</a></span><span class="symbol">,</span><span class="normal"> </span><span class="number">2</span><span class="symbol">);</span>
156
<span class="normal"> toggle1</span><span class="symbol">,</span><span class="normal"> FALSE</span><span class="symbol">,</span><span class="normal"> FALSE</span><span class="symbol">,</span><span class="normal"> </span><span class="number">2</span><span class="symbol">);</span>
157
157
<span class="normal"> toggle2 </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="GtkToggleButton.html#gtk-toggle-button-new-with-label">gtk_toggle_button_new_with_label</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"Hi, i'm another toggle button."</span><span class="symbol">);</span>
158
<span class="normal"> </span><span class="function"><a href="GtkToggleButton.html#gtk-toggle-button-set-mode">gtk_toggle_button_set_mode</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function">GTK_TOGGLE_BUTTON</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">toggle2</span><span class="symbol">),</span><span class="normal"> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS">FALSE</a></span><span class="symbol">);</span>
158
<span class="normal"> </span><span class="function"><a href="GtkToggleButton.html#gtk-toggle-button-set-mode">gtk_toggle_button_set_mode</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function">GTK_TOGGLE_BUTTON</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">toggle2</span><span class="symbol">),</span><span class="normal"> FALSE</span><span class="symbol">);</span>
159
159
<span class="normal"> </span><span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#g-signal-connect">g_signal_connect</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">toggle2</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"toggled"</span><span class="symbol">,</span>
160
<span class="normal"> </span><span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Closures.html#G-CALLBACK:CAPS">G_CALLBACK</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">output_state</span><span class="symbol">),</span><span class="normal"> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span>
160
<span class="normal"> </span><span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Closures.html#G-CALLBACK:CAPS">G_CALLBACK</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">output_state</span><span class="symbol">),</span><span class="normal"> <a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS">NULL</a></span><span class="symbol">);</span>
161
161
<span class="normal"> </span><span class="function"><a href="GtkBox.html#gtk-box-pack-start">gtk_box_pack_start</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function">GTK_BOX</span><span class="normal"> </span><span class="symbol">(</span><span class="function">GTK_DIALOG</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">dialog</span><span class="symbol">)-></span><span class="normal">action_area</span><span class="symbol">),</span>
162
<span class="normal"> toggle2</span><span class="symbol">,</span><span class="normal"> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS">FALSE</a></span><span class="symbol">,</span><span class="normal"> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS">FALSE</a></span><span class="symbol">,</span><span class="normal"> </span><span class="number">2</span><span class="symbol">);</span>
162
<span class="normal"> toggle2</span><span class="symbol">,</span><span class="normal"> FALSE</span><span class="symbol">,</span><span class="normal"> FALSE</span><span class="symbol">,</span><span class="normal"> </span><span class="number">2</span><span class="symbol">);</span>
163
163
<span class="normal"> </span><span class="function"><a href="GtkWidget.html#gtk-widget-show-all">gtk_widget_show_all</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">dialog</span><span class="symbol">);</span>
164
164
<span class="cbracket">}</span></pre></td>
225
225
<div class="refsect2">
226
226
<a name="gtk-toggle-button-new-with-mnemonic"></a><h3>gtk_toggle_button_new_with_mnemonic ()</h3>
227
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> * gtk_toggle_button_new_with_mnemonic (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *label</code></em>);</pre>
227
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> * gtk_toggle_button_new_with_mnemonic (<em class="parameter"><code>const <span class="type">gchar</span> *label</code></em>);</pre>
229
229
Creates a new <a class="link" href="GtkToggleButton.html" title="GtkToggleButton"><span class="type">GtkToggleButton</span></a> containing a label. The label
230
230
will be created using <a class="link" href="GtkLabel.html#gtk-label-new-with-mnemonic" title="gtk_label_new_with_mnemonic ()"><code class="function">gtk_label_new_with_mnemonic()</code></a>, so underscores
253
253
<div class="refsect2">
254
254
<a name="gtk-toggle-button-set-mode"></a><h3>gtk_toggle_button_set_mode ()</h3>
255
255
<pre class="programlisting"><span class="returnvalue">void</span> gtk_toggle_button_set_mode (<em class="parameter"><code><a class="link" href="GtkToggleButton.html" title="GtkToggleButton"><span class="type">GtkToggleButton</span></a> *toggle_button</code></em>,
256
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> draw_indicator</code></em>);</pre>
256
<em class="parameter"><code><span class="type">gboolean</span> draw_indicator</code></em>);</pre>
258
258
Sets whether the button is displayed as a separate indicator and label.
259
259
You can call this function on a checkbutton or a radiobutton with
260
<em class="parameter"><code>draw_indicator</code></em> = <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> to make the button look like a normal button
260
<em class="parameter"><code>draw_indicator</code></em> = <code class="literal">FALSE</code> to make the button look like a normal button
263
263
This function only affects instances of classes like <a class="link" href="GtkCheckButton.html" title="GtkCheckButton"><span class="type">GtkCheckButton</span></a>
279
279
<td><p><span class="term"><em class="parameter"><code>draw_indicator</code></em> :</span></p></td>
280
<td>if <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, draw the button as a separate indicator
281
and label; if <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>, draw the button like a normal button</td>
280
<td>if <code class="literal">TRUE</code>, draw the button as a separate indicator
281
and label; if <code class="literal">FALSE</code>, draw the button like a normal button</td>
287
287
<div class="refsect2">
288
288
<a name="gtk-toggle-button-get-mode"></a><h3>gtk_toggle_button_get_mode ()</h3>
289
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gtk_toggle_button_get_mode (<em class="parameter"><code><a class="link" href="GtkToggleButton.html" title="GtkToggleButton"><span class="type">GtkToggleButton</span></a> *toggle_button</code></em>);</pre>
289
<pre class="programlisting"><span class="returnvalue">gboolean</span> gtk_toggle_button_get_mode (<em class="parameter"><code><a class="link" href="GtkToggleButton.html" title="GtkToggleButton"><span class="type">GtkToggleButton</span></a> *toggle_button</code></em>);</pre>
291
291
Retrieves whether the button is displayed as a separate indicator
292
292
and label. See <a class="link" href="GtkToggleButton.html#gtk-toggle-button-set-mode" title="gtk_toggle_button_set_mode ()"><code class="function">gtk_toggle_button_set_mode()</code></a>.
348
348
<div class="refsect2">
349
349
<a name="gtk-toggle-button-get-active"></a><h3>gtk_toggle_button_get_active ()</h3>
350
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gtk_toggle_button_get_active (<em class="parameter"><code><a class="link" href="GtkToggleButton.html" title="GtkToggleButton"><span class="type">GtkToggleButton</span></a> *toggle_button</code></em>);</pre>
350
<pre class="programlisting"><span class="returnvalue">gboolean</span> gtk_toggle_button_get_active (<em class="parameter"><code><a class="link" href="GtkToggleButton.html" title="GtkToggleButton"><span class="type">GtkToggleButton</span></a> *toggle_button</code></em>);</pre>
352
Queries a <a class="link" href="GtkToggleButton.html" title="GtkToggleButton"><span class="type">GtkToggleButton</span></a> and returns its current state. Returns <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if
353
the toggle button is pressed in and <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if it is raised.
352
Queries a <a class="link" href="GtkToggleButton.html" title="GtkToggleButton"><span class="type">GtkToggleButton</span></a> and returns its current state. Returns <code class="literal">TRUE</code> if
353
the toggle button is pressed in and <code class="literal">FALSE</code> if it is raised.
355
355
<div class="variablelist"><table border="0" class="variablelist">
373
373
<div class="refsect2">
374
374
<a name="gtk-toggle-button-set-active"></a><h3>gtk_toggle_button_set_active ()</h3>
375
375
<pre class="programlisting"><span class="returnvalue">void</span> gtk_toggle_button_set_active (<em class="parameter"><code><a class="link" href="GtkToggleButton.html" title="GtkToggleButton"><span class="type">GtkToggleButton</span></a> *toggle_button</code></em>,
376
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> is_active</code></em>);</pre>
376
<em class="parameter"><code><span class="type">gboolean</span> is_active</code></em>);</pre>
378
Sets the status of the toggle button. Set to <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if you want the
379
GtkToggleButton to be 'pressed in', and <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> to raise it.
378
Sets the status of the toggle button. Set to <code class="literal">TRUE</code> if you want the
379
GtkToggleButton to be 'pressed in', and <code class="literal">FALSE</code> to raise it.
380
380
This action causes the toggled signal to be emitted.
382
382
<div class="variablelist"><table border="0" class="variablelist">
427
427
<div class="refsect2">
428
428
<a name="gtk-toggle-button-set-inconsistent"></a><h3>gtk_toggle_button_set_inconsistent ()</h3>
429
429
<pre class="programlisting"><span class="returnvalue">void</span> gtk_toggle_button_set_inconsistent (<em class="parameter"><code><a class="link" href="GtkToggleButton.html" title="GtkToggleButton"><span class="type">GtkToggleButton</span></a> *toggle_button</code></em>,
430
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> setting</code></em>);</pre>
430
<em class="parameter"><code><span class="type">gboolean</span> setting</code></em>);</pre>
432
432
If the user has selected a range of elements (such as some text or
433
433
spreadsheet cells) that are affected by a toggle button, and the
462
462
<a name="GtkToggleButton.property-details"></a><h2>Property Details</h2>
463
463
<div class="refsect2">
464
464
<a name="GtkToggleButton--active"></a><h3>The <code class="literal">"active"</code> property</h3>
465
<pre class="programlisting"> "active" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write</pre>
465
<pre class="programlisting"> "active" <span class="type">gboolean</span> : Read / Write</pre>
466
466
<p>If the toggle button should be pressed in or not.</p>
467
467
<p>Default value: FALSE</p>
470
470
<div class="refsect2">
471
471
<a name="GtkToggleButton--draw-indicator"></a><h3>The <code class="literal">"draw-indicator"</code> property</h3>
472
<pre class="programlisting"> "draw-indicator" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write</pre>
472
<pre class="programlisting"> "draw-indicator" <span class="type">gboolean</span> : Read / Write</pre>
473
473
<p>If the toggle part of the button is displayed.</p>
474
474
<p>Default value: FALSE</p>
477
477
<div class="refsect2">
478
478
<a name="GtkToggleButton--inconsistent"></a><h3>The <code class="literal">"inconsistent"</code> property</h3>
479
<pre class="programlisting"> "inconsistent" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write</pre>
479
<pre class="programlisting"> "inconsistent" <span class="type">gboolean</span> : Read / Write</pre>
480
480
<p>If the toggle button is in an "in between" state.</p>
481
481
<p>Default value: FALSE</p>
486
486
<div class="refsect2">
487
487
<a name="GtkToggleButton-toggled"></a><h3>The <code class="literal">"toggled"</code> signal</h3>
488
488
<pre class="programlisting"><span class="returnvalue">void</span> user_function (<a class="link" href="GtkToggleButton.html" title="GtkToggleButton"><span class="type">GtkToggleButton</span></a> *togglebutton,
489
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data) : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS"><code class="literal">Run First</code></a></pre>
489
<span class="type">gpointer</span> user_data) : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS"><code class="literal">Run First</code></a></pre>
491
491
Should be connected if you wish to perform an action whenever the
492
492
<a class="link" href="GtkToggleButton.html" title="GtkToggleButton"><span class="type">GtkToggleButton</span></a>'s state is changed.