Code

Implement cross-architecture print dialog using cairo and PNG backends.
[inkscape.git] / src / ui / widget / style-swatch.h
index d78b3d64eda16c66c450716fea73460852c39383..5efd561f380fd9092ffb295e9bf5abd0ec02ebf6 100644 (file)
@@ -21,6 +21,7 @@
 #include <glibmm/i18n.h>
 
 #include <desktop.h>
+#include <verbs.h>
 
 #include "button.h"
 
@@ -28,6 +29,12 @@ class SPUnit;
 class SPStyle;
 class SPCSSAttr;
 
+namespace Inkscape {
+namespace XML {
+class Node;
+}
+}
+
 namespace Inkscape {
 namespace UI {
 namespace Widget {
@@ -35,8 +42,7 @@ namespace Widget {
 class StyleSwatch : public Gtk::HBox
 {
 public:
-    StyleSwatch (SPStyle *style);
-    StyleSwatch (SPCSSAttr *attr);
+    StyleSwatch (SPCSSAttr *attr, gchar const *main_tip);
 
     ~StyleSwatch();
 
@@ -44,9 +50,27 @@ public:
     void setStyle(SPCSSAttr *attr);
     SPCSSAttr *getStyle();
 
+    void setWatched (Inkscape::XML::Node *watched, Inkscape::XML::Node *secondary);
+    void setWatchedTool (const char *path, bool synthesize);
+
+    void setClickVerb(sp_verb_t verb_t);
+    void setDesktop(SPDesktop *desktop);
+    bool on_click(GdkEventButton *event);
+
+    char *_tool_path;
+
 protected:
+    SPDesktop *_desktop;
+
+    sp_verb_t _verb_t;
+
     SPCSSAttr *_css;
 
+    Inkscape::XML::Node *_watched;
+    Inkscape::XML::Node *_watched_tool;
+
+    Gtk::EventBox _swatch;
+
     Gtk::Table _table;
 
     Gtk::Label _label[2];