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

Method MouseButtonPressEvent

Views/Infovis/vtkGraphItem.cxx:417–435  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

415}
416
417bool vtkGraphItem::MouseButtonPressEvent(const vtkContextMouseEvent& event)
418{
419 this->Tooltip->SetVisible(false);
420 if (event.GetButton() == vtkContextMouseEvent::LEFT_BUTTON)
421 {
422 vtkIdType hitVertex = this->HitVertex(event.GetPos());
423 this->Layout->SetFixed(hitVertex);
424 if (hitVertex >= 0 && this->Internal->Interactor)
425 {
426 this->Layout->SetAlpha(this->Internal->LayoutAlphaStart);
427 if (!this->Internal->Animating && this->Internal->Interactor)
428 {
429 this->StartLayoutAnimation(this->Internal->Interactor);
430 }
431 }
432 return true;
433 }
434 return false;
435}
436
437bool vtkGraphItem::MouseButtonReleaseEvent(const vtkContextMouseEvent& event)
438{

Callers

nothing calls this directly

Calls 4

HitVertexMethod · 0.95
StartLayoutAnimationMethod · 0.95
SetFixedMethod · 0.80
SetAlphaMethod · 0.45

Tested by

no test coverage detected