Code

When snapping only the closest node, draw an indicator at that node
[inkscape.git] / src / display / snap-indicator.h
1 #ifndef INKSCAPE_DISPLAY_SNAP_INDICATOR_H
2 #define INKSCAPE_DISPLAY_SNAP_INDICATOR_H
4 /** \file
5  * Provides a class that shows a temporary indicator on the canvas of where the snap was, and what kind of snap
6  *
7  * Authors:
8  *   Johan Engelen
9  *   Diederik van Lierop
10  *
11  * Copyright (C) Johan Engelen 2008 <j.b.c.engelen@utwente.nl>
12  * Copyright (C) Diederik van Lierop 2008 <mail@diedenrezi.nl>
13  *
14  * Released under GNU GPL, read the file 'COPYING' for more information
15  */
17 #include "forward.h"
18 #include "display/display-forward.h"
19 #include "snapped-point.h"
21 namespace Inkscape {
22 namespace Display {
24 class SnapIndicator  {
25 public:
26     SnapIndicator(SPDesktop *desktop);
27     virtual ~SnapIndicator();
29     void set_new_snaptarget(Inkscape::SnappedPoint const p);
30     void remove_snaptarget();
31     
32     void set_new_snapsource(Geom::Point const p);
33     void remove_snapsource();
34     
35 protected:
36     TemporaryItem *_snaptarget;
37     TemporaryItem *_snapsource;
38     SPDesktop *_desktop;
40 private:
41     SnapIndicator(const SnapIndicator&);
42     SnapIndicator& operator=(const SnapIndicator&);
43 };
45 } //namespace Display
46 } //namespace Inkscape
48 #endif
50 /*
51   Local Variables:
52   mode:c++
53   c-file-style:"stroustrup"
54   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
55   indent-tabs-mode:nil
56   fill-column:99
57   End:
58 */
59 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :