~ubuntu-branches/ubuntu/trusty/gimp/trusty

« back to all changes in this revision

Viewing changes to devel-docs/libgimpwidgets/xml/gimpcolorbutton.xml

  • Committer: Bazaar Package Importer
  • Author(s): Ari Pollak
  • Date: 2009-08-14 09:57:17 UTC
  • mto: (1.1.21 upstream) (0.1.5 squeeze)
  • mto: This revision was merged to the branch mainline in revision 48.
  • Revision ID: james.westby@ubuntu.com-20090814095717-37dh2xqy5t0rurpk
ImportĀ upstreamĀ versionĀ 2.6.7

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
<refnamediv>
13
13
<refname>GimpColorButton</refname>
14
14
<refpurpose>Widget for selecting a color from a simple button.</refpurpose>
15
 
<!--[<xref linkend="desc" endterm="desc.title"/>]-->
16
15
</refnamediv>
17
16
 
18
17
<refsynopsisdiv id="GimpColorButton.synopsis" role="synopsis">
20
19
 
21
20
<synopsis>
22
21
                    <link linkend="GimpColorButton-struct">GimpColorButton</link>;
23
 
<link linkend="GtkWidget">GtkWidget</link>*          <link linkend="gimp-color-button-new">gimp_color_button_new</link>               (const <link linkend="gchar">gchar</link> *title,
 
22
<link linkend="GtkWidget">GtkWidget</link> *         <link linkend="gimp-color-button-new">gimp_color_button_new</link>               (const <link linkend="gchar">gchar</link> *title,
24
23
                                                         <link linkend="gint">gint</link> width,
25
24
                                                         <link linkend="gint">gint</link> height,
26
25
                                                         const <link linkend="GimpRGB">GimpRGB</link> *color,
51
50
                                       +----<link linkend="GimpButton">GimpButton</link>
52
51
                                             +----GimpColorButton
53
52
</synopsis>
54
 
 
55
53
</refsect1>
56
54
 
57
55
 
60
58
<title role="impl_interfaces.title">Implemented Interfaces</title>
61
59
<para>
62
60
GimpColorButton implements
63
 
 <link linkend="AtkImplementorIface">AtkImplementorIface</link> and  <link linkend="GtkBuildable">GtkBuildable</link>.</para>
64
 
 
 
61
 <link linkend="GtkBuildable">GtkBuildable</link>,  <link linkend="AtkImplementorIface">AtkImplementorIface</link> and  <link linkend="GtkActivatable">GtkActivatable</link>.</para>
65
62
</refsect1>
66
63
 
67
64
 
92
89
<para>
93
90
On click a GtkColorSelectionDialog is opened. Additionally the button
94
91
supports Drag and Drop and has a right-click menu that allows to choose
95
 
the color from the current FG or BG color. If the user changes the 
 
92
the color from the current FG or BG color. If the user changes the
96
93
color, the "color_changed" signal is emitted.
97
94
</para>
98
95
</refsect1>
101
98
<title role="details.title">Details</title>
102
99
<refsect2 id="GimpColorButton-struct" role="struct">
103
100
<title>GimpColorButton</title>
104
 
<indexterm zone="GimpColorButton-struct"><primary>GimpColorButton</primary></indexterm><programlisting>typedef struct _GimpColorButton GimpColorButton;</programlisting>
 
101
<indexterm zone="GimpColorButton-struct"><primary sortas="GimpColorButton">GimpColorButton</primary></indexterm><programlisting>typedef struct _GimpColorButton GimpColorButton;</programlisting>
105
102
<para>
106
 
 
107
103
</para></refsect2>
108
104
<refsect2 id="gimp-color-button-new" role="function">
109
105
<title>gimp_color_button_new ()</title>
110
 
<indexterm zone="gimp-color-button-new"><primary>gimp_color_button_new</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link>*          gimp_color_button_new               (const <link linkend="gchar">gchar</link> *title,
 
106
<indexterm zone="gimp-color-button-new"><primary sortas="gimp_color_button_new">gimp_color_button_new</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link> *         gimp_color_button_new               (const <link linkend="gchar">gchar</link> *title,
111
107
                                                         <link linkend="gint">gint</link> width,
112
108
                                                         <link linkend="gint">gint</link> height,
113
109
                                                         const <link linkend="GimpRGB">GimpRGB</link> *color,
122
118
array that was used to pass the initial color and the "color-changed"
123
119
signal is emitted.</para>
124
120
<para>
125
 
 
126
121
</para><variablelist role="params">
127
 
<varlistentry><term><parameter>title</parameter>&nbsp;:</term>
 
122
<varlistentry><term><parameter>title</parameter>&#160;:</term>
128
123
<listitem><simpara> String that will be used as title for the color_selector.
129
124
</simpara></listitem></varlistentry>
130
 
<varlistentry><term><parameter>width</parameter>&nbsp;:</term>
 
125
<varlistentry><term><parameter>width</parameter>&#160;:</term>
131
126
<listitem><simpara> Width of the colorpreview in pixels.
132
127
</simpara></listitem></varlistentry>
133
 
<varlistentry><term><parameter>height</parameter>&nbsp;:</term>
 
128
<varlistentry><term><parameter>height</parameter>&#160;:</term>
134
129
<listitem><simpara> Height of the colorpreview in pixels.
135
130
</simpara></listitem></varlistentry>
136
 
<varlistentry><term><parameter>color</parameter>&nbsp;:</term>
 
131
<varlistentry><term><parameter>color</parameter>&#160;:</term>
137
132
<listitem><simpara> A pointer to a <link linkend="GimpRGB"><type>GimpRGB</type></link> color.
138
133
</simpara></listitem></varlistentry>
139
 
<varlistentry><term><parameter>type</parameter>&nbsp;:</term>
 
134
<varlistentry><term><parameter>type</parameter>&#160;:</term>
140
135
<listitem><simpara>
141
136
</simpara></listitem></varlistentry>
142
 
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> Pointer to the new <link linkend="GimpColorButton"><type>GimpColorButton</type></link> widget.
 
137
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> Pointer to the new <link linkend="GimpColorButton"><type>GimpColorButton</type></link> widget.
143
138
</simpara></listitem></varlistentry>
144
139
</variablelist></refsect2>
145
140
<refsect2 id="gimp-color-button-set-color" role="function">
146
141
<title>gimp_color_button_set_color ()</title>
147
 
<indexterm zone="gimp-color-button-set-color"><primary>gimp_color_button_set_color</primary></indexterm><programlisting><link linkend="void">void</link>                gimp_color_button_set_color         (<link linkend="GimpColorButton">GimpColorButton</link> *button,
 
142
<indexterm zone="gimp-color-button-set-color"><primary sortas="gimp_color_button_set_color">gimp_color_button_set_color</primary></indexterm><programlisting><link linkend="void">void</link>                gimp_color_button_set_color         (<link linkend="GimpColorButton">GimpColorButton</link> *button,
148
143
                                                         const <link linkend="GimpRGB">GimpRGB</link> *color);</programlisting>
149
144
<para>
150
145
Sets the <parameter>button</parameter> to the given <parameter>color</parameter>.</para>
151
146
<para>
152
 
 
153
147
</para><variablelist role="params">
154
 
<varlistentry><term><parameter>button</parameter>&nbsp;:</term>
 
148
<varlistentry><term><parameter>button</parameter>&#160;:</term>
155
149
<listitem><simpara> Pointer to a <link linkend="GimpColorButton"><type>GimpColorButton</type></link>.
156
150
</simpara></listitem></varlistentry>
157
 
<varlistentry><term><parameter>color</parameter>&nbsp;:</term>
 
151
<varlistentry><term><parameter>color</parameter>&#160;:</term>
158
152
<listitem><simpara> Pointer to the new <link linkend="GimpRGB"><type>GimpRGB</type></link> color.
159
153
</simpara></listitem></varlistentry>
160
154
</variablelist></refsect2>
161
155
<refsect2 id="gimp-color-button-get-color" role="function">
162
156
<title>gimp_color_button_get_color ()</title>
163
 
<indexterm zone="gimp-color-button-get-color"><primary>gimp_color_button_get_color</primary></indexterm><programlisting><link linkend="void">void</link>                gimp_color_button_get_color         (<link linkend="GimpColorButton">GimpColorButton</link> *button,
 
157
<indexterm zone="gimp-color-button-get-color"><primary sortas="gimp_color_button_get_color">gimp_color_button_get_color</primary></indexterm><programlisting><link linkend="void">void</link>                gimp_color_button_get_color         (<link linkend="GimpColorButton">GimpColorButton</link> *button,
164
158
                                                         <link linkend="GimpRGB">GimpRGB</link> *color);</programlisting>
165
159
<para>
166
160
Retrieves the currently set color from the <parameter>button</parameter>.</para>
167
161
<para>
168
 
 
169
162
</para><variablelist role="params">
170
 
<varlistentry><term><parameter>button</parameter>&nbsp;:</term>
 
163
<varlistentry><term><parameter>button</parameter>&#160;:</term>
171
164
<listitem><simpara> Pointer to a <link linkend="GimpColorButton"><type>GimpColorButton</type></link>.
172
165
</simpara></listitem></varlistentry>
173
 
<varlistentry><term><parameter>color</parameter>&nbsp;:</term>
 
166
<varlistentry><term><parameter>color</parameter>&#160;:</term>
174
167
<listitem><simpara> Pointer to a <link linkend="GimpRGB"><type>GimpRGB</type></link> struct used to return the color.
175
168
</simpara></listitem></varlistentry>
176
169
</variablelist></refsect2>
177
170
<refsect2 id="gimp-color-button-set-update" role="function">
178
171
<title>gimp_color_button_set_update ()</title>
179
 
<indexterm zone="gimp-color-button-set-update"><primary>gimp_color_button_set_update</primary></indexterm><programlisting><link linkend="void">void</link>                gimp_color_button_set_update        (<link linkend="GimpColorButton">GimpColorButton</link> *button,
 
172
<indexterm zone="gimp-color-button-set-update"><primary sortas="gimp_color_button_set_update">gimp_color_button_set_update</primary></indexterm><programlisting><link linkend="void">void</link>                gimp_color_button_set_update        (<link linkend="GimpColorButton">GimpColorButton</link> *button,
180
173
                                                         <link linkend="gboolean">gboolean</link> continuous);</programlisting>
181
174
<para>
182
 
When set to <link linkend="TRUE:CAPS"><type>TRUE</type></link>, the <parameter>button</parameter> will emit the "color-changed"
 
175
When set to <link linkend="TRUE--CAPS"><type>TRUE</type></link>, the <parameter>button</parameter> will emit the "color-changed"
183
176
continuously while the color is changed in the color selection
184
177
dialog.</para>
185
178
<para>
186
 
 
187
179
</para><variablelist role="params">
188
 
<varlistentry><term><parameter>button</parameter>&nbsp;:</term>
 
180
<varlistentry><term><parameter>button</parameter>&#160;:</term>
189
181
<listitem><simpara>     A <link linkend="GimpColorButton"><type>GimpColorButton</type></link> widget.
190
182
</simpara></listitem></varlistentry>
191
 
<varlistentry><term><parameter>continuous</parameter>&nbsp;:</term>
 
183
<varlistentry><term><parameter>continuous</parameter>&#160;:</term>
192
184
<listitem><simpara> The new setting of the <parameter>continuous_update</parameter> property.
193
185
</simpara></listitem></varlistentry>
194
186
</variablelist></refsect2>
195
187
<refsect2 id="gimp-color-button-get-update" role="function">
196
188
<title>gimp_color_button_get_update ()</title>
197
 
<indexterm zone="gimp-color-button-get-update"><primary>gimp_color_button_get_update</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gimp_color_button_get_update        (<link linkend="GimpColorButton">GimpColorButton</link> *button);</programlisting>
 
189
<indexterm zone="gimp-color-button-get-update"><primary sortas="gimp_color_button_get_update">gimp_color_button_get_update</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gimp_color_button_get_update        (<link linkend="GimpColorButton">GimpColorButton</link> *button);</programlisting>
198
190
<para>
199
191
Returns the color button's <parameter>continuous_update</parameter> property.</para>
200
192
<para>
201
 
 
202
193
</para><variablelist role="params">
203
 
<varlistentry><term><parameter>button</parameter>&nbsp;:</term>
 
194
<varlistentry><term><parameter>button</parameter>&#160;:</term>
204
195
<listitem><simpara> A <link linkend="GimpColorButton"><type>GimpColorButton</type></link> widget.
205
196
</simpara></listitem></varlistentry>
206
 
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the <parameter>continuous_update</parameter> property.
 
197
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the <parameter>continuous_update</parameter> property.
207
198
</simpara></listitem></varlistentry>
208
199
</variablelist></refsect2>
209
200
<refsect2 id="gimp-color-button-has-alpha" role="function">
210
201
<title>gimp_color_button_has_alpha ()</title>
211
 
<indexterm zone="gimp-color-button-has-alpha"><primary>gimp_color_button_has_alpha</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gimp_color_button_has_alpha         (<link linkend="GimpColorButton">GimpColorButton</link> *button);</programlisting>
 
202
<indexterm zone="gimp-color-button-has-alpha"><primary sortas="gimp_color_button_has_alpha">gimp_color_button_has_alpha</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gimp_color_button_has_alpha         (<link linkend="GimpColorButton">GimpColorButton</link> *button);</programlisting>
212
203
<para>
213
204
Checks whether the <parameter>buttons</parameter> shows transparency information.</para>
214
205
<para>
215
 
 
216
206
</para><variablelist role="params">
217
 
<varlistentry><term><parameter>button</parameter>&nbsp;:</term>
 
207
<varlistentry><term><parameter>button</parameter>&#160;:</term>
218
208
<listitem><simpara> Pointer to a <link linkend="GimpColorButton"><type>GimpColorButton</type></link>.
219
209
</simpara></listitem></varlistentry>
220
 
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the <parameter>button</parameter> shows transparency information, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link>
 
210
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the <parameter>button</parameter> shows transparency information, <link linkend="FALSE--CAPS"><literal>FALSE</literal></link>
221
211
otherwise.
222
212
</simpara></listitem></varlistentry>
223
213
</variablelist></refsect2>
224
214
<refsect2 id="gimp-color-button-set-type" role="function">
225
215
<title>gimp_color_button_set_type ()</title>
226
 
<indexterm zone="gimp-color-button-set-type"><primary>gimp_color_button_set_type</primary></indexterm><programlisting><link linkend="void">void</link>                gimp_color_button_set_type          (<link linkend="GimpColorButton">GimpColorButton</link> *button,
 
216
<indexterm zone="gimp-color-button-set-type"><primary sortas="gimp_color_button_set_type">gimp_color_button_set_type</primary></indexterm><programlisting><link linkend="void">void</link>                gimp_color_button_set_type          (<link linkend="GimpColorButton">GimpColorButton</link> *button,
227
217
                                                         <link linkend="GimpColorAreaType">GimpColorAreaType</link> type);</programlisting>
228
218
<para>
229
219
Sets the <parameter>button</parameter> to the given <parameter>type</parameter>. See also <link linkend="gimp-color-area-set-type"><function>gimp_color_area_set_type()</function></link>.</para>
230
220
<para>
231
 
 
232
221
</para><variablelist role="params">
233
 
<varlistentry><term><parameter>button</parameter>&nbsp;:</term>
 
222
<varlistentry><term><parameter>button</parameter>&#160;:</term>
234
223
<listitem><simpara> Pointer to a <link linkend="GimpColorButton"><type>GimpColorButton</type></link>.
235
224
</simpara></listitem></varlistentry>
236
 
<varlistentry><term><parameter>type</parameter>&nbsp;:</term>
 
225
<varlistentry><term><parameter>type</parameter>&#160;:</term>
237
226
<listitem><simpara> the new <link linkend="GimpColorAreaType"><type>GimpColorAreaType</type></link>
238
227
</simpara></listitem></varlistentry>
239
228
</variablelist></refsect2>
241
230
</refsect1>
242
231
<refsect1 id="GimpColorButton.property-details" role="property_details">
243
232
<title role="property_details.title">Property Details</title>
244
 
<refsect2 id="GimpColorButton--color"><title>The <literal>&quot;color&quot;</literal> property</title>
245
 
<indexterm zone="GimpColorButton--color" role="GIMP 2.4"><primary>GimpColorButton:color</primary></indexterm><programlisting>  &quot;color&quot;                    <link linkend="GimpRGB">GimpRGB</link>*              : Read / Write / Construct</programlisting>
 
233
<refsect2 id="GimpColorButton--color" role="property"><title>The <literal>&quot;color&quot;</literal> property</title>
 
234
<indexterm zone="GimpColorButton--color" role="GIMP 2.4"><primary sortas="GimpColorButton:color">GimpColorButton:color</primary></indexterm><programlisting>  &quot;color&quot;                    <link linkend="GimpRGB">GimpRGB</link>*              : Read / Write / Construct</programlisting>
246
235
<para>
247
236
The color displayed in the button's color area.</para>
248
237
<para>
249
 
 
250
 
</para><para>Since  GIMP 2.4
251
 
</para>
 
238
</para><para>Since GIMP 2.4</para>
252
239
</refsect2>
253
 
<refsect2 id="GimpColorButton--continuous-update"><title>The <literal>&quot;continuous-update&quot;</literal> property</title>
254
 
<indexterm zone="GimpColorButton--continuous-update" role="GIMP 2.4"><primary>GimpColorButton:continuous-update</primary></indexterm><programlisting>  &quot;continuous-update&quot;        <link linkend="gboolean">gboolean</link>              : Read / Write / Construct</programlisting>
 
240
<refsect2 id="GimpColorButton--continuous-update" role="property"><title>The <literal>&quot;continuous-update&quot;</literal> property</title>
 
241
<indexterm zone="GimpColorButton--continuous-update" role="GIMP 2.4"><primary sortas="GimpColorButton:continuous-update">GimpColorButton:continuous-update</primary></indexterm><programlisting>  &quot;continuous-update&quot;        <link linkend="gboolean">gboolean</link>              : Read / Write / Construct</programlisting>
255
242
<para>
256
243
The update policy of the color button.</para>
257
244
<para>
258
 
 
259
245
</para><para>Default value: FALSE</para>
260
 
<para>Since  GIMP 2.4
261
 
</para>
 
246
<para>Since GIMP 2.4</para>
262
247
</refsect2>
263
 
<refsect2 id="GimpColorButton--title"><title>The <literal>&quot;title&quot;</literal> property</title>
264
 
<indexterm zone="GimpColorButton--title" role="GIMP 2.4"><primary>GimpColorButton:title</primary></indexterm><programlisting>  &quot;title&quot;                    <link linkend="gchar">gchar</link>*                : Read / Write / Construct Only</programlisting>
 
248
<refsect2 id="GimpColorButton--title" role="property"><title>The <literal>&quot;title&quot;</literal> property</title>
 
249
<indexterm zone="GimpColorButton--title" role="GIMP 2.4"><primary sortas="GimpColorButton:title">GimpColorButton:title</primary></indexterm><programlisting>  &quot;title&quot;                    <link linkend="gchar">gchar</link>*                : Read / Write / Construct Only</programlisting>
265
250
<para>
266
251
The title to be used for the color selection dialog.</para>
267
252
<para>
268
 
 
269
253
</para><para>Default value: NULL</para>
270
 
<para>Since  GIMP 2.4
271
 
</para>
 
254
<para>Since GIMP 2.4</para>
272
255
</refsect2>
273
 
<refsect2 id="GimpColorButton--type"><title>The <literal>&quot;type&quot;</literal> property</title>
274
 
<indexterm zone="GimpColorButton--type" role="GIMP 2.4"><primary>GimpColorButton:type</primary></indexterm><programlisting>  &quot;type&quot;                     <link linkend="GimpColorAreaType">GimpColorAreaType</link>     : Read / Write / Construct</programlisting>
 
256
<refsect2 id="GimpColorButton--type" role="property"><title>The <literal>&quot;type&quot;</literal> property</title>
 
257
<indexterm zone="GimpColorButton--type" role="GIMP 2.4"><primary sortas="GimpColorButton:type">GimpColorButton:type</primary></indexterm><programlisting>  &quot;type&quot;                     <link linkend="GimpColorAreaType">GimpColorAreaType</link>     : Read / Write / Construct</programlisting>
275
258
<para>
276
259
The type of the button's color area.</para>
277
260
<para>
278
 
 
279
261
</para><para>Default value: GIMP_COLOR_AREA_FLAT</para>
280
 
<para>Since  GIMP 2.4
281
 
</para>
 
262
<para>Since GIMP 2.4</para>
282
263
</refsect2>
283
 
 
284
264
</refsect1>
285
265
 
286
266
<refsect1 id="GimpColorButton.signal-details" role="signals">
287
267
<title role="signals.title">Signal Details</title>
288
 
<refsect2 id="GimpColorButton-color-changed"><title>The <literal>&quot;color-changed&quot;</literal> signal</title>
289
 
<indexterm zone="GimpColorButton-color-changed"><primary>GimpColorButton::color-changed</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="GimpColorButton">GimpColorButton</link> *gimpcolorbutton,
 
268
<refsect2 id="GimpColorButton-color-changed" role="signal"><title>The <literal>&quot;color-changed&quot;</literal> signal</title>
 
269
<indexterm zone="GimpColorButton-color-changed"><primary sortas="GimpColorButton::color-changed">GimpColorButton::color-changed</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="GimpColorButton">GimpColorButton</link> *gimpcolorbutton,
290
270
                                                        <link linkend="gpointer">gpointer</link>         user_data)            : Run First</programlisting>
291
271
<para>
292
 
 
293
272
</para><variablelist role="params">
294
 
<varlistentry><term><parameter>gimpcolorbutton</parameter>&nbsp;:</term>
 
273
<varlistentry><term><parameter>gimpcolorbutton</parameter>&#160;:</term>
295
274
<listitem><simpara>the object which received the signal.
296
 
 
297
275
</simpara></listitem></varlistentry>
298
 
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
 
276
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
299
277
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
300
278
</variablelist></refsect2>
301
279
</refsect1>