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 _getGType() static nothrow
GType _gType() @property nothrow
ColorButton self() nothrowReturns `this`, for use in `with` statements.
ColorButtonGidBuilder builder() static nothrowGet builder for [gtk.color_button.ColorButton] Returns: New builder object
uint alpha() @property nothrowGet `alpha` property. Returns: The selected opacity value (0 fully transparent, 65535 fully opaque).
void alpha(uint propval) @property nothrowSet `alpha` property. Params: propval = The selected opacity value (0 fully transparent, 65535 fully opaque).
gdk.color.Color color() @property nothrowGet `color` property. Returns: The selected color.
void color(gdk.color.Color propval) @property nothrowSet `color` property. Params: propval = The selected color.
gdk.rgba.RGBA rgba() @property nothrowGet `rgba` property. Returns: The RGBA color.
void rgba(gdk.rgba.RGBA propval) @property nothrowSet `rgba` property. Params: propval = The RGBA color.
bool showEditor() @property nothrowGet `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) @property nothrowSet `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() @property nothrowGet `title` property. Returns: The title of the color selection dialog
void title(string propval) @property nothrowSet `title` property. Params: propval = The title of the color selection dialog
bool useAlpha() @property nothrowGet `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) @property nothrowSet `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 newWithColor(gdk.color.Color color) static nothrowCreates a new color button.
gtk.color_button.ColorButton newWithRgba(gdk.rgba.RGBA rgba) static nothrowCreates a new color button.
ushort getAlpha() nothrowReturns the current alpha value. Returns: an integer between 0 and 65535
void getColor(out gdk.color.Color color) nothrowSets color to be the current color in the #GtkColorButton widget.
string getTitle() nothrowGets the title of the color selection dialog. Returns: An internal string, do not free the return value
bool getUseAlpha() nothrowDoes the color selection dialog use the alpha channel ? Returns: true if the color sample uses alpha channel, false if not
void setAlpha(ushort alpha) nothrowSets the current opacity to be alpha.
void setColor(gdk.color.Color color) nothrowSets the current color to be color.
void setTitle(string title) nothrowSets the title for the color selection dialog.
void setUseAlpha(bool useAlpha) nothrowSets 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) nothrowConnect to `ColorSet` signal.
Constructors
this(void * ptr, Flag!"Take" take)
this()Creates a new color button.

Fluent builder implementation template for gtk.color_button.ColorButton

Methods
T alpha(uint propval) nothrowSet `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) nothrowSet `color` property. Params: propval = The selected color. Returns: Builder instance for fluent chaining
T rgba(gdk.rgba.RGBA propval) nothrowSet `rgba` property. Params: propval = The RGBA color. Returns: Builder instance for fluent chaining
T showEditor(bool propval) nothrowSet `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) nothrowSet `title` property. Params: propval = The title of the color selection dialog Returns: Builder instance for fluent chaining
T useAlpha(bool propval) nothrowSet `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

Methods
ColorButton build() nothrowCreate object from builder. Returns: New object