comparison Framework/Viewport/IViewport.h @ 1053:32b403a47b19

simplifying IViewport
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 10 Oct 2019 15:24:48 +0200
parents 6a9300ecfa13
children af456106576c
comparison
equal deleted inserted replaced
1052:0cc62db7e61b 1053:32b403a47b19
40 40
41 virtual Scene2D& GetScene() = 0; 41 virtual Scene2D& GetScene() = 0;
42 42
43 virtual void Refresh() = 0; 43 virtual void Refresh() = 0;
44 44
45 virtual unsigned int GetCanvasWidth() const = 0;
46
47 virtual unsigned int GetCanvasHeight() const = 0;
48
49 // TODO - Is this needed at this level (e.g. for SDL)? 45 // TODO - Is this needed at this level (e.g. for SDL)?
50 virtual const std::string& GetCanvasIdentifier() const = 0; 46 virtual const std::string& GetCanvasIdentifier() const = 0;
51 47
52 virtual ScenePoint2D GetPixelCenterCoordinates(int x, int y) const = 0; 48 virtual ScenePoint2D GetPixelCenterCoordinates(int x, int y) = 0;
53 49
54 #if ORTHANC_ENABLE_LOCALE == 1 50 virtual bool HasCompositor() const = 0;
55 virtual void SetFont(size_t index,
56 Orthanc::EmbeddedResources::FileResourceId resource,
57 unsigned int fontSize,
58 Orthanc::Encoding codepage) = 0;
59 #endif
60 51
61 protected: 52 virtual ICompositor& GetCompositor() = 0;
62 // TODO - Replace this by "ICompositor& GetCompositor()"
63 virtual ICompositor* GetCompositor() = 0;
64
65 virtual const ICompositor* GetCompositor() const
66 {
67 IViewport* self = const_cast<IViewport*>(this);
68 return self->GetCompositor();
69 }
70 }; 53 };
71 } 54 }