Mercurial > hg > orthanc-stone
comparison Framework/Scene2DViewport/OneGesturePointerTracker.h @ 727:853e30d17cae
merge
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 21 May 2019 11:45:06 +0200 |
parents | 28b9e3a54200 |
children | e42b491f1fb2 |
comparison
equal
deleted
inserted
replaced
726:4f2416d519b4 | 727:853e30d17cae |
---|---|
24 | 24 |
25 namespace OrthancStone | 25 namespace OrthancStone |
26 { | 26 { |
27 /** | 27 /** |
28 This base is class allows to write simple trackers that deal with single | 28 This base is class allows to write simple trackers that deal with single |
29 drag gestures. It is *not* suitables for multi-state trackers where various | 29 drag gestures with only one touch. It is *not* suitable for multi-touch and |
30 mouse operations need to be handled. | 30 multi-state trackers where various mouse operations need to be handled. |
31 | 31 |
32 In order to write such a tracker: | 32 In order to write such a tracker: |
33 - subclass this class | 33 - subclass this class |
34 - you may store the initial click/touch position in the constructor | 34 - you may store the initial click/touch position in the constructor |
35 - implement PointerMove to react to pointer/touch events | 35 - implement PointerMove to react to pointer/touch events |
36 - implement Cancel to restore the state at initial tracker creation time | 36 - implement Cancel to restore the state at initial tracker creation time |
37 | |
37 */ | 38 */ |
38 class OneGesturePointerTracker : public IFlexiblePointerTracker | 39 class OneGesturePointerTracker : public IFlexiblePointerTracker |
39 { | 40 { |
40 public: | 41 public: |
41 OneGesturePointerTracker(ViewportControllerWPtr controllerW); | 42 OneGesturePointerTracker(ViewportControllerWPtr controllerW); |
47 ViewportControllerPtr GetController(); | 48 ViewportControllerPtr GetController(); |
48 | 49 |
49 private: | 50 private: |
50 ViewportControllerWPtr controllerW_; | 51 ViewportControllerWPtr controllerW_; |
51 bool alive_; | 52 bool alive_; |
53 int currentTouchCount_; | |
52 }; | 54 }; |
53 } | 55 } |
54 | 56 |