8
8
<link rel="up" href="DisplayWidgets.html" title="Display Widgets">
9
9
<link rel="prev" href="DisplayWidgets.html" title="Display Widgets">
10
10
<link rel="next" href="GtkImage.html" title="GtkImage">
11
<meta name="generator" content="GTK-Doc V1.17.1 (XML mode)">
11
<meta name="generator" content="GTK-Doc V1.17 (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">
47
47
#include <gtk/gtk.h>
49
49
struct <a class="link" href="GtkAccelLabel.html#GtkAccelLabel-struct" title="struct GtkAccelLabel">GtkAccelLabel</a>;
50
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> * <a class="link" href="GtkAccelLabel.html#gtk-accel-label-new" title="gtk_accel_label_new ()">gtk_accel_label_new</a> (<em class="parameter"><code>const <span class="type">gchar</span> *string</code></em>);
50
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> * <a class="link" href="GtkAccelLabel.html#gtk-accel-label-new" title="gtk_accel_label_new ()">gtk_accel_label_new</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> *string</code></em>);
51
51
<span class="returnvalue">void</span> <a class="link" href="GtkAccelLabel.html#gtk-accel-label-set-accel-closure" title="gtk_accel_label_set_accel_closure ()">gtk_accel_label_set_accel_closure</a> (<em class="parameter"><code><a class="link" href="GtkAccelLabel.html" title="GtkAccelLabel"><span class="type">GtkAccelLabel</span></a> *accel_label</code></em>,
52
<em class="parameter"><code><span class="type">GClosure</span> *accel_closure</code></em>);
52
<em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Closures.html#GClosure"><span class="type">GClosure</span></a> *accel_closure</code></em>);
53
53
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> * <a class="link" href="GtkAccelLabel.html#gtk-accel-label-get-accel-widget" title="gtk_accel_label_get_accel_widget ()">gtk_accel_label_get_accel_widget</a> (<em class="parameter"><code><a class="link" href="GtkAccelLabel.html" title="GtkAccelLabel"><span class="type">GtkAccelLabel</span></a> *accel_label</code></em>);
54
54
<span class="returnvalue">void</span> <a class="link" href="GtkAccelLabel.html#gtk-accel-label-set-accel-widget" title="gtk_accel_label_set_accel_widget ()">gtk_accel_label_set_accel_widget</a> (<em class="parameter"><code><a class="link" href="GtkAccelLabel.html" title="GtkAccelLabel"><span class="type">GtkAccelLabel</span></a> *accel_label</code></em>,
55
55
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *accel_widget</code></em>);
56
<span class="returnvalue">guint</span> <a class="link" href="GtkAccelLabel.html#gtk-accel-label-get-accel-width" title="gtk_accel_label_get_accel_width ()">gtk_accel_label_get_accel_width</a> (<em class="parameter"><code><a class="link" href="GtkAccelLabel.html" title="GtkAccelLabel"><span class="type">GtkAccelLabel</span></a> *accel_label</code></em>);
57
<span class="returnvalue">gboolean</span> <a class="link" href="GtkAccelLabel.html#gtk-accel-label-refetch" title="gtk_accel_label_refetch ()">gtk_accel_label_refetch</a> (<em class="parameter"><code><a class="link" href="GtkAccelLabel.html" title="GtkAccelLabel"><span class="type">GtkAccelLabel</span></a> *accel_label</code></em>);
56
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> <a class="link" href="GtkAccelLabel.html#gtk-accel-label-get-accel-width" title="gtk_accel_label_get_accel_width ()">gtk_accel_label_get_accel_width</a> (<em class="parameter"><code><a class="link" href="GtkAccelLabel.html" title="GtkAccelLabel"><span class="type">GtkAccelLabel</span></a> *accel_label</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="GtkAccelLabel.html#gtk-accel-label-refetch" title="gtk_accel_label_refetch ()">gtk_accel_label_refetch</a> (<em class="parameter"><code><a class="link" href="GtkAccelLabel.html" title="GtkAccelLabel"><span class="type">GtkAccelLabel</span></a> *accel_label</code></em>);
60
60
<div class="refsect1">
61
61
<a name="GtkAccelLabel.object-hierarchy"></a><h2>Object Hierarchy</h2>
62
62
<pre class="synopsis">
64
+----GInitiallyUnowned
63
<a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
64
+----<a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>
65
65
+----<a class="link" href="GtkObject.html" title="GtkObject">GtkObject</a>
66
66
+----<a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>
67
67
+----<a class="link" href="GtkMisc.html" title="GtkMisc">GtkMisc</a>
78
78
<div class="refsect1">
79
79
<a name="GtkAccelLabel.properties"></a><h2>Properties</h2>
80
80
<pre class="synopsis">
81
"<a class="link" href="GtkAccelLabel.html#GtkAccelLabel--accel-closure" title='The "accel-closure" property'>accel-closure</a>" <span class="type">GClosure</span>* : Read / Write
81
"<a class="link" href="GtkAccelLabel.html#GtkAccelLabel--accel-closure" title='The "accel-closure" property'>accel-closure</a>" <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Closures.html#GClosure"><span class="type">GClosure</span></a>* : Read / Write
82
82
"<a class="link" href="GtkAccelLabel.html#GtkAccelLabel--accel-widget" title='The "accel-widget" property'>accel-widget</a>" <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a>* : Read / Write
115
115
though it is almost always used to display just one accelerator key.
117
117
<div class="example">
118
<a name="id578844"></a><p class="title"><b>Example 11. Creating a simple menu item with an accelerator key.</b></p>
118
<a name="id576504"></a><p class="title"><b>Example 11. Creating a simple menu item with an accelerator key.</b></p>
119
119
<div class="example-contents">
120
120
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
155
155
<span class="comment"> GtkAccelLabel is automatically set up to display the GtkMenuItem</span>
156
156
<span class="comment"> accelerators. We just need to make sure we use GTK_ACCEL_VISIBLE here. */</span>
157
157
<span class="function"><a href="GtkWidget.html#gtk-widget-add-accelerator">gtk_widget_add_accelerator</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">save_item</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"activate"</span><span class="symbol">,</span><span class="normal"> accel_group</span><span class="symbol">,</span>
158
<span class="normal"> GDK_s</span><span class="symbol">,</span><span class="normal"> <a href="../gdk/gdk-Windows.html#GDK-CONTROL-MASK:CAPS">GDK_CONTROL_MASK</a></span><span class="symbol">,</span><span class="normal"> GTK_ACCEL_VISIBLE</span><span class="symbol">);</span></pre></td>
158
<span class="normal"> GDK_s</span><span class="symbol">,</span><span class="normal"> <a href="http://library.gnome.org/devel/gdk3/gdk-Windows.html#GDK-CONTROL-MASK:CAPS">GDK_CONTROL_MASK</a></span><span class="symbol">,</span><span class="normal"> GTK_ACCEL_VISIBLE</span><span class="symbol">);</span></pre></td>
179
179
<div class="refsect2">
180
180
<a name="gtk-accel-label-new"></a><h3>gtk_accel_label_new ()</h3>
181
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> * gtk_accel_label_new (<em class="parameter"><code>const <span class="type">gchar</span> *string</code></em>);</pre>
181
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> * gtk_accel_label_new (<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> *string</code></em>);</pre>
183
183
Creates a new <a class="link" href="GtkAccelLabel.html" title="GtkAccelLabel"><span class="type">GtkAccelLabel</span></a>.
189
189
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
190
<td>the label string. Must be non-<a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>.</td>
190
<td>the label string. Must be non-<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
193
193
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
200
200
<div class="refsect2">
201
201
<a name="gtk-accel-label-set-accel-closure"></a><h3>gtk_accel_label_set_accel_closure ()</h3>
202
202
<pre class="programlisting"><span class="returnvalue">void</span> gtk_accel_label_set_accel_closure (<em class="parameter"><code><a class="link" href="GtkAccelLabel.html" title="GtkAccelLabel"><span class="type">GtkAccelLabel</span></a> *accel_label</code></em>,
203
<em class="parameter"><code><span class="type">GClosure</span> *accel_closure</code></em>);</pre>
203
<em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Closures.html#GClosure"><span class="type">GClosure</span></a> *accel_closure</code></em>);</pre>
205
205
Sets the closure to be monitored by this accelerator label. The closure
206
206
must be connected to an accelerator group; see <a class="link" href="gtk-Keyboard-Accelerators.html#gtk-accel-group-connect" title="gtk_accel_group_connect ()"><code class="function">gtk_accel_group_connect()</code></a>.
240
240
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
241
<td>the object monitored by the accelerator label, or <a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
241
<td>the object monitored by the accelerator label, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
271
271
<div class="refsect2">
272
272
<a name="gtk-accel-label-get-accel-width"></a><h3>gtk_accel_label_get_accel_width ()</h3>
273
<pre class="programlisting"><span class="returnvalue">guint</span> gtk_accel_label_get_accel_width (<em class="parameter"><code><a class="link" href="GtkAccelLabel.html" title="GtkAccelLabel"><span class="type">GtkAccelLabel</span></a> *accel_label</code></em>);</pre>
273
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> gtk_accel_label_get_accel_width (<em class="parameter"><code><a class="link" href="GtkAccelLabel.html" title="GtkAccelLabel"><span class="type">GtkAccelLabel</span></a> *accel_label</code></em>);</pre>
275
275
Returns the width needed to display the accelerator key(s).
276
276
This is used by menus to align all of the <a class="link" href="GtkMenuItem.html" title="GtkMenuItem"><span class="type">GtkMenuItem</span></a> widgets, and shouldn't
294
294
<div class="refsect2">
295
295
<a name="gtk-accel-label-refetch"></a><h3>gtk_accel_label_refetch ()</h3>
296
<pre class="programlisting"><span class="returnvalue">gboolean</span> gtk_accel_label_refetch (<em class="parameter"><code><a class="link" href="GtkAccelLabel.html" title="GtkAccelLabel"><span class="type">GtkAccelLabel</span></a> *accel_label</code></em>);</pre>
296
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gtk_accel_label_refetch (<em class="parameter"><code><a class="link" href="GtkAccelLabel.html" title="GtkAccelLabel"><span class="type">GtkAccelLabel</span></a> *accel_label</code></em>);</pre>
298
298
Recreates the string representing the accelerator keys.
299
299
This should not be needed since the string is automatically updated whenever
318
318
<a name="GtkAccelLabel.property-details"></a><h2>Property Details</h2>
319
319
<div class="refsect2">
320
320
<a name="GtkAccelLabel--accel-closure"></a><h3>The <code class="literal">"accel-closure"</code> property</h3>
321
<pre class="programlisting"> "accel-closure" <span class="type">GClosure</span>* : Read / Write</pre>
321
<pre class="programlisting"> "accel-closure" <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Closures.html#GClosure"><span class="type">GClosure</span></a>* : Read / Write</pre>
322
322
<p>The closure to be monitored for accelerator changes.</p>