Code

Use subdirectories with icon sizes.
[inkscape.git] / src / seltrans.h
index 4f47d8e2072d7311f537adbe6b787845ee29d881..0183683ffe028026dd0bbdd525a0c4e4cd04d5ba 100644 (file)
@@ -24,6 +24,7 @@
 #include "selcue.h"
 #include "message-context.h"
 #include <vector>
+#include "sp-item.h"
 
 struct SPKnot;
 class SPDesktop;
@@ -53,7 +54,7 @@ public:
     void increaseState();
     void resetState();
     void setCenter(Geom::Point const &p);
-    void grab(Geom::Point const &p, gdouble x, gdouble y, bool show_handles);
+    void grab(Geom::Point const &p, gdouble x, gdouble y, bool show_handles, bool translating);
     void transform(Geom::Matrix const &rel_affine, Geom::Point const &norm);
     void ungrab();
     void stamp();
@@ -102,7 +103,7 @@ private:
     Geom::Point _getGeomHandlePos(Geom::Point const &visual_handle_pos);
     Geom::Point _calcAbsAffineDefault(Geom::Scale const default_scale);
     Geom::Point _calcAbsAffineGeom(Geom::Scale const geom_scale);
-    void _keepClosestPointOnly(std::vector<std::pair<Geom::Point, int> > &points, const Geom::Point &reference);
+    void _keepClosestPointOnly(std::vector<Inkscape::SnapCandidatePoint> &points, const Geom::Point &reference);
     void _display_snapsource();
 
     enum State {
@@ -117,8 +118,9 @@ private:
     std::vector<Geom::Matrix> _items_affines;
     std::vector<Geom::Point> _items_centers;
 
-    std::vector<std::pair<Geom::Point, int> > _snap_points;
-    std::vector<std::pair<Geom::Point, int> > _bbox_points;
+    std::vector<Inkscape::SnapCandidatePoint> _snap_points;
+    std::vector<Inkscape::SnapCandidatePoint> _bbox_points; // the bbox point of the selection as a whole, i.e. max. 4 corners plus optionally some midpoints
+    std::vector<Inkscape::SnapCandidatePoint> _bbox_points_for_translating; // the bbox points of each selected item, only to be used for translating
 
     Inkscape::SelCue _selcue;