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

Method OnKeyPress

Views/Context2D/vtkContextInteractorStyle.cxx:435–453  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

433
434//------------------------------------------------------------------------------
435void vtkContextInteractorStyle::OnKeyPress()
436{
437 this->BeginProcessingEvent();
438 vtkContextKeyEvent event;
439 vtkVector2i position(
440 this->Interactor->GetEventPosition()[0], this->Interactor->GetEventPosition()[1]);
441 event.SetInteractor(this->Interactor);
442 event.SetPosition(position);
443 bool keepEvent = false;
444 if (this->Scene)
445 {
446 keepEvent = this->Scene->KeyPressEvent(event);
447 }
448 if (!keepEvent)
449 {
450 this->Superclass::OnKeyPress();
451 }
452 this->EndProcessingEvent();
453}
454
455//------------------------------------------------------------------------------
456void vtkContextInteractorStyle::OnKeyRelease()

Callers

nothing calls this directly

Calls 5

BeginProcessingEventMethod · 0.95
EndProcessingEventMethod · 0.95
SetInteractorMethod · 0.45
SetPositionMethod · 0.45
KeyPressEventMethod · 0.45

Tested by

no test coverage detected