comparison Framework/Scene2D/Internals/FixedPointAligner.h @ 860:238693c3bc51 am-dev

merge default -> am-dev
author Alain Mazy <alain@mazy.be>
date Mon, 24 Jun 2019 14:35:00 +0200
parents e42b491f1fb2
children 2d8ab34c8c91
comparison
equal deleted inserted replaced
856:a6e17a5a39e7 860:238693c3bc51
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 <Framework/Scene2DViewport/PointerTypes.h> 23 #include "../../Scene2DViewport/PredeclaredTypes.h"
24 #include <Framework/Scene2D/ScenePoint2D.h> 24 #include "../../Scene2D/ScenePoint2D.h"
25 25
26 namespace OrthancStone 26 namespace OrthancStone
27 { 27 {
28 namespace Internals 28 namespace Internals
29 { 29 {
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 the same 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 }