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

Method StartEventLoop

Rendering/UI/vtkXRenderWindowInteractor.cxx:343–366  ·  view source on GitHub ↗

------------------------------------------------------------------------------ This will start up the X event loop. If you call this method it will loop processing X events until the loop is exited.

Source from the content-addressed store, hash-verified

341// call this method it will loop processing X events until the
342// loop is exited.
343void vtkXRenderWindowInteractor::StartEventLoop()
344{
345 // cannot process events without an X display or window.
346 if (!this->DisplayId || !this->WindowId)
347 {
348 return;
349 }
350 for (auto rwi : vtkXRenderWindowInteractorInternals::Instances)
351 {
352 rwi->Done = false;
353 }
354
355 auto& loopDone = this->Internal->LoopDone;
356 do
357 {
358 // process pending events.
359 this->ProcessEvents();
360 // wait for events if application is not yet terminated.
361 if (!loopDone)
362 {
363 this->WaitForEvents();
364 }
365 } while (!loopDone);
366}
367
368//------------------------------------------------------------------------------
369// Initializes the event handlers without an XtAppContext. This is

Callers 1

StartMethod · 0.45

Calls 2

ProcessEventsMethod · 0.95
WaitForEventsMethod · 0.95

Tested by

no test coverage detected