| Top |
| GtkWidget * | gimp_color_button_new () |
| void | gimp_color_button_set_color () |
| void | gimp_color_button_get_color () |
| void | gimp_color_button_set_update () |
| gboolean | gimp_color_button_get_update () |
| gboolean | gimp_color_button_has_alpha () |
| void | gimp_color_button_set_type () |
| gint | area-height | Write / Construct |
| gint | area-width | Write / Construct |
| GimpRGB * | color | Read / Write / Construct |
| gboolean | continuous-update | Read / Write / Construct |
| gchar * | title | Read / Write / Construct Only |
| GimpColorAreaType | type | Read / Write / Construct |
GObject
╰── GInitiallyUnowned
╰── GtkObject
╰── GtkWidget
╰── GtkContainer
╰── GtkBin
╰── GtkButton
╰── GimpButton
╰── GimpColorButton
GimpColorButton implements AtkImplementorIface, GtkBuildable and GtkActivatable.
This widget provides a simple button with a preview showing the color.
On click a color selection dialog 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.
GtkWidget * gimp_color_button_new (const gchar *title,gint width,gint height,const GimpRGB *color,GimpColorAreaType type);
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.
title |
String that will be used as title for the color_selector. |
|
width |
Width of the colorpreview in pixels. |
|
height |
Height of the colorpreview in pixels. |
|
color |
A pointer to a GimpRGB color. |
|
type |
The type of transparency to be displayed. |
void gimp_color_button_set_color (GimpColorButton *button,const GimpRGB *color);
Sets the button
to the given color
.
void gimp_color_button_get_color (GimpColorButton *button,GimpRGB *color);
Retrieves the currently set color from the button
.
button |
Pointer to a GimpColorButton. |
|
color |
Pointer to a GimpRGB struct used to return the color. |
void gimp_color_button_set_update (GimpColorButton *button,gboolean continuous);
When set to TRUE, the button
will emit the "color-changed"
continuously while the color is changed in the color selection
dialog.
button |
A GimpColorButton widget. |
|
continuous |
The new setting of the |
gboolean
gimp_color_button_get_update (GimpColorButton *button);
Returns the color button's continuous_update
property.
gboolean
gimp_color_button_has_alpha (GimpColorButton *button);
Checks whether the buttons
shows transparency information.
void gimp_color_button_set_type (GimpColorButton *button,GimpColorAreaType type);
Sets the button
to the given type
. See also gimp_color_area_set_type().
“area-height” property “area-height” gint
The minimum height of the button's GimpColorArea.
Flags: Write / Construct
Allowed values: >= 1
Default value: 16
Since GIMP 2.8
“area-width” property “area-width” gint
The minimum width of the button's GimpColorArea.
Flags: Write / Construct
Allowed values: >= 1
Default value: 16
Since GIMP 2.8
“color” property“color” GimpRGB *
The color displayed in the button's color area.
Flags: Read / Write / Construct
Since GIMP 2.4
“continuous-update” property “continuous-update” gboolean
The update policy of the color button.
Flags: Read / Write / Construct
Default value: FALSE
Since GIMP 2.4
“title” property “title” gchar *
The title to be used for the color selection dialog.
Flags: Read / Write / Construct Only
Default value: NULL
Since GIMP 2.4
“type” property“type” GimpColorAreaType
The type of the button's color area.
Flags: Read / Write / Construct
Default value: GIMP_COLOR_AREA_FLAT
Since GIMP 2.4
“color-changed” signalvoid user_function (GimpColorButton *gimpcolorbutton, gpointer user_data)
gimpcolorbutton |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First