comparison Framework/Scene2DViewport/ViewportController.h @ 1203:f3bb9a6dd949 broker

locking abstraction in IViewport
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 29 Nov 2019 21:22:21 +0100
parents e713f1a99861
children 00e6bff9ea39
comparison
equal deleted inserted replaced
1200:54cbffabdc45 1203:f3bb9a6dd949
110 updates it according to user interaction 110 updates it according to user interaction
111 */ 111 */
112 void SetActiveTracker(boost::shared_ptr<IFlexiblePointerTracker> tracker); 112 void SetActiveTracker(boost::shared_ptr<IFlexiblePointerTracker> tracker);
113 113
114 /** Forwarded to the underlying scene */ 114 /** Forwarded to the underlying scene */
115 const AffineTransform2D& GetCanvasToSceneTransform() const; 115 AffineTransform2D GetCanvasToSceneTransform() const;
116 116
117 /** Forwarded to the underlying scene */ 117 /** Forwarded to the underlying scene */
118 const AffineTransform2D& GetSceneToCanvasTransform() const; 118 AffineTransform2D GetSceneToCanvasTransform() const;
119 119
120 /** Forwarded to the underlying scene, and broadcasted to the observers */ 120 /** Forwarded to the underlying scene, and broadcasted to the observers */
121 void SetSceneToCanvasTransform(const AffineTransform2D& transform); 121 void SetSceneToCanvasTransform(const AffineTransform2D& transform);
122 122
123 /** Forwarded to the underlying scene, and broadcasted to the observers */ 123 /** Forwarded to the underlying scene, and broadcasted to the observers */
170 bool CanUndo() const; 170 bool CanUndo() const;
171 171
172 /** forwarded to the UndoStack */ 172 /** forwarded to the UndoStack */
173 bool CanRedo() const; 173 bool CanRedo() const;
174 174
175 Scene2D& GetScene() 175 IViewport& GetViewport() const
176 { 176 {
177 return viewport_.GetScene(); 177 return viewport_;
178 }
179
180 const Scene2D& GetScene() const
181 {
182 return const_cast<IViewport&>(viewport_).GetScene();
183 } 178 }
184 179
185 private: 180 private:
186 double GetCanvasToSceneFactor() const; 181 double GetCanvasToSceneFactor() const;
187 182