MCPcopy Create free account
hub / github.com/Kitware/VTK / SelectAction

Method SelectAction

Interaction/Widgets/vtkCamera3DWidget.cxx:106–134  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

104
105//------------------------------------------------------------------------------
106void 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//------------------------------------------------------------------------------
137void vtkCamera3DWidget::MoveAction(vtkAbstractWidget* w)

Callers

nothing calls this directly

Calls 5

InvokeEventMethod · 0.80
GrabFocusMethod · 0.45
SetInteractionStateMethod · 0.45
StartInteractionMethod · 0.45

Tested by

no test coverage detected