Reference Manual
Inti Logo
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

Inti::Gtk::ColorSelection Class Reference

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

#include <inti/gtk/colorselection.h>

Inheritance diagram for Inti::Gtk::ColorSelection:

Inti::Gtk::VBox Inti::Gtk::Box Inti::Gtk::Container Inti::Gtk::Widget Inti::Gtk::Object Inti::Atk::Implementor Inti::G::Object Inti::G::TypeInterface Inti::G::TypeInstance Inti::MemoryHandler Inti::G::TypeInstance Inti::ReferencedBase Inti::ReferencedBase List of all members.

Public Member Functions

Constructors
Accessors
Methods
Property Proxies
Signal Proxies

Static Public Member Functions

Protected Member Functions

Constructors
Signal Handlers

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

Inti::Gtk::ColorSelection::ColorSelection GtkColorSelection *  color_selection,
bool  reference = false
[explicit, protected]
 

Construct a new ColorSelection from an existing GtkColorSelection.

Parameters:
color_selection A pointer to a GtkColorSelection.
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 Inti::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 Inti::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 Inti::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 Inti::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 Inti::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 Inti::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 Inti::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 Inti::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.


The documentation for this class was generated from the following file: Main Page - Footer


Generated on Sun Sep 14 20:08:14 2003 for Inti by doxygen 1.3.2 written by Dimitri van Heesch, © 1997-2002