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 _snap_visible_only(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 void Inkscape::Snapper::setSnapVisibleOnly(bool s)
39 {
40 _snap_visible_only = s;
41 }
43 /*
44 Local Variables:
45 mode:c++
46 c-file-style:"stroustrup"
47 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
48 indent-tabs-mode:nil
49 fill-column:99
50 End:
51 */
52 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :