Code

Changed preference to use file chooser button
[inkscape.git] / src / snap.h
index 527947e104bf17d8973bea76b4454503e81498ac..f44df8923f68c9651db6541d1bc299bd146a1aa2 100644 (file)
@@ -50,10 +50,14 @@ public:
 
     Inkscape::SnappedPoint freeSnap(Inkscape::Snapper::PointType t,
                                     NR::Point const &p,
+                                    bool const &first_point,
+                                    std::vector<NR::Point> &points_to_snap,
                                     std::list<SPItem const *> const &it) const;
 
        Inkscape::SnappedPoint freeSnap( Inkscape::Snapper::PointType t,
                                       NR::Point const &p,
+                                      bool const &first_point,
+                                      std::vector<NR::Point> &points_to_snap,
                                       std::list<SPItem const *> const &it,
                                       SnapperList const &snappers ) const;
 
@@ -74,8 +78,13 @@ public:
     
     Inkscape::SnappedPoint constrainedSnap(Inkscape::Snapper::PointType t,
                                            NR::Point const &p,
+                                           bool const &first_point,
+                                           std::vector<NR::Point> &points_to_snap,
                                            Inkscape::Snapper::ConstraintLine const &c,
                                            std::list<SPItem const *> const &it) const;
+                                           
+       Inkscape::SnappedPoint guideSnap(NR::Point const &p,
+                                                                        NR::Point const &guide_normal) const;
 
     std::pair<NR::Point, bool> freeSnapTranslation(Inkscape::Snapper::PointType t,
                                                    std::vector<NR::Point> const &p,
@@ -123,10 +132,22 @@ public:
     SnapperList getGridSnappers() const;
     
     void setSnapModeBBox(bool enabled);
-    void setSnapModeNodes(bool enabled);
+    void setSnapModeNode(bool enabled);
+    void setSnapModeGuide(bool enabled);
     bool getSnapModeBBox() const;
-    bool getSnapModeNodes() const;
-
+    bool getSnapModeNode() const;
+    bool getSnapModeGuide() const;
+
+       void setIncludeItemCenter(bool enabled) {
+               _include_item_center = enabled;
+               object.setIncludeItemCenter(enabled);   //store a local copy in the object-snapper
+                                                                                               //instead of passing it through many functions 
+       }
+       
+       bool getIncludeItemCenter()     const {
+               return _include_item_center;
+       }
+               
 protected:
     SPNamedView const *_named_view;
 
@@ -139,6 +160,8 @@ private:
         SKEW
     };
     
+    bool _include_item_center; //If true, snapping nodes will also snap the item's center
+    
     std::pair<NR::Point, bool> _snapTransformed(Inkscape::Snapper::PointType type,
                                                 std::vector<NR::Point> const &points,
                                                 std::list<SPItem const *> const &ignore,