Mercurial > hg > orthanc-stone
diff 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 |
line wrap: on
line diff
--- a/Framework/Layers/LayerSourceBase.h Tue May 16 22:12:41 2017 +0200 +++ b/Framework/Layers/LayerSourceBase.h Wed May 17 22:03:09 2017 +0200 @@ -29,25 +29,37 @@ { private: IObserver* observer_; + bool started_; protected: + bool IsStarted() + { + return started_; + } + + void NotifyGeometryReady(); + void NotifySourceChange(); void NotifySliceChange(const SliceGeometry& slice); // Takes ownership of "layer" (that cannot be "NULL") void NotifyLayerReady(ILayerRenderer* layer, - ILayerSource& source, const SliceGeometry& viewportSlice); - void NotifyLayerError(ILayerSource& source, - const SliceGeometry& viewportSlice); + void NotifyLayerError(const SliceGeometry& viewportSlice); + + virtual void StartInternal() = 0; public: - LayerSourceBase() : observer_(NULL) + LayerSourceBase() : + observer_(NULL), + started_(false) { } virtual void SetObserver(IObserver& observer); + + virtual void Start(); }; }