Code

5475f9f60e30a3bdddfae43622905fe64550a652
[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 2010 <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, bool pre_snap = false);
30     void remove_snaptarget(bool only_if_presnap = false);
32     void set_new_snapsource(Inkscape::SnapCandidatePoint const &p);
33     void remove_snapsource();
35 protected:
36     TemporaryItem *_snaptarget;
37     TemporaryItem *_snaptarget_tooltip;
38     TemporaryItem *_snaptarget_bbox;
39     TemporaryItem *_snapsource;
40     bool _snaptarget_is_presnap;
41     SPDesktop *_desktop;
43 private:
44     SnapIndicator(const SnapIndicator&);
45     SnapIndicator& operator=(const SnapIndicator&);
46 };
48 } //namespace Display
49 } //namespace Inkscape
51 #endif
53 /*
54   Local Variables:
55   mode:c++
56   c-file-style:"stroustrup"
57   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
58   indent-tabs-mode:nil
59   fill-column:99
60   End:
61 */
62 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :