comparison OrthancStone/Sources/Scene2D/GrayscaleWindowingSceneTracker.h @ 1972:9c0adcc8feec

refactoring to simplify OneGesturePointerTracker
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 28 Oct 2022 16:21:28 +0200
parents 7053b8a0aaec
children 5a434f5889f8
comparison
equal deleted inserted replaced
1971:e5b31d55206d 1972:9c0adcc8feec
21 **/ 21 **/
22 22
23 23
24 #pragma once 24 #pragma once
25 25
26
27 #include "../Scene2DViewport/OneGesturePointerTracker.h" 26 #include "../Scene2DViewport/OneGesturePointerTracker.h"
28 #include "../Viewport/IViewport.h" 27 #include "../Viewport/IViewport.h"
29 #include "Internals/FixedPointAligner.h"
30 28
31 #include <boost/weak_ptr.hpp> 29 #include <boost/weak_ptr.hpp>
32 30
33 namespace OrthancStone 31 namespace OrthancStone
34 { 32 {
35 class GrayscaleWindowingSceneTracker : public OneGesturePointerTracker 33 class GrayscaleWindowingSceneTracker : public OneGesturePointerTracker
36 { 34 {
37 private: 35 private:
36 boost::weak_ptr<IViewport> viewport_;
37
38 bool active_; 38 bool active_;
39 int layerIndex_; 39 int layerIndex_;
40 double normalization_; 40 double normalization_;
41 float originalCenter_; 41 float originalCenter_;
42 float originalWidth_; 42 float originalWidth_;
51 int layerIndex, 51 int layerIndex,
52 const PointerEvent& event, 52 const PointerEvent& event,
53 unsigned int canvasWidth, 53 unsigned int canvasWidth,
54 unsigned int canvasHeight); 54 unsigned int canvasHeight);
55 55
56 virtual void PointerMove(const PointerEvent& event) ORTHANC_OVERRIDE; 56 virtual void PointerMove(const PointerEvent& event,
57 const Scene2D& scene) ORTHANC_OVERRIDE;
57 58
58 virtual void Cancel() ORTHANC_OVERRIDE; 59 virtual void Cancel() ORTHANC_OVERRIDE;
59 }; 60 };
60 } 61 }