------------------------------------------------------------------------------
| 239 | |
| 240 | //------------------------------------------------------------------------------ |
| 241 | void vtkWebAssemblyRenderWindowInteractor::ProcessEvents() |
| 242 | { |
| 243 | // initialize if not already done. |
| 244 | if (!this->Initialized) |
| 245 | { |
| 246 | this->Initialize(); |
| 247 | } |
| 248 | if (!this->Enabled) |
| 249 | { |
| 250 | return; |
| 251 | } |
| 252 | auto& internals = (*this->Internals); |
| 253 | // register UI callbacks if not already done. This can happen when the end-user application |
| 254 | // bypasses `vtkRenderWindowInteractor::Start` and directly invokes `ProcessEvents`. |
| 255 | if (!internals.RegisteredUICallbacks) |
| 256 | { |
| 257 | this->RegisterUICallbacks(); |
| 258 | } |
| 259 | while (!internals.Events.empty()) |
| 260 | { |
| 261 | auto& event = (*internals.Events.front()); |
| 262 | this->ProcessEvent(event.type(), event.data()); |
| 263 | internals.Events.pop_front(); |
| 264 | } |
| 265 | if (!internals.ExpandedCanvasToContainerElement) |
| 266 | { |
| 267 | vtkInitializeCanvasElement(this->CanvasSelector, this->ExpandCanvasToContainer); |
| 268 | internals.ExpandedCanvasToContainerElement = true; |
| 269 | } |
| 270 | } |
| 271 | |
| 272 | //------------------------------------------------------------------------------ |
| 273 | void vtkWebAssemblyRenderWindowInteractor::RegisterUICallbacks() |
no test coverage detected