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

gcs::Widgets::ColorSwatch Class Reference

#include <gcs-colorswatch.h>

Inheritance diagram for gcs::Widgets::ColorSwatch:

gcs::Widgets::TextSwatch

List of all members.


Detailed Description

A widget which displays a colorswatch

The ColorSwatch is a rectangular box with its background set to the color we want to display. It also displays some text describing the color being displayed.

The ColorSwatch widget is modeled on the example found at http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/ch14s03.html

Definition at line 50 of file gcs-colorswatch.h.


Public Types

typedef std::auto_ptr< Gdk::Color > ref_gdkcolor_type

Public Member Functions

 ColorSwatch (const ColorSwatch &c)
 ColorSwatch (ColorPtr bg)
ColorPtr get_color ()
void set_border_width (int width)
virtual void set_color (ColorPtr bg)
void set_size (int width, int height)
sigc::signal< bool > & signal_selected (void)

Protected Member Functions

void alloc_bg ()
virtual bool on_button_press_event (GdkEventButton *e)
virtual void on_drag_data_get (const Glib::RefPtr< Gdk::DragContext > &context, Gtk::SelectionData &selection_data, guint info, guint time)
virtual bool on_expose_event (GdkEventExpose *e)
virtual void on_realize (void)
virtual void redraw (void)
void set_color_icon (const Glib::RefPtr< Gdk::DragContext > &context)

Protected Attributes

ColorPtr m_background
Glib::RefPtr< Gdk::GC > m_borderGC
int m_borderWidth
Glib::RefPtr< Gdk::Colormap > m_colormap
int m_minSize
sigc::signal< bool > m_signal_selected
int m_swatchPadding

Static Protected Attributes

static ColorPtr m_black = gcs::Color::create("#000000")
static ColorPtr m_white = gcs::Color::create("#FFFFFF")
static Gtk::Tooltips * pTooltips = NULL
static int tooltip_refs = 0

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

Generated by  Doxygen 1.6.0   Back to index