comparison Framework/Viewport/SdlViewport.h @ 942:685c9a2d115f

Added missing ORTHANC_OVERRIDE + preparation for lost GL context handling + stubs for GL context event handlers
author Benjamin Golinvaux <bgo@osimis.io>
date Mon, 05 Aug 2019 12:27:27 +0200
parents 7a7e4e1f558f
children 1091b2adeb5a
comparison
equal deleted inserted replaced
939:ab90628e70d9 942:685c9a2d115f
79 unsigned int width, 79 unsigned int width,
80 unsigned int height, 80 unsigned int height,
81 boost::shared_ptr<Scene2D>& scene, 81 boost::shared_ptr<Scene2D>& scene,
82 bool allowDpiScaling = true); 82 bool allowDpiScaling = true);
83 83
84 84 virtual SdlWindow& GetWindow() ORTHANC_OVERRIDE
85 virtual ICompositor& GetCompositor()
86 {
87 return compositor_;
88 }
89
90 virtual SdlWindow& GetWindow()
91 { 85 {
92 return context_.GetWindow(); 86 return context_.GetWindow();
93 } 87 }
94 88
95 virtual void UpdateSize(unsigned int width, 89 virtual void UpdateSize(unsigned int width, unsigned int height) ORTHANC_OVERRIDE
96 unsigned int height)
97 { 90 {
98 // nothing to do in OpenGL, the OpenGLCompositor::UpdateSize will be called automatically 91 // nothing to do in OpenGL, the OpenGLCompositor::UpdateSize will be called automatically
92 }
93
94 protected:
95 virtual ICompositor& GetCompositor() ORTHANC_OVERRIDE
96 {
97 return compositor_;
99 } 98 }
100 }; 99 };
101 100
102 101
103 class SdlCairoViewport : public SdlViewport 102 class SdlCairoViewport : public SdlViewport
119 boost::shared_ptr<Scene2D>& scene, 118 boost::shared_ptr<Scene2D>& scene,
120 bool allowDpiScaling = true); 119 bool allowDpiScaling = true);
121 120
122 ~SdlCairoViewport(); 121 ~SdlCairoViewport();
123 122
124 virtual ICompositor& GetCompositor() 123 virtual SdlWindow& GetWindow() ORTHANC_OVERRIDE
125 {
126 return compositor_;
127 }
128
129 virtual SdlWindow& GetWindow()
130 { 124 {
131 return window_; 125 return window_;
132 } 126 }
133 127
134 virtual void Refresh(); 128 virtual void Refresh() ORTHANC_OVERRIDE;
135 129
136 virtual void UpdateSize(unsigned int width, 130 virtual void UpdateSize(unsigned int width,
137 unsigned int height); 131 unsigned int height) ORTHANC_OVERRIDE;
132 protected:
133 virtual ICompositor& GetCompositor() ORTHANC_OVERRIDE
134 {
135 return compositor_;
136 }
138 137
139 private: 138 private:
140 void UpdateSdlSurfaceSize(unsigned int width, 139 void UpdateSdlSurfaceSize(unsigned int width,
141 unsigned int height); 140 unsigned int height);
142 }; 141 };