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 "sp-namedview.h"
13 #include "inkscape.h"
14 #include "desktop.h"
16 /**
17 * Construct new Snapper for named view.
18 * \param nv Named view.
19 * \param d Snap tolerance.
20 */
21 Inkscape::Snapper::Snapper(SnapManager *sm, Geom::Coord const /*t*/) :
22 _snapmanager(sm),
23 _snap_enabled(true)
24 {
25 g_assert(_snapmanager != NULL);
26 }
28 /**
29 * \param s true to enable this snapper, otherwise false.
30 */
32 void Inkscape::Snapper::setEnabled(bool s)
33 {
34 _snap_enabled = s;
35 }
37 /*
38 Local Variables:
39 mode:c++
40 c-file-style:"stroustrup"
41 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
42 indent-tabs-mode:nil
43 fill-column:99
44 End:
45 */
46 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :