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
ColorDialogGidBuilder builder() static nothrowGet builder for [gtk.color_dialog.ColorDialog] Returns: New builder objectbool modal() @property nothrowGet `modal` property. Returns: Whether the color chooser dialog is modal.void modal(bool propval) @property nothrowSet `modal` property. Params: propval = Whether the color chooser dialog is modal.string title() @property nothrowGet `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) @property nothrowSet `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() @property nothrowGet `withAlpha` property. Returns: Whether colors may have alpha (translucency).void withAlpha(bool propval) @property nothrowSet `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) nothrowThis 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() nothrowReturns whether the color chooser dialog blocks interaction with the parent window while it is presented. Returns: `TRUE` if the color chooser dialog is modalstring getTitle() nothrowReturns the title that will be shown on the color chooser dialog. Returns: the titlebool getWithAlpha() nothrowReturns whether colors may have alpha. Returns: `TRUE` if colors may have alphavoid setModal(bool modal) nothrowSets whether the color chooser dialog blocks interaction with the parent window while it is presented.Fluent builder implementation template for gtk.color_dialog.ColorDialog
Methods
T modal(bool propval) nothrowSet `modal` property. Params: propval = Whether the color chooser dialog is modal. Returns: Builder instance for fluent chainingT title(string propval) nothrowSet `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) nothrowSet `withAlpha` property. Params: propval = Whether colors may have alpha (translucency).Fluent builder for gtk.color_dialog.ColorDialog
Methods