# HG changeset patch # User Sebastien Jodogne # Date 1597917461 -7200 # Node ID 97b34cb88600340ee72f1b34aa89b7bb92c24ed7 # Parent 314b6dc507d90f806a27e013927e55cfeeef0859 removing IPointerTracker.h and CreateSimpleTrackerAdapter.cpp diff -r 314b6dc507d9 -r 97b34cb88600 OrthancStone/Resources/CMake/OrthancStoneConfiguration.cmake --- 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 diff -r 314b6dc507d9 -r 97b34cb88600 OrthancStone/Sources/Scene2D/IPointerTracker.h --- 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 . - **/ - - -#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 diff -r 314b6dc507d9 -r 97b34cb88600 OrthancStone/Sources/Scene2DViewport/CreateSimpleTrackerAdapter.cpp --- 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 . - **/ - -#include "IFlexiblePointerTracker.h" -#include "../Scene2D/IPointerTracker.h" - - -namespace OrthancStone -{ -#if 0 - namespace - { - class SimpleTrackerAdapter : public IFlexiblePointerTracker - { - public: - SimpleTrackerAdapter(boost::shared_ptr 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 wrappedTracker_; - bool active_; - }; - } - - boost::shared_ptr CreateSimpleTrackerAdapter(boost::shared_ptr t) - { - return boost::shared_ptr(new SimpleTrackerAdapter(t)); - } -#endif -} diff -r 314b6dc507d9 -r 97b34cb88600 OrthancStone/Sources/Scene2DViewport/IFlexiblePointerTracker.h --- 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 CreateSimpleTrackerAdapter(boost::shared_ptr); } -