gtk.color_button
Module for [ColorButton] class
Types 3
The [gtk.color_button.ColorButton] allows to open a color chooser dialog to change the color.
It is suitable widget for selecting a color in a preference dialog.
CSS nodes
colorbutton
╰── button.color
╰── [content][gtk.color_button.ColorButton] has a single CSS node with name colorbutton which contains a button node. To differentiate it from a plain [gtk.button.Button], it gets the .color style class.
Deprecated
Use [gtk.color_dialog_button.ColorDialogButton] instead
Methods
ColorButton self()Returns `this`, for use in `with` statements.ColorButtonGidBuilder builder()Get builder for [gtk.color_button.ColorButton] Returns: New builder objectbool modal() @propertyGet `modal` property. Returns: Whether the color chooser dialog should be modal.void modal(bool propval) @propertySet `modal` property. Params: propval = Whether the color chooser dialog should be modal.bool showEditor() @propertyGet `showEditor` property. Returns: Whether the color chooser should open in editor mode.void showEditor(bool propval) @propertySet `showEditor` property. Params: propval = Whether the color chooser should open in editor mode.void title(string propval) @propertySet `title` property. Params: propval = The title of the color chooser dialoggtk.color_button.ColorButton newWithRgba(gdk.rgba.RGBA rgba)Creates a new color button showing the given color.bool getModal()Gets whether the dialog is modal. Returns: true if the dialog is modalstring getTitle()Gets the title of the color chooser dialog. Returns: An internal string, do not free the return valuevoid setModal(bool modal)Sets whether the dialog should be modal.void setTitle(string title)Sets the title for the color chooser dialog.gulong connectActivate(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 `Activate` signal.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.widget.WidgetGidBuilderImpl!T, gtk.color_chooser.ColorChooserGidBuilderImpl!T
Methods
T modal(bool propval)Set `modal` property. Params: propval = Whether the color chooser dialog should be modal. Returns: Builder instance for fluent chainingT showEditor(bool propval)Set `showEditor` property. Params: propval = Whether the color chooser should open in editor mode.T title(string propval)Set `title` property. Params: propval = The title of the color chooser dialog Returns: Builder instance for fluent chainingFluent builder for [gtk.color_button.ColorButton]
Methods