comparison Framework/Scene2DViewport/AngleMeasureTool.h @ 1331:ab81ee8fce1f broker

- Viewport is not passed and stored as a shared_ptr instead of raw reference. - ViewportController can now be injected with an undo stack (not a ctor param anymore, as a preparation for the move of the undo stack to an interactor) - Added (temp) flag to disable emscripten events registration in the WebAssemblyViewport (because legacy client code deals with them directly) - Added emscripten_clear_timeout in ~WebGLViewportsRegistry - Removed GenericToolbox::HoldingRef whose responsibility is better served with proper callback un-registration.
author Benjamin Golinvaux <bgo@osimis.io>
date Mon, 30 Mar 2020 14:23:46 +0200
parents 9b126de2cde2
children
comparison
equal deleted inserted replaced
1329:8d3e669f01a2 1331:ab81ee8fce1f
38 namespace OrthancStone 38 namespace OrthancStone
39 { 39 {
40 class AngleMeasureTool : public MeasureTool 40 class AngleMeasureTool : public MeasureTool
41 { 41 {
42 public: 42 public:
43 static boost::shared_ptr<AngleMeasureTool> Create(IViewport& viewport); 43 static boost::shared_ptr<AngleMeasureTool> Create(boost::shared_ptr<IViewport> viewport);
44 44
45 ~AngleMeasureTool(); 45 ~AngleMeasureTool();
46 46
47 void SetSide1End(ScenePoint2D start); 47 void SetSide1End(ScenePoint2D start);
48 void SetCenter(ScenePoint2D start); 48 void SetCenter(ScenePoint2D start);
68 68
69 69
70 AngleHighlightArea AngleHitTest(ScenePoint2D p) const; 70 AngleHighlightArea AngleHitTest(ScenePoint2D p) const;
71 71
72 private: 72 private:
73 AngleMeasureTool(IViewport& viewport); 73 AngleMeasureTool(boost::shared_ptr<IViewport> viewport);
74 74
75 virtual void RefreshScene() ORTHANC_OVERRIDE; 75 virtual void RefreshScene() ORTHANC_OVERRIDE;
76 void RemoveFromScene(); 76 void RemoveFromScene();
77 void SetAngleHighlightArea(AngleHighlightArea area); 77 void SetAngleHighlightArea(AngleHighlightArea area);
78 78