diff options
| author | John Bintz <me@johnbintz.com> | 2006-10-04 01:30:15 +0000 |
|---|---|---|
| committer | johncoswell <johncoswell@users.sourceforge.net> | 2006-10-04 01:30:15 +0000 |
| commit | 733eff8a3ac5f53149bff3a657e511d90fcd7d2f (patch) | |
| tree | d4d95caed5a7a7d7c33a9eb68df2221e2985cacb | |
| parent | Added preferences.xml option to show the widgets to get the axonometric grid.... (diff) | |
| download | inkscape-733eff8a3ac5f53149bff3a657e511d90fcd7d2f.tar.gz inkscape-733eff8a3ac5f53149bff3a657e511d90fcd7d2f.zip | |
Add interface to check whether or not rubberband operation has been started
(bzr r1763)
| -rw-r--r-- | src/rubberband.cpp | 10 | ||||
| -rw-r--r-- | src/rubberband.h | 2 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/rubberband.cpp b/src/rubberband.cpp index b6211c519..9ada46f52 100644 --- a/src/rubberband.cpp +++ b/src/rubberband.cpp @@ -21,7 +21,7 @@ Inkscape::Rubberband *Inkscape::Rubberband::_instance = NULL; Inkscape::Rubberband::Rubberband() - : _desktop(SP_ACTIVE_DESKTOP), _canvas(NULL) + : _desktop(SP_ACTIVE_DESKTOP), _canvas(NULL), _started(false) { } @@ -31,6 +31,7 @@ void Inkscape::Rubberband::start(SPDesktop *d, NR::Point const &p) stop(); _desktop = d; _start = p; + _started = true; sp_canvas_force_full_redraw_after_interruptions(_desktop->canvas, 5); } @@ -42,6 +43,8 @@ void Inkscape::Rubberband::stop() _canvas = NULL; sp_canvas_end_forced_full_redraws(_desktop->canvas); } + + _started = false; } void Inkscape::Rubberband::move(NR::Point const &p) @@ -74,6 +77,11 @@ Inkscape::Rubberband *Inkscape::Rubberband::get() return _instance; } +bool Inkscape::Rubberband::is_started() +{ + return _started; +} + /* Local Variables: mode:c++ diff --git a/src/rubberband.h b/src/rubberband.h index 9dd0b6025..36e9c4d8e 100644 --- a/src/rubberband.h +++ b/src/rubberband.h @@ -34,6 +34,7 @@ public: void move(NR::Point const &p); NR::Maybe<NR::Rect> getRectangle() const; void stop(); + bool is_started(); static Rubberband* get(); @@ -46,6 +47,7 @@ private: NR::Point _start; NR::Point _end; CtrlRect *_canvas; + bool _started; }; } |
