Mercurial > hg > orthanc-stone
comparison Framework/Layers/LayerSourceBase.h @ 66:298f375dcb68 wasm
LayerWidget
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 17 May 2017 22:03:09 +0200 |
parents | 885932a893de |
children | f5f54ed8d307 |
comparison
equal
deleted
inserted
replaced
65:885932a893de | 66:298f375dcb68 |
---|---|
27 { | 27 { |
28 class LayerSourceBase : public ILayerSource | 28 class LayerSourceBase : public ILayerSource |
29 { | 29 { |
30 private: | 30 private: |
31 IObserver* observer_; | 31 IObserver* observer_; |
32 bool started_; | |
32 | 33 |
33 protected: | 34 protected: |
35 bool IsStarted() | |
36 { | |
37 return started_; | |
38 } | |
39 | |
40 void NotifyGeometryReady(); | |
41 | |
34 void NotifySourceChange(); | 42 void NotifySourceChange(); |
35 | 43 |
36 void NotifySliceChange(const SliceGeometry& slice); | 44 void NotifySliceChange(const SliceGeometry& slice); |
37 | 45 |
38 // Takes ownership of "layer" (that cannot be "NULL") | 46 // Takes ownership of "layer" (that cannot be "NULL") |
39 void NotifyLayerReady(ILayerRenderer* layer, | 47 void NotifyLayerReady(ILayerRenderer* layer, |
40 ILayerSource& source, | |
41 const SliceGeometry& viewportSlice); | 48 const SliceGeometry& viewportSlice); |
42 | 49 |
43 void NotifyLayerError(ILayerSource& source, | 50 void NotifyLayerError(const SliceGeometry& viewportSlice); |
44 const SliceGeometry& viewportSlice); | 51 |
52 virtual void StartInternal() = 0; | |
45 | 53 |
46 public: | 54 public: |
47 LayerSourceBase() : observer_(NULL) | 55 LayerSourceBase() : |
56 observer_(NULL), | |
57 started_(false) | |
48 { | 58 { |
49 } | 59 } |
50 | 60 |
51 virtual void SetObserver(IObserver& observer); | 61 virtual void SetObserver(IObserver& observer); |
62 | |
63 virtual void Start(); | |
52 }; | 64 }; |
53 } | 65 } |