Mercurial > hg > orthanc-stone
annotate Framework/Scene2D/ICompositor.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 | d10d2acb8a02 |
children | 9efa66d8d3f8 |
rev | line source |
---|---|
1053
32b403a47b19
simplifying IViewport
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
905
diff
changeset
|
1 #pragma once |
32b403a47b19
simplifying IViewport
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
905
diff
changeset
|
2 |
1211
d10d2acb8a02
compositors do not keep a reference to the scene anymore
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1053
diff
changeset
|
3 #include "Scene2D.h" |
d10d2acb8a02
compositors do not keep a reference to the scene anymore
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1053
diff
changeset
|
4 |
1053
32b403a47b19
simplifying IViewport
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
905
diff
changeset
|
5 #include <EmbeddedResources.h> |
32b403a47b19
simplifying IViewport
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
905
diff
changeset
|
6 |
32b403a47b19
simplifying IViewport
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
905
diff
changeset
|
7 namespace OrthancStone |
32b403a47b19
simplifying IViewport
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
905
diff
changeset
|
8 { |
32b403a47b19
simplifying IViewport
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
905
diff
changeset
|
9 class ICompositor : public boost::noncopyable |
32b403a47b19
simplifying IViewport
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
905
diff
changeset
|
10 { |
32b403a47b19
simplifying IViewport
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
905
diff
changeset
|
11 public: |
32b403a47b19
simplifying IViewport
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
905
diff
changeset
|
12 virtual ~ICompositor() |
32b403a47b19
simplifying IViewport
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
905
diff
changeset
|
13 { |
32b403a47b19
simplifying IViewport
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
905
diff
changeset
|
14 } |
32b403a47b19
simplifying IViewport
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
905
diff
changeset
|
15 |
32b403a47b19
simplifying IViewport
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
905
diff
changeset
|
16 virtual unsigned int GetCanvasWidth() const = 0; |
32b403a47b19
simplifying IViewport
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
905
diff
changeset
|
17 |
32b403a47b19
simplifying IViewport
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
905
diff
changeset
|
18 virtual unsigned int GetCanvasHeight() const = 0; |
32b403a47b19
simplifying IViewport
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
905
diff
changeset
|
19 |
1211
d10d2acb8a02
compositors do not keep a reference to the scene anymore
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1053
diff
changeset
|
20 /** |
d10d2acb8a02
compositors do not keep a reference to the scene anymore
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1053
diff
changeset
|
21 * WARNING: "Refresh()" must always be called with the same |
d10d2acb8a02
compositors do not keep a reference to the scene anymore
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1053
diff
changeset
|
22 * scene. If the scene changes, a call to "ResetScene()" must be |
d10d2acb8a02
compositors do not keep a reference to the scene anymore
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1053
diff
changeset
|
23 * done to reset the tracking of the revisions of the layers. |
d10d2acb8a02
compositors do not keep a reference to the scene anymore
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1053
diff
changeset
|
24 **/ |
d10d2acb8a02
compositors do not keep a reference to the scene anymore
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1053
diff
changeset
|
25 virtual void Refresh(const Scene2D& scene) = 0; |
d10d2acb8a02
compositors do not keep a reference to the scene anymore
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1053
diff
changeset
|
26 |
d10d2acb8a02
compositors do not keep a reference to the scene anymore
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1053
diff
changeset
|
27 virtual void ResetScene() = 0; |
1053
32b403a47b19
simplifying IViewport
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
905
diff
changeset
|
28 |
32b403a47b19
simplifying IViewport
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
905
diff
changeset
|
29 #if ORTHANC_ENABLE_LOCALE == 1 |
32b403a47b19
simplifying IViewport
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
905
diff
changeset
|
30 virtual void SetFont(size_t index, |
32b403a47b19
simplifying IViewport
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
905
diff
changeset
|
31 Orthanc::EmbeddedResources::FileResourceId resource, |
32b403a47b19
simplifying IViewport
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
905
diff
changeset
|
32 unsigned int fontSize, |
32b403a47b19
simplifying IViewport
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
905
diff
changeset
|
33 Orthanc::Encoding codepage) = 0; |
32b403a47b19
simplifying IViewport
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
905
diff
changeset
|
34 #endif |
32b403a47b19
simplifying IViewport
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
905
diff
changeset
|
35 }; |
32b403a47b19
simplifying IViewport
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
905
diff
changeset
|
36 } |