11.47Class GtkColorButton

A button to launch a color selection dialog

Class GtkColorButton

The GtkColorButton is a button which displays the currently selected color an allows to open a color selection dialog to change the color. It is suitable widget for selecting a color in a preference dialog.

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.

Methods
get_alphaReturns the current alpha value.
get_colorGets the current color.
get_titleGets the title of the color selection dialog.
get_use_alphaDoes the color selection dialog use the alpha channel?
new_with_colorCreates a new color button.
set_alphaSets the current opacity to be alpha.
set_colorSets the current color to be color.
set_titleSets the title for the color selection dialog.
set_use_alphaSets whether or not the color button should use the alpha channel.
signal_color_setThe color-set signal is emitted when the user selects a color.

Methods

get_alpha

Returns the current alpha value.

GtkColorButton.get_alpha()
Returnan integer between 0 and 65535.

get_color

Gets the current color.

GtkColorButton.get_color()
ReturnGdkColor of the widget.

get_title

Gets the title of the color selection dialog.

GtkColorButton.get_title()
ReturnThe title.

get_use_alpha

Does the color selection dialog use the alpha channel?

GtkColorButton.get_use_alpha()
Returntrue if the color sample uses alpha channel, false if not.

new_with_color

Creates a new color button.

GtkColorButton.new_with_color( color )
color A GdkColor to set the current color with.
Returna new color button.

set_alpha

Sets the current opacity to be alpha.

GtkColorButton.set_alpha( alpha )
alpha an integer between 0 and 65535.

set_color

Sets the current color to be color.

GtkColorButton.set_color( color )
color A GdkColor to set the current color with.

set_title

Sets the title for the color selection dialog.

GtkColorButton.set_title( title )
title String containing new window title.

set_use_alpha

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

GtkColorButton.set_use_alpha( use_alpha )
use_alpha true if color button should use alpha channel, false if not.

signal_color_set

The color-set signal is emitted when the user selects a color.

GtkColorButton.signal_color_set()

When handling this signal, use gtk_color_button_get_color() and gtk_color_button_get_alpha() to find out which color was just selected.

Note that this signal is only emitted when the user changes the color. If you need to react to programmatic color changes as well, use the notify::color signal.

Made with http://www.falconpl.org