Mercurial > hg > orthanc-stone
annotate Framework/Widgets/WorldSceneWidget.cpp @ 535:79bb0a02d1cc bgo-commands-codegen
- Added ORTHANC_OVERRIDE to several methods (translates to "override" in C++ 11 compilers)
- Last fixes to new style command handling (removed useless commands and switch command handling in simple samples to use XxxxSerializedMessageXxxx instead of XxxxCommandXxxx
- Fixed hardcoded input instance in SingleFrameEditorApplication
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Tue, 19 Mar 2019 09:13:57 +0100 |
parents | 3b4df9925db6 |
children | 1201b12eb9f8 |
rev | line source |
---|---|
0 | 1 /** |
2 * Stone of Orthanc | |
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics | |
4 * Department, University Hospital of Liege, Belgium | |
439 | 5 * Copyright (C) 2017-2019 Osimis S.A., Belgium |
0 | 6 * |
7 * This program is free software: you can redistribute it and/or | |
47 | 8 * modify it under the terms of the GNU Affero General Public License |
9 * as published by the Free Software Foundation, either version 3 of | |
10 * the License, or (at your option) any later version. | |
0 | 11 * |
12 * This program is distributed in the hope that it will be useful, but | |
13 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
47 | 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
15 * Affero General Public License for more details. | |
281 | 16 * |
47 | 17 * You should have received a copy of the GNU Affero General Public License |
0 | 18 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
19 **/ | |
20 | |
21 | |
22 #include "WorldSceneWidget.h" | |
23 | |
332
50e5ec1bdd46
separating ZoomMouseTracker and PanMouseTracker from WorldSceneWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
331
diff
changeset
|
24 #include "PanMouseTracker.h" |
50e5ec1bdd46
separating ZoomMouseTracker and PanMouseTracker from WorldSceneWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
331
diff
changeset
|
25 #include "ZoomMouseTracker.h" |
457
3b4df9925db6
added support for 'touch' in mouse trackers. This is still a bit hacky and we need to refactor it to make it clean. Thanks to that, Pan and zoom are available together with 2 touches
Alain Mazy <alain@mazy.be>
parents:
439
diff
changeset
|
26 #include "PanZoomMouseTracker.h" |
332
50e5ec1bdd46
separating ZoomMouseTracker and PanMouseTracker from WorldSceneWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
331
diff
changeset
|
27 |
50e5ec1bdd46
separating ZoomMouseTracker and PanMouseTracker from WorldSceneWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
331
diff
changeset
|
28 #include <Core/Logging.h> |
403 | 29 #include <Core/OrthancException.h> |
332
50e5ec1bdd46
separating ZoomMouseTracker and PanMouseTracker from WorldSceneWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
331
diff
changeset
|
30 |
110
53025eecbc95
renamed SliceGeometry as CoordinateSystem3D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
109
diff
changeset
|
31 #include <math.h> |
53025eecbc95
renamed SliceGeometry as CoordinateSystem3D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
109
diff
changeset
|
32 #include <memory> |
53025eecbc95
renamed SliceGeometry as CoordinateSystem3D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
109
diff
changeset
|
33 #include <cassert> |
0 | 34 |
35 namespace OrthancStone | |
36 { | |
281 | 37 // this is an adapter between a IWorldSceneMouseTracker |
38 // that is tracking a mouse in scene coordinates/mm and | |
39 // an IMouseTracker that is tracking a mouse | |
40 // in screen coordinates/pixels. | |
0 | 41 class WorldSceneWidget::SceneMouseTracker : public IMouseTracker |
42 { | |
43 private: | |
332
50e5ec1bdd46
separating ZoomMouseTracker and PanMouseTracker from WorldSceneWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
331
diff
changeset
|
44 ViewportGeometry view_; |
0 | 45 std::auto_ptr<IWorldSceneMouseTracker> tracker_; |
281 | 46 |
0 | 47 public: |
48 SceneMouseTracker(const ViewportGeometry& view, | |
49 IWorldSceneMouseTracker* tracker) : | |
50 view_(view), | |
51 tracker_(tracker) | |
52 { | |
332
50e5ec1bdd46
separating ZoomMouseTracker and PanMouseTracker from WorldSceneWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
331
diff
changeset
|
53 if (tracker == NULL) |
50e5ec1bdd46
separating ZoomMouseTracker and PanMouseTracker from WorldSceneWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
331
diff
changeset
|
54 { |
50e5ec1bdd46
separating ZoomMouseTracker and PanMouseTracker from WorldSceneWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
331
diff
changeset
|
55 throw Orthanc::OrthancException(Orthanc::ErrorCode_NullPointer); |
50e5ec1bdd46
separating ZoomMouseTracker and PanMouseTracker from WorldSceneWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
331
diff
changeset
|
56 } |
0 | 57 } |
58 | |
59 virtual void Render(Orthanc::ImageAccessor& target) | |
60 { | |
332
50e5ec1bdd46
separating ZoomMouseTracker and PanMouseTracker from WorldSceneWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
331
diff
changeset
|
61 if (tracker_->HasRender()) |
50e5ec1bdd46
separating ZoomMouseTracker and PanMouseTracker from WorldSceneWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
331
diff
changeset
|
62 { |
50e5ec1bdd46
separating ZoomMouseTracker and PanMouseTracker from WorldSceneWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
331
diff
changeset
|
63 CairoSurface surface(target); |
50e5ec1bdd46
separating ZoomMouseTracker and PanMouseTracker from WorldSceneWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
331
diff
changeset
|
64 CairoContext context(surface); |
50e5ec1bdd46
separating ZoomMouseTracker and PanMouseTracker from WorldSceneWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
331
diff
changeset
|
65 view_.ApplyTransform(context); |
50e5ec1bdd46
separating ZoomMouseTracker and PanMouseTracker from WorldSceneWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
331
diff
changeset
|
66 tracker_->Render(context, view_.GetZoom()); |
50e5ec1bdd46
separating ZoomMouseTracker and PanMouseTracker from WorldSceneWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
331
diff
changeset
|
67 } |
0 | 68 } |
69 | |
281 | 70 virtual void MouseUp() |
0 | 71 { |
72 tracker_->MouseUp(); | |
73 } | |
74 | |
281 | 75 virtual void MouseMove(int x, |
457
3b4df9925db6
added support for 'touch' in mouse trackers. This is still a bit hacky and we need to refactor it to make it clean. Thanks to that, Pan and zoom are available together with 2 touches
Alain Mazy <alain@mazy.be>
parents:
439
diff
changeset
|
76 int y, |
3b4df9925db6
added support for 'touch' in mouse trackers. This is still a bit hacky and we need to refactor it to make it clean. Thanks to that, Pan and zoom are available together with 2 touches
Alain Mazy <alain@mazy.be>
parents:
439
diff
changeset
|
77 const std::vector<Touch>& displayTouches) |
0 | 78 { |
79 double sceneX, sceneY; | |
332
50e5ec1bdd46
separating ZoomMouseTracker and PanMouseTracker from WorldSceneWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
331
diff
changeset
|
80 view_.MapPixelCenterToScene(sceneX, sceneY, x, y); |
457
3b4df9925db6
added support for 'touch' in mouse trackers. This is still a bit hacky and we need to refactor it to make it clean. Thanks to that, Pan and zoom are available together with 2 touches
Alain Mazy <alain@mazy.be>
parents:
439
diff
changeset
|
81 |
3b4df9925db6
added support for 'touch' in mouse trackers. This is still a bit hacky and we need to refactor it to make it clean. Thanks to that, Pan and zoom are available together with 2 touches
Alain Mazy <alain@mazy.be>
parents:
439
diff
changeset
|
82 std::vector<Touch> sceneTouches; |
3b4df9925db6
added support for 'touch' in mouse trackers. This is still a bit hacky and we need to refactor it to make it clean. Thanks to that, Pan and zoom are available together with 2 touches
Alain Mazy <alain@mazy.be>
parents:
439
diff
changeset
|
83 for (size_t t = 0; t < displayTouches.size(); t++) |
3b4df9925db6
added support for 'touch' in mouse trackers. This is still a bit hacky and we need to refactor it to make it clean. Thanks to that, Pan and zoom are available together with 2 touches
Alain Mazy <alain@mazy.be>
parents:
439
diff
changeset
|
84 { |
3b4df9925db6
added support for 'touch' in mouse trackers. This is still a bit hacky and we need to refactor it to make it clean. Thanks to that, Pan and zoom are available together with 2 touches
Alain Mazy <alain@mazy.be>
parents:
439
diff
changeset
|
85 double sx, sy; |
3b4df9925db6
added support for 'touch' in mouse trackers. This is still a bit hacky and we need to refactor it to make it clean. Thanks to that, Pan and zoom are available together with 2 touches
Alain Mazy <alain@mazy.be>
parents:
439
diff
changeset
|
86 view_.MapPixelCenterToScene(sx, sy, (int)displayTouches[t].x, (int)displayTouches[t].y); |
3b4df9925db6
added support for 'touch' in mouse trackers. This is still a bit hacky and we need to refactor it to make it clean. Thanks to that, Pan and zoom are available together with 2 touches
Alain Mazy <alain@mazy.be>
parents:
439
diff
changeset
|
87 sceneTouches.push_back(Touch(sx, sy)); |
3b4df9925db6
added support for 'touch' in mouse trackers. This is still a bit hacky and we need to refactor it to make it clean. Thanks to that, Pan and zoom are available together with 2 touches
Alain Mazy <alain@mazy.be>
parents:
439
diff
changeset
|
88 } |
3b4df9925db6
added support for 'touch' in mouse trackers. This is still a bit hacky and we need to refactor it to make it clean. Thanks to that, Pan and zoom are available together with 2 touches
Alain Mazy <alain@mazy.be>
parents:
439
diff
changeset
|
89 tracker_->MouseMove(x, y, sceneX, sceneY, displayTouches, sceneTouches); |
0 | 90 } |
91 }; | |
92 | |
93 | |
94 bool WorldSceneWidget::RenderCairo(CairoContext& context) | |
95 { | |
53
c2dc924f1a63
removing threading out of the framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
48
diff
changeset
|
96 view_.ApplyTransform(context); |
c2dc924f1a63
removing threading out of the framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
48
diff
changeset
|
97 return RenderScene(context, view_); |
0 | 98 } |
99 | |
100 | |
101 void WorldSceneWidget::RenderMouseOverCairo(CairoContext& context, | |
102 int x, | |
103 int y) | |
104 { | |
105 ViewportGeometry view = GetView(); | |
106 view.ApplyTransform(context); | |
107 | |
108 double sceneX, sceneY; | |
332
50e5ec1bdd46
separating ZoomMouseTracker and PanMouseTracker from WorldSceneWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
331
diff
changeset
|
109 view.MapPixelCenterToScene(sceneX, sceneY, x, y); |
331
7ccf919faff0
simplify WorldSceneWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
330
diff
changeset
|
110 |
7ccf919faff0
simplify WorldSceneWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
330
diff
changeset
|
111 if (interactor_) |
7ccf919faff0
simplify WorldSceneWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
330
diff
changeset
|
112 { |
7ccf919faff0
simplify WorldSceneWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
330
diff
changeset
|
113 interactor_->MouseOver(context, *this, view, sceneX, sceneY, GetStatusBar()); |
7ccf919faff0
simplify WorldSceneWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
330
diff
changeset
|
114 } |
0 | 115 } |
116 | |
117 | |
53
c2dc924f1a63
removing threading out of the framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
48
diff
changeset
|
118 void WorldSceneWidget::SetSceneExtent(ViewportGeometry& view) |
0 | 119 { |
109
53bd9277b025
using the Extent class
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
91
diff
changeset
|
120 view.SetSceneExtent(GetSceneExtent()); |
0 | 121 } |
122 | |
123 | |
124 void WorldSceneWidget::SetSize(unsigned int width, | |
125 unsigned int height) | |
126 { | |
127 CairoWidget::SetSize(width, height); | |
53
c2dc924f1a63
removing threading out of the framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
48
diff
changeset
|
128 view_.SetDisplaySize(width, height); |
0 | 129 } |
130 | |
131 | |
132 void WorldSceneWidget::SetInteractor(IWorldSceneInteractor& interactor) | |
133 { | |
134 interactor_ = &interactor; | |
135 } | |
136 | |
137 | |
330 | 138 void WorldSceneWidget::FitContent() |
0 | 139 { |
53
c2dc924f1a63
removing threading out of the framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
48
diff
changeset
|
140 SetSceneExtent(view_); |
330 | 141 view_.FitContent(); |
0 | 142 |
278 | 143 NotifyContentChanged(); |
0 | 144 } |
145 | |
146 | |
147 void WorldSceneWidget::SetView(const ViewportGeometry& view) | |
148 { | |
53
c2dc924f1a63
removing threading out of the framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
48
diff
changeset
|
149 view_ = view; |
0 | 150 |
278 | 151 NotifyContentChanged(); |
0 | 152 } |
153 | |
154 | |
155 IMouseTracker* WorldSceneWidget::CreateMouseTracker(MouseButton button, | |
156 int x, | |
157 int y, | |
457
3b4df9925db6
added support for 'touch' in mouse trackers. This is still a bit hacky and we need to refactor it to make it clean. Thanks to that, Pan and zoom are available together with 2 touches
Alain Mazy <alain@mazy.be>
parents:
439
diff
changeset
|
158 KeyboardModifiers modifiers, |
3b4df9925db6
added support for 'touch' in mouse trackers. This is still a bit hacky and we need to refactor it to make it clean. Thanks to that, Pan and zoom are available together with 2 touches
Alain Mazy <alain@mazy.be>
parents:
439
diff
changeset
|
159 const std::vector<Touch>& touches) |
0 | 160 { |
53
c2dc924f1a63
removing threading out of the framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
48
diff
changeset
|
161 double sceneX, sceneY; |
332
50e5ec1bdd46
separating ZoomMouseTracker and PanMouseTracker from WorldSceneWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
331
diff
changeset
|
162 view_.MapPixelCenterToScene(sceneX, sceneY, x, y); |
0 | 163 |
281 | 164 // asks the Widget Interactor to provide a mouse tracker |
331
7ccf919faff0
simplify WorldSceneWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
330
diff
changeset
|
165 std::auto_ptr<IWorldSceneMouseTracker> tracker; |
0 | 166 |
331
7ccf919faff0
simplify WorldSceneWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
330
diff
changeset
|
167 if (interactor_) |
7ccf919faff0
simplify WorldSceneWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
330
diff
changeset
|
168 { |
457
3b4df9925db6
added support for 'touch' in mouse trackers. This is still a bit hacky and we need to refactor it to make it clean. Thanks to that, Pan and zoom are available together with 2 touches
Alain Mazy <alain@mazy.be>
parents:
439
diff
changeset
|
169 tracker.reset(interactor_->CreateMouseTracker(*this, view_, button, modifiers, x, y, sceneX, sceneY, GetStatusBar(), touches)); |
331
7ccf919faff0
simplify WorldSceneWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
330
diff
changeset
|
170 } |
7ccf919faff0
simplify WorldSceneWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
330
diff
changeset
|
171 |
0 | 172 if (tracker.get() != NULL) |
173 { | |
53
c2dc924f1a63
removing threading out of the framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
48
diff
changeset
|
174 return new SceneMouseTracker(view_, tracker.release()); |
0 | 175 } |
333
08683537a227
possibility to turn off default mouse events in WorldSceneWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
332
diff
changeset
|
176 else if (hasDefaultMouseEvents_) |
0 | 177 { |
457
3b4df9925db6
added support for 'touch' in mouse trackers. This is still a bit hacky and we need to refactor it to make it clean. Thanks to that, Pan and zoom are available together with 2 touches
Alain Mazy <alain@mazy.be>
parents:
439
diff
changeset
|
178 printf("has default mouse events\n"); |
3b4df9925db6
added support for 'touch' in mouse trackers. This is still a bit hacky and we need to refactor it to make it clean. Thanks to that, Pan and zoom are available together with 2 touches
Alain Mazy <alain@mazy.be>
parents:
439
diff
changeset
|
179 if (touches.size() == 2) |
333
08683537a227
possibility to turn off default mouse events in WorldSceneWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
332
diff
changeset
|
180 { |
457
3b4df9925db6
added support for 'touch' in mouse trackers. This is still a bit hacky and we need to refactor it to make it clean. Thanks to that, Pan and zoom are available together with 2 touches
Alain Mazy <alain@mazy.be>
parents:
439
diff
changeset
|
181 printf("2 touches !\n"); |
3b4df9925db6
added support for 'touch' in mouse trackers. This is still a bit hacky and we need to refactor it to make it clean. Thanks to that, Pan and zoom are available together with 2 touches
Alain Mazy <alain@mazy.be>
parents:
439
diff
changeset
|
182 return new SceneMouseTracker(view_, new PanZoomMouseTracker(*this, touches)); |
3b4df9925db6
added support for 'touch' in mouse trackers. This is still a bit hacky and we need to refactor it to make it clean. Thanks to that, Pan and zoom are available together with 2 touches
Alain Mazy <alain@mazy.be>
parents:
439
diff
changeset
|
183 } |
3b4df9925db6
added support for 'touch' in mouse trackers. This is still a bit hacky and we need to refactor it to make it clean. Thanks to that, Pan and zoom are available together with 2 touches
Alain Mazy <alain@mazy.be>
parents:
439
diff
changeset
|
184 else |
3b4df9925db6
added support for 'touch' in mouse trackers. This is still a bit hacky and we need to refactor it to make it clean. Thanks to that, Pan and zoom are available together with 2 touches
Alain Mazy <alain@mazy.be>
parents:
439
diff
changeset
|
185 { |
3b4df9925db6
added support for 'touch' in mouse trackers. This is still a bit hacky and we need to refactor it to make it clean. Thanks to that, Pan and zoom are available together with 2 touches
Alain Mazy <alain@mazy.be>
parents:
439
diff
changeset
|
186 switch (button) |
3b4df9925db6
added support for 'touch' in mouse trackers. This is still a bit hacky and we need to refactor it to make it clean. Thanks to that, Pan and zoom are available together with 2 touches
Alain Mazy <alain@mazy.be>
parents:
439
diff
changeset
|
187 { |
3b4df9925db6
added support for 'touch' in mouse trackers. This is still a bit hacky and we need to refactor it to make it clean. Thanks to that, Pan and zoom are available together with 2 touches
Alain Mazy <alain@mazy.be>
parents:
439
diff
changeset
|
188 case MouseButton_Middle: |
3b4df9925db6
added support for 'touch' in mouse trackers. This is still a bit hacky and we need to refactor it to make it clean. Thanks to that, Pan and zoom are available together with 2 touches
Alain Mazy <alain@mazy.be>
parents:
439
diff
changeset
|
189 return new SceneMouseTracker(view_, new PanMouseTracker(*this, x, y)); |
333
08683537a227
possibility to turn off default mouse events in WorldSceneWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
332
diff
changeset
|
190 |
457
3b4df9925db6
added support for 'touch' in mouse trackers. This is still a bit hacky and we need to refactor it to make it clean. Thanks to that, Pan and zoom are available together with 2 touches
Alain Mazy <alain@mazy.be>
parents:
439
diff
changeset
|
191 case MouseButton_Right: |
3b4df9925db6
added support for 'touch' in mouse trackers. This is still a bit hacky and we need to refactor it to make it clean. Thanks to that, Pan and zoom are available together with 2 touches
Alain Mazy <alain@mazy.be>
parents:
439
diff
changeset
|
192 return new SceneMouseTracker(view_, new ZoomMouseTracker(*this, x, y)); |
0 | 193 |
457
3b4df9925db6
added support for 'touch' in mouse trackers. This is still a bit hacky and we need to refactor it to make it clean. Thanks to that, Pan and zoom are available together with 2 touches
Alain Mazy <alain@mazy.be>
parents:
439
diff
changeset
|
194 default: |
3b4df9925db6
added support for 'touch' in mouse trackers. This is still a bit hacky and we need to refactor it to make it clean. Thanks to that, Pan and zoom are available together with 2 touches
Alain Mazy <alain@mazy.be>
parents:
439
diff
changeset
|
195 return NULL; |
3b4df9925db6
added support for 'touch' in mouse trackers. This is still a bit hacky and we need to refactor it to make it clean. Thanks to that, Pan and zoom are available together with 2 touches
Alain Mazy <alain@mazy.be>
parents:
439
diff
changeset
|
196 } |
3b4df9925db6
added support for 'touch' in mouse trackers. This is still a bit hacky and we need to refactor it to make it clean. Thanks to that, Pan and zoom are available together with 2 touches
Alain Mazy <alain@mazy.be>
parents:
439
diff
changeset
|
197 } |
333
08683537a227
possibility to turn off default mouse events in WorldSceneWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
332
diff
changeset
|
198 } |
08683537a227
possibility to turn off default mouse events in WorldSceneWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
332
diff
changeset
|
199 else |
08683537a227
possibility to turn off default mouse events in WorldSceneWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
332
diff
changeset
|
200 { |
08683537a227
possibility to turn off default mouse events in WorldSceneWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
332
diff
changeset
|
201 return NULL; |
0 | 202 } |
203 } | |
204 | |
205 | |
206 void WorldSceneWidget::MouseWheel(MouseWheelDirection direction, | |
207 int x, | |
208 int y, | |
281 | 209 KeyboardModifiers modifiers) |
0 | 210 { |
211 if (interactor_) | |
212 { | |
213 interactor_->MouseWheel(*this, direction, modifiers, GetStatusBar()); | |
214 } | |
215 } | |
216 | |
217 | |
327 | 218 void WorldSceneWidget::KeyPressed(KeyboardKeys key, |
219 char keyChar, | |
0 | 220 KeyboardModifiers modifiers) |
221 { | |
222 if (interactor_) | |
223 { | |
327 | 224 interactor_->KeyPressed(*this, key, keyChar, modifiers, GetStatusBar()); |
0 | 225 } |
226 } | |
227 } |