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

Method LeftButtonReleaseEvent

Rendering/Core/vtkRenderWindowInteractor.cxx:1129–1157  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1127
1128//------------------------------------------------------------------
1129void vtkRenderWindowInteractor::LeftButtonReleaseEvent()
1130{
1131 if (!this->Enabled)
1132 {
1133 return;
1134 }
1135
1136 // Left button release event is responsible for ending any current multi-touch gestures being
1137 // processed. Before invoking a release event on the first pointer and decrementing the pointers
1138 // down count, note the current down count. This can be used later to call RecognizeGesture and
1139 // end the gesture with a release event.
1140 int previousPointersDownCount = this->PointersDownCount;
1141 if (this->RecognizeGestures)
1142 {
1143 if (this->PointersDown[this->PointerIndex])
1144 {
1145 this->PointersDown[this->PointerIndex] = 0;
1146 this->PointersDownCount--;
1147 }
1148 // do we have multitouch
1149 if (previousPointersDownCount > 1)
1150 {
1151 // handle the gesture
1152 this->RecognizeGesture(vtkCommand::LeftButtonReleaseEvent);
1153 return;
1154 }
1155 }
1156 this->InvokeEvent(vtkCommand::LeftButtonReleaseEvent, nullptr);
1157}
1158
1159//------------------------------------------------------------------
1160void vtkRenderWindowInteractor::MiddleButtonPressEvent()

Callers 2

HandleMotionEventMethod · 0.45
ProcessEventMethod · 0.45

Calls 2

RecognizeGestureMethod · 0.95
InvokeEventMethod · 0.80

Tested by

no test coverage detected