~bratsche/ubuntu/maverick/gtk+2.0/menu-activation-fix

« back to all changes in this revision

Viewing changes to docs/reference/gtk/xml/gtkscalebutton.xml

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2007-06-13 10:00:13 UTC
  • mto: (72.2.1 lenny) (1.5.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 44.
  • Revision ID: james.westby@ubuntu.com-20070613100013-qstao3cwpm6xdlxc
Tags: upstream-2.11.2
ImportĀ upstreamĀ versionĀ 2.11.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<refentry id="GtkScaleButton">
 
2
<refmeta>
 
3
<refentrytitle role="top_of_page">GtkScaleButton</refentrytitle>
 
4
<manvolnum>3</manvolnum>
 
5
<refmiscinfo>GTK Library</refmiscinfo>
 
6
</refmeta>
 
7
 
 
8
<refnamediv>
 
9
<refname>GtkScaleButton</refname>
 
10
<refpurpose></refpurpose>
 
11
<!--[<xref linkend="desc" endterm="desc.title"/>]-->
 
12
</refnamediv>
 
13
 
 
14
<refsynopsisdiv role="synopsis">
 
15
<title role="synopsis.title">Synopsis</title>
 
16
 
 
17
<synopsis>
 
18
 
 
19
#include &lt;gtk/gtk.h&gt;
 
20
 
 
21
 
 
22
                    <link linkend="GtkScaleButton-struct">GtkScaleButton</link>;
 
23
<link linkend="GtkWidget">GtkWidget</link>*          <link linkend="gtk-scale-button-new">gtk_scale_button_new</link>                (<link linkend="GtkIconSize">GtkIconSize</link> size,
 
24
                                                         <link linkend="gdouble">gdouble</link> min,
 
25
                                                         <link linkend="gdouble">gdouble</link> max,
 
26
                                                         <link linkend="gdouble">gdouble</link> step,
 
27
                                                         const <link linkend="gchar">gchar</link> **icons);
 
28
<link linkend="void">void</link>                <link linkend="gtk-scale-button-set-adjustment">gtk_scale_button_set_adjustment</link>     (<link linkend="GtkScaleButton">GtkScaleButton</link> *button,
 
29
                                                         <link linkend="GtkAdjustment">GtkAdjustment</link> *adjustment);
 
30
<link linkend="void">void</link>                <link linkend="gtk-scale-button-set-icons">gtk_scale_button_set_icons</link>          (<link linkend="GtkScaleButton">GtkScaleButton</link> *button,
 
31
                                                         const <link linkend="gchar">gchar</link> **icons);
 
32
<link linkend="void">void</link>                <link linkend="gtk-scale-button-set-value">gtk_scale_button_set_value</link>          (<link linkend="GtkScaleButton">GtkScaleButton</link> *button,
 
33
                                                         <link linkend="gdouble">gdouble</link> value);
 
34
<link linkend="GtkAdjustment">GtkAdjustment</link>*      <link linkend="gtk-scale-button-get-adjustment">gtk_scale_button_get_adjustment</link>     (<link linkend="GtkScaleButton">GtkScaleButton</link> *button);
 
35
<link linkend="gdouble">gdouble</link>             <link linkend="gtk-scale-button-get-value">gtk_scale_button_get_value</link>          (<link linkend="GtkScaleButton">GtkScaleButton</link> *button);
 
36
 
 
37
 
 
38
</synopsis>
 
39
</refsynopsisdiv>
 
40
 
 
41
<refsect1 role="object_hierarchy">
 
42
<title role="object_hierarchy.title">Object Hierarchy</title>
 
43
<synopsis>
 
44
 
 
45
  <link linkend="GObject">GObject</link>
 
46
   +----<link linkend="GInitiallyUnowned">GInitiallyUnowned</link>
 
47
         +----<link linkend="GtkObject">GtkObject</link>
 
48
               +----<link linkend="GtkWidget">GtkWidget</link>
 
49
                     +----<link linkend="GtkContainer">GtkContainer</link>
 
50
                           +----<link linkend="GtkBin">GtkBin</link>
 
51
                                 +----<link linkend="GtkButton">GtkButton</link>
 
52
                                       +----GtkScaleButton
 
53
                                             +----<link linkend="GtkVolumeButton">GtkVolumeButton</link>
 
54
</synopsis>
 
55
 
 
56
</refsect1>
 
57
 
 
58
 
 
59
 
 
60
<refsect1 role="impl_interfaces">
 
61
<title role="impl_interfaces.title">Implemented Interfaces</title>
 
62
<para>
 
63
GtkScaleButton implements
 
64
 <link linkend="AtkImplementorIface">AtkImplementorIface</link>.</para>
 
65
 
 
66
</refsect1>
 
67
 
 
68
 
 
69
<refsect1 role="properties">
 
70
<title role="properties.title">Properties</title>
 
71
<synopsis>
 
72
 
 
73
  <link linkend="GtkScaleButton--adjustment">adjustment</link>               <link linkend="GtkAdjustment">GtkAdjustment</link>         : Read / Write
 
74
  <link linkend="GtkScaleButton--size">size</link>                     <link linkend="GtkIconSize">GtkIconSize</link>           : Read / Write
 
75
  <link linkend="GtkScaleButton--value">value</link>                    <link linkend="gdouble">gdouble</link>               : Read / Write
 
76
</synopsis>
 
77
</refsect1>
 
78
 
 
79
<refsect1 role="signal_proto">
 
80
<title role="signal_proto.title">Signals</title>
 
81
<synopsis>
 
82
 
 
83
  <link linkend="GtkScaleButton-popdown">popdown</link>                                        : Run Last / Action
 
84
  <link linkend="GtkScaleButton-popup">popup</link>                                          : Run Last / Action
 
85
  <link linkend="GtkScaleButton-value-changed">value-changed</link>                                  : Run Last
 
86
</synopsis>
 
87
</refsect1>
 
88
 
 
89
 
 
90
<refsect1 role="desc">
 
91
<title role="desc.title">Description</title>
 
92
<para>
 
93
 
 
94
</para>
 
95
</refsect1>
 
96
 
 
97
<refsect1 role="details">
 
98
<title role="details.title">Details</title>
 
99
<refsect2>
 
100
<title><anchor id="GtkScaleButton-struct" role="struct"/>GtkScaleButton</title>
 
101
<indexterm><primary>GtkScaleButton</primary></indexterm><programlisting>typedef struct _GtkScaleButton GtkScaleButton;</programlisting>
 
102
<para>
 
103
 
 
104
</para></refsect2>
 
105
<refsect2>
 
106
<title><anchor id="gtk-scale-button-new" role="function" condition="since:2.12"/>gtk_scale_button_new ()</title>
 
107
<indexterm role="2.12"><primary>gtk_scale_button_new</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link>*          gtk_scale_button_new                (<link linkend="GtkIconSize">GtkIconSize</link> size,
 
108
                                                         <link linkend="gdouble">gdouble</link> min,
 
109
                                                         <link linkend="gdouble">gdouble</link> max,
 
110
                                                         <link linkend="gdouble">gdouble</link> step,
 
111
                                                         const <link linkend="gchar">gchar</link> **icons);</programlisting>
 
112
<para>
 
113
Creates a <link linkend="GtkScaleButton"><type>GtkScaleButton</type></link>, with a range between <parameter>min</parameter> and <parameter>max</parameter>, with
 
114
a stepping of <parameter>step</parameter>.</para>
 
115
<para>
 
116
 
 
117
</para><variablelist role="params">
 
118
<varlistentry><term><parameter>size</parameter>&nbsp;:</term>
 
119
<listitem><simpara> a stock icon size
 
120
</simpara></listitem></varlistentry>
 
121
<varlistentry><term><parameter>min</parameter>&nbsp;:</term>
 
122
<listitem><simpara> the minimum value of the scale (usually 0)
 
123
</simpara></listitem></varlistentry>
 
124
<varlistentry><term><parameter>max</parameter>&nbsp;:</term>
 
125
<listitem><simpara> the maximum value of the scale (usually 100)
 
126
</simpara></listitem></varlistentry>
 
127
<varlistentry><term><parameter>step</parameter>&nbsp;:</term>
 
128
<listitem><simpara> the stepping of value when a scroll-wheel event,
 
129
       or up/down arrow event occurs (usually 2)
 
130
</simpara></listitem></varlistentry>
 
131
<varlistentry><term><parameter>icons</parameter>&nbsp;:</term>
 
132
<listitem><simpara> a <link linkend="NULL:CAPS"><literal>NULL</literal></link>-terminated array of icon names, or <link linkend="NULL:CAPS"><literal>NULL</literal></link> if
 
133
        you want to set the list later with <link linkend="gtk-scale-button-set-icons"><function>gtk_scale_button_set_icons()</function></link>
 
134
</simpara></listitem></varlistentry>
 
135
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a new <link linkend="GtkScaleButton"><type>GtkScaleButton</type></link>
 
136
 
 
137
</simpara></listitem></varlistentry>
 
138
</variablelist><para role="since">Since  2.12
 
139
</para></refsect2>
 
140
<refsect2>
 
141
<title><anchor id="gtk-scale-button-set-adjustment" role="function" condition="since:2.12"/>gtk_scale_button_set_adjustment ()</title>
 
142
<indexterm role="2.12"><primary>gtk_scale_button_set_adjustment</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_scale_button_set_adjustment     (<link linkend="GtkScaleButton">GtkScaleButton</link> *button,
 
143
                                                         <link linkend="GtkAdjustment">GtkAdjustment</link> *adjustment);</programlisting>
 
144
<para>
 
145
Sets the <link linkend="GtkAdjustment"><type>GtkAdjustment</type></link> to be used as a model for the <link linkend="GtkScaleButton"><type>GtkScaleButton</type></link>'s scale.
 
146
See <link linkend="gtk-range-set-adjustment"><function>gtk_range_set_adjustment()</function></link> for details.</para>
 
147
<para>
 
148
 
 
149
</para><variablelist role="params">
 
150
<varlistentry><term><parameter>button</parameter>&nbsp;:</term>
 
151
<listitem><simpara> a <link linkend="GtkScaleButton"><type>GtkScaleButton</type></link>
 
152
</simpara></listitem></varlistentry>
 
153
<varlistentry><term><parameter>adjustment</parameter>&nbsp;:</term>
 
154
<listitem><simpara> a <link linkend="GtkAdjustment"><type>GtkAdjustment</type></link>
 
155
</simpara></listitem></varlistentry>
 
156
</variablelist><para role="since">Since  2.12
 
157
</para></refsect2>
 
158
<refsect2>
 
159
<title><anchor id="gtk-scale-button-set-icons" role="function"/>gtk_scale_button_set_icons ()</title>
 
160
<indexterm><primary>gtk_scale_button_set_icons</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_scale_button_set_icons          (<link linkend="GtkScaleButton">GtkScaleButton</link> *button,
 
161
                                                         const <link linkend="gchar">gchar</link> **icons);</programlisting>
 
162
<para>
 
163
Sets the icons to be used by the scale button. The first item in the array 
 
164
will be used in the button when the current value is the lowest value, the 
 
165
second item for the highest value. All the subsequent icons will be used for 
 
166
all the other values, spread evenly over the range of values.
 
167
</para>
 
168
<para>
 
169
If there's only one icon in the <parameter>icons</parameter> array, it will be used for all the
 
170
values. If only two icons are in the <parameter>icons</parameter> array, the first one will be
 
171
used for the bottom 50% of the scale, and the second one for the top 50%.
 
172
So it is recommended to use at least 3 icons so that the <link linkend="GtkScaleButton"><type>GtkScaleButton</type></link>
 
173
reflects the current value of the scale better for the users.
 
174
</para>
 
175
<para>
 
176
Since 2.12</para>
 
177
<para>
 
178
 
 
179
</para><variablelist role="params">
 
180
<varlistentry><term><parameter>button</parameter>&nbsp;:</term>
 
181
<listitem><simpara> a <link linkend="GtkScaleButton"><type>GtkScaleButton</type></link>
 
182
</simpara></listitem></varlistentry>
 
183
<varlistentry><term><parameter>icons</parameter>&nbsp;:</term>
 
184
<listitem><simpara> a <link linkend="NULL:CAPS"><literal>NULL</literal></link>-terminated array of icon names
 
185
</simpara></listitem></varlistentry>
 
186
</variablelist></refsect2>
 
187
<refsect2>
 
188
<title><anchor id="gtk-scale-button-set-value" role="function" condition="since:2.12"/>gtk_scale_button_set_value ()</title>
 
189
<indexterm role="2.12"><primary>gtk_scale_button_set_value</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_scale_button_set_value          (<link linkend="GtkScaleButton">GtkScaleButton</link> *button,
 
190
                                                         <link linkend="gdouble">gdouble</link> value);</programlisting>
 
191
<para>
 
192
Sets the current value of the scale; if the value is outside the minimum or 
 
193
maximum range values, it will be clamped to fit inside them. The scale button 
 
194
emits the "value_changed" signal if the value changes.</para>
 
195
<para>
 
196
 
 
197
</para><variablelist role="params">
 
198
<varlistentry><term><parameter>button</parameter>&nbsp;:</term>
 
199
<listitem><simpara> a <link linkend="GtkScaleButton"><type>GtkScaleButton</type></link>
 
200
</simpara></listitem></varlistentry>
 
201
<varlistentry><term><parameter>value</parameter>&nbsp;:</term>
 
202
<listitem><simpara> new value of the scale button
 
203
</simpara></listitem></varlistentry>
 
204
</variablelist><para role="since">Since  2.12
 
205
</para></refsect2>
 
206
<refsect2>
 
207
<title><anchor id="gtk-scale-button-get-adjustment" role="function" condition="since:2.12"/>gtk_scale_button_get_adjustment ()</title>
 
208
<indexterm role="2.12"><primary>gtk_scale_button_get_adjustment</primary></indexterm><programlisting><link linkend="GtkAdjustment">GtkAdjustment</link>*      gtk_scale_button_get_adjustment     (<link linkend="GtkScaleButton">GtkScaleButton</link> *button);</programlisting>
 
209
<para>
 
210
Gets the <link linkend="GtkAdjustment"><type>GtkAdjustment</type></link> associated with the <link linkend="GtkScaleButton"><type>GtkScaleButton</type></link>'s scale.
 
211
See <link linkend="gtk-range-get-adjustment"><function>gtk_range_get_adjustment()</function></link> for details.</para>
 
212
<para>
 
213
 
 
214
</para><variablelist role="params">
 
215
<varlistentry><term><parameter>button</parameter>&nbsp;:</term>
 
216
<listitem><simpara> a <link linkend="GtkScaleButton"><type>GtkScaleButton</type></link>
 
217
</simpara></listitem></varlistentry>
 
218
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the adjustment associated with the scale
 
219
 
 
220
</simpara></listitem></varlistentry>
 
221
</variablelist><para role="since">Since  2.12
 
222
</para></refsect2>
 
223
<refsect2>
 
224
<title><anchor id="gtk-scale-button-get-value" role="function" condition="since:2.12"/>gtk_scale_button_get_value ()</title>
 
225
<indexterm role="2.12"><primary>gtk_scale_button_get_value</primary></indexterm><programlisting><link linkend="gdouble">gdouble</link>             gtk_scale_button_get_value          (<link linkend="GtkScaleButton">GtkScaleButton</link> *button);</programlisting>
 
226
<para>
 
227
Gets the current value of the scale button.</para>
 
228
<para>
 
229
 
 
230
</para><variablelist role="params">
 
231
<varlistentry><term><parameter>button</parameter>&nbsp;:</term>
 
232
<listitem><simpara> a <link linkend="GtkScaleButton"><type>GtkScaleButton</type></link>
 
233
</simpara></listitem></varlistentry>
 
234
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> current value of the scale button
 
235
 
 
236
</simpara></listitem></varlistentry>
 
237
</variablelist><para role="since">Since  2.12
 
238
</para></refsect2>
 
239
 
 
240
</refsect1>
 
241
<refsect1 role="property_details">
 
242
<title role="property_details.title">Property Details</title>
 
243
<refsect2><title><anchor id="GtkScaleButton--adjustment"/>The :<literal>adjustment</literal> property</title>
 
244
<indexterm><primary>GtkScaleButton:adjustment</primary></indexterm><programlisting>  adjustment               <link linkend="GtkAdjustment">GtkAdjustment</link>         : Read / Write</programlisting>
 
245
<para>The GtkAdjustment that contains the current value of this scale button object.</para></refsect2>
 
246
<refsect2><title><anchor id="GtkScaleButton--size"/>The :<literal>size</literal> property</title>
 
247
<indexterm><primary>GtkScaleButton:size</primary></indexterm><programlisting>  size                     <link linkend="GtkIconSize">GtkIconSize</link>           : Read / Write</programlisting>
 
248
<para>The icon size.</para><para>Default value: GTK_ICON_SIZE_SMALL_TOOLBAR</para>
 
249
</refsect2>
 
250
<refsect2><title><anchor id="GtkScaleButton--value"/>The :<literal>value</literal> property</title>
 
251
<indexterm><primary>GtkScaleButton:value</primary></indexterm><programlisting>  value                    <link linkend="gdouble">gdouble</link>               : Read / Write</programlisting>
 
252
<para>The value of the scale.</para><para>Default value: 0</para>
 
253
</refsect2>
 
254
 
 
255
</refsect1>
 
256
 
 
257
<refsect1 role="signals">
 
258
<title role="signals.title">Signal Details</title>
 
259
<refsect2><title><anchor id="GtkScaleButton-popdown"/>The <literal>::popdown</literal> signal</title>
 
260
<indexterm><primary>GtkScaleButton::popdown</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="GtkScaleButton">GtkScaleButton</link> *scalebutton,
 
261
                                                        <link linkend="gpointer">gpointer</link>        user_data)        : Run Last / Action</programlisting>
 
262
<para>
 
263
 
 
264
</para><variablelist role="params">
 
265
<varlistentry><term><parameter>scalebutton</parameter>&nbsp;:</term>
 
266
<listitem><simpara>the object which received the signal.
 
267
 
 
268
</simpara></listitem></varlistentry>
 
269
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
 
270
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
 
271
</variablelist></refsect2><refsect2><title><anchor id="GtkScaleButton-popup"/>The <literal>::popup</literal> signal</title>
 
272
<indexterm><primary>GtkScaleButton::popup</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="GtkScaleButton">GtkScaleButton</link> *scalebutton,
 
273
                                                        <link linkend="gpointer">gpointer</link>        user_data)        : Run Last / Action</programlisting>
 
274
<para>
 
275
 
 
276
</para><variablelist role="params">
 
277
<varlistentry><term><parameter>scalebutton</parameter>&nbsp;:</term>
 
278
<listitem><simpara>the object which received the signal.
 
279
 
 
280
</simpara></listitem></varlistentry>
 
281
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
 
282
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
 
283
</variablelist></refsect2><refsect2><title><anchor id="GtkScaleButton-value-changed"/>The <literal>::value-changed</literal> signal</title>
 
284
<indexterm role="2.12"><primary>GtkScaleButton::value-changed</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="GtkScaleButton">GtkScaleButton</link> *button,
 
285
                                                        <link linkend="gdouble">gdouble</link>         arg1,
 
286
                                                        <link linkend="gpointer">gpointer</link>        user_data)      : Run Last</programlisting>
 
287
<para>
 
288
Emitted when the value field has changed.</para>
 
289
<para>
 
290
 
 
291
</para><variablelist role="params">
 
292
<varlistentry><term><parameter>button</parameter>&nbsp;:</term>
 
293
<listitem><simpara> the object that received the signal
 
294
</simpara></listitem></varlistentry>
 
295
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
 
296
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
 
297
</variablelist><para>Since  2.12
 
298
 
 
299
</para></refsect2>
 
300
</refsect1>
 
301
 
 
302
 
 
303
 
 
304
</refentry>