logo top
Main Page   Widgets   Namespaces   Book  

Gdk::Colormap Class Reference

Inheritance diagram for Gdk::Colormap:

Inheritance graph
[legend]
List of all members.

Public Methods

virtual ~Colormap ()
GdkColormap* gobj ()
const GdkColormap* gobj () const
GdkColormap* gobj_copy ()
int alloc_colors (GdkColor* colors, int ncolors, bool writeable, bool best_match, gboolean* success)
bool alloc_color (Color& color, bool writeable=false, bool best_match=true)
void free_colors (GdkColor* colors, int ncolors)
void query_color (gulong pixel, Color& result)
 Locates the RGB color in colormap corresponding to the given hardware pixel pixel.

Glib::RefPtr<Visualget_visual ()

Static Public Methods

Glib::RefPtr<Colormap> create (const Glib::RefPtr<Visual>& visual, bool allocate)

Protected Methods

 Colormap (const Glib::RefPtr<Visual>& visual, bool allocate)

Related Functions

(Note that these are not member functions.)

Glib::RefPtr<Gdk::Colormap> wrap (GdkColormap* object, bool take_copy=false)

Constructor & Destructor Documentation

virtual Gdk::Colormap::~Colormap (   [virtual]
 

Gdk::Colormap::Colormap ( const Glib::RefPtr<Visual>&    visual,
bool    allocate
[explicit, protected]
 


Member Function Documentation

bool Gdk::Colormap::alloc_color ( Color   color,
bool    writeable = false,
bool    best_match = true
 

int Gdk::Colormap::alloc_colors ( GdkColor*    colors,
int    ncolors,
bool    writeable,
bool    best_match,
gboolean*    success
 

Glib::RefPtr<Colormap> Gdk::Colormap::create ( const Glib::RefPtr<Visual>&    visual,
bool    allocate
[static]
 

void Gdk::Colormap::free_colors ( GdkColor*    colors,
int    ncolors
 

Glib::RefPtr<Visual> Gdk::Colormap::get_visual (  
 

const GdkColormap* Gdk::Colormap::gobj (   const [inline]
 

Reimplemented from Glib::ObjectBase.

GdkColormap* Gdk::Colormap::gobj (   [inline]
 

Reimplemented from Glib::ObjectBase.

GdkColormap* Gdk::Colormap::gobj_copy (  
 

void Gdk::Colormap::query_color ( gulong    pixel,
Color   result
 

Locates the RGB color in colormap corresponding to the given hardware pixel pixel.

pixel must be a valid pixel in the colormap; it's a programmer error to call this function with a pixel which is not in the colormap. Hardware pixels are normally obtained from alloc_colors(), or from a Gdk::Image. (A Gdk::Image contains image data in hardware format, a Gdk::Pixbuf contains image data in a canonical 24-bit RGB format.)

This function is rarely useful, it's used for example to implement the eyedropper feature in Gtk::ColorSelection.

Parameters:
pixel Pixel value in hardware display format.
result Gdk::Color with red, green, blue fields initialized.


Friends And Related Function Documentation

Glib::RefPtr<Gdk::Colormap> wrap ( GdkColormap*    object,
bool    take_copy = false
[related]
 


The documentation for this class was generated from the following file:
Generated for gtkmm by Doxygen 1.3-rc1 © 1997-2001