4
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
5
<title>GimpColorButton</title>
6
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
7
<link rel="start" href="index.html" title="GIMP Widgets Library Reference Manual">
6
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
7
<link rel="home" href="index.html" title="GIMP Widgets Library Reference Manual">
8
8
<link rel="up" href="libgimpwidgets-widgets.html" title="Part I. GIMP Widgets">
9
9
<link rel="prev" href="GimpColorArea.html" title="GimpColorArea">
10
10
<link rel="next" href="GimpColorHexEntry.html" title="GimpColorHexEntry">
11
<meta name="generator" content="GTK-Doc V1.10 (XML mode)">
11
<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
13
13
<link rel="part" href="libgimpwidgets-widgets.html" title="Part I. GIMP Widgets">
14
14
<link rel="chapter" href="libgimpwidgets-hierarchy.html" title="Object Hierarchy">
34
34
<th width="100%" align="center">GIMP Widgets Library Reference Manual</th>
35
35
<td><a accesskey="n" href="GimpColorHexEntry.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
37
<tr><td colspan="5" class="shortcuts"><nobr><a href="#GimpColorButton.synopsis" class="shortcut">Top</a>
39
<a href="#GimpColorButton.description" class="shortcut">Description</a>
41
<a href="#GimpColorButton.object-hierarchy" class="shortcut">Object Hierarchy</a>
43
<a href="#GimpColorButton.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
45
<a href="#GimpColorButton.properties" class="shortcut">Properties</a>
47
<a href="#GimpColorButton.signals" class="shortcut">Signals</a></nobr></td></tr>
37
<tr><td colspan="5" class="shortcuts">
38
<a href="#GimpColorButton.synopsis" class="shortcut">Top</a>
40
<a href="#GimpColorButton.description" class="shortcut">Description</a>
42
<a href="#GimpColorButton.object-hierarchy" class="shortcut">Object Hierarchy</a>
44
<a href="#GimpColorButton.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
46
<a href="#GimpColorButton.properties" class="shortcut">Properties</a>
48
<a href="#GimpColorButton.signals" class="shortcut">Signals</a>
49
<div class="refentry" lang="en">
51
<div class="refentry" title="GimpColorButton">
50
52
<a name="GimpColorButton"></a><div class="titlepage"></div>
51
53
<div class="refnamediv"><table width="100%"><tr>
56
58
<td valign="top" align="right"><img src="gimp-color-button.png"></td>
57
59
</tr></table></div>
58
<div class="refsynopsisdiv">
60
<div class="refsynopsisdiv" title="Synopsis">
59
61
<a name="GimpColorButton.synopsis"></a><h2>Synopsis</h2>
60
62
<pre class="synopsis">
61
63
<a class="link" href="GimpColorButton.html#GimpColorButton-struct" title="GimpColorButton">GimpColorButton</a>;
63
href="/usr/share/gtk-doc/html/gtk/GtkWidget.html"
64
>GtkWidget</a>* <a class="link" href="GimpColorButton.html#gimp-color-button-new" title="gimp_color_button_new ()">gimp_color_button_new</a> (const <a
65
href="http://library.gnome.org/devel/gtk/unstable/GtkWidget.html"
66
>GtkWidget</a> * <a class="link" href="GimpColorButton.html#gimp-color-button-new" title="gimp_color_button_new ()">gimp_color_button_new</a> (const <a
65
67
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
96
98
<a class="link" href="GimpColorArea.html#GimpColorAreaType" title="enum GimpColorAreaType">GimpColorAreaType</a> type);
99
<div class="refsect1" lang="en">
101
<div class="refsect1" title="Object Hierarchy">
100
102
<a name="GimpColorButton.object-hierarchy"></a><h2>Object Hierarchy</h2>
101
103
<pre class="synopsis">
106
108
href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GInitiallyUnowned"
107
109
>GInitiallyUnowned</a>
109
href="/usr/share/gtk-doc/html/gtk/GtkObject.html"
111
href="http://library.gnome.org/devel/gtk/unstable/GtkObject.html"
112
href="/usr/share/gtk-doc/html/gtk/GtkWidget.html"
114
href="http://library.gnome.org/devel/gtk/unstable/GtkWidget.html"
115
href="/usr/share/gtk-doc/html/gtk/GtkContainer.html"
117
href="http://library.gnome.org/devel/gtk/unstable/GtkContainer.html"
116
118
>GtkContainer</a>
118
href="/usr/share/gtk-doc/html/gtk/GtkBin.html"
120
href="http://library.gnome.org/devel/gtk/unstable/GtkBin.html"
121
href="/usr/share/gtk-doc/html/gtk/GtkButton.html"
123
href="http://library.gnome.org/devel/gtk/unstable/GtkButton.html"
123
125
+----<a class="link" href="GimpButton.html" title="GimpButton">GimpButton</a>
124
126
+----GimpColorButton
127
<div class="refsect1" lang="en">
129
<div class="refsect1" title="Implemented Interfaces">
128
130
<a name="GimpColorButton.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
130
132
GimpColorButton implements
131
AtkImplementorIface and <a
132
href="/usr/share/gtk-doc/html/gtk/gtk-gtkbuildable.html#GtkBuildable"
133
>GtkBuildable</a>.</p>
134
href="http://library.gnome.org/devel/gtk/unstable/gtk-gtkbuildable.html#GtkBuildable"
135
>GtkBuildable</a>, AtkImplementorIface and <a
136
href="http://library.gnome.org/devel/gtk/unstable/GtkActivatable.html"
137
>GtkActivatable</a>.</p>
135
<div class="refsect1" lang="en">
139
<div class="refsect1" title="Properties">
136
140
<a name="GimpColorButton.properties"></a><h2>Properties</h2>
137
141
<pre class="synopsis">
138
142
"<a class="link" href="GimpColorButton.html#GimpColorButton--color" title='The "color" property'>color</a>" <a
147
151
"<a class="link" href="GimpColorButton.html#GimpColorButton--type" title='The "type" property'>type</a>" <a class="link" href="GimpColorArea.html#GimpColorAreaType" title="enum GimpColorAreaType">GimpColorAreaType</a> : Read / Write / Construct
150
<div class="refsect1" lang="en">
154
<div class="refsect1" title="Signals">
151
155
<a name="GimpColorButton.signals"></a><h2>Signals</h2>
152
156
<pre class="synopsis">
153
157
"<a class="link" href="GimpColorButton.html#GimpColorButton-color-changed" title='The "color-changed" signal'>color-changed</a>" : Run First
156
<div class="refsect1" lang="en">
160
<div class="refsect1" title="Description">
157
161
<a name="GimpColorButton.description"></a><h2>Description</h2>
159
163
This widget provides a simple button with a preview showing the
163
167
On click a GtkColorSelectionDialog is opened. Additionally the button
164
168
supports Drag and Drop and has a right-click menu that allows to choose
165
the color from the current FG or BG color. If the user changes the
169
the color from the current FG or BG color. If the user changes the
166
170
color, the "color_changed" signal is emitted.
169
<div class="refsect1" lang="en">
173
<div class="refsect1" title="Details">
170
174
<a name="GimpColorButton.details"></a><h2>Details</h2>
171
<div class="refsect2" lang="en">
175
<div class="refsect2" title="GimpColorButton">
172
176
<a name="GimpColorButton-struct"></a><h3>GimpColorButton</h3>
173
177
<pre class="programlisting">typedef struct _GimpColorButton GimpColorButton;</pre>
179
<div class="refsect2" lang="en">
182
<div class="refsect2" title="gimp_color_button_new ()">
180
183
<a name="gimp-color-button-new"></a><h3>gimp_color_button_new ()</h3>
181
184
<pre class="programlisting"><a
182
href="/usr/share/gtk-doc/html/gtk/GtkWidget.html"
183
>GtkWidget</a>* gimp_color_button_new (const <a
185
href="http://library.gnome.org/devel/gtk/unstable/GtkWidget.html"
186
>GtkWidget</a> * gimp_color_button_new (const <a
184
187
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
185
188
>gchar</a> *title,
247
<div class="refsect2" lang="en">
249
<div class="refsect2" title="gimp_color_button_set_color ()">
248
250
<a name="gimp-color-button-set-color"></a><h3>gimp_color_button_set_color ()</h3>
249
251
<pre class="programlisting">void gimp_color_button_set_color (<a class="link" href="GimpColorButton.html" title="GimpColorButton">GimpColorButton</a> *button,
277
<div class="refsect2" lang="en">
278
<div class="refsect2" title="gimp_color_button_get_color ()">
278
279
<a name="gimp-color-button-get-color"></a><h3>gimp_color_button_get_color ()</h3>
279
280
<pre class="programlisting">void gimp_color_button_get_color (<a class="link" href="GimpColorButton.html" title="GimpColorButton">GimpColorButton</a> *button,
307
<div class="refsect2" lang="en">
307
<div class="refsect2" title="gimp_color_button_set_update ()">
308
308
<a name="gimp-color-button-set-update"></a><h3>gimp_color_button_set_update ()</h3>
309
309
<pre class="programlisting">void gimp_color_button_set_update (<a class="link" href="GimpColorButton.html" title="GimpColorButton">GimpColorButton</a> *button,
312
312
>gboolean</a> continuous);</pre>
315
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"
315
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE--CAPS"
316
316
><span class="type">TRUE</span></a>, the <em class="parameter"><code>button</code></em> will emit the "color-changed"
317
317
continuously while the color is changed in the color selection
322
321
<div class="variablelist"><table border="0">
323
322
<col align="left" valign="top">
339
<div class="refsect2" lang="en">
338
<div class="refsect2" title="gimp_color_button_get_update ()">
340
339
<a name="gimp-color-button-get-update"></a><h3>gimp_color_button_get_update ()</h3>
341
340
<pre class="programlisting"><a
342
341
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
366
<div class="refsect2" lang="en">
364
<div class="refsect2" title="gimp_color_button_has_alpha ()">
367
365
<a name="gimp-color-button-has-alpha"></a><h3>gimp_color_button_has_alpha ()</h3>
368
366
<pre class="programlisting"><a
369
367
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
385
382
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
387
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"
384
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE--CAPS"
388
385
><code class="literal">TRUE</code></a> if the <em class="parameter"><code>button</code></em> shows transparency information, <a
389
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"
386
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE--CAPS"
390
387
><code class="literal">FALSE</code></a>
398
<div class="refsect2" lang="en">
395
<div class="refsect2" title="gimp_color_button_set_type ()">
399
396
<a name="gimp-color-button-set-type"></a><h3>gimp_color_button_set_type ()</h3>
400
397
<pre class="programlisting">void gimp_color_button_set_type (<a class="link" href="GimpColorButton.html" title="GimpColorButton">GimpColorButton</a> *button,
401
398
<a class="link" href="GimpColorArea.html#GimpColorAreaType" title="enum GimpColorAreaType">GimpColorAreaType</a> type);</pre>
403
400
Sets the <em class="parameter"><code>button</code></em> to the given <em class="parameter"><code>type</code></em>. See also <a class="link" href="GimpColorArea.html#gimp-color-area-set-type" title="gimp_color_area_set_type ()"><code class="function">gimp_color_area_set_type()</code></a>.</p>
407
403
<div class="variablelist"><table border="0">
408
404
<col align="left" valign="top">
424
<div class="refsect1" lang="en">
420
<div class="refsect1" title="Property Details">
425
421
<a name="GimpColorButton.property-details"></a><h2>Property Details</h2>
426
<div class="refsect2" lang="en">
422
<div class="refsect2" title='The "color" property'>
427
423
<a name="GimpColorButton--color"></a><h3>The <code class="literal">"color"</code> property</h3>
428
424
<pre class="programlisting"> "color" <a
429
425
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
432
428
The color displayed in the button's color area.</p>
431
<p>Since GIMP 2.4</p>
440
<div class="refsect2" lang="en">
434
<div class="refsect2" title='The "continuous-update" property'>
441
435
<a name="GimpColorButton--continuous-update"></a><h3>The <code class="literal">"continuous-update"</code> property</h3>
442
436
<pre class="programlisting"> "continuous-update" <a
443
437
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
446
440
The update policy of the color button.</p>
450
443
<p>Default value: FALSE</p>
444
<p>Since GIMP 2.4</p>
455
<div class="refsect2" lang="en">
447
<div class="refsect2" title='The "title" property'>
456
448
<a name="GimpColorButton--title"></a><h3>The <code class="literal">"title"</code> property</h3>
457
449
<pre class="programlisting"> "title" <a
458
450
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
461
453
The title to be used for the color selection dialog.</p>
465
456
<p>Default value: NULL</p>
457
<p>Since GIMP 2.4</p>
470
<div class="refsect2" lang="en">
460
<div class="refsect2" title='The "type" property'>
471
461
<a name="GimpColorButton--type"></a><h3>The <code class="literal">"type"</code> property</h3>
472
462
<pre class="programlisting"> "type" <a class="link" href="GimpColorArea.html#GimpColorAreaType" title="enum GimpColorAreaType">GimpColorAreaType</a> : Read / Write / Construct</pre>
474
464
The type of the button's color area.</p>
478
467
<p>Default value: GIMP_COLOR_AREA_FLAT</p>
483
<div class="refsect1" lang="en">
468
<p>Since GIMP 2.4</p>
471
<div class="refsect1" title="Signal Details">
484
472
<a name="GimpColorButton.signal-details"></a><h2>Signal Details</h2>
485
<div class="refsect2" lang="en">
473
<div class="refsect2" title='The "color-changed" signal'>
486
474
<a name="GimpColorButton-color-changed"></a><h3>The <code class="literal">"color-changed"</code> signal</h3>
487
475
<pre class="programlisting">void user_function (<a class="link" href="GimpColorButton.html" title="GimpColorButton">GimpColorButton</a> *gimpcolorbutton,
489
477
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"
490
478
>gpointer</a> user_data) : Run First</pre>
494
481
<div class="variablelist"><table border="0">
495
482
<col align="left" valign="top">