Description Methods and Functions Hierarchy Interfaces Detailed Description Structures Convenient Construction Signals Properties Author(s) References See Also
A button to launch a color selection dialog
gtkColorButtonNew(show = TRUE)
gtkColorButtonNewWithColor(color, show = TRUE)
gtkColorButtonSetColor(object, color)
gtkColorButtonGetColor(object)
gtkColorButtonSetAlpha(object, alpha)
gtkColorButtonGetAlpha(object)
gtkColorButtonSetUseAlpha(object, use.alpha)
gtkColorButtonGetUseAlpha(object)
gtkColorButtonSetTitle(object, title)
gtkColorButtonGetTitle(object)
gtkColorButton(color, show = TRUE)
1 2 3 4 5 6 7 8 | GObject
+----GInitiallyUnowned
+----GtkObject
+----GtkWidget
+----GtkContainer
+----GtkBin
+----GtkButton
+----GtkColorButton
|
GtkColorButton implements
AtkImplementorIface, GtkBuildable
and GtkActivatable
.
The GtkColorButton
is a button which displays the currently selected color
an allows to open a color selection dialog to change the color. It is suitable
widget for selecting a color in a preference dialog.
GtkColorButton
The GtkColorButton struct has only private fields and should not be used directly.
gtkColorButton
is the result of collapsing the constructors of GtkColorButton
(gtkColorButtonNew
, gtkColorButtonNewWithColor
) and accepts a subset of its arguments matching the required arguments of one of its delegate constructors.
color-set(widget, user.data)
The ::color-set signal is emitted when the user selects a color.
When handling this signal, use gtkColorButtonGetColor
and
gtkColorButtonGetAlpha
to find out which color was just selected.
Note that this signal is only emitted when the user changes the color. If you need to react to programmatic color changes as well, use the notify::color signal. Since 2.4
widget
the object which received the signal.
user.data
user data set when the signal handler was connected.
alpha
[numeric : Read / Write]The selected opacity value (0 fully transparent, 65535 fully opaque). Allowed values: <= 65535 Default value: 65535 Since 2.4
color
[GdkColor
: * : Read / Write]The selected color. Since 2.4
title
[character : * : Read / Write]The title of the color selection dialog Default value: "Pick a Color" Since 2.4
use-alpha
[logical : Read / Write]If this property is set to TRUE
, the color swatch on the button is rendered against a
checkerboard background to show its opacity and the opacity slider is displayed in the
color selection dialog.
Default value: FALSE Since 2.4
Derived by RGtkGen from GTK+ documentation
https://developer.gnome.org/gtk2/stable/GtkColorButton.html
GtkColorSelectionDialog
GtkFontButton
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.