diff 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
line wrap: on
line diff
--- a/Framework/Viewport/IViewport.h	Thu Oct 10 14:37:23 2019 +0200
+++ b/Framework/Viewport/IViewport.h	Thu Oct 10 15:24:48 2019 +0200
@@ -42,30 +42,13 @@
 
     virtual void Refresh() = 0;
 
-    virtual unsigned int GetCanvasWidth() const = 0;
-
-    virtual unsigned int GetCanvasHeight() const = 0;
-
     // TODO - Is this needed at this level (e.g. for SDL)?
     virtual const std::string& GetCanvasIdentifier() const = 0;
 
-    virtual ScenePoint2D GetPixelCenterCoordinates(int x, int y) const = 0;
-
-#if ORTHANC_ENABLE_LOCALE == 1
-    virtual void SetFont(size_t index,
-      Orthanc::EmbeddedResources::FileResourceId resource,
-      unsigned int fontSize,
-      Orthanc::Encoding codepage) = 0;
-#endif
+    virtual ScenePoint2D GetPixelCenterCoordinates(int x, int y) = 0;
 
-  protected:
-    // TODO - Replace this by "ICompositor& GetCompositor()"    
-    virtual ICompositor* GetCompositor() = 0;
+    virtual bool HasCompositor() const = 0;
 
-    virtual const ICompositor* GetCompositor() const
-    {
-      IViewport* self = const_cast<IViewport*>(this);
-      return self->GetCompositor();
-    }
+    virtual ICompositor& GetCompositor() = 0;
   };
 }