Module gwy :: Class ColorButton
[hide private]
[frames] | no frames]

Class ColorButton

source code

Instance Methods [hide private]
 
__init__()
Creates a new color button.
source code
 
set_color(color)
Sets the current color to be color.
source code
 
get_color()
Sets color to be the current color in the ColorButton widget.
source code
 
set_use_alpha(use_alpha)
Sets whether or not the color button should use the alpha channel.
source code
 
get_use_alpha()
Does the color selection dialog use the alpha channel?
source code
Method Details [hide private]

__init__()
(Constructor)

source code 

Creates a new color button. This returns a widget in the form of a small button containing a swatch representing the current selected color. When the button is clicked, a color-selection dialog will open, allowing the user to select a color. The swatch will be updated to reflect the new color when the user finishes.

Returns:
a new color button. (gtk.Widget)

set_color(color)

source code 

Sets the current color to be color.

Parameters:
  • color - A RGBA to set the current color with. (const-RGBA*)

get_color()

source code 

Sets color to be the current color in the ColorButton widget.

Returns:
Value color. ((RGBAOutArg))

set_use_alpha(use_alpha)

source code 

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

Parameters:
  • use_alpha - True if color button should use alpha channel, False if not. (bool)

get_use_alpha()

source code 

Does the color selection dialog use the alpha channel?

Returns:
True if the color sample uses alpha channel, False if not. (bool)