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

Class ColorButton


ColorButton The selected color.
Method Summary
  __init__()
Creates a new color button.
  get_color(color)
Sets color to be the current color in the ColorButton widget.
  get_use_alpha()
Does the color selection dialog use the alpha channel?
  set_color(color)
Sets the current color to be color.
  set_use_alpha(use_alpha)
Sets whether or not the color button should use the alpha channel.

Method Details

__init__()
(Constructor)

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.

get_color(color)

Sets color to be the current color in the ColorButton widget.
Parameters:
color - a RGBA to fill in with the current color. (RGBA)

get_use_alpha()

Does the color selection dialog use the alpha channel?
Returns:
True if the color sample uses alpha channel, False if not.

set_color(color)

Sets the current color to be color.
Parameters:
color - A RGBA to set the current color with. (RGBA)

set_use_alpha(use_alpha)

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)

Generated by Epydoc 2.1 on Tue Dec 30 04:01:42 2008 http://epydoc.sf.net