Code

moving trunk for module inkscape
[inkscape.git] / src / ui / widget / color-preview.h
1 #ifndef __COLOR_PREVIEW_H__
2 #define __COLOR_PREVIEW_H__
4 /** \file
5  * A simple color preview widget, mainly used within a picker button.
6  *
7  * Authors:
8  *   Lauris Kaplinski <lauris@kaplinski.com>
9  *   Ralf Stephan <ralf@ark.in-berlin.de>
10  *
11  * Copyright (C) 2001-2005 Authors
12  * Copyright (C) 2001 Ximian, Inc.
13  *
14  * Released under GNU GPL, read the file 'COPYING' for more information
15  */
17 #include <gtkmm/eventbox.h>
19 namespace Inkscape {
20     namespace UI {
21         namespace Widget {
23 class ColorPreview : public Gtk::Widget {
24 public:
25     ColorPreview (guint32 rgba);
26     void setRgba32 (guint32 rgba);
28 protected:
29     virtual void on_size_request (Gtk::Requisition *req);
30     virtual void on_size_allocate (Gtk::Allocation &all);
31     virtual bool on_expose_event (GdkEventExpose *event);
32     void paint (GdkRectangle *area);
33    
34     guint32 _rgba;
35 };
37 }}}
39 #endif
41 /*
42   Local Variables:
43   mode:c++
44   c-file-style:"stroustrup"
45   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
46   indent-tabs-mode:nil
47   fill-column:99
48   End:
49 */
50 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :