Mercurial > hg > orthanc-stone
comparison Framework/Scene2D/Internals/FixedPointAligner.h @ 818:e42b491f1fb2
Removed typedefs to shared_ptr by making them explicit. Removed using namespace
directives to make usage more explicit, too.
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Wed, 29 May 2019 10:51:28 +0200 |
parents | c0fcb2757b0a |
children | 2d8ab34c8c91 |
comparison
equal
deleted
inserted
replaced
817:68f888812af4 | 818:e42b491f1fb2 |
---|---|
18 * along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
19 **/ | 19 **/ |
20 | 20 |
21 #pragma once | 21 #pragma once |
22 | 22 |
23 #include "../../Scene2DViewport/PointerTypes.h" | 23 #include "../../Scene2DViewport/PredeclaredTypes.h" |
24 #include "../../Scene2D/ScenePoint2D.h" | 24 #include "../../Scene2D/ScenePoint2D.h" |
25 | 25 |
26 namespace OrthancStone | 26 namespace OrthancStone |
27 { | 27 { |
28 namespace Internals | 28 namespace Internals |
30 // During a mouse event that modifies the view of a scene, keeps | 30 // During a mouse event that modifies the view of a scene, keeps |
31 // one point (the pivot) at a fixed position on the canvas | 31 // one point (the pivot) at a fixed position on the canvas |
32 class FixedPointAligner : public boost::noncopyable | 32 class FixedPointAligner : public boost::noncopyable |
33 { | 33 { |
34 private: | 34 private: |
35 ViewportControllerWPtr controllerW_; | 35 boost::weak_ptr<ViewportController> controllerW_; |
36 ScenePoint2D pivot_; | 36 ScenePoint2D pivot_; |
37 ScenePoint2D canvas_; | 37 ScenePoint2D canvas_; |
38 | 38 |
39 public: | 39 public: |
40 FixedPointAligner(ViewportControllerWPtr controllerW, | 40 FixedPointAligner(boost::weak_ptr<ViewportController> controllerW, |
41 const ScenePoint2D& p); | 41 const ScenePoint2D& p); |
42 | 42 |
43 void Apply(); | 43 void Apply(); |
44 }; | 44 }; |
45 } | 45 } |