Mercurial > hg > orthanc-stone
diff OrthancStone/Sources/Scene2DViewport/OneGesturePointerTracker.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 | 07964689cb0b |
line wrap: on
line diff
--- a/OrthancStone/Sources/Scene2DViewport/OneGesturePointerTracker.h Fri Oct 28 13:38:19 2022 +0200 +++ b/OrthancStone/Sources/Scene2DViewport/OneGesturePointerTracker.h Fri Oct 28 16:21:28 2022 +0200 @@ -24,8 +24,6 @@ #include "IFlexiblePointerTracker.h" -#include "../Viewport/IViewport.h" - #include <Compatibility.h> // For ORTHANC_OVERRIDE #include <boost/shared_ptr.hpp> @@ -51,21 +49,14 @@ bool alive_; int currentTouchCount_; - protected: - boost::weak_ptr<IViewport> viewport_; - - /** - This will return a scoped lock to the viewport. - If the viewport does not exist anymore, then nullptr is returned. - */ - IViewport::ILock* GetViewportLock(); - public: - explicit OneGesturePointerTracker(boost::weak_ptr<IViewport> viewport); + explicit OneGesturePointerTracker(); - virtual void PointerUp(const PointerEvent& event) ORTHANC_OVERRIDE; + virtual void PointerUp(const PointerEvent& event, + const Scene2D& scene) ORTHANC_OVERRIDE; - virtual void PointerDown(const PointerEvent& event) ORTHANC_OVERRIDE; + virtual void PointerDown(const PointerEvent& event, + const Scene2D& scene) ORTHANC_OVERRIDE; virtual bool IsAlive() const ORTHANC_OVERRIDE; };