ColorSelection

Description 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.

getColor
void getColor(double[] color)

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

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)

Sets color 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)

Fills color 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.

setColor
void setColor(double[] color)

Warning gtk_color_selection_set_color has been deprecated since version 2.0 and should not be used in newly-written code. Use gtk_color_selection_set_current_color() 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.

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)

Sets the current color to be color. The first time this is called, it will also set the original color to be color 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)

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.

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

Warning gtk_color_selection_set_update_policy is deprecated and should not be used in newly-written code. Sets the policy controlling when the color_changed signals are emitted.

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(Color colors, int nColors)

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

setChangePaletteHook
GtkColorSelectionChangePaletteFunc setChangePaletteHook(GtkColorSelectionChangePaletteFunc func)

Warning gtk_color_selection_set_change_palette_hook has been deprecated since version 2.4 and should not be used in newly-written code. This function does not work in multihead environments. Use gtk_color_selection_set_change_palette_with_screen_hook() instead. 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 GtkSettings property "gtk-color-palette" so all GtkColorSelection widgets will be modified.

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 GtkSettings property "gtk-color-palette" 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 VBox

gtkVBox
GtkVBox* gtkVBox;

the main Gtk struct

getVBoxStruct
GtkVBox* getVBoxStruct()
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.

Meta