Mercurial > hg > orthanc-stone
comparison Framework/Scene2DViewport/LineMeasureTool.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 |
---|---|
36 namespace OrthancStone | 36 namespace OrthancStone |
37 { | 37 { |
38 class LineMeasureTool : public MeasureTool | 38 class LineMeasureTool : public MeasureTool |
39 { | 39 { |
40 public: | 40 public: |
41 static boost::shared_ptr<LineMeasureTool> Create(IViewport& viewport); | 41 static boost::shared_ptr<LineMeasureTool> Create(boost::shared_ptr<IViewport> viewport); |
42 | 42 |
43 ~LineMeasureTool(); | 43 ~LineMeasureTool(); |
44 | 44 |
45 void SetStart(ScenePoint2D start); | 45 void SetStart(ScenePoint2D start); |
46 void SetEnd(ScenePoint2D end); | 46 void SetEnd(ScenePoint2D end); |
65 | 65 |
66 | 66 |
67 LineHighlightArea LineHitTest(ScenePoint2D p); | 67 LineHighlightArea LineHitTest(ScenePoint2D p); |
68 | 68 |
69 private: | 69 private: |
70 LineMeasureTool(IViewport& viewport); | 70 LineMeasureTool(boost::shared_ptr<IViewport> viewport); |
71 | 71 |
72 virtual void RefreshScene() ORTHANC_OVERRIDE; | 72 virtual void RefreshScene() ORTHANC_OVERRIDE; |
73 void RemoveFromScene(); | 73 void RemoveFromScene(); |
74 void SetLineHighlightArea(LineHighlightArea area); | 74 void SetLineHighlightArea(LineHighlightArea area); |
75 | 75 |