Logo Search packages:      
Sourcecode: agave version File versions  Download package

gcs::Widgets::CellRendererSwatch Class Reference

#include <gcs-cellrendererswatch.h>

List of all members.

Detailed Description

A custom CellRenderer that is used to display a color swatch based on a color value contained in a model row of a TreeView

To use, create an instance of the renderer and add it to a TreeViewColumn. Then Connect the 'color' property of the CellRenderer to one of the columns of the treemodel that specifies a color hex string (i.e. "#FFFFFF"). This is done like this:

pColumn->add_attribute(pRenderer->property_color(), columns.hexString)

where pRenderer is the instance of the renderer that you created and pColumn is the TreeViewColumn

Definition at line 49 of file gcs-cellrendererswatch.h.

Public Member Functions

< ColorPtr > 
property_border_color (void) const
Glib::PropertyProxy< ColorPtr > property_border_color (void)
< gint > 
property_border_width (void) const
Glib::PropertyProxy< gint > property_border_width (void)
< ColorPtr > 
property_color (void) const
Glib::PropertyProxy< ColorPtr > property_color (void)
< gint > 
property_size (void) const
Glib::PropertyProxy< gint > property_size (void)

Protected Member Functions

virtual void get_size_vfunc (Gtk::Widget &widget, const Gdk::Rectangle *cell_area, int *x_offset, int *y_offset, int *width, int *height) const
virtual void render_vfunc (const Glib::RefPtr< Gdk::Drawable > &window, Gtk::Widget &widget, const Gdk::Rectangle &background_area, const Gdk::Rectangle &cell_area, const Gdk::Rectangle &expose_area, Gtk::CellRendererState flags)

Private Attributes

Glib::Property< ColorPtr > m_property_border_color
Glib::Property< gint > m_property_border_width
Glib::Property< ColorPtr > m_property_color
Glib::Property< gint > m_property_size

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index