Xfce Foundation Classes
Main Page  | IndexNamespace List  |  Alphabetical List  |  Class List  |  File List


Xfc::Gtk::ColorSelection Class Reference

A GtkColorSelection C++ wrapper class. More...

#include <xfc/gtk/colorselection.hh>

Inheritance diagram for Xfc::Gtk::ColorSelection:

Xfc::Gtk::VBox Xfc::Gtk::Box Xfc::Gtk::Container Xfc::Gtk::Widget Xfc::Gtk::Object Xfc::Atk::Implementor Xfc::G::Object Xfc::G::TypeInterface Xfc::G::TypeInstance Xfc::G::TypeInstance Xfc::Trackable Xfc::Trackable List of all members.

Signal Prototypes

Public Member Functions

Accessors
Methods
Signal Proxies

Static Public Member Functions

Methods

Detailed Description

A GtkColorSelection C++ wrapper class.

The 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 in the standard color selection dialog box ColorSelectionDialog.

See also: the ColorSelection HOWTO and example.


Constructor & Destructor Documentation

Xfc::Gtk::ColorSelection::ColorSelection ( GtkColorSelection *  color_selection,
bool  owns_reference = false 
) [explicit, protected]

Construct a new ColorSelection from an existing GtkColorSelection.

Parameters:
color_selection A pointer to a GtkColorSelection.
owns_reference Set false if the initial reference count is floating, set true if it's not.
The color_selection can be a newly created GtkColorSelection or an existing GtkColorSelection. (see G::Object::Object).

Xfc::Gtk::ColorSelection::ColorSelection ( GtkColorSelection *  color_selection,
bool  owns_reference = false 
) [explicit, protected]

Construct a new ColorSelection from an existing GtkColorSelection.

Parameters:
color_selection A pointer to a GtkColorSelection.
owns_reference Set false if the initial reference count is floating, set true if it's not.
The color_selection can be a newly created GtkColorSelection or an existing GtkColorSelection. (see G::Object::Object).


Member Function Documentation

void Xfc::Gtk::ColorSelection::set_has_opacity_control ( bool  has_opacity  ) 

Sets the ColorSelection to use or not use opacity.

Parameters:
has_opacity true if the ColorSelection can set the opacity, false otherwise.

void Xfc::Gtk::ColorSelection::set_has_palette ( bool  has_palette  ) 

Shows and hides the palette based upon the value of has_palette.

Parameters:
has_palette true if the palette is to be visible, false otherwise.

void Xfc::Gtk::ColorSelection::set_current_color ( const Gdk::Color color  ) 

Sets the current color to be color.

Parameters:
color A Gdk::Color to set the current color with.
The first time this is called, it will also set the original color to be color too.

void Xfc::Gtk::ColorSelection::set_current_alpha ( unsigned short  alpha  ) 

Sets the current opacity to be alpha.

Parameters:
alpha An integer between 0 and 65535.
The first time this is called, it will also set the original opacity to be alpha too.

void Xfc::Gtk::ColorSelection::set_previous_color ( const Gdk::Color color  ) 

Sets the 'previous' color to be color.

Parameters:
color A Gdk::Color to set the previous color with.
This method should be called with some hesitations, as it might seem confusing to have that color change. Calling set_current_color() will also set this color the first time it is called.

void Xfc::Gtk::ColorSelection::set_previous_alpha ( unsigned short  alpha  ) 

Sets the 'previous' alpha to be alpha.

Parameters:
alpha An integer between 0 and 65535.
This method should be called with some hesitations, as it might seem confusing to have that alpha change.

static bool Xfc::Gtk::ColorSelection::palette_from_string ( const String str,
std::vector< Gdk::Color > &  colors 
) [static]

Parses a color palette string; the string is a colon-separated list of color names readable by Gdk::Color::parse().

Parameters:
str A String encoding a color palette.
colors A vector of Gdk::Color to fill with the newly allocated colors.
Returns:
true if a palette was successfully parsed.

static String Xfc::Gtk::ColorSelection::palette_to_string ( const std::vector< Gdk::Color > &  colors  )  [static]

Encodes a palette as a string, useful for persistent storage.

Parameters:
colors A vector of Gdk::Color objects.
Returns:
A String encoding the palette.


Member Data Documentation

const ColorChangedSignalType Xfc::Gtk::ColorSelection::color_changed_signal [static, protected]

Color changed signal (see signal_color_changed()).

Calls a slot with the signature:

< void function();
<


The documentation for this class was generated from the following file: Xfce Foundation Classes
Copyright © 2004-2005 The XFC Development Team XFC 4.3