comparison Framework/Viewport/IViewport.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 00e6bff9ea39
children 9efa66d8d3f8
comparison
equal deleted inserted replaced
1212:ab06dfdf3b75 1213:86a8266b8888
45 public: 45 public:
46 virtual ~ILock() 46 virtual ~ILock()
47 { 47 {
48 } 48 }
49 49
50 virtual Scene2D& GetScene() = 0;
51
52 // Get the center of the given pixel, in canvas coordinates 50 // Get the center of the given pixel, in canvas coordinates
53 virtual ScenePoint2D GetPixelCenterCoordinates(int x, int y) = 0; 51 virtual ScenePoint2D GetPixelCenterCoordinates(int x, int y) = 0;
54 52
55 virtual bool HasCompositor() const = 0; 53 virtual bool HasCompositor() const = 0;
56 54
57 virtual ICompositor& GetCompositor() = 0; 55 virtual ICompositor& GetCompositor() = 0;
58 56
59 virtual void FitContent() = 0; 57 virtual void FitContent(Scene2D& scene) = 0;
60 }; 58 };
61 59
62 virtual ~IViewport() 60 virtual ~IViewport()
63 { 61 {
64 } 62 }
66 // Can be invoked from any thread (notably from the thread of the 64 // Can be invoked from any thread (notably from the thread of the
67 // Stone context) 65 // Stone context)
68 virtual void Invalidate() = 0; 66 virtual void Invalidate() = 0;
69 67
70 // Must be invoked from the main (GUI) thread 68 // Must be invoked from the main (GUI) thread
71 virtual void Paint() = 0; 69 virtual void Paint(const Scene2D& scene) = 0;
72 70
73 virtual void UpdateSize(unsigned int width, 71 virtual void UpdateSize(unsigned int width,
74 unsigned int height) = 0; 72 unsigned int height) = 0;
75 73
76 virtual ILock* Lock() = 0; 74 virtual ILock* Lock() = 0;