------------------------------------------------------------------------------
| 136 | |
| 137 | //------------------------------------------------------------------------------ |
| 138 | void vtkLineWidget2::SelectAction(vtkAbstractWidget* w) |
| 139 | { |
| 140 | vtkLineWidget2* self = reinterpret_cast<vtkLineWidget2*>(w); |
| 141 | if (self->WidgetRep->GetInteractionState() == vtkLineRepresentation::Outside) |
| 142 | { |
| 143 | return; |
| 144 | } |
| 145 | |
| 146 | // Get the event position |
| 147 | int X = self->Interactor->GetEventPosition()[0]; |
| 148 | int Y = self->Interactor->GetEventPosition()[1]; |
| 149 | |
| 150 | // We are definitely selected |
| 151 | self->WidgetState = vtkLineWidget2::Active; |
| 152 | self->GrabFocus(self->EventCallbackCommand); |
| 153 | double e[2]; |
| 154 | e[0] = static_cast<double>(X); |
| 155 | e[1] = static_cast<double>(Y); |
| 156 | reinterpret_cast<vtkLineRepresentation*>(self->WidgetRep)->StartWidgetInteraction(e); |
| 157 | self->InvokeEvent(vtkCommand::LeftButtonPressEvent, nullptr); // for the handles |
| 158 | self->StartInteraction(); |
| 159 | self->InvokeEvent(vtkCommand::StartInteractionEvent, nullptr); |
| 160 | self->EventCallbackCommand->SetAbortFlag(1); |
| 161 | } |
| 162 | |
| 163 | //------------------------------------------------------------------------------ |
| 164 | void vtkLineWidget2::TranslateAction(vtkAbstractWidget* w) |
nothing calls this directly
no test coverage detected