gtk.color_button

Module for [ColorButton] class

Types 3

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.

Methods
GType _gType() @property
ColorButton self()Returns `this`, for use in `with` statements.
ColorButtonGidBuilder builder()Get builder for [gtk.color_button.ColorButton] Returns: New builder object
uint alpha() @propertyGet `alpha` property. Returns: The selected opacity value (0 fully transparent, 65535 fully opaque).
void alpha(uint propval) @propertySet `alpha` property. Params: propval = The selected opacity value (0 fully transparent, 65535 fully opaque).
gdk.color.Color color() @propertyGet `color` property. Returns: The selected color.
void color(gdk.color.Color propval) @propertySet `color` property. Params: propval = The selected color.
gdk.rgba.RGBA rgba() @propertyGet `rgba` property. Returns: The RGBA color.
void rgba(gdk.rgba.RGBA propval) @propertySet `rgba` property. Params: propval = The RGBA color.
bool showEditor() @propertyGet `showEditor` property. Returns: Set this property to true to skip the palette in the dialog and go directly to the color editor.
void showEditor(bool propval) @propertySet `showEditor` property. Params: propval = Set this property to true to skip the palette in the dialog and go directly to the color editor.
string title() @propertyGet `title` property. Returns: The title of the color selection dialog
void title(string propval) @propertySet `title` property. Params: propval = The title of the color selection dialog
bool useAlpha() @propertyGet `useAlpha` property. Returns: 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 display...
void useAlpha(bool propval) @propertySet `useAlpha` property. Params: propval = 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 i...
gtk.color_button.ColorButton newWithRgba(gdk.rgba.RGBA rgba)Creates a new color button.
ushort getAlpha()Returns the current alpha value. Returns: an integer between 0 and 65535
void getColor(out gdk.color.Color color)Sets color to be the current color in the #GtkColorButton widget.
string getTitle()Gets the title of the color selection dialog. Returns: An internal string, do not free the return value
bool getUseAlpha()Does the color selection dialog use the alpha channel ? Returns: true if the color sample uses alpha channel, false if not
void setAlpha(ushort alpha)Sets the current opacity to be alpha.
void setColor(gdk.color.Color color)Sets the current color to be color.
void setTitle(string title)Sets the title for the color selection dialog.
void setUseAlpha(bool useAlpha)Sets whether or not the color button should use the alpha channel.
gulong connectColorSet(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtk.color_button.ColorButton))) && Parameters!T.length < 2)Connect to `ColorSet` signal.
Constructors
this(void * ptr, Flag!"Take" take)
this()Creates a new color button.
Methods
T alpha(uint propval)Set `alpha` property. Params: propval = The selected opacity value (0 fully transparent, 65535 fully opaque). Returns: Builder instance for fluent chaining
T color(gdk.color.Color propval)Set `color` property. Params: propval = The selected color. Returns: Builder instance for fluent chaining
T rgba(gdk.rgba.RGBA propval)Set `rgba` property. Params: propval = The RGBA color. Returns: Builder instance for fluent chaining
T showEditor(bool propval)Set `showEditor` property. Params: propval = Set this property to true to skip the palette in the dialog and go directly to the color editor.
T title(string propval)Set `title` property. Params: propval = The title of the color selection dialog Returns: Builder instance for fluent chaining
T useAlpha(bool propval)Set `useAlpha` property. Params: propval = 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 i...

Fluent builder for [gtk.color_button.ColorButton]