Mercurial > hg > orthanc-stone
comparison Framework/Viewport/ViewportBase.h @ 1213:86a8266b8888 broker
moving the scene from IViewport to ViewportController
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 04 Dec 2019 17:54:10 +0100 |
parents | 6009c59d8676 |
children |
comparison
equal
deleted
inserted
replaced
1212:ab06dfdf3b75 | 1213:86a8266b8888 |
---|---|
26 | 26 |
27 namespace OrthancStone | 27 namespace OrthancStone |
28 { | 28 { |
29 class ViewportBase : public IViewport | 29 class ViewportBase : public IViewport |
30 { | 30 { |
31 private: | |
32 Scene2D scene_; | |
33 | |
34 protected: | 31 protected: |
35 class LockBase : public ILock | 32 class LockBase : public ILock |
36 { | 33 { |
37 private: | 34 private: |
38 ViewportBase& that_; | 35 ViewportBase& that_; |
41 LockBase(ViewportBase& that) : | 38 LockBase(ViewportBase& that) : |
42 that_(that) | 39 that_(that) |
43 { | 40 { |
44 } | 41 } |
45 | 42 |
46 virtual Scene2D& GetScene() ORTHANC_OVERRIDE | |
47 { | |
48 return that_.scene_; | |
49 } | |
50 | |
51 virtual ScenePoint2D GetPixelCenterCoordinates(int x, int y) ORTHANC_OVERRIDE; | 43 virtual ScenePoint2D GetPixelCenterCoordinates(int x, int y) ORTHANC_OVERRIDE; |
52 | 44 |
53 virtual void FitContent() ORTHANC_OVERRIDE; | 45 virtual void FitContent(Scene2D& scene) ORTHANC_OVERRIDE; |
54 }; | 46 }; |
55 | |
56 Scene2D& GetScene() | |
57 { | |
58 return scene_; | |
59 } | |
60 }; | 47 }; |
61 } | 48 } |