1993
|
1 /**
|
|
2 * Stone of Orthanc
|
|
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
|
|
4 * Department, University Hospital of Liege, Belgium
|
|
5 * Copyright (C) 2017-2022 Osimis S.A., Belgium
|
|
6 * Copyright (C) 2021-2022 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
|
|
7 *
|
|
8 * This program is free software: you can redistribute it and/or
|
|
9 * modify it under the terms of the GNU Lesser General Public License
|
|
10 * as published by the Free Software Foundation, either version 3 of
|
|
11 * the License, or (at your option) any later version.
|
|
12 *
|
|
13 * This program is distributed in the hope that it will be useful, but
|
|
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
16 * Lesser General Public License for more details.
|
|
17 *
|
|
18 * You should have received a copy of the GNU Lesser General Public
|
|
19 * License along with this program. If not, see
|
|
20 * <http://www.gnu.org/licenses/>.
|
|
21 **/
|
|
22
|
|
23
|
|
24 #pragma once
|
|
25
|
|
26 #include "../Scene2DViewport/OneGesturePointerTracker.h"
|
|
27 #include "../Viewport/ViewportLocker.h"
|
|
28
|
|
29 #include <boost/weak_ptr.hpp>
|
|
30
|
|
31 namespace OrthancStone
|
|
32 {
|
|
33 class MagnifyingGlassTracker : public OneGesturePointerTracker
|
|
34 {
|
|
35 private:
|
|
36 boost::weak_ptr<IViewport> viewport_;
|
|
37 ScenePoint2D pivot_;
|
|
38 AffineTransform2D originalSceneToCanvas_;
|
|
39 AffineTransform2D originalCanvasToScene_;
|
|
40
|
1994
|
41 void Update(const ViewportLocker& locker,
|
1993
|
42 const PointerEvent& event);
|
|
43
|
|
44 public:
|
|
45 MagnifyingGlassTracker(boost::weak_ptr<IViewport> viewport,
|
|
46 const PointerEvent& event);
|
|
47
|
|
48 virtual void PointerUp(const PointerEvent& event,
|
|
49 const Scene2D& scene) ORTHANC_OVERRIDE;
|
|
50
|
|
51 virtual void PointerMove(const PointerEvent& event,
|
|
52 const Scene2D& scene) ORTHANC_OVERRIDE;
|
|
53
|
|
54 virtual void Cancel(const Scene2D& scene) ORTHANC_OVERRIDE;
|
|
55 };
|
|
56 }
|