Code

Refactoring SPColor to C++ and removing legacy CMYK implementation
[inkscape.git] / src / rubberband.h
index 9dd0b6025e96cb08a825ef467ee4baa2b96c501b..b6ef1984eec6a32fb5efe9d8a1211fb02d3e51aa 100644 (file)
 #include "libnr/nr-forward.h"
 #include "libnr/nr-point.h"
 #include "libnr/nr-maybe.h"
+#include <vector>
 
 /* fixme: do multidocument safe */
 
 class CtrlRect;
+class SPCanvasItem;
+class SPCurve;
+
+enum {
+    RUBBERBAND_MODE_RECT,
+    RUBBERBAND_MODE_TOUCHPATH
+};
 
 namespace Inkscape
 {
@@ -34,6 +42,12 @@ public:
     void move(NR::Point const &p);
     NR::Maybe<NR::Rect> getRectangle() const;
     void stop();
+    bool is_started();
+
+    inline int getMode() {return _mode;}
+    inline std::vector<NR::Point> getPoints() {return _points;}
+
+    void setMode(int mode);
 
     static Rubberband* get();
 
@@ -45,7 +59,17 @@ private:
     SPDesktop *_desktop;
     NR::Point _start;
     NR::Point _end;
-    CtrlRect *_canvas;
+
+    std::vector<NR::Point> _points;
+
+    CtrlRect *_rect;
+    SPCanvasItem *_touchpath;
+    SPCurve *_touchpath_curve;
+
+    void delete_canvas_items();
+
+    bool _started;
+    int _mode;
 };
 
 }