------------------------------------------------------------------------------ checks for USERINTERACTION state, then defers to the superclass modes
| 45 | //------------------------------------------------------------------------------ |
| 46 | // checks for USERINTERACTION state, then defers to the superclass modes |
| 47 | void vtkInteractorStyleUser::OnTimer() |
| 48 | { |
| 49 | if (this->HasObserver(vtkCommand::TimerEvent)) |
| 50 | { |
| 51 | this->InvokeEvent(vtkCommand::TimerEvent, &(this->TimerId)); |
| 52 | } |
| 53 | |
| 54 | if (this->State == VTKIS_USERINTERACTION) |
| 55 | { |
| 56 | if (this->HasObserver(vtkCommand::UserEvent)) |
| 57 | { |
| 58 | this->InvokeEvent(vtkCommand::UserEvent, nullptr); |
| 59 | this->OldPos[0] = this->LastPos[0]; |
| 60 | this->OldPos[1] = this->LastPos[1]; |
| 61 | if (this->UseTimers) |
| 62 | { |
| 63 | this->Interactor->ResetTimer(this->TimerId); |
| 64 | } |
| 65 | } |
| 66 | } |
| 67 | else if (!(this->HasObserver(vtkCommand::MouseMoveEvent) && |
| 68 | (this->Button == 0 || |
| 69 | (this->HasObserver(vtkCommand::LeftButtonPressEvent) && this->Button == 1) || |
| 70 | (this->HasObserver(vtkCommand::MiddleButtonPressEvent) && this->Button == 2) || |
| 71 | (this->HasObserver(vtkCommand::RightButtonPressEvent) && this->Button == 3)))) |
| 72 | { |
| 73 | this->vtkInteractorStyle::OnTimer(); |
| 74 | } |
| 75 | else if (this->HasObserver(vtkCommand::TimerEvent)) |
| 76 | { |
| 77 | if (this->UseTimers) |
| 78 | { |
| 79 | this->Interactor->ResetTimer(this->TimerId); |
| 80 | } |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | //------------------------------------------------------------------------------ |
| 85 | void vtkInteractorStyleUser::OnKeyPress() |
nothing calls this directly
no test coverage detected