Code

Fix uniconvertor extensions to work with UC version 1.1.5
[inkscape.git] / src / rubberband.h
index b6ef1984eec6a32fb5efe9d8a1211fb02d3e51aa..1f4b7d2eaec6b3b2be2154234999c2a46da1aff7 100644 (file)
  */
 
 #include "forward.h"
-#include "libnr/nr-forward.h"
-#include "libnr/nr-point.h"
-#include "libnr/nr-maybe.h"
+#include <boost/optional.hpp>
 #include <vector>
+#include <2geom/point.h>
+#include <2geom/rect.h>
 
 /* fixme: do multidocument safe */
 
@@ -38,29 +38,29 @@ class Rubberband
 {
 public:
 
-    void start(SPDesktop *desktop, NR::Point const &p);
-    void move(NR::Point const &p);
-    NR::Maybe<NR::Rect> getRectangle() const;
+    void start(SPDesktop *desktop, Geom::Point const &p);
+    void move(Geom::Point const &p);
+    Geom::OptRect getRectangle() const;
     void stop();
     bool is_started();
 
     inline int getMode() {return _mode;}
-    inline std::vector<NR::Point> getPoints() {return _points;}
+    inline std::vector<Geom::Point> getPoints() {return _points;}
 
     void setMode(int mode);
 
-    static Rubberband* get();
+    static Rubberband* get(SPDesktop *desktop);
 
 private:
 
-    Rubberband();
+    Rubberband(SPDesktop *desktop);
     static Rubberband* _instance;
     
     SPDesktop *_desktop;
-    NR::Point _start;
-    NR::Point _end;
+    Geom::Point _start;
+    Geom::Point _end;
 
-    std::vector<NR::Point> _points;
+    std::vector<Geom::Point> _points;
 
     CtrlRect *_rect;
     SPCanvasItem *_touchpath;