changeset 1559:97b34cb88600

removing IPointerTracker.h and CreateSimpleTrackerAdapter.cpp
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 20 Aug 2020 11:57:41 +0200
parents 314b6dc507d9
children b4ccd4963d37
files OrthancStone/Resources/CMake/OrthancStoneConfiguration.cmake OrthancStone/Sources/Scene2D/IPointerTracker.h OrthancStone/Sources/Scene2DViewport/CreateSimpleTrackerAdapter.cpp OrthancStone/Sources/Scene2DViewport/IFlexiblePointerTracker.h
diffstat 4 files changed, 0 insertions(+), 139 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancStone/Resources/CMake/OrthancStoneConfiguration.cmake	Thu Aug 20 11:38:56 2020 +0200
+++ b/OrthancStone/Resources/CMake/OrthancStoneConfiguration.cmake	Thu Aug 20 11:57:41 2020 +0200
@@ -345,7 +345,6 @@
   ${ORTHANC_STONE_ROOT}/Sources/Scene2D/GrayscaleWindowingSceneTracker.h
   ${ORTHANC_STONE_ROOT}/Sources/Scene2D/ICompositor.h
   ${ORTHANC_STONE_ROOT}/Sources/Scene2D/ILayerStyleConfigurator.h
-  ${ORTHANC_STONE_ROOT}/Sources/Scene2D/IPointerTracker.h
   ${ORTHANC_STONE_ROOT}/Sources/Scene2D/ISceneLayer.h
   ${ORTHANC_STONE_ROOT}/Sources/Scene2D/InfoPanelSceneLayer.cpp
   ${ORTHANC_STONE_ROOT}/Sources/Scene2D/InfoPanelSceneLayer.h
@@ -405,7 +404,6 @@
   ${ORTHANC_STONE_ROOT}/Sources/Scene2DViewport/CreateLineMeasureTracker.h
   ${ORTHANC_STONE_ROOT}/Sources/Scene2DViewport/CreateMeasureTracker.cpp
   ${ORTHANC_STONE_ROOT}/Sources/Scene2DViewport/CreateMeasureTracker.h
-  ${ORTHANC_STONE_ROOT}/Sources/Scene2DViewport/CreateSimpleTrackerAdapter.cpp
   ${ORTHANC_STONE_ROOT}/Sources/Scene2DViewport/EditAngleMeasureCommand.cpp
   ${ORTHANC_STONE_ROOT}/Sources/Scene2DViewport/EditAngleMeasureCommand.h
   ${ORTHANC_STONE_ROOT}/Sources/Scene2DViewport/EditAngleMeasureTracker.cpp
--- a/OrthancStone/Sources/Scene2D/IPointerTracker.h	Thu Aug 20 11:38:56 2020 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/**
- * Stone of Orthanc
- * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
- * Department, University Hospital of Liege, Belgium
- * Copyright (C) 2017-2020 Osimis S.A., Belgium
- *
- * This program is free software: you can redistribute it and/or
- * modify it under the terms of the GNU Affero General Public License
- * as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Affero General Public License for more details.
- * 
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- **/
-
-
-#pragma once
-
-#if 0
-
-#include "PointerEvent.h"
-
-namespace OrthancStone
-{
-  class IPointerTracker : public boost::noncopyable
-  {
-  public:
-    virtual ~IPointerTracker()
-    {
-    }
-
-    /**
-    This method will be repeatedly called during user interaction
-    */
-    virtual void Update(const PointerEvent& event) = 0;
-
-    /**
-    This method will be called when the tracker should commit its result
-    before being destroyed.
-    */
-    virtual void Release() = 0;
-  };
-}
-
-#endif
--- a/OrthancStone/Sources/Scene2DViewport/CreateSimpleTrackerAdapter.cpp	Thu Aug 20 11:38:56 2020 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-/**
- * Stone of Orthanc
- * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
- * Department, University Hospital of Liege, Belgium
- * Copyright (C) 2017-2020 Osimis S.A., Belgium
- *
- * This program is free software: you can redistribute it and/or
- * modify it under the terms of the GNU Affero General Public License
- * as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Affero General Public License for more details.
- * 
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- **/
-
-#include "IFlexiblePointerTracker.h"
-#include "../Scene2D/IPointerTracker.h"
-
-
-namespace OrthancStone
-{
-#if 0
-  namespace
-  {
-    class SimpleTrackerAdapter : public IFlexiblePointerTracker
-    {
-    public:
-      SimpleTrackerAdapter(boost::shared_ptr<IPointerTracker> wrappedTracker)
-        : wrappedTracker_(wrappedTracker)
-        , active_(true)
-      {
-      }
-
-      virtual void PointerMove(const PointerEvent& event) ORTHANC_OVERRIDE
-      {
-        if(active_)
-          wrappedTracker_->Update(event);
-      };
-      virtual void PointerUp(const PointerEvent& event) ORTHANC_OVERRIDE
-      {
-        if (wrappedTracker_)
-        {
-          wrappedTracker_->Release();
-          wrappedTracker_ = NULL;
-        }
-        active_ = false;
-      }
-      virtual void PointerDown(const PointerEvent& event) ORTHANC_OVERRIDE
-      {
-        // nothing to do atm
-      }
-      virtual bool IsActive() const ORTHANC_OVERRIDE
-      {
-        return active_;
-      }
-
-      virtual void Cancel() ORTHANC_OVERRIDE
-      {
-        wrappedTracker_ = NULL;
-        active_ = false;
-      }
-
-    private:
-      boost::shared_ptr<IPointerTracker> wrappedTracker_;
-      bool active_;
-    };
-  }
-
-  boost::shared_ptr<IFlexiblePointerTracker> CreateSimpleTrackerAdapter(boost::shared_ptr<IPointerTracker> t)
-  {
-    return boost::shared_ptr<IFlexiblePointerTracker>(new SimpleTrackerAdapter(t));
-  }
-#endif
-}
--- a/OrthancStone/Sources/Scene2DViewport/IFlexiblePointerTracker.h	Thu Aug 20 11:38:56 2020 +0200
+++ b/OrthancStone/Sources/Scene2DViewport/IFlexiblePointerTracker.h	Thu Aug 20 11:57:41 2020 +0200
@@ -77,12 +77,4 @@
     */
     virtual void Cancel() = 0;
   };
-
-
-  /**
-  This factory adopts the supplied simple tracker and creates a flexible 
-  tracker wrapper around it.
-  */
-  boost::shared_ptr<IFlexiblePointerTracker> CreateSimpleTrackerAdapter(boost::shared_ptr<IPointerTracker>);
 }
-