ColorDialog
Object Hierarchy:
Gtk.ColorDialog
Gtk.ColorDialog
Gtk.ColorDialog
GLib.Object
GLib.Object
GLib.Object->Gtk.ColorDialog
Description:
[ CCode ( type_id = "gtk_color_dialog_get_type ()" ) ] [ Version ( since = "4.10" ) ]public sealed class ColorDialog : Object
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.
Content:
Properties:
public bool modal { get ; set ; }
Whether the color chooser dialog is modal.
public string title { get ; set ; }
A title that may be shown on the color chooser dialog that is
presented by [method@Gtk.
public bool with_alpha { get ; set ; }
Whether colors may have alpha (translucency).
Creation methods:
Methods:
public async RGBA ? choose_rgba (Window ? parent, RGBA ? initial_color, Cancellable ? cancellable) throws Error
This function initiates a color choice operation by presenting a color
chooser dialog to the user.
public bool get_modal ()
Returns whether the color chooser dialog blocks interaction with the
parent window while it is presented.
public unowned string get_title ()
Returns the title that will be shown on the color chooser dialog.
public bool get_with_alpha ()
Returns whether colors may have alpha.
public void set_modal (bool modal)
Sets whether the color chooser dialog blocks interaction with the
parent window while it is presented.
public void set_title (string title)
Sets the title that will be shown on the color chooser dialog.
public void set_with_alpha (bool with_alpha)
Sets whether colors may have alpha.
Inherited Members:
All known members inherited from class GLib.Object
@get
@new
@ref
@set
add_toggle_ref
add_weak_pointer
bind_property
connect
constructed
disconnect
dispose
dup_data
dup_qdata
force_floating
freeze_notify
get_class
get_data
get_property
get_qdata
get_type
getv
interface_find_property
interface_install_property
interface_list_properties
is_floating
new_valist
new_with_properties
newv
notify
notify_property
ref_count
ref_sink
remove_toggle_ref
remove_weak_pointer
replace_data
replace_qdata
set_data
set_data_full
set_property
set_qdata
set_qdata_full
set_valist
setv
steal_data
steal_qdata
thaw_notify
unref
watch_closure
weak_ref
weak_unref