comparison Framework/Scene2DViewport/OneGesturePointerTracker.h @ 722:28b9e3a54200

Undo mechanism implemented (not connected to UI yet). Undo stack and measuring tools are now handled by the ViewportController. Multi-touch does not crash trackers anymore.
author Benjamin Golinvaux <bgo@osimis.io>
date Tue, 21 May 2019 10:27:54 +0200
parents 059e1fd05fd6
children e42b491f1fb2
comparison
equal deleted inserted replaced
721:af0aa0c149fa 722:28b9e3a54200
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