~canonical-dx-team/ubuntu/maverick/gtk+2.0/menuproxy

« back to all changes in this revision

Viewing changes to docs/reference/gtk/html/GtkToggleButton.html

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Dröge
  • Date: 2010-06-11 12:19:30 UTC
  • mfrom: (1.11.6 upstream)
  • mto: This revision was merged to the branch mainline in revision 175.
  • Revision ID: james.westby@ubuntu.com-20100611121930-n4pklvkoqdsg12vm
Tags: 2.21.2-1
* New upstream development release:
  + debian/rules,
    debian/libgtk2.0-0.symbols:
    - Update for new API symbols.
  + debian/patches/070_mandatory-relibtoolize.patch:
    - Regenerated for the new version.
  + debian/control.in:
    - Update GLib (build-) dependency to >= 2.25.8.

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
 
51
51
                    <a class="link" href="GtkToggleButton.html#GtkToggleButton-struct" title="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="/usr/share/gtk-doc/html/glib/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="/usr/share/gtk-doc/html/glib/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 <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>);
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="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> draw_indicator</code></em>);
57
 
<a href="/usr/share/gtk-doc/html/glib/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><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>);
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="/usr/share/gtk-doc/html/glib/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
<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>);
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="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> is_active</code></em>);
63
 
<a href="/usr/share/gtk-doc/html/glib/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><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>);
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="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> setting</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>);
66
66
</pre>
67
67
</div>
68
68
<div class="refsect1" title="Object Hierarchy">
69
69
<a name="GtkToggleButton.object-hierarchy"></a><h2>Object Hierarchy</h2>
70
70
<pre class="synopsis">
71
 
  <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a>
72
 
   +----<a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>
 
71
  <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
 
72
   +----<a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>
73
73
         +----<a class="link" href="GtkObject.html" title="GtkObject">GtkObject</a>
74
74
               +----<a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>
75
75
                     +----<a class="link" href="GtkContainer.html" title="GtkContainer">GtkContainer</a>
88
88
<div class="refsect1" title="Properties">
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="/usr/share/gtk-doc/html/glib/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="/usr/share/gtk-doc/html/glib/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="/usr/share/gtk-doc/html/glib/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>"                   <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
94
94
</pre>
95
95
</div>
96
96
<div class="refsect1" title="Signals">
121
121
To simply switch the state of a toggle button, use gtk_toggle_button_toggled.
122
122
</p>
123
123
<div class="example">
124
 
<a name="id763258"></a><p class="title"><b>Example 16. Creating two <span class="structname">GtkToggleButton</span> widgets.</b></p>
 
124
<a name="id646319"></a><p class="title"><b>Example 16. Creating two <span class="structname">GtkToggleButton</span> widgets.</b></p>
125
125
<div class="example-contents">
126
126
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
127
127
    <tbody>
145
145
17
146
146
18</pre></td>
147
147
        <td class="listing_code"><pre class="programlisting"><span class="type">void</span><span class="normal"> </span><span class="function">make_toggles</span><span class="normal"> </span><span class="symbol">(</span><span class="type">void</span><span class="symbol">)</span><span class="normal"> </span><span class="cbracket">{</span>
148
 
<span class="normal">   <a href="GtkWidget.html">GtkWidget</a> </span><span class="symbol">*</span><span class="normal">dialog</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">toggle1</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">toggle2</span><span class="symbol">;</span>
 
148
<span class="normal">   </span><span class="usertype">GtkWidget</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">dialog</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">toggle1</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">toggle2</span><span class="symbol">;</span>
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="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS">TRUE</a></span><span class="symbol">);</span>
153
 
<span class="normal">   </span><span class="function"><a href="/usr/share/gtk-doc/html/gobject/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="/usr/share/gtk-doc/html/gobject/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="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS">NULL</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"> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS">TRUE</a></span><span class="symbol">);</span>
 
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>
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">)-&gt;</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="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS">FALSE</a></span><span class="symbol">,</span><span class="normal"> <a href="/usr/share/gtk-doc/html/glib/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"> <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>
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="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS">FALSE</a></span><span class="symbol">);</span>
159
 
<span class="normal">   </span><span class="function"><a href="/usr/share/gtk-doc/html/gobject/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="/usr/share/gtk-doc/html/gobject/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="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS">NULL</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"> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS">FALSE</a></span><span class="symbol">);</span>
 
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>
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">)-&gt;</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="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS">FALSE</a></span><span class="symbol">,</span><span class="normal"> <a href="/usr/share/gtk-doc/html/glib/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"> <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>
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>
165
165
      </tr>
198
198
<hr>
199
199
<div class="refsect2" title="gtk_toggle_button_new_with_label ()">
200
200
<a name="gtk-toggle-button-new-with-label"></a><h3>gtk_toggle_button_new_with_label ()</h3>
201
 
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a>*          gtk_toggle_button_new_with_label    (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *label</code></em>);</pre>
 
201
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a>*          gtk_toggle_button_new_with_label    (<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>
202
202
<p>
203
203
Creates a new toggle button with a text label.
204
204
</p>
221
221
<hr>
222
222
<div class="refsect2" title="gtk_toggle_button_new_with_mnemonic ()">
223
223
<a name="gtk-toggle-button-new-with-mnemonic"></a><h3>gtk_toggle_button_new_with_mnemonic ()</h3>
224
 
<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="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *label</code></em>);</pre>
 
224
<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>
225
225
<p>
226
226
Creates a new <a class="link" href="GtkToggleButton.html" title="GtkToggleButton"><span class="type">GtkToggleButton</span></a> containing a label. The label
227
227
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
248
248
<div class="refsect2" title="gtk_toggle_button_set_mode ()">
249
249
<a name="gtk-toggle-button-set-mode"></a><h3>gtk_toggle_button_set_mode ()</h3>
250
250
<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>,
251
 
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> draw_indicator</code></em>);</pre>
 
251
                                                         <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>
252
252
<p>
253
253
Sets whether the button is displayed as a separate indicator and label.
254
254
You can call this function on a checkbutton or a radiobutton with
255
 
<em class="parameter"><code>draw_indicator</code></em> = <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> to make the button look like a normal button
 
255
<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
256
256
</p>
257
257
<p>
258
258
This function only affects instances of classes like <a class="link" href="GtkCheckButton.html" title="GtkCheckButton"><span class="type">GtkCheckButton</span></a>
269
269
</tr>
270
270
<tr>
271
271
<td><p><span class="term"><em class="parameter"><code>draw_indicator</code></em> :</span></p></td>
272
 
<td>if <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, draw the button as a separate indicator
273
 
and label; if <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>, draw the button like a normal button
 
272
<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
 
273
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
274
274
</td>
275
275
</tr>
276
276
</tbody>
279
279
<hr>
280
280
<div class="refsect2" title="gtk_toggle_button_get_mode ()">
281
281
<a name="gtk-toggle-button-get-mode"></a><h3>gtk_toggle_button_get_mode ()</h3>
282
 
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/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>
 
282
<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>
283
283
<p>
284
284
Retrieves whether the button is displayed as a separate indicator
285
285
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>.
294
294
</tr>
295
295
<tr>
296
296
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
297
 
<td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the togglebutton is drawn as a separate indicator
 
297
<td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the togglebutton is drawn as a separate indicator
298
298
  and label.
299
299
</td>
300
300
</tr>
335
335
<hr>
336
336
<div class="refsect2" title="gtk_toggle_button_get_active ()">
337
337
<a name="gtk-toggle-button-get-active"></a><h3>gtk_toggle_button_get_active ()</h3>
338
 
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/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>
 
338
<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>
339
339
<p>
340
 
Queries a <a class="link" href="GtkToggleButton.html" title="GtkToggleButton"><span class="type">GtkToggleButton</span></a> and returns its current state. Returns <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if
341
 
the toggle button is pressed in and <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if it is raised.
 
340
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
 
341
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.
342
342
</p>
343
343
<div class="variablelist"><table border="0">
344
344
<col align="left" valign="top">
350
350
</tr>
351
351
<tr>
352
352
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
353
 
<td>a <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> value.
 
353
<td>a <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> value.
354
354
</td>
355
355
</tr>
356
356
</tbody>
360
360
<div class="refsect2" title="gtk_toggle_button_set_active ()">
361
361
<a name="gtk-toggle-button-set-active"></a><h3>gtk_toggle_button_set_active ()</h3>
362
362
<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>,
363
 
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> is_active</code></em>);</pre>
 
363
                                                         <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>
364
364
<p>
365
 
Sets the status of the toggle button. Set to <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if you want the
366
 
GtkToggleButton to be 'pressed in', and <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> to raise it.
 
365
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
 
366
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.
367
367
This action causes the toggled signal to be emitted.
368
368
</p>
369
369
<div class="variablelist"><table border="0">
377
377
<tr>
378
378
<td><p><span class="term"><em class="parameter"><code>is_active</code></em> :</span></p></td>
379
379
<td>
380
 
<a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.
 
380
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.
381
381
</td>
382
382
</tr>
383
383
</tbody>
386
386
<hr>
387
387
<div class="refsect2" title="gtk_toggle_button_get_inconsistent ()">
388
388
<a name="gtk-toggle-button-get-inconsistent"></a><h3>gtk_toggle_button_get_inconsistent ()</h3>
389
 
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gtk_toggle_button_get_inconsistent  (<em class="parameter"><code><a class="link" href="GtkToggleButton.html" title="GtkToggleButton"><span class="type">GtkToggleButton</span></a> *toggle_button</code></em>);</pre>
 
389
<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_inconsistent  (<em class="parameter"><code><a class="link" href="GtkToggleButton.html" title="GtkToggleButton"><span class="type">GtkToggleButton</span></a> *toggle_button</code></em>);</pre>
390
390
<p>
391
391
Gets the value set by <a class="link" href="GtkToggleButton.html#gtk-toggle-button-set-inconsistent" title="gtk_toggle_button_set_inconsistent ()"><code class="function">gtk_toggle_button_set_inconsistent()</code></a>.
392
392
</p>
400
400
</tr>
401
401
<tr>
402
402
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
403
 
<td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the button is displayed as inconsistent, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise
 
403
<td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the button is displayed as inconsistent, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise
404
404
</td>
405
405
</tr>
406
406
</tbody>
410
410
<div class="refsect2" title="gtk_toggle_button_set_inconsistent ()">
411
411
<a name="gtk-toggle-button-set-inconsistent"></a><h3>gtk_toggle_button_set_inconsistent ()</h3>
412
412
<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>,
413
 
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> setting</code></em>);</pre>
 
413
                                                         <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>
414
414
<p>
415
415
If the user has selected a range of elements (such as some text or
416
416
spreadsheet cells) that are affected by a toggle button, and the
432
432
<tr>
433
433
<td><p><span class="term"><em class="parameter"><code>setting</code></em> :</span></p></td>
434
434
<td>
435
 
<a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if state is inconsistent
 
435
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if state is inconsistent
436
436
</td>
437
437
</tr>
438
438
</tbody>
443
443
<a name="GtkToggleButton.property-details"></a><h2>Property Details</h2>
444
444
<div class="refsect2" title='The "active" property'>
445
445
<a name="GtkToggleButton--active"></a><h3>The <code class="literal">"active"</code> property</h3>
446
 
<pre class="programlisting">  "active"                   <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write</pre>
 
446
<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>
447
447
<p>If the toggle button should be pressed in or not.</p>
448
448
<p>Default value: FALSE</p>
449
449
</div>
450
450
<hr>
451
451
<div class="refsect2" title='The "draw-indicator" property'>
452
452
<a name="GtkToggleButton--draw-indicator"></a><h3>The <code class="literal">"draw-indicator"</code> property</h3>
453
 
<pre class="programlisting">  "draw-indicator"           <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write</pre>
 
453
<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>
454
454
<p>If the toggle part of the button is displayed.</p>
455
455
<p>Default value: FALSE</p>
456
456
</div>
457
457
<hr>
458
458
<div class="refsect2" title='The "inconsistent" property'>
459
459
<a name="GtkToggleButton--inconsistent"></a><h3>The <code class="literal">"inconsistent"</code> property</h3>
460
 
<pre class="programlisting">  "inconsistent"             <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write</pre>
 
460
<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>
461
461
<p>If the toggle button is in an "in between" state.</p>
462
462
<p>Default value: FALSE</p>
463
463
</div>
467
467
<div class="refsect2" title='The "toggled" signal'>
468
468
<a name="GtkToggleButton-toggled"></a><h3>The <code class="literal">"toggled"</code> signal</h3>
469
469
<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,
470
 
                                                        <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>         user_data)         : Run First</pre>
 
470
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>         user_data)         : Run First</pre>
471
471
<p>
472
472
Should be connected if you wish to perform an action whenever the
473
473
<a class="link" href="GtkToggleButton.html" title="GtkToggleButton"><span class="type">GtkToggleButton</span></a>'s state is changed.