Code

Moved compass like display of angles from windows to steps in preferences
[inkscape.git] / src / ui / widget / style-swatch.h
1 /**
2  * \brief Static style swatch (fill, stroke, opacity)
3  *
4  * Author:
5  *   buliabyak@gmail.com
6  *
7  * Copyright (C) 2005 author
8  *
9  * Released under GNU GPL.  Read the file 'COPYING' for more information.
10  */
12 #ifndef INKSCAPE_UI_CURRENT_STYLE_H
13 #define INKSCAPE_UI_CURRENT_STYLE_H
15 #include <gtkmm/table.h>
16 #include <gtkmm/label.h>
17 #include <gtkmm/box.h>
18 #include <gtkmm/eventbox.h>
19 #include <gtkmm/enums.h>
21 #include <glibmm/i18n.h>
23 #include <desktop.h>
25 #include "button.h"
27 class SPUnit;
28 class SPStyle;
29 class SPCSSAttr;
31 namespace Inkscape {
32 namespace XML {
33 class Node;
34 }
35 }
37 namespace Inkscape {
38 namespace UI {
39 namespace Widget {
41 class StyleSwatch : public Gtk::HBox
42 {
43 public:
44     StyleSwatch (SPCSSAttr *attr);
46     ~StyleSwatch();
48     void setStyle(SPStyle *style);
49     void setStyle(SPCSSAttr *attr);
50     SPCSSAttr *getStyle();
52     void setWatched (Inkscape::XML::Node *watched);
53     void setWatchedTool (const char *path, bool synthesize);
55     char *_tool_path;
57 protected:
58     SPCSSAttr *_css;
60     Inkscape::XML::Node *_watched;
61     Inkscape::XML::Node *_watched_tool;
63     Gtk::Table _table;
65     Gtk::Label _label[2];
67     Gtk::EventBox _place[2];
68     Gtk::EventBox _opacity_place;
70     Gtk::Label _value[2];
71     Gtk::Label _opacity_value;
73     Gtk::Widget *_color_preview[2];
74     Glib::ustring __color[2];
76     Gtk::HBox _stroke;
77     Gtk::EventBox _stroke_width_place;
78     Gtk::Label _stroke_width;
80     SPUnit *_sw_unit;
82     Gtk::Tooltips _tooltips;
83 };
86 } // namespace Widget
87 } // namespace UI
88 } // namespace Inkscape
90 #endif // INKSCAPE_UI_WIDGET_BUTTON_H
92 /* 
93   Local Variables:
94   mode:c++
95   c-file-style:"stroustrup"
96   c-file-offsets:((innamespace . 0)(inline-open . 0))
97   indent-tabs-mode:nil
98   fill-column:99
99   End:
100 */
101 // vim: filetype=c++:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :