GimpUi.ColorButton¶
- Subclasses:
None
Methods¶
- Inherited:
GimpUi.Button (2), Gtk.Button (29), Gtk.Bin (1), Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10), Gtk.Actionable (5), Gtk.Activatable (6)
- Structs:
Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5)
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
GimpUi.Button (1), Gtk.Button (6), Gtk.Container (10), Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10), Gtk.Actionable (4), Gtk.Activatable (2)
Properties¶
- Inherited:
Gtk.Button (9), Gtk.Container (3), Gtk.Widget (39), Gtk.Actionable (2), Gtk.Activatable (2)
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
w/c |
The minimum height of the button’s |
||
w/c |
The minimum width of the button’s |
||
r/w/c |
The color displayed in the button’s color area |
||
r/w |
The color config object used |
||
r/w/c |
The update policy of the color button |
||
r/w/c |
The title to be used for the color selection dialog |
||
r/w/c |
The type of the button’s color area |
Style Properties¶
- Inherited:
Signals¶
- Inherited:
GimpUi.Button (1), Gtk.Button (6), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)
Name |
Short Description |
|---|---|
Fields¶
- Inherited:
GimpUi.Button (1), Gtk.Button (6), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)
Name |
Type |
Access |
Description |
|---|---|---|---|
parent_instance |
r |
Class Details¶
- class GimpUi.ColorButton(*args, **kwargs)¶
- Bases:
- Abstract:
No
- Structure:
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.
- classmethod new(title, width, height, color, type)¶
- Parameters:
title (
str) – String that will be used as title for the color_selector.width (
int) – Width of the colorpreview in pixels.height (
int) – Height of the colorpreview in pixels.color (
Gegl.Color) – A [class`Gegl`.Color].type (
GimpUi.ColorAreaType) – The type of transparency to be displayed.
- Returns:
Pointer to the new
GimpUi.ColorButtonwidget.- Return type:
Creates a new
GimpUi.ColorButtonwidget.This returns a button with a preview showing the color. When the button is clicked a
Gtk.ColorSelectionDialogis 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.
- get_action_group()¶
- Returns:
The self's
Gio.SimpleActionGroup.- Return type:
New in version 3.0.
- get_color()¶
- Returns:
a copy of self's [class`Gegl`.Color].
- Return type:
Retrieves the currently set color from the self.
- get_update()¶
- Returns:
the continuous_update property.
- Return type:
Returns the color button’s continuous_update property.
- has_alpha()¶
-
Checks whether the buttons shows transparency information.
- set_color(color)¶
- Parameters:
color (
Gegl.Color) – A new [class`Gegl`.Color].
Sets the self to the given color.
- set_color_config(config)¶
- Parameters:
config (
Gimp.ColorConfig) – aGimp.ColorConfigobject.
Sets the color management configuration to use with this color button’s
GimpUi.ColorArea.New in version 2.10.
- set_title(title)¶
- Parameters:
title (
str) – the new title.
Sets the self dialog’s title.
New in version 2.10.
- set_type(type)¶
- Parameters:
type (
GimpUi.ColorAreaType) – the newGimpUi.ColorAreaType
Sets the self to the given type. See also
GimpUi.ColorArea.set_type().
- set_update(continuous)¶
- Parameters:
continuous (
bool) – The new setting of the continuous_update property.
When set to
True, the self will emit the “color-changed” continuously while the color is changed in the color selection dialog.
- do_color_changed() virtual¶
- do_get_action_type() virtual¶
- Return type:
Signal Details¶
- GimpUi.ColorButton.signals.color_changed(color_button)¶
- Signal Name:
color-changed- Flags:
- Parameters:
color_button (
GimpUi.ColorButton) – The object which received the signal
Property Details¶
- GimpUi.ColorButton.props.area_height¶
-
The minimum height of the button’s
GimpUi.ColorArea.New in version 2.8.
- GimpUi.ColorButton.props.area_width¶
-
The minimum width of the button’s
GimpUi.ColorArea.New in version 2.8.
- GimpUi.ColorButton.props.color¶
- Name:
color- Type:
- Default Value:
<Color object at 0x000000000000 (GeglColor at 0x0000000)>- Flags:
The color displayed in the button’s color area.
New in version 2.4.
- GimpUi.ColorButton.props.color_config¶
- Name:
color-config- Type:
- Default Value:
- Flags:
The
Gimp.ColorConfigobject used for the button’sGimpUi.ColorAreaandGimpUi.ColorSelection.New in version 2.10.
- GimpUi.ColorButton.props.continuous_update¶
-
The update policy of the color button.
New in version 2.4.
- GimpUi.ColorButton.props.title¶
-
The title to be used for the color selection dialog.
New in version 2.4.
- GimpUi.ColorButton.props.type¶
- Name:
type- Type:
- Default Value:
- Flags:
The type of the button’s color area.
New in version 2.4.