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