gtk.color_dialog

Module for [ColorDialog] class

Types 3

A [gtk.color_dialog.ColorDialog] object collects the arguments that are needed to present a color chooser dialog to the user, such as a title for the dialog and whether it should be modal.

The dialog is shown with the [gtk.color_dialog.ColorDialog.chooseRgba] function. This API follows the GIO async pattern, and the result can be obtained by calling [gtk.color_dialog.ColorDialog.chooseRgbaFinish].

See [gtk.color_dialog_button.ColorDialogButton] for a convenient control that uses [gtk.color_dialog.ColorDialog] and presents the results.

Methods
GType _gType() @property
ColorDialog self()Returns `this`, for use in `with` statements.
ColorDialogGidBuilder builder()Get builder for [gtk.color_dialog.ColorDialog] Returns: New builder object
bool modal() @propertyGet `modal` property. Returns: Whether the color chooser dialog is modal.
void modal(bool propval) @propertySet `modal` property. Params: propval = Whether the color chooser dialog is modal.
string title() @propertyGet `title` property. Returns: A title that may be shown on the color chooser dialog that is presented by [gtk.color_dialog.ColorDialog.chooseRgba].
void title(string propval) @propertySet `title` property. Params: propval = A title that may be shown on the color chooser dialog that is presented by [gtk.color_dialog.ColorDialog.chooseRgba].
bool withAlpha() @propertyGet `withAlpha` property. Returns: Whether colors may have alpha (translucency).
void withAlpha(bool propval) @propertySet `withAlpha` property. Params: propval = Whether colors may have alpha (translucency).
void chooseRgba(gtk.window.Window parent, gdk.rgba.RGBA initialColor, gio.cancellable.Cancellable cancellable = null, gio.types.AsyncReadyCallback callback = null)This function initiates a color choice operation by presenting a color chooser dialog to the user.
gdk.rgba.RGBA chooseRgbaFinish(gio.async_result.AsyncResult result)Finishes the [gtk.color_dialog.ColorDialog.chooseRgba] call and returns the resulting color.
bool getModal()Returns whether the color chooser dialog blocks interaction with the parent window while it is presented. Returns: `TRUE` if the color chooser dialog is modal
string getTitle()Returns the title that will be shown on the color chooser dialog. Returns: the title
bool getWithAlpha()Returns whether colors may have alpha. Returns: `TRUE` if colors may have alpha
void setModal(bool modal)Sets whether the color chooser dialog blocks interaction with the parent window while it is presented.
void setTitle(string title)Sets the title that will be shown on the color chooser dialog.
void setWithAlpha(bool withAlpha)Sets whether colors may have alpha.
Constructors
this(void * ptr, Flag!"Take" take)
this()Creates a new [gtk.colordialog.ColorDialog] object. Returns: the new [gtk.colordialog.ColorDialog]
Methods
T modal(bool propval)Set `modal` property. Params: propval = Whether the color chooser dialog is modal. Returns: Builder instance for fluent chaining
T title(string propval)Set `title` property. Params: propval = A title that may be shown on the color chooser dialog that is presented by [gtk.color_dialog.ColorDialog.chooseRgba]. Returns: Builder instance for fluent ch...
T withAlpha(bool propval)Set `withAlpha` property. Params: propval = Whether colors may have alpha (translucency).

Fluent builder for [gtk.color_dialog.ColorDialog]