Mercurial > hg > orthanc-stone
diff Framework/Scene2D/Scene2D.h @ 654:462a5074f914
Turned the scene into an observable to be able to dynamically react to
scene to canvas transform changes --> now the handles and angle measure
adornments are immune to zoom changes
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Tue, 14 May 2019 13:51:00 +0200 |
parents | 500c3f70b6c2 |
children | 8b6adfb62a2f |
line wrap: on
line diff
--- a/Framework/Scene2D/Scene2D.h Tue May 14 13:49:12 2019 +0200 +++ b/Framework/Scene2D/Scene2D.h Tue May 14 13:51:00 2019 +0200 @@ -23,13 +23,18 @@ #include "ISceneLayer.h" #include "../Toolbox/AffineTransform2D.h" +#include <Framework/Messages/IObservable.h> +#include <Framework/Messages/IMessage.h> + #include <map> namespace OrthancStone { - class Scene2D : public boost::noncopyable + class Scene2D : public IObservable { public: + ORTHANC_STONE_DEFINE_ORIGIN_MESSAGE(__FILE__, __LINE__, SceneTransformChanged, Scene2D); + class IVisitor : public boost::noncopyable { public: @@ -55,8 +60,9 @@ Scene2D(const Scene2D& other); public: - Scene2D() : - layerCounter_(0) + Scene2D(MessageBroker& broker) + : IObservable(broker) + , layerCounter_(0) { }