ColorChooserDialog

A dialog for choosing a color.

An example GtkColorChooserDialog

GtkColorChooserDialog implements the [iface@Gtk.ColorChooser] interface and does not provide much API of its own.

To create a GtkColorChooserDialog, use [ctor@Gtk.ColorChooserDialog.new].

To change the initially selected color, use [method@Gtk.ColorChooser.set_rgba]. To get the selected color use [method@Gtk.ColorChooser.get_rgba].

Constructors

this
this(GtkColorChooserDialog* gtkColorChooserDialog, bool ownedRef)

Sets our main struct and passes it to the parent class.

this
this(string title, Window parent)

Creates a new GtkColorChooserDialog.

Members

Functions

getColorChooserDialogStruct
GtkColorChooserDialog* getColorChooserDialogStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

Mixins

__anonymous
mixin ColorChooserT!(GtkColorChooserDialog)
Undocumented in source.

Static functions

getType
GType getType()

Variables

gtkColorChooserDialog
GtkColorChooserDialog* gtkColorChooserDialog;

the main Gtk struct

Inherited Members

From Dialog

gtkDialog
GtkDialog* gtkDialog;

the main Gtk struct

getDialogStruct
GtkDialog* getDialogStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

addButtons
void addButtons(string[] buttonsText, ResponseType[] responses)
getType
GType getType()
addActionWidget
void addActionWidget(Widget child, int responseId)

Adds an activatable widget to the action area of a GtkDialog.

addButton
Widget addButton(string buttonText, int responseId)

Adds a button with the given text.

getContentArea
Box getContentArea()

Returns the content area of @dialog.

getHeaderBar
HeaderBar getHeaderBar()

Returns the header bar of @dialog.

getResponseForWidget
int getResponseForWidget(Widget widget)

Gets the response id of a widget in the action area of a dialog.

getWidgetForResponse
Widget getWidgetForResponse(int responseId)

Gets the widget button that uses the given response ID in the action area of a dialog.

response
void response(int responseId)

Emits the ::response signal with the given response ID.

setDefaultResponse
void setDefaultResponse(int responseId)

Sets the default widget for the dialog based on the response ID.

setResponseSensitive
void setResponseSensitive(int responseId, bool setting)

A convenient way to sensitize/desensitize dialog buttons.

addOnClose
gulong addOnClose(void delegate(Dialog) dlg, ConnectFlags connectFlags)

Emitted when the user uses a keybinding to close the dialog.

addOnResponse
gulong addOnResponse(void delegate(int, Dialog) dlg, ConnectFlags connectFlags)

Emitted when an action widget is clicked.

From ColorChooserIF

getColorChooserStruct
GtkColorChooser* getColorChooserStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

getType
GType getType()
addPalette
void addPalette(GtkOrientation orientation, int colorsPerLine, RGBA[] colors)

Adds a palette to the color chooser.

getRgba
void getRgba(RGBA color)

Gets the currently-selected color.

getUseAlpha
bool getUseAlpha()

Returns whether the color chooser shows the alpha channel.

setRgba
void setRgba(RGBA color)

Sets the color.

setUseAlpha
void setUseAlpha(bool useAlpha)

Sets whether or not the color chooser should use the alpha channel.

addOnColorActivated
gulong addOnColorActivated(void delegate(RGBA, ColorChooserIF) dlg, ConnectFlags connectFlags)

Emitted when a color is activated from the color chooser.

Meta