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/dialog.h>
20 #include <gtkmm/tooltips.h>
21 #include "widgets/sp-color-selector.h"
22 #include "ui/widget/color-preview.h"
23 //#include "ui/dialog/dialog.h"
27 namespace Inkscape
28 {
29 namespace UI
30 {
31 namespace Widget
32 {
35 class ColorPicker : public Gtk::Button {
36 public:
38 ColorPicker (const Glib::ustring& title,
39 const Glib::ustring& tip,
40 const guint32 rgba,
41 bool undo);
43 virtual ~ColorPicker();
45 void setRgba32 (guint32 rgba);
47 void closeWindow();
49 sigc::connection connectChanged (const sigc::slot<void,guint>& slot)
50 { return _changed_signal.connect (slot); }
52 protected:
54 friend void sp_color_picker_color_mod(SPColorSelector *csel, GObject *cp);
55 virtual void on_clicked();
56 virtual void on_changed (guint32);
58 ColorPreview _preview;
59 Gtk::Tooltips _tt;
61 /*const*/ Glib::ustring _title;
62 sigc::signal<void,guint32> _changed_signal;
63 guint32 _rgba;
64 bool _undo;
67 //Dialog
68 void setupDialog(const Glib::ustring &title);
69 //Inkscape::UI::Dialog::Dialog _colorSelectorDialog;
70 Gtk::Dialog _colorSelectorDialog;
71 SPColorSelector *_colorSelector;
73 };
75 }//namespace Widget
76 }//namespace UI
77 }//namespace Inkscape
79 #endif /* !__COLOR_PICKER_H__ */
81 /*
82 Local Variables:
83 mode:c++
84 c-file-style:"stroustrup"
85 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
86 indent-tabs-mode:nil
87 fill-column:99
88 End:
89 */
90 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :