Code

When snapping to a bounding box, flash that bounding box together with the snap indicator
[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();
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     SPDesktop *_desktop;
42 private:
43     SnapIndicator(const SnapIndicator&);
44     SnapIndicator& operator=(const SnapIndicator&);
45 };
47 } //namespace Display
48 } //namespace Inkscape
50 #endif
52 /*
53   Local Variables:
54   mode:c++
55   c-file-style:"stroustrup"
56   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
57   indent-tabs-mode:nil
58   fill-column:99
59   End:
60 */
61 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :