diff options
| author | Diederik van Lierop <mail@diedenrezi.nl> | 2008-09-07 15:12:57 +0000 |
|---|---|---|
| committer | dvlierop2 <dvlierop2@users.sourceforge.net> | 2008-09-07 15:12:57 +0000 |
| commit | 63d732ef4c6d3ee46fc743768274d407de6f876a (patch) | |
| tree | 9e4231bab7970e0525ec69029c468da8e5e5b3cc /src/snapper.h | |
| parent | Remove pointer to SPDesktop from ObjectSnapper (diff) | |
| download | inkscape-63d732ef4c6d3ee46fc743768274d407de6f876a.tar.gz inkscape-63d732ef4c6d3ee46fc743768274d407de6f876a.zip | |
If a snapper needs a reference to a SPNamedView or a SPDesktop, then get that reference via the SnapManager (instead of storing references in the snapper and accessing them directly)
(bzr r6773)
Diffstat (limited to 'src/snapper.h')
| -rw-r--r-- | src/snapper.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/snapper.h b/src/snapper.h index 18967ebd9..97068bf10 100644 --- a/src/snapper.h +++ b/src/snapper.h @@ -30,7 +30,7 @@ struct SnappedConstraints { std::list<Inkscape::SnappedCurve> curves; }; -struct SPNamedView; +class SnapManager; struct SPItem; namespace Inkscape @@ -41,7 +41,7 @@ class Snapper { public: Snapper() {} - Snapper(SPNamedView const *nv, ::Geom::Coord const d); + Snapper(SnapManager const *sm, ::Geom::Coord const d); virtual ~Snapper() {} /// Point types to snap. @@ -112,12 +112,12 @@ public: std::vector<SPItem const *> const */*it*/) const {}; protected: - SPNamedView const *_named_view; - int _snap_from; ///< bitmap of point types that we will snap from + SnapManager const *_snapmanager; + int _snap_from; ///< bitmap of point types that we will snap from bool _snap_enabled; ///< true if this snapper is enabled, otherwise false private: - Geom::Coord _snapper_tolerance; ///< snap tolerance in desktop coordinates + Geom::Coord _snapper_tolerance; ///< snap tolerance in desktop coordinates // must be private to enforce the usage of getTolerance(), which retrieves // the tolerance in screen pixels (making it zoom independent) |
