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

Method ButtonReleaseEvent

Rendering/Context2D/vtkContextScene.cxx:540–569  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

538
539//------------------------------------------------------------------------------
540bool vtkContextScene::ButtonReleaseEvent(const vtkContextMouseEvent& e)
541{
542 switch (e.GetButton())
543 {
544 case vtkContextMouseEvent::LEFT_BUTTON:
545 this->InvokeEvent(vtkCommand::LeftButtonReleaseEvent);
546 break;
547 case vtkContextMouseEvent::MIDDLE_BUTTON:
548 this->InvokeEvent(vtkCommand::MiddleButtonReleaseEvent);
549 break;
550 case vtkContextMouseEvent::RIGHT_BUTTON:
551 this->InvokeEvent(vtkCommand::RightButtonReleaseEvent);
552 break;
553 default:
554 break;
555 }
556
557 bool res = false;
558 if (this->Storage->itemMousePressCurrent)
559 {
560 vtkContextMouseEvent& event = this->Storage->Event;
561 this->EventCopy(e);
562 event.SetButton(e.GetButton());
563 vtkAbstractContextItem* cur = this->Storage->itemMousePressCurrent;
564 res = this->ProcessItem(cur, event, &vtkAbstractContextItem::MouseButtonReleaseEvent);
565 this->Storage->itemMousePressCurrent = nullptr;
566 }
567 this->Storage->Event.SetButton(vtkContextMouseEvent::NO_BUTTON);
568 return res;
569}
570
571//------------------------------------------------------------------------------
572bool vtkContextScene::DoubleClickEvent(const vtkContextMouseEvent& e)

Callers 4

ProcessMousePressMethod · 0.80
OnLeftButtonUpMethod · 0.80
OnMiddleButtonUpMethod · 0.80
OnRightButtonUpMethod · 0.80

Calls 3

EventCopyMethod · 0.95
ProcessItemMethod · 0.95
InvokeEventMethod · 0.80

Tested by

no test coverage detected