Class Index Cross Index Namespace Index

Class Gtk::ColorSelection

A widget used to select a color.
Contained in: Gtk
Derived from: Gtk::VBox
Derived by: none

#include <gtk--/colorselection.h>


public function member index:

ColorSelection();
signal void color_changed();
void get_color(gdouble* color) const;
GtkColorSelection* gtkobj();
const GtkColorSelection* gtkobj() const;
static bool isA(Object* object);
void set_color(const gdouble* color);
void set_opacity(gint use_opacity);
void set_update_policy(GtkUpdateType policy);
virtual ~ColorSelection();
 

protected function member index:

virtual void color_changed_impl();
 

Description:

The Gtk::ColorSelection 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 Gtk::ColorSelectionDialog.


Function Member Descriptions:

Gtk::ColorSelection::color_changed - This signal is emitted when the color changes in the Gtk::ColorSelection according to its update policy.

signal void color_changed();
virtual void color_changed_impl();

Gtk::ColorSelection::get_color - Retrieve the currently selected color value.

void get_color(gdouble* color) const;
color: A color array consisting of 4 gfloat values for red, green, blue, and opacity.


Gtk::ColorSelection::gtkobj - Returns the underlaying gtk+ object.

GtkColorSelection* gtkobj();

Gtk::ColorSelection::isA - Returns true if object is this type.

static bool isA(Object* object);

Gtk::ColorSelection::set_color - Sets the color in the Gtk::ColorSelection.

void set_color(const gdouble* color);
The widgets are updated to reflect the new color.

color: A color array consisting of 4 gfloat values for red, green, blue, and opacity.



Gtk::ColorSelection::set_opacity - Controls whether opacity can be set with the Gtk::ColorSelection.

void set_opacity(gint use_opacity);
If this functionality is enabled, the necessary additional widgets are added to the Gtk::ColorSelection and the opacity value can be retrieved via the fourth value in the color array returned by the get_color function.


Gtk::ColorSelection::set_update_policy - Sets the policy controlling when the color_changed signals are emitted.

void set_update_policy(GtkUpdateType policy);
The available policies are:

GTK_UPDATE_CONTINUOUS - signals are sent continuously as the color selection changes.

GTK_UPDATE_DISCONTINUOUS - signals are sent only when the mouse button is released.

GTK_UPDATE_DELAYED - signals are sent when the mouse button is released or when the mouse has been motionless for a period of time.