Class

GtkColorButton

[]

Description [src]

class Gtk.ColorButton : Gtk.Button
  implements Atk.ImplementorIface, Gtk.Actionable, Gtk.Activatable, Gtk.Buildable, Gtk.ColorChooser {
  /* No available fields */
}

The GtkColorButton is a button which displays the currently selected color and allows to open a color selection dialog to change the color. It is suitable widget for selecting a color in a preference dialog.

CSS nodes

GtkColorButton has a single CSS node with name button. To differentiate it from a plain GtkButton, it gets the .color style class.

[]

Hierarchy

hierarchy this GtkColorButton implements_0 AtkImplementorIface this--implements_0 implements_1 GtkActionable this--implements_1 implements_2 GtkActivatable this--implements_2 implements_3 GtkBuildable this--implements_3 implements_4 GtkColorChooser this--implements_4 ancestor_0 GtkButton ancestor_0--this ancestor_1 GtkBin ancestor_1--ancestor_0 ancestor_2 GtkContainer ancestor_2--ancestor_1 ancestor_3 GtkWidget ancestor_3--ancestor_2 ancestor_4 GInitiallyUnowned ancestor_4--ancestor_3 ancestor_5 GObject ancestor_5--ancestor_4
[]

Constructors

gtk_color_button_new

Creates a new color button.

since: 2.4

gtk_color_button_new_with_color

Creates a new color button.

deprecated: 3.4 since: 2.4

gtk_color_button_new_with_rgba

Creates a new color button.

since: 3.0

[]

Instance methods

gtk_color_button_get_alpha

Returns the current alpha value.

deprecated: 3.4 since: 2.4

gtk_color_button_get_color

Sets color to be the current color in the GtkColorButton widget.

deprecated: 3.4 since: 2.4

gtk_color_button_get_rgba

Sets rgba to be the current color in the GtkColorButton widget.

deprecated: 3.4 since: 3.0

gtk_color_button_get_title

Gets the title of the color selection dialog.

since: 2.4

gtk_color_button_get_use_alpha

Does the color selection dialog use the alpha channel ?

deprecated: 3.4 since: 2.4

gtk_color_button_set_alpha

Sets the current opacity to be alpha.

deprecated: 3.4 since: 2.4

gtk_color_button_set_color

Sets the current color to be color.

deprecated: Unknown since: 2.4

gtk_color_button_set_rgba

Sets the current color to be rgba.

deprecated: 3.4 since: 3.0

gtk_color_button_set_title

Sets the title for the color selection dialog.

since: 2.4

gtk_color_button_set_use_alpha

Sets whether or not the color button should use the alpha channel.

deprecated: 3.4 since: 2.4

Methods inherited from GtkButton (24)
Methods inherited from GtkBin (1)
Methods inherited from GtkContainer (33)
Methods inherited from GtkWidget (263)
Methods inherited from GObject (43)
Methods inherited from GtkActionable (6)
Methods inherited from GtkActivatable (6)
Methods inherited from GtkBuildable (10)
Methods inherited from GtkColorChooser (5)
[]

Properties

Gtk.ColorButton:alpha

The selected opacity value (0 fully transparent, 65535 fully opaque).

since: 2.4

Gtk.ColorButton:color

The selected color.

deprecated: 3.4 since: 2.4

Gtk.ColorButton:rgba

The RGBA color.

since: 3.0

Gtk.ColorButton:show-editor

Set this property to TRUE to skip the palette in the dialog and go directly to the color editor.

since: 3.20

Gtk.ColorButton:title

The title of the color selection dialog.

since: 2.4

Gtk.ColorButton:use-alpha

If this property is set to TRUE, the color swatch on the button is rendered against a checkerboard background to show its opacity and the opacity slider is displayed in the color selection dialog.

since: 2.4

Properties inherited from GtkButton (9)
Properties inherited from GtkContainer (3)
Properties inherited from GtkWidget (39)
Properties inherited from GtkActionable (2)
Properties inherited from GtkActivatable (2)
Properties inherited from GtkColorChooser (2)
[]

Signals

Gtk.ColorButton::color-set

The ::color-set signal is emitted when the user selects a color. When handling this signal, use gtk_color_button_get_rgba() to find out which color was just selected.

since: 2.4

Signals inherited from GtkButton (6)
Signals inherited from GtkContainer (4)
Signals inherited from GtkWidget (69)
Signals inherited from GObject (1)
Signals inherited from GtkColorChooser (1)

Class structure

[]

Virtual methods

Gtk.ColorButtonClass.color_set
No description available.