------------------------------------------------------------------------------
| 206 | |
| 207 | //------------------------------------------------------------------------------ |
| 208 | void vtkLineWidget2::ScaleAction(vtkAbstractWidget* w) |
| 209 | { |
| 210 | vtkLineWidget2* self = reinterpret_cast<vtkLineWidget2*>(w); |
| 211 | if (self->WidgetRep->GetInteractionState() == vtkLineRepresentation::Outside) |
| 212 | { |
| 213 | return; |
| 214 | } |
| 215 | |
| 216 | reinterpret_cast<vtkLineRepresentation*>(self->WidgetRep) |
| 217 | ->SetInteractionState(vtkLineRepresentation::Scaling); |
| 218 | self->Interactor->Disable(); |
| 219 | self->LineHandle->SetEnabled(0); |
| 220 | self->Interactor->Enable(); |
| 221 | |
| 222 | // Get the event position |
| 223 | int X = self->Interactor->GetEventPosition()[0]; |
| 224 | int Y = self->Interactor->GetEventPosition()[1]; |
| 225 | |
| 226 | // We are definitely selected |
| 227 | self->WidgetState = vtkLineWidget2::Active; |
| 228 | self->GrabFocus(self->EventCallbackCommand); |
| 229 | double eventPos[2]; |
| 230 | eventPos[0] = static_cast<double>(X); |
| 231 | eventPos[1] = static_cast<double>(Y); |
| 232 | reinterpret_cast<vtkLineRepresentation*>(self->WidgetRep)->StartWidgetInteraction(eventPos); |
| 233 | self->EventCallbackCommand->SetAbortFlag(1); |
| 234 | self->StartInteraction(); |
| 235 | self->InvokeEvent(vtkCommand::StartInteractionEvent, nullptr); |
| 236 | } |
| 237 | |
| 238 | //------------------------------------------------------------------------------ |
| 239 | void vtkLineWidget2::MoveAction(vtkAbstractWidget* w) |
nothing calls this directly
no test coverage detected