Code

moving trunk for module inkscape
[inkscape.git] / src / rubberband.h
1 #ifndef __RUBBERBAND_H__
2 #define __RUBBERBAND_H__
4 /**
5  * \file src/rubberband.h
6  * \brief Rubberbanding selector
7  *
8  * Authors:
9  *   Lauris Kaplinski <lauris@kaplinski.com>
10  *   Carl Hetherington <inkscape@carlh.net>
11  *
12  * Copyright (C) 1999-2002 Lauris Kaplinski
13  *
14  * Released under GNU GPL, read the file 'COPYING' for more information
15  */
17 #include "forward.h"
18 #include "libnr/nr-forward.h"
19 #include "libnr/nr-point.h"
20 #include "libnr/nr-maybe.h"
22 /* fixme: do multidocument safe */
24 class CtrlRect;
26 namespace Inkscape
27 {
29 class Rubberband
30 {
31 public:
33     void start(SPDesktop *desktop, NR::Point const &p);
34     void move(NR::Point const &p);
35     NR::Maybe<NR::Rect> getRectangle() const;
36     void stop();
38     static Rubberband* get();
40 private:
42     Rubberband();
43     static Rubberband* _instance;
44     
45     SPDesktop *_desktop;
46     NR::Point _start;
47     NR::Point _end;
48     CtrlRect *_canvas;
49 };
51 }
53 #endif
55 /*
56   Local Variables:
57   mode:c++
58   c-file-style:"stroustrup"
59   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
60   indent-tabs-mode:nil
61   fill-column:99
62   End:
63 */
64 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :