Code

New file. use for building with gtk28
[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();
37     bool is_started();
39     static Rubberband* get();
41 private:
43     Rubberband();
44     static Rubberband* _instance;
45     
46     SPDesktop *_desktop;
47     NR::Point _start;
48     NR::Point _end;
49     CtrlRect *_canvas;
50     bool _started;
51 };
53 }
55 #endif
57 /*
58   Local Variables:
59   mode:c++
60   c-file-style:"stroustrup"
61   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
62   indent-tabs-mode:nil
63   fill-column:99
64   End:
65 */
66 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :