Top |
GimpColorAreaGimpColorArea — Displays a GimpRGB color, optionally with alpha-channel. |
Functions
GtkWidget * | gimp_color_area_new () |
void | gimp_color_area_set_color () |
void | gimp_color_area_get_color () |
gboolean | gimp_color_area_has_alpha () |
void | gimp_color_area_set_type () |
void | gimp_color_area_set_draw_border () |
void | gimp_color_area_set_color_config () |
Properties
GimpRGB * | color | Read / Write / Construct |
GdkModifierType | drag-mask | Write / Construct Only |
gboolean | draw-border | Read / Write |
GimpColorAreaType | type | Read / Write / Construct |
Object Hierarchy
GObject ╰── GInitiallyUnowned ╰── GtkObject ╰── GtkWidget ╰── GtkDrawingArea ╰── GimpColorArea
Functions
gimp_color_area_new ()
GtkWidget * gimp_color_area_new (const GimpRGB *color
,GimpColorAreaType type
,GdkModifierType drag_mask
);
Creates a new GimpColorArea widget.
This returns a preview area showing the color. It handles color DND. If the color changes, the "color_changed" signal is emitted.
Parameters
color |
A pointer to a GimpRGB struct. |
|
type |
The type of color area to create. |
|
drag_mask |
The event_mask that should trigger drags. |
gimp_color_area_set_color ()
void gimp_color_area_set_color (GimpColorArea *area
,const GimpRGB *color
);
Sets area
to a different color
.
Parameters
area |
Pointer to a GimpColorArea. |
|
color |
Pointer to a GimpRGB struct that defines the new color. |
gimp_color_area_get_color ()
void gimp_color_area_get_color (GimpColorArea *area
,GimpRGB *color
);
Retrieves the current color of the area
.
Parameters
area |
Pointer to a GimpColorArea. |
|
color |
Pointer to a GimpRGB struct that is used to return the color. |
gimp_color_area_has_alpha ()
gboolean
gimp_color_area_has_alpha (GimpColorArea *area
);
Checks whether the area
shows transparency information. This is determined
via the area
's GimpColorAreaType.
gimp_color_area_set_type ()
void gimp_color_area_set_type (GimpColorArea *area
,GimpColorAreaType type
);
Changes the type of area
. The GimpColorAreaType determines
whether the widget shows transparency information and chooses the
size of the checkerboard used to do that.
gimp_color_area_set_draw_border ()
void gimp_color_area_set_draw_border (GimpColorArea *area
,gboolean draw_border
);
The area
can draw a thin border in the foreground color around
itself. This function toggles this behaviour on and off. The
default is not draw a border.
gimp_color_area_set_color_config ()
void gimp_color_area_set_color_config (GimpColorArea *area
,GimpColorConfig *config
);
Sets the color management configuration to use with this color area.
Since: 2.10
Property Details
The “color”
property
“color” GimpRGB *
The color displayed in the color area.
Owner: GimpColorArea
Flags: Read / Write / Construct
Since: 2.4
The “drag-mask”
property
“drag-mask” GdkModifierType
The modifier mask that triggers dragging the color.
Owner: GimpColorArea
Flags: Write / Construct Only
The “draw-border”
property
“draw-border” gboolean
Whether to draw a thin border in the foreground color around the area.
Owner: GimpColorArea
Flags: Read / Write
Default value: FALSE
Since: 2.4
The “type”
property
“type” GimpColorAreaType
The type of the color area.
Owner: GimpColorArea
Flags: Read / Write / Construct
Default value: GIMP_COLOR_AREA_FLAT
Since: 2.4
Signal Details
The “color-changed”
signal
void user_function (GimpColorArea *gimpcolorarea, gpointer user_data)
Flags: Run First