| 691 | } |
| 692 | |
| 693 | void vtkBoxWidget::OnRightButtonDown() |
| 694 | { |
| 695 | int X = this->Interactor->GetEventPosition()[0]; |
| 696 | int Y = this->Interactor->GetEventPosition()[1]; |
| 697 | |
| 698 | // Okay, we can process this. Try to pick handles first; |
| 699 | // if no handles picked, then pick the bounding box. |
| 700 | if (!this->CurrentRenderer || !this->CurrentRenderer->IsInViewport(X, Y)) |
| 701 | { |
| 702 | this->State = vtkBoxWidget::Outside; |
| 703 | return; |
| 704 | } |
| 705 | |
| 706 | vtkAssemblyPath* path = this->GetAssemblyPath(X, Y, 0., this->HandlePicker); |
| 707 | |
| 708 | if (path != nullptr) |
| 709 | { |
| 710 | this->State = vtkBoxWidget::Scaling; |
| 711 | this->HighlightOutline(1); |
| 712 | this->HandlePicker->GetPickPosition(this->LastPickPosition); |
| 713 | this->ValidPick = 1; |
| 714 | } |
| 715 | else |
| 716 | { |
| 717 | path = this->GetAssemblyPath(X, Y, 0., this->HexPicker); |
| 718 | |
| 719 | if (path != nullptr) |
| 720 | { |
| 721 | this->State = vtkBoxWidget::Scaling; |
| 722 | this->HighlightOutline(1); |
| 723 | this->HexPicker->GetPickPosition(this->LastPickPosition); |
| 724 | this->ValidPick = 1; |
| 725 | } |
| 726 | else |
| 727 | { |
| 728 | this->State = vtkBoxWidget::Outside; |
| 729 | return; |
| 730 | } |
| 731 | } |
| 732 | |
| 733 | this->EventCallbackCommand->SetAbortFlag(1); |
| 734 | this->StartInteraction(); |
| 735 | this->InvokeEvent(vtkCommand::StartInteractionEvent, nullptr); |
| 736 | this->Interactor->Render(); |
| 737 | } |
| 738 | |
| 739 | void vtkBoxWidget::OnRightButtonUp() |
| 740 | { |
no test coverage detected