Gtk.ColorSelection¶
- Subclasses:
 None
Methods¶
- Inherited:
 Gtk.Box (14), Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10), Gtk.Orientable (2)
- Structs:
 Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5)
class  | 
  | 
class  | 
  | 
class  | 
  | 
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
Virtual Methods¶
Properties¶
- Inherited:
 Gtk.Box (3), Gtk.Container (3), Gtk.Widget (39), Gtk.Orientable (1)
Name  | 
Type  | 
Flags  | 
Short Description  | 
|---|---|---|---|
r/w  | 
The current opacity value (0 fully transparent, 65535 fully opaque)  | 
||
d/r/w  | 
The current color   | 
||
r/w  | 
The current RGBA color  | 
||
r/w  | 
Whether the color selector should allow setting opacity  | 
||
r/w  | 
Whether a palette should be used  | 
Child Properties¶
- Inherited:
 
Style Properties¶
- Inherited:
 
Signals¶
- Inherited:
 
Name  | 
Short Description  | 
|---|---|
This signal is emitted when the color changes in the   | 
Fields¶
- Inherited:
 
Name  | 
Type  | 
Access  | 
Description  | 
|---|---|---|---|
parent_instance  | 
r  | 
Class Details¶
- class Gtk.ColorSelection(*args, **kwargs)¶
 - Bases:
 - Abstract:
 No
- Structure:
 
- classmethod new()[source]¶
 - Returns:
 a new
Gtk.ColorSelection- Return type:
 
Creates a new
Gtk.ColorSelection.
- classmethod palette_from_string(str)[source]¶
 - Parameters:
 str (
str) – a string encoding a color palette- Returns:
 Trueif a palette was successfully parsed- colors:
 return location for allocated array of
Gdk.Color
- Return type:
 
Parses a color palette string; the string is a colon-separated list of color names readable by
Gdk.Color.parse().
- classmethod palette_to_string(colors)[source]¶
 - Parameters:
 colors ([
Gdk.Color]) – an array of colors- Returns:
 allocated string encoding the palette
- Return type:
 
Encodes a palette as a string, useful for persistent storage.
- get_current_alpha()[source]¶
 - Returns:
 an integer between 0 and 65535
- Return type:
 
Returns the current alpha value.
- get_current_color()[source]¶
 - 
Sets color to be the current color in the
Gtk.ColorSelectionwidget.Deprecated since version 3.4: Use
Gtk.ColorSelection.get_current_rgba() instead. 
- get_current_rgba()[source]¶
 - 
Sets rgba to be the current color in the
Gtk.ColorSelectionwidget.New in version 3.0.
 
- get_previous_alpha()[source]¶
 - Returns:
 an integer between 0 and 65535
- Return type:
 
Returns the previous alpha value.
- get_previous_color()[source]¶
 - 
Fills color in with the original color value.
Deprecated since version 3.4: Use
Gtk.ColorSelection.get_previous_rgba() instead. 
- is_adjusting()[source]¶
 - Returns:
 Trueif the user is currently dragging a color around, andFalseif the selection has stopped- Return type:
 
Gets the current state of the self.
- set_current_alpha(alpha)[source]¶
 - Parameters:
 alpha (
int) – an integer between 0 and 65535
Sets the current opacity to be alpha.
The first time this is called, it will also set the original opacity to be alpha too.
- set_current_color(color)[source]¶
 - 
Sets the current color to be color.
The first time this is called, it will also set the original color to be color too.
Deprecated since version 3.4: Use
Gtk.ColorSelection.set_current_rgba() instead. 
- set_current_rgba(rgba)[source]¶
 - 
Sets the current color to be rgba.
The first time this is called, it will also set the original color to be rgba too.
New in version 3.0.
 
- set_has_palette(has_palette)[source]¶
 - 
Shows and hides the palette based upon the value of has_palette.
 
- set_previous_alpha(alpha)[source]¶
 - Parameters:
 alpha (
int) – an integer between 0 and 65535
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.
- set_previous_color(color)[source]¶
 - 
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.ColorSelection.set_current_color() will also set this color the first time it is called.Deprecated since version 3.4: Use
Gtk.ColorSelection.set_previous_rgba() instead. 
- set_previous_rgba(rgba)[source]¶
 - 
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.ColorSelection.set_current_rgba() will also set this color the first time it is called.New in version 3.0.
 
- do_color_changed() virtual¶
 
Signal Details¶
- Gtk.ColorSelection.signals.color_changed(color_selection)¶
 - Signal Name:
 color-changed- Flags:
 - Parameters:
 color_selection (
Gtk.ColorSelection) – The object which received the signal
This signal is emitted when the color changes in the
Gtk.ColorSelectionaccording to its update policy.
Property Details¶
- Gtk.ColorSelection.props.current_alpha¶
 - 
The current opacity value (0 fully transparent, 65535 fully opaque)
 
- Gtk.ColorSelection.props.current_color¶
 - Name:
 current-color- Type:
 - Default Value:
 - Flags:
 
The current
Gdk.Colorcolor.Deprecated since version 3.4: Use
Gtk.ColorSelection:current-rgbainstead.
- Gtk.ColorSelection.props.current_rgba¶
 - 
The current RGBA color.
New in version 3.0.
 
- Gtk.ColorSelection.props.has_opacity_control¶
 - 
Whether the color selector should allow setting opacity