Name
GimpColorButton -- Widget for selecting a color.
Object Hierarchy
GtkObject
+----GtkWidget
+----GtkContainer
+----GtkBin
+----GtkButton
+----GimpColorButton |
Description
This widget provides a simple button with a preview showing the
color.
On click a GtkColorSelectionDialog is opened. Additionally the button
supports Drag and Drop and has a right-click menu that allows to choose
the color from the current FG or BG color. If the user changes the
color, the "color_changed" signal is emitted.
Note that the color is changed in place.
Details
GIMP_COLOR_BUTTON()
#define GIMP_COLOR_BUTTON(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_COLOR_BUTTON, GimpColorButton)) |
Checks if the passed pointer is a pointer to a GimpColorButton and
performs the cast if valid.
gimp_color_button_new ()
GtkWidget* gimp_color_button_new (gchar *title,
gint width,
gint height,
guchar *color,
gint bpp); |
Creates a new GimpColorButton widget.
This returns a button with a preview showing the color.
When the button is clicked a GtkColorSelectionDialog is opened.
If the user changes the color the new color is written into the
array that was used to pass the initial color and the "color_changed"
signal is emitted.
gimp_color_button_double_new ()
GtkWidget* gimp_color_button_double_new (gchar *title,
gint width,
gint height,
gdouble *color,
gint bpp); |
Creates a new GimpColorButton widget.
This returns a button with a preview showing the color.
When the button is clicked a GtkColorSelectionDialog is opened.
If the user changes the color the new color is written into the
array that was used to pass the initial color and the "color_changed"
signal is emitted.
gimp_color_button_update ()
Should be used after the color controlled by a GimpColorButton
was changed. The color is then reread and the change is propagated
to the preview and the GtkColorSelectionDialog if one is open.
Signals
The "color-changed" signal