GFC Logo GFC Title Logo
Reference Manual
Main Page  |  Namespace List  |  Alphabetical List  |  Class List  |  File List

GFC::Gtk::ColorSelection Class Reference

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

#include <gfc/gtk/colorselection.hh>

Inheritance diagram for GFC::Gtk::ColorSelection:

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

Signal Prototypes

Public Member Functions

Constructors
Accessors
Methods
Signal Proxies

Static Public Member Functions

Protected Member Functions

Constructors

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.


Constructor & Destructor Documentation

GFC::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

bool GFC::Gtk::ColorSelection::palette_from_string const String str,
std::vector< Pointer< 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 to fill with smart pointers to a newly allocated Gdk::Color.
Returns:
true if a palette was successfully parsed.

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

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

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

void GFC::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 GFC::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 GFC::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 GFC::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 GFC::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.

void GFC::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.


Member Data Documentation

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

Color changed signal (see sig_color_changed()).

Calls a slot with the signature:

             void function();


The documentation for this class was generated from the following file:
Generated on Tue Aug 24 00:34:38 2004 for GFC-UI by doxygen 1.3.8