Code

moving trunk for module inkscape
[inkscape.git] / src / ui / widget / color-picker.h
1 #ifndef __COLOR_PICKER_H__
2 #define __COLOR_PICKER_H__
4 /**
5  * \file  Color picker button \& window.
6  */
7 /*
8  * Authors:
9  *   Lauris Kaplinski <lauris@kaplinski.com>
10  *   Ralf Stephan <ralf@ark.in-berlin.de>
11  *
12  * Copyright (C) Authors 2000-2005
13  *
14  * Released under GNU GPL, read the file 'COPYING' for more information
15  */
17 #include <sigc++/sigc++.h>
18 #include <gtkmm/button.h>
19 #include <gtkmm/tooltips.h>
20 #include "ui/widget/color-preview.h"
22 class SPColorSelector;
23 namespace Inkscape {
24     namespace UI {
25         namespace Widget {
26             class ColorPickerWindow;
28 class ColorPicker : public Gtk::Button {
29 public:
30     ColorPicker (const Glib::ustring& title, const Glib::ustring& tip, const guint32 rgba, bool undo);
31     virtual ~ColorPicker();
32     void setRgba32 (guint32 rgba);
33     void closeWindow();
34     sigc::connection connectChanged (const sigc::slot<void,guint>& slot) 
35         { return _changed_signal.connect (slot); }
37 protected:
38     friend void sp_color_picker_color_mod(SPColorSelector *csel, GObject *cp);
39     virtual void on_clicked();
40     virtual void on_changed (guint32);
41     
42     ColorPreview        _preview;
43     Gtk::Tooltips       _tt;
44     ColorPickerWindow   *_window;
45     
46     const Glib::ustring _title;
47     sigc::signal<void,guint32> _changed_signal;
48     guint32             _rgba;
49     bool                _undo;
50 };
52 }}}
54 #endif /* !__COLOR_PICKER_H__ */
56 /*
57   Local Variables:
58   mode:c++
59   c-file-style:"stroustrup"
60   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
61   indent-tabs-mode:nil
62   fill-column:99
63   End:
64 */
65 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :