GimpUi.LabelColor

g Atk.ImplementorIface Atk.ImplementorIface Gtk.Widget Gtk.Widget Atk.ImplementorIface->Gtk.Widget GObject.GInterface GObject.GInterface GObject.GInterface->Atk.ImplementorIface Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable Gtk.Orientable Gtk.Orientable GObject.GInterface->Gtk.Orientable GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned GimpUi.LabelColor GimpUi.LabelColor GimpUi.Labeled GimpUi.Labeled GimpUi.Labeled->GimpUi.LabelColor Gtk.Buildable->Gtk.Widget Gtk.Container Gtk.Container Gtk.Grid Gtk.Grid Gtk.Container->Gtk.Grid Gtk.Grid->GimpUi.Labeled Gtk.Orientable->Gtk.Grid Gtk.Widget->Gtk.Container

Subclasses:

None

Methods

Inherited:

GimpUi.Labeled (3), Gtk.Grid (21), Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10), Gtk.Orientable (2)

Structs:

Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5)

class

new (label, color, editable)

get_color_widget ()

get_value ()

is_editable ()

set_editable (editable)

set_value (value)

Virtual Methods

Inherited:

GimpUi.Labeled (1), Gtk.Container (10), Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10)

Properties

Inherited:

GimpUi.Labeled (1), Gtk.Grid (5), Gtk.Container (3), Gtk.Widget (39), Gtk.Orientable (1)

Name

Type

Flags

Short Description

editable

bool

r/w

Whether the color can be edited

value

Gegl.Color

r/w/c

The displayed color

Child Properties

Inherited:

Gtk.Grid (4)

Style Properties

Inherited:

Gtk.Widget (17)

Signals

Inherited:

GimpUi.Labeled (1), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)

Name

Short Description

value-changed

Fields

Inherited:

GimpUi.Labeled (1), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)

Class Details

class GimpUi.LabelColor(**kwargs)
Bases:

GimpUi.Labeled

Abstract:

No

Structure:

GimpUi.LabelColorClass

This widget is a subclass of GimpUi.Labeled with a #GtkColor.

classmethod new(label, color, editable)
Parameters:
Returns:

The new GimpUi.LabelColor widget.

Return type:

Gtk.Widget

Creates a GimpUi.LabelColor which contains a widget and displays a color area. By default, the color area is of type GimpUi.ColorAreaType.SMALL_CHECKS, which means transparency of color will be shown.

Moreover in the non-editable case, the color is draggable to other widgets accepting color drops with buttons 1 and 2. In the editable case, the label is reused as the color chooser’s dialog title.

If you wish to customize any of these default behaviors, get the GimpUi.ColorArea or GimpUi.ColorButton with GimpUi.LabelColor.get_color_widget().

get_color_widget()
Returns:

The color widget packed in self.

Return type:

Gtk.Widget

This function returns the color widget packed in self, which can be either a GimpUi.ColorButton (if the self is editable) or a GimpUi.ColorArea otherwise.

get_value()
Returns:

a copy of the [class`Gegl`.Color] used by the widget.

Return type:

Gegl.Color

This function returns the value shown by self.

is_editable()
Returns:

True if the color is editable.

Return type:

bool

This function tells whether the color widget allows to edit the color.

set_editable(editable)
Parameters:

editable (bool) – Whether the color should be editable.

Changes the editability of the color.

set_value(value)
Parameters:

value (Gegl.Color) – A new value.

This function sets the value in the #GtkColor inside self.

Signal Details

GimpUi.LabelColor.signals.value_changed(label_color)
Signal Name:

value-changed

Flags:

RUN_FIRST

Parameters:

label_color (GimpUi.LabelColor) – The object which received the signal

Property Details

GimpUi.LabelColor.props.editable
Name:

editable

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Whether the color can be edited.

New in version 3.0.

GimpUi.LabelColor.props.value
Name:

value

Type:

Gegl.Color

Default Value:

<Color object at 0x000000000000 (GeglColor at 0x0000000)>

Flags:

READABLE, WRITABLE, CONSTRUCT

The currently set value.

New in version 3.0.