Gtk.ColorChooserWidget

g GObject.GInterface GObject.GInterface Gtk.Accessible Gtk.Accessible GObject.GInterface->Gtk.Accessible Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable Gtk.ColorChooser Gtk.ColorChooser GObject.GInterface->Gtk.ColorChooser Gtk.ConstraintTarget Gtk.ConstraintTarget GObject.GInterface->Gtk.ConstraintTarget GObject.InitiallyUnowned GObject.InitiallyUnowned Gtk.Widget Gtk.Widget GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.Accessible->Gtk.Widget Gtk.Buildable->Gtk.Widget Gtk.ColorChooserWidget Gtk.ColorChooserWidget Gtk.ColorChooser->Gtk.ColorChooserWidget Gtk.ConstraintTarget->Gtk.Widget Gtk.Widget->Gtk.ColorChooserWidget

Subclasses:

None

Methods

Inherited:

Gtk.Widget (181), GObject.Object (37), Gtk.Accessible (15), Gtk.Buildable (1), Gtk.ColorChooser (5)

Structs:

Gtk.WidgetClass (18), GObject.ObjectClass (5)

class

new ()

Virtual Methods

Inherited:

Gtk.Widget (25), GObject.Object (7), Gtk.Accessible (6), Gtk.Buildable (9), Gtk.ColorChooser (4)

Properties

Inherited:

Gtk.Widget (34), Gtk.Accessible (1), Gtk.ColorChooser (2)

Name

Type

Flags

Short Description

show-editor

bool

r/w

Signals

Inherited:

Gtk.Widget (13), GObject.Object (1), Gtk.ColorChooser (1)

Fields

Inherited:

Gtk.Widget (13), GObject.Object (1), Gtk.ColorChooser (1)

Class Details

class Gtk.ColorChooserWidget(**kwargs)
Bases:

Gtk.Widget, Gtk.ColorChooser

Abstract:

No

The GtkColorChooserWidget widget lets the user select a color.

By default, the chooser presents a predefined palette of colors, plus a small number of settable custom colors. It is also possible to select a different color with the single-color editor.

To enter the single-color editing mode, use the context menu of any color of the palette, or use the ‘+’ button to add a new custom color.

The chooser automatically remembers the last selection, as well as custom colors.

To create a GtkColorChooserWidget, use [ctor`Gtk`.ColorChooserWidget.new].

To change the initially selected color, use [method`Gtk`.ColorChooser.set_rgba]. To get the selected color use [method`Gtk`.ColorChooser.get_rgba].

The GtkColorChooserWidget is used in the [class`Gtk`.ColorChooserDialog] to provide a dialog for selecting colors.

CSS names

GtkColorChooserWidget has a single CSS node with name colorchooser.

Deprecated since version 4.10: Direct use of GtkColorChooserWidget is deprecated.

classmethod new()[source]
Returns:

a new GtkColorChooserWidget

Return type:

Gtk.Widget

Creates a new GtkColorChooserWidget.

Property Details

Gtk.ColorChooserWidget.props.show_editor
Name:

show-editor

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

True when the color chooser is showing the single-color editor.

It can be set to switch the color chooser into single-color editing mode.