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

Method OnMiddleButtonDown

Interaction/Style/vtkInteractorStyleUser.cxx:220–240  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

218
219//------------------------------------------------------------------------------
220void vtkInteractorStyleUser::OnMiddleButtonDown()
221{
222 this->Button = 2;
223
224 if (this->HasObserver(vtkCommand::MiddleButtonPressEvent))
225 {
226 int x = this->Interactor->GetEventPosition()[0];
227 int y = this->Interactor->GetEventPosition()[1];
228 this->CtrlKey = this->Interactor->GetControlKey();
229 this->ShiftKey = this->Interactor->GetShiftKey();
230 this->LastPos[0] = x;
231 this->LastPos[1] = y;
232 this->InvokeEvent(vtkCommand::MiddleButtonPressEvent, nullptr);
233 this->OldPos[0] = x;
234 this->OldPos[1] = y;
235 }
236 else
237 {
238 this->vtkInteractorStyle::OnMiddleButtonDown();
239 }
240}
241//------------------------------------------------------------------------------
242void vtkInteractorStyleUser::OnMiddleButtonUp()
243{

Callers

nothing calls this directly

Calls 2

HasObserverMethod · 0.80
InvokeEventMethod · 0.80

Tested by

no test coverage detected