1 /**
2 * \file src/snapper.cpp
3 * \brief Snapper class.
4 *
5 * Authors:
6 * Carl Hetherington <inkscape@carlh.net>
7 * Diederik van Lierop <mail@diedenrezi.nl>
8 *
9 * Released under GNU GPL, read the file 'COPYING' for more information.
10 */
12 #include "libnr/nr-values.h"
13 #include "sp-namedview.h"
14 #include "inkscape.h"
15 #include "desktop.h"
17 /**
18 * Construct new Snapper for named view.
19 * \param nv Named view.
20 * \param d Snap tolerance.
21 */
22 Inkscape::Snapper::Snapper(SnapManager *sm, Geom::Coord const /*t*/) :
23 _snapmanager(sm),
24 _snap_enabled(true)
25 {
26 g_assert(_snapmanager != NULL);
27 }
29 /**
30 * \param s true to enable this snapper, otherwise false.
31 */
33 void Inkscape::Snapper::setEnabled(bool s)
34 {
35 _snap_enabled = s;
36 }
38 /*
39 Local Variables:
40 mode:c++
41 c-file-style:"stroustrup"
42 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
43 indent-tabs-mode:nil
44 fill-column:99
45 End:
46 */
47 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :