Class: Gtk::ColorDialog

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Constructor Details

#initialize ⇒ Gtk::ColorDialog

Creates a new GtkColorDialog object.

Instance Method Details

#choose_rgba(parent, initial_color, cancellable, callback, user_data) ⇒ nil

Presents a color chooser dialog to the user.

Parameters:

  • parent (Gtk::Window) —

    the parent window

  • initial_color (Gdk::RGBA) —

    the color to select initially

  • cancellable (Gio::Cancellable) —

    a cancellable to cancel the operation

  • callback (Gio::AsyncReadyCallback) —

    a callback to call
    when the operation is complete

  • user_data (GObject) —

    data to pass to callback

Returns:

  • (nil)

#choose_rgba_finish(result) ⇒ Gdk::RGBA

Finishes the [methodGtk.ColorDialog.choose_rgba] call

Note that this function returns a [errorGtk.DialogError.DISMISSED]
error if the user cancels the dialog.

Parameters:

  • result (Gio::AsyncResult) —

    the result

Returns:

  • (Gdk::RGBA) —

    the selected color

Returns whether the color chooser dialog
blocks interaction with the parent window
while it is presented.

Returns:

  • (Boolean) —

    true if the color chooser dialog is modal

#modal=(modal) ⇒ Boolean

Whether the color chooser dialog is modal.

Parameters:

  • modal (Boolean)

Returns:

  • (Boolean) —

    modal

  • (Boolean) —

    modal

#modal? ⇒ Boolean

Whether the color chooser dialog is modal.

Returns:

  • (Boolean) —

    modal

#title ⇒ String

A title that may be shown on the color chooser dialog.

Returns:

  • (String) —

    title

#title=(title) ⇒ String

A title that may be shown on the color chooser dialog.

Parameters:

  • title (String)

Returns:

  • (String) —

    title

  • (String) —

    title

#with_alpha ⇒ Boolean

Returns whether colors may have alpha.

Returns:

  • (Boolean) —

    true if colors may have alpha

#with_alpha=(with_alpha) ⇒ Boolean

Whether colors may have alpha (translucency).

When with-alpha is false, the color that is selected
will be forced to have alpha == 1.

Parameters:

  • with_alpha (Boolean)

Returns:

  • (Boolean) —

    with-alpha

  • (Boolean) —

    with-alpha

#with_alpha? ⇒ Boolean

Whether colors may have alpha (translucency).

When with-alpha is false, the color that is selected
will be forced to have alpha == 1.

Returns:

  • (Boolean) —

    with-alpha