Mercurial > hg > orthanc-stone
comparison Framework/Viewport/IViewport.h @ 1216:5147277850cf broker
better abstraction for IViewport
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 05 Dec 2019 16:36:40 +0100 |
parents | 9efa66d8d3f8 |
children | 0ca50d275b9a |
comparison
equal
deleted
inserted
replaced
1215:9efa66d8d3f8 | 1216:5147277850cf |
---|---|
19 **/ | 19 **/ |
20 | 20 |
21 #pragma once | 21 #pragma once |
22 | 22 |
23 #include "../Scene2D/ICompositor.h" | 23 #include "../Scene2D/ICompositor.h" |
24 #include "../Scene2D/Scene2D.h" | 24 #include "../Scene2DViewport/ViewportController.h" |
25 #include "../Scene2D/ScenePoint2D.h" | |
26 | 25 |
27 namespace OrthancStone | 26 namespace OrthancStone |
28 { | 27 { |
29 /** | 28 /** |
30 * Class that combines a Scene2D with a canvas where to draw the | 29 * Class that combines a Scene2D with a canvas where to draw the |
48 } | 47 } |
49 | 48 |
50 virtual bool HasCompositor() const = 0; | 49 virtual bool HasCompositor() const = 0; |
51 | 50 |
52 virtual ICompositor& GetCompositor() = 0; | 51 virtual ICompositor& GetCompositor() = 0; |
52 | |
53 virtual ViewportController& GetController() = 0; | |
54 | |
55 virtual void Invalidate() = 0; | |
53 }; | 56 }; |
54 | 57 |
55 virtual ~IViewport() | 58 virtual ~IViewport() |
56 { | 59 { |
57 } | 60 } |
58 | 61 |
59 // Can be invoked from any thread (notably from the thread of the | |
60 // Stone context) | |
61 virtual void Invalidate() = 0; | |
62 | |
63 // Must be invoked from the main (GUI) thread | |
64 virtual void Paint(const Scene2D& scene) = 0; | |
65 | |
66 virtual void UpdateSize(unsigned int width, | |
67 unsigned int height) = 0; | |
68 | |
69 virtual ILock* Lock() = 0; | 62 virtual ILock* Lock() = 0; |
70 }; | 63 }; |
71 } | 64 } |