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
ColorButton self()Returns `this`, for use in `with` statements.ColorButtonGidBuilder builder()Get builder for [gtk.color_button.ColorButton] Returns: New builder objectuint 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).void color(gdk.color.Color propval) @propertySet `color` property. Params: propval = The selected 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.void title(string propval) @propertySet `title` property. Params: propval = The title of the color selection dialogbool 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 newWithColor(gdk.color.Color color)Creates a new color button.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 65535void 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 valuebool getUseAlpha()Does the color selection dialog use the alpha channel ? Returns: true if the color sample uses alpha channel, false if notvoid 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.classColorButtonGidBuilderImpl(T) : gtk.button.ButtonGidBuilderImpl!T, gtk.color_chooser.ColorChooserGidBuilderImpl!T
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 chainingT color(gdk.color.Color propval)Set `color` property. Params: propval = The selected color. Returns: Builder instance for fluent chainingT rgba(gdk.rgba.RGBA propval)Set `rgba` property. Params: propval = The RGBA color. Returns: Builder instance for fluent chainingT 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 chainingT 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]
Methods