Top |
GtkWidget * | gimp_color_button_new () |
void | gimp_color_button_set_title () |
const gchar * | gimp_color_button_get_title () |
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 () |
void | gimp_color_button_set_color_config () |
GtkUIManager * | gimp_color_button_get_ui_manager () |
int | area-height | Write / Construct |
int | area-width | Write / Construct |
GimpRGB * | color | Read / Write / Construct |
GimpColorConfig * | color-config | Read / Write |
gboolean | continuous-update | Read / Write / Construct |
char * | title | Read / Write / Construct |
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 one 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_title (GimpColorButton *button
,const gchar *title
);
Sets the button
dialog's title.
Since: 2.10
const gchar *
gimp_color_button_get_title (GimpColorButton *button
);
Since: 2.10
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()
.
void gimp_color_button_set_color_config (GimpColorButton *button
,GimpColorConfig *config
);
Sets the color management configuration to use with this color button's GimpColorArea.
Since: 2.10
GtkUIManager *
gimp_color_button_get_ui_manager (GimpColorButton *button
);
Since: 2.10
“area-height”
property “area-height” int
The minimum height of the button's GimpColorArea.
Owner: GimpColorButton
Flags: Write / Construct
Allowed values: >= 1
Default value: 16
Since: 2.8
“area-width”
property “area-width” int
The minimum width of the button's GimpColorArea.
Owner: GimpColorButton
Flags: Write / Construct
Allowed values: >= 1
Default value: 16
Since: 2.8
“color”
property“color” GimpRGB *
The color displayed in the button's color area.
Owner: GimpColorButton
Flags: Read / Write / Construct
Since: 2.4
“color-config”
property “color-config” GimpColorConfig *
The GimpColorConfig object used for the button's GimpColorArea and GimpColorSelection.
Owner: GimpColorButton
Flags: Read / Write
Since: 2.10
“continuous-update”
property “continuous-update” gboolean
The update policy of the color button.
Owner: GimpColorButton
Flags: Read / Write / Construct
Default value: FALSE
Since: 2.4
“title”
property “title” char *
The title to be used for the color selection dialog.
Owner: GimpColorButton
Flags: Read / Write / Construct
Default value: NULL
Since: 2.4
“type”
property“type” GimpColorAreaType
The type of the button's color area.
Owner: GimpColorButton
Flags: Read / Write / Construct
Default value: GIMP_COLOR_AREA_FLAT
Since: 2.4
“color-changed”
signalvoid user_function (GimpColorButton *gimpcolorbutton, gpointer user_data)
Flags: Run First