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
ColorButtonGidBuilder builder() static nothrowGet builder for [gtk.color_button.ColorButton] Returns: New builder objectuint 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).void color(gdk.color.Color propval) @property nothrowSet `color` property. Params: propval = The selected 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 dialogvoid title(string propval) @property nothrowSet `title` property. Params: propval = The title of the color selection dialogbool 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.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 valuebool getUseAlpha() nothrowDoes the color selection dialog use the alpha channel ? Returns: true if the color sample uses alpha channel, false if notvoid 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.classColorButtonGidBuilderImpl(T) : gtk.button.ButtonGidBuilderImpl!T, gtk.color_chooser.ColorChooserGidBuilderImpl!T
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 chainingT color(gdk.color.Color propval) nothrowSet `color` property. Params: propval = The selected color. Returns: Builder instance for fluent chainingT rgba(gdk.rgba.RGBA propval) nothrowSet `rgba` property. Params: propval = The RGBA color. Returns: Builder instance for fluent chainingT 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 chainingT 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