Code

Split SPCanvasItem and SPCanvasGroup to individual .h files. Removed forward header.
[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 "snapped-point.h"
20 namespace Inkscape {
21 namespace Display {
23 class TemporaryItem;
25 class SnapIndicator  {
26 public:
27     SnapIndicator(SPDesktop *desktop);
28     virtual ~SnapIndicator();
30     void set_new_snaptarget(Inkscape::SnappedPoint const &p, bool pre_snap = false);
31     void remove_snaptarget(bool only_if_presnap = false);
33     void set_new_snapsource(Inkscape::SnapCandidatePoint const &p);
34     void remove_snapsource();
36 protected:
37     TemporaryItem *_snaptarget;
38     TemporaryItem *_snaptarget_tooltip;
39     TemporaryItem *_snaptarget_bbox;
40     TemporaryItem *_snapsource;
41     bool _snaptarget_is_presnap;
42     SPDesktop *_desktop;
44 private:
45     SnapIndicator(const SnapIndicator&);
46     SnapIndicator& operator=(const SnapIndicator&);
47 };
49 } //namespace Display
50 } //namespace Inkscape
52 #endif
54 /*
55   Local Variables:
56   mode:c++
57   c-file-style:"stroustrup"
58   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
59   indent-tabs-mode:nil
60   fill-column:99
61   End:
62 */
63 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :