Next: , Previous: GtkColorButton, Up: Top


78 GtkColorSelection

A widget used to select a color

78.1 Overview

The <gtk-color-selection> is a widget that is used to select a color. It consists of a color wheel and number of sliders and entry boxes for color parameters such as hue, saturation, value, red, green, blue, and opacity. It is found on the standard color selection dialog box <gtk-color-selection-dialog>.

78.2 Usage

— Class: <gtk-color-selection>

Derives from <gtk-vbox>.

This class defines the following slots:

has-palette
Whether a palette should be used
has-opacity-control
Whether the color selector should allow setting opacity
current-color
The current color
current-alpha
The current opacity value (0 fully transparent, 65535 fully opaque)
— Signal on <gtk-color-selection>: color-changed

This signal is emitted when the color changes in the <gtk-color-selection> according to its update policy.

— Function: gtk-color-selection-new ⇒  (ret <gtk-widget>)

Creates a new GtkColorSelection.

ret
a new <gtk-color-selection>
— Function: gtk-color-selection-set-has-palette (self <gtk-color-selection>) (has_palette bool)
— Method: set-has-palette

Shows and hides the palette based upon the value of has-palette.

colorsel
a <gtk-color-selection>.
has-palette
#t’ if palette is to be visible, ‘#f’ otherwise.
— Function: gtk-color-selection-get-has-palette (self <gtk-color-selection>) ⇒  (ret bool)
— Method: get-has-palette

Determines whether the color selector has a color palette.

colorsel
a <gtk-color-selection>.
ret
#t’ if the selector has a palette. ‘#f’ if it hasn't.
— Function: gtk-color-selection-is-adjusting (self <gtk-color-selection>) ⇒  (ret bool)
— Method: is-adjusting

Gets the current state of the colorsel.

colorsel
a <gtk-color-selection>.
ret
#t’ if the user is currently dragging a color around, and ‘#f’ if the selection has stopped.