~centralelyon2010/inkscape/imagelinks2

9020 by JazzyNico
Code refactoring and merging with trunk (revision 10599).
1
#ifndef SEEN_RUBBERBAND_H
2
#define SEEN_RUBBERBAND_H
1 by mental
moving trunk for module inkscape
3
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
 */
16
17
#include "forward.h"
6569 by johanengelen
NR::Maybe => boost::optional
18
#include <boost/optional.hpp>
2863 by buliabyak
add touchpath mode
19
#include <vector>
6839 by cilix42
Next roud of NR ==> Geom conversion
20
#include <2geom/point.h>
21
#include <2geom/rect.h>
1 by mental
moving trunk for module inkscape
22
23
/* fixme: do multidocument safe */
24
25
class CtrlRect;
2863 by buliabyak
add touchpath mode
26
class SPCanvasItem;
27
class SPCurve;
28
29
enum {
30
    RUBBERBAND_MODE_RECT,
31
    RUBBERBAND_MODE_TOUCHPATH
32
};
1 by mental
moving trunk for module inkscape
33
34
namespace Inkscape
35
{
36
37
class Rubberband
38
{
39
public:
40
6839 by cilix42
Next roud of NR ==> Geom conversion
41
    void start(SPDesktop *desktop, Geom::Point const &p);
42
    void move(Geom::Point const &p);
6891 by Ted Gould
Merge from fe-moved
43
    Geom::OptRect getRectangle() const;
1 by mental
moving trunk for module inkscape
44
    void stop();
1763 by johncoswell
Add interface to check whether or not rubberband operation has been started
45
    bool is_started();
1 by mental
moving trunk for module inkscape
46
2863 by buliabyak
add touchpath mode
47
    inline int getMode() {return _mode;}
6839 by cilix42
Next roud of NR ==> Geom conversion
48
    inline std::vector<Geom::Point> getPoints() {return _points;}
2863 by buliabyak
add touchpath mode
49
50
    void setMode(int mode);
51
6630 by cilix42
Removal of SP_ACTIVE_DESKTOP, next take
52
    static Rubberband* get(SPDesktop *desktop);
1 by mental
moving trunk for module inkscape
53
54
private:
55
6630 by cilix42
Removal of SP_ACTIVE_DESKTOP, next take
56
    Rubberband(SPDesktop *desktop);
1 by mental
moving trunk for module inkscape
57
    static Rubberband* _instance;
58
    
59
    SPDesktop *_desktop;
6839 by cilix42
Next roud of NR ==> Geom conversion
60
    Geom::Point _start;
61
    Geom::Point _end;
2863 by buliabyak
add touchpath mode
62
6839 by cilix42
Next roud of NR ==> Geom conversion
63
    std::vector<Geom::Point> _points;
2863 by buliabyak
add touchpath mode
64
65
    CtrlRect *_rect;
66
    SPCanvasItem *_touchpath;
67
    SPCurve *_touchpath_curve;
68
69
    void delete_canvas_items();
70
1763 by johncoswell
Add interface to check whether or not rubberband operation has been started
71
    bool _started;
2863 by buliabyak
add touchpath mode
72
    int _mode;
1 by mental
moving trunk for module inkscape
73
};
74
75
}
76
9020 by JazzyNico
Code refactoring and merging with trunk (revision 10599).
77
#endif // SEEN_RUBBERBAND_H
1 by mental
moving trunk for module inkscape
78
79
/*
80
  Local Variables:
81
  mode:c++
82
  c-file-style:"stroustrup"
83
  c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
84
  indent-tabs-mode:nil
85
  fill-column:99
86
  End:
87
*/
9020 by JazzyNico
Code refactoring and merging with trunk (revision 10599).
88
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :