ColorChooserWidget

The GtkColorChooserWidget widget lets the user select a color. By default, the chooser presents a prefined palette of colors, plus a small number of settable custom colors. It is also possible to select a different color with the single-color editor. To enter the single-color editing mode, use the context menu of any color of the palette, or use the '+' button to add a new custom color.

The chooser automatically remembers the last selection, as well as custom colors.

To change the initially selected color, use gtk_color_chooser_set_rgba(). To get the selected font use gtk_color_chooser_get_rgba().

The GtkColorChooserWidget is used in the GtkColorChooserDialog to provide a dialog for selecting colors.

Constructors

this
this(GtkColorChooserWidget* gtkColorChooserWidget)

Sets our main struct and passes it to the parent class

this
this()

Creates a new GtkColorChooserWidget.

Members

Functions

getColorChooserWidgetStruct
GtkColorChooserWidget* getColorChooserWidgetStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
getStruct
void* getStruct()

the main Gtk struct as a void*

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.

Mixins

__anonymous
mixin ColorChooserT!(GtkColorChooserWidget)
Undocumented in source.

Variables

gtkColorChooserWidget
GtkColorChooserWidget* gtkColorChooserWidget;

the main Gtk struct

Inherited Members

From Box

gtkBox
GtkBox* gtkBox;

the main Gtk struct

getBoxStruct
GtkBox* getBoxStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
getStruct
void* getStruct()

the main Gtk struct as a void*

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.
__anonymous
mixin OrientableT!(GtkBox)
Undocumented in source.
packStart
void packStart(Widget child, int expand, int fill, uint padding)

Adds child to box, packed with reference to the start of box. The child is packed after any other child packed with reference to the start of box.

packEnd
void packEnd(Widget child, int expand, int fill, uint padding)

Adds child to box, packed with reference to the end of box. The child is packed after (away from end of) any other child packed with reference to the end of box.

getHomogeneous
int getHomogeneous()

Returns whether the box is homogeneous (all children are the same size). See gtk_box_set_homogeneous().

setHomogeneous
void setHomogeneous(int homogeneous)

Sets the "homogeneous" property of box, controlling whether or not all children of box are given equal space in the box.

getSpacing
int getSpacing()

Gets the value set by gtk_box_set_spacing().

setSpacing
void setSpacing(int spacing)

Sets the "spacing" property of box, which is the number of pixels to place between children of box.

reorderChild
void reorderChild(Widget child, int position)

Moves child to a new position in the list of box children. The list is the children field of GtkBox, and contains both widgets packed GTK_PACK_START as well as widgets packed GTK_PACK_END, in the order that these widgets were added to box. A widget's position in the box children list determines where the widget is packed into box. A child widget at some position in the list will be packed just after all other widgets of the same packing type that appear earlier in the list.

queryChildPacking
void queryChildPacking(Widget child, int expand, int fill, uint padding, GtkPackType packType)

Obtains information about how child is packed into box.

setChildPacking
void setChildPacking(Widget child, int expand, int fill, uint padding, GtkPackType packType)

Sets the way child is packed into box.

getBaselinePosition
GtkBaselinePosition getBaselinePosition()

Gets the value set by gtk_box_set_baseline_position().

setBaselinePosition
void setBaselinePosition(GtkBaselinePosition position)

Sets the baseline position of a box. This affects only horizontal boxes with at least one baseline aligned child. If there is more vertical space availible than requested, and the baseline is not allocated by the parent then position is used to allocate the baseline wrt the extra space available.

From ColorChooserIF

getColorChooserTStruct
GtkColorChooser* getColorChooserTStruct()
Undocumented in source.
getStruct
void* getStruct()

the main Gtk struct as a void*

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

Adds a palette to the color chooser. If orientation is horizontal, the colors are grouped in rows, with colorsPerPine colors in each row. If horizontal is false, the colors are grouped in columns instead.

onColorActivatedListeners
void delegate(RGBA, ColorChooserIF)[] onColorActivatedListeners [@property getter]
addOnColorActivated
void addOnColorActivated(void delegate(RGBA, ColorChooserIF) dlg, ConnectFlags connectFlags)

Emitted when a color is activated from the color chooser. This usually happens when the user clicks a color swatch, or a color is selected and the user presses one of the keys Space, Shift+Space, Return or Enter. Since 3.4 See Also GtkColorChooserDialog, GtkColorChooserWidget, GtkColorButton

getRgba
void getRgba(RGBA color)

Gets the currently-selected color.

setRgba
void setRgba(RGBA color)

Sets the color.

getUseAlpha
int getUseAlpha()

Returns whether the color chooser shows the alpha channel.

setUseAlpha
void setUseAlpha(int useAlpha)

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

Meta