Gtk.ColorDialog¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/en |
|||
r/w/en |
|||
r/w/en |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Gtk.ColorDialog(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
A
GtkColorDialog
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 [method`Gtk`.ColorDialog.choose_rgba] function. This API follows the GIO async pattern, and the result can be obtained by calling [method`Gtk`.ColorDialog.choose_rgba_finish].
See [class`Gtk`.ColorDialogButton] for a convenient control that uses
GtkColorDialog
and presents the results.New in version 4.10.
- classmethod new()[source]¶
- Returns:
the new
GtkColorDialog
- Return type:
Creates a new
GtkColorDialog
object.New in version 4.10.
- choose_rgba(parent, initial_color, cancellable, callback, *user_data)[source]¶
- Parameters:
parent (
Gtk.Window
orNone
) – the parentGtkWindow
initial_color (
Gdk.RGBA
orNone
) – the color to select initiallycancellable (
Gio.Cancellable
orNone
) – aGCancellable
to cancel the operationcallback (
Gio.AsyncReadyCallback
orNone
) – a callback to call when the operation is complete
This function initiates a color choice operation by presenting a color chooser dialog to the user.
The callback will be called when the dialog is dismissed. It should call [method`Gtk`.ColorDialog.choose_rgba_finish] to obtain the result.
New in version 4.10.
- choose_rgba_finish(result)[source]¶
- Parameters:
result (
Gio.AsyncResult
) – aGAsyncResult
- Raises:
- Returns:
the selected color, or
NULL
and error is set- Return type:
Finishes the [method`Gtk`.ColorDialog.choose_rgba] call and returns the resulting color.
New in version 4.10.
- get_modal()[source]¶
- Returns:
TRUE
if the color chooser dialog is modal- Return type:
Returns whether the color chooser dialog blocks interaction with the parent window while it is presented.
New in version 4.10.
- get_title()[source]¶
- Returns:
the title
- Return type:
Returns the title that will be shown on the color chooser dialog.
New in version 4.10.
- get_with_alpha()[source]¶
- Returns:
TRUE
if colors may have alpha- Return type:
Returns whether colors may have alpha.
New in version 4.10.
- set_modal(modal)[source]¶
- Parameters:
modal (
bool
) – the new value
Sets whether the color chooser dialog blocks interaction with the parent window while it is presented.
New in version 4.10.
Property Details¶
- Gtk.ColorDialog.props.modal¶
- Name:
modal
- Type:
- Default Value:
- Flags:
Whether the color chooser dialog is modal.
New in version 4.10.
- Gtk.ColorDialog.props.title¶
- Name:
title
- Type:
- Default Value:
- Flags:
A title that may be shown on the color chooser dialog that is presented by [method`Gtk`.ColorDialog.choose_rgba].
New in version 4.10.