Code

write no/unset fill/stroke to current style
[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 UI {
33 namespace Widget {
35 class StyleSwatch : public Gtk::HBox
36 {
37 public:
38     StyleSwatch (SPStyle *style);
39     StyleSwatch (SPCSSAttr *attr);
41     ~StyleSwatch();
43     void setStyle(SPStyle *style);
44     void setStyle(SPCSSAttr *attr);
45     SPCSSAttr *getStyle();
47 protected:
48     SPCSSAttr *_css;
50     Gtk::Table _table;
52     Gtk::Label _label[2];
54     Gtk::EventBox _place[2];
55     Gtk::EventBox _opacity_place;
57     Gtk::Label _value[2];
58     Gtk::Label _opacity_value;
60     Gtk::Widget *_color_preview[2];
61     Glib::ustring __color[2];
63     Gtk::HBox _stroke;
64     Gtk::EventBox _stroke_width_place;
65     Gtk::Label _stroke_width;
67     SPUnit *_sw_unit;
69     Gtk::Tooltips _tooltips;
70 };
73 } // namespace Widget
74 } // namespace UI
75 } // namespace Inkscape
77 #endif // INKSCAPE_UI_WIDGET_BUTTON_H
79 /* 
80   Local Variables:
81   mode:c++
82   c-file-style:"stroustrup"
83   c-file-offsets:((innamespace . 0)(inline-open . 0))
84   indent-tabs-mode:nil
85   fill-column:99
86   End:
87 */
88 // vim: filetype=c++:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :