------------------------------------------------------------------------------
| 104 | |
| 105 | //------------------------------------------------------------------------------ |
| 106 | void vtkCamera3DWidget::SelectAction(vtkAbstractWidget* w) |
| 107 | { |
| 108 | // We are in a static method, cast to ourself |
| 109 | vtkCamera3DWidget* self = vtkCamera3DWidget::SafeDownCast(w); |
| 110 | int interactionState = self->WidgetRep->GetInteractionState(); |
| 111 | if (interactionState == vtkCamera3DRepresentation::Outside) |
| 112 | { |
| 113 | return; |
| 114 | } |
| 115 | |
| 116 | // Begin the widget interaction which has the side effect of setting the |
| 117 | // interaction state. |
| 118 | double eventPosition[2]; |
| 119 | eventPosition[0] = static_cast<double>(self->Interactor->GetEventPosition()[0]); |
| 120 | eventPosition[1] = static_cast<double>(self->Interactor->GetEventPosition()[1]); |
| 121 | vtkCamera3DRepresentation::SafeDownCast(self->WidgetRep)->StartWidgetInteraction(eventPosition); |
| 122 | |
| 123 | // We are definitely selected |
| 124 | self->Active = true; |
| 125 | self->GrabFocus(self->EventCallbackCommand); |
| 126 | |
| 127 | // The SetInteractionState has the side effect of highlighting the widget |
| 128 | vtkCamera3DRepresentation::SafeDownCast(self->WidgetRep)->SetInteractionState(interactionState); |
| 129 | |
| 130 | // start the interaction |
| 131 | self->EventCallbackCommand->SetAbortFlag(1); |
| 132 | self->StartInteraction(); |
| 133 | self->InvokeEvent(vtkCommand::StartInteractionEvent, nullptr); |
| 134 | } |
| 135 | |
| 136 | //------------------------------------------------------------------------------ |
| 137 | void vtkCamera3DWidget::MoveAction(vtkAbstractWidget* w) |
nothing calls this directly
no test coverage detected