summaryrefslogtreecommitdiffstats
path: root/src/snap-preferences.h
diff options
context:
space:
mode:
authorDiederik van Lierop <mail@diedenrezi.nl>2011-12-18 12:45:52 +0000
committerDiederik van Lierop <mail@diedenrezi.nl>2011-12-18 12:45:52 +0000
commit8f1c271f1e1d226061e9fe63faa40cefdd1dcd81 (patch)
tree815228eb578c6dcb90a999eba02cfb169ce5b261 /src/snap-preferences.h
parentsome static code analysis stuff (cppcheck warnings) (diff)
downloadinkscape-8f1c271f1e1d226061e9fe63faa40cefdd1dcd81.tar.gz
inkscape-8f1c271f1e1d226061e9fe63faa40cefdd1dcd81.zip
Refactor snap-preferences a bit more
(bzr r10780)
Diffstat (limited to 'src/snap-preferences.h')
-rw-r--r--src/snap-preferences.h28
1 files changed, 5 insertions, 23 deletions
diff --git a/src/snap-preferences.h b/src/snap-preferences.h
index 0db135f5d..71f6c1247 100644
--- a/src/snap-preferences.h
+++ b/src/snap-preferences.h
@@ -31,14 +31,11 @@ public:
bool isTargetSnappable(Inkscape::SnapTargetType const target1, Inkscape::SnapTargetType const target2, Inkscape::SnapTargetType const target3, Inkscape::SnapTargetType const target4, Inkscape::SnapTargetType const target5) const;
bool isSnapButtonEnabled(Inkscape::SnapTargetType const target) const;
- void setSnapModeBBox(bool enabled);
- void setSnapModeNode(bool enabled);
- void setSnapModeOthers(bool enabled);
- bool getSnapModeBBox() const;
- bool getSnapModeNode() const;
- bool getSnapModeDatums() const;
- bool getSnapModeOthers() const;
- bool getSnapModeAny() const;
+ SnapTargetType source2target(SnapSourceType source) const;
+ bool isSourceSnappable(Inkscape::SnapSourceType const source) const;
+
+ bool isAnyDatumSnappable() const; // Needed because we cannot toggle the datum snap targets as a group
+ bool isAnyCategorySnappable() const;
void setSnapEnabledGlobally(bool enabled) {_snap_enabled_globally = enabled;}
bool getSnapEnabledGlobally() const {return _snap_enabled_globally;}
@@ -46,19 +43,6 @@ public:
void setSnapPostponedGlobally(bool postponed) {_snap_postponed_globally = postponed;}
bool getSnapPostponedGlobally() const {return _snap_postponed_globally;}
- /**
- * Turn on/off snapping of specific point types.
- * @param t Point type.
- * @param s true to snap to this point type, otherwise false.
- */
- void setSnapFrom(Inkscape::SnapSourceType t, bool s);
-
- /**
- * @param t Point type.
- * @return true if snapper will snap this type of point, otherwise false.
- */
- bool getSnapFrom(Inkscape::SnapSourceType t) const;
-
bool getStrictSnapping() const {return _strict_snapping;}
gdouble getGridTolerance() const {return _grid_tolerance;}
@@ -94,8 +78,6 @@ private:
bool _snap_enabled_globally; // Toggles ALL snapping
bool _snap_postponed_globally; // Hold all snapping temporarily when the mouse is moving fast
- SnapSourceType _snap_from; ///< bitmap of point types that we will snap from
-
//If enabled, then bbox corners will only snap to bboxes,
//and nodes will only snap to nodes and paths. We will not
//snap bbox corners to nodes, or nodes to bboxes.