ColorSelection

The GtkColorSelection is a widget that is used to select a color. It consists of a color wheel and number of sliders and entry boxes for color parameters such as hue, saturation, value, red, green, blue, and opacity. It is found on the standard color selection dialog box GtkColorSelectionDialog.

Constructors

this
this(GtkColorSelection* gtkColorSelection)

Sets our main struct and passes it to the parent class

this
this()

Creates a new GtkColorSelection.

Members

Functions

addOnColorChanged
void addOnColorChanged(void delegate(ColorSelection) dlg, ConnectFlags connectFlags)

This signal is emitted when the color changes in the GtkColorSelection according to its update policy.

getColorSelectionStruct
GtkColorSelection* getColorSelectionStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
getCurrentAlpha
ushort getCurrentAlpha()

Returns the current alpha value.

getCurrentColor
void getCurrentColor(Color color)

Warning gtk_color_selection_get_current_color has been deprecated since version 3.4 and should not be used in newly-written code. Use gtk_color_selection_get_current_rgba() instead. Sets color to be the current color in the GtkColorSelection widget.

getCurrentRgba
void getCurrentRgba(RGBA rgba)

Sets rgba to be the current color in the GtkColorSelection widget.

getHasOpacityControl
int getHasOpacityControl()

Determines whether the colorsel has an opacity control.

getHasPalette
int getHasPalette()

Determines whether the color selector has a color palette.

getPreviousAlpha
ushort getPreviousAlpha()

Returns the previous alpha value.

getPreviousColor
void getPreviousColor(Color color)

Warning gtk_color_selection_get_previous_color has been deprecated since version 3.4 and should not be used in newly-written code. Use gtk_color_selection_get_previous_rgba() instead. Fills color in with the original color value.

getPreviousRgba
void getPreviousRgba(RGBA rgba)

Fills rgba in with the original color value.

getStruct
void* getStruct()

the main Gtk struct as a void*

isAdjusting
int isAdjusting()

Gets the current state of the colorsel.

setCurrentAlpha
void setCurrentAlpha(ushort alpha)

Sets the current opacity to be alpha. The first time this is called, it will also set the original opacity to be alpha too.

setCurrentColor
void setCurrentColor(Color color)

Warning gtk_color_selection_set_current_color has been deprecated since version 3.4 and should not be used in newly-written code. Use gtk_color_selection_set_current_rgba() instead. Sets the current color to be color. The first time this is called, it will also set the original color to be color too.

setCurrentRgba
void setCurrentRgba(RGBA rgba)

Sets the current color to be rgba. The first time this is called, it will also set the original color to be rgba too.

setHasOpacityControl
void setHasOpacityControl(int hasOpacity)

Sets the colorsel to use or not use opacity.

setHasPalette
void setHasPalette(int hasPalette)

Shows and hides the palette based upon the value of has_palette.

setPreviousAlpha
void setPreviousAlpha(ushort alpha)

Sets the 'previous' alpha to be alpha. This function should be called with some hesitations, as it might seem confusing to have that alpha change.

setPreviousColor
void setPreviousColor(Color color)

Warning gtk_color_selection_set_previous_color has been deprecated since version 3.4 and should not be used in newly-written code. Use gtk_color_selection_set_previous_rgba() instead. Sets the 'previous' color to be color. This function should be called with some hesitations, as it might seem confusing to have that color change. Calling gtk_color_selection_set_current_color() will also set this color the first time it is called.

setPreviousRgba
void setPreviousRgba(RGBA rgba)

Sets the 'previous' color to be rgba. This function should be called with some hesitations, as it might seem confusing to have that color change. Calling gtk_color_selection_set_current_rgba() will also set this color the first time it is called.

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

Static functions

callBackColorChanged
void callBackColorChanged(GtkColorSelection* colorselectionStruct, ColorSelection _colorSelection)
Undocumented in source. Be warned that the author may not have intended to support it.
paletteFromString
int paletteFromString(string str, GdkColor[] colors)

Parses a color palette string; the string is a colon-separated list of color names readable by gdk_color_parse().

paletteToString
string paletteToString(GdkColor[] colors)

Encodes a palette as a string, useful for persistent storage.

setChangePaletteWithScreenHook
GtkColorSelectionChangePaletteWithScreenFunc setChangePaletteWithScreenHook(GtkColorSelectionChangePaletteWithScreenFunc func)

Installs a global function to be called whenever the user tries to modify the palette in a color selection. This function should save the new palette contents, and update the "gtk-color-palette" GtkSettings property so all GtkColorSelection widgets will be modified. Since 2.2

Variables

connectedSignals
int[string] connectedSignals;
gtkColorSelection
GtkColorSelection* gtkColorSelection;

the main Gtk struct

onColorChangedListeners
void delegate(ColorSelection)[] onColorChangedListeners;
Undocumented in source.

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.

Meta