MCPcopy Create free account
hub / github.com/Kitware/VTK / ProcessEvents

Method ProcessEvents

Views/Infovis/vtkRenderView.cxx:296–363  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

294}
295
296void vtkRenderView::ProcessEvents(vtkObject* caller, unsigned long eventId, void* callData)
297{
298 if (caller == this->GetInteractor() && eventId == vtkCommand::RenderEvent)
299 {
300 vtkDebugMacro(<< "interactor causing a render event.");
301 this->Render();
302 }
303 if (caller == this->HoverWidget.GetPointer() && eventId == vtkCommand::TimerEvent)
304 {
305 vtkDebugMacro(<< "hover widget timer causing a render event.");
306 this->UpdateHoverText();
307 this->InHoverTextRender = true;
308 this->Render();
309 this->InHoverTextRender = false;
310 }
311 if (caller == this->GetInteractor() && eventId == vtkCommand::StartInteractionEvent)
312 {
313 this->Interacting = true;
314 this->UpdateHoverWidgetState();
315 }
316 if (caller == this->GetInteractor() && eventId == vtkCommand::EndInteractionEvent)
317 {
318 this->Interacting = false;
319 this->UpdateHoverWidgetState();
320 this->PickRenderNeedsUpdate = true;
321 }
322 if (caller == this->RenderWindow.GetPointer() && eventId == vtkCommand::EndEvent)
323 {
324 vtkDebugMacro(<< "did a render, interacting: " << this->Interacting << " in pick render: "
325 << this->InPickRender << " in hover text render: " << this->InHoverTextRender);
326 if (!this->Interacting && !this->InPickRender && !this->InHoverTextRender)
327 {
328 // This will cause UpdatePickRender to create a new snapshot of the view
329 // for picking with the next drag selection or hover event.
330 this->PickRenderNeedsUpdate = true;
331 }
332 }
333 if (vtkDataRepresentation::SafeDownCast(caller) && eventId == vtkCommand::SelectionChangedEvent)
334 {
335 vtkDebugMacro("selection changed causing a render event");
336 this->Render();
337 }
338 else if (vtkDataRepresentation::SafeDownCast(caller) && eventId == vtkCommand::UpdateEvent)
339 {
340 // UpdateEvent is called from push pipeline executions from
341 // vtkExecutionScheduler. We want to automatically render the view
342 // when one of our representations is updated.
343 vtkDebugMacro("push pipeline causing a render event");
344 this->Render();
345 }
346 else if (caller == this->GetInteractorStyle() && eventId == vtkCommand::SelectionChangedEvent)
347 {
348 vtkDebugMacro("interactor style made a selection changed event");
349 vtkSmartPointer<vtkSelection> selection = vtkSmartPointer<vtkSelection>::New();
350 this->GenerateSelection(callData, selection);
351
352 // This enum value is the same for 2D and 3D interactor styles
353 unsigned int* data = reinterpret_cast<unsigned int*>(callData);

Callers

nothing calls this directly

Calls 11

RenderMethod · 0.95
UpdateHoverTextMethod · 0.95
GetInteractorStyleMethod · 0.95
GenerateSelectionMethod · 0.95
GetRepresentationMethod · 0.80
NewFunction · 0.50
GetInteractorMethod · 0.45
GetPointerMethod · 0.45
SelectMethod · 0.45

Tested by

no test coverage detected