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

Method OnRightButtonDown

Interaction/Style/vtkInteractorStyleImage.cxx:310–343  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

308
309//------------------------------------------------------------------------------
310void vtkInteractorStyleImage::OnRightButtonDown()
311{
312 int x = this->Interactor->GetEventPosition()[0];
313 int y = this->Interactor->GetEventPosition()[1];
314
315 this->FindPokedRenderer(x, y);
316 if (this->CurrentRenderer == nullptr)
317 {
318 return;
319 }
320
321 // Redefine this button + shift to handle pick
322 this->GrabFocus(this->EventCallbackCommand);
323 if (this->Interactor->GetShiftKey())
324 {
325 this->StartPick();
326 }
327
328 else if (this->InteractionMode == VTKIS_IMAGE3D && this->Interactor->GetControlKey())
329 {
330 this->StartSlice();
331 }
332 else if (this->InteractionMode == VTKIS_IMAGE_SLICING && this->Interactor->GetControlKey())
333 {
334 this->StartSpin();
335 }
336
337 // The rest of the button + key combinations remain the same
338
339 else
340 {
341 this->Superclass::OnRightButtonDown();
342 }
343}
344
345//------------------------------------------------------------------------------
346void vtkInteractorStyleImage::OnRightButtonUp()

Callers

nothing calls this directly

Calls 5

StartPickMethod · 0.95
StartSliceMethod · 0.95
StartSpinMethod · 0.80
FindPokedRendererMethod · 0.45
GrabFocusMethod · 0.45

Tested by

no test coverage detected