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

Method OnMouseMove

Rendering/UI/vtkWin32RenderWindowInteractor.cxx:604–632  ·  view source on GitHub ↗

------------------------------------------------------------- Event loop handlers -------------------------------------------------------------

Source from the content-addressed store, hash-verified

602// Event loop handlers
603//-------------------------------------------------------------
604int vtkWin32RenderWindowInteractor::OnMouseMove(HWND hWnd, UINT nFlags, int X, int Y)
605{
606 if (!this->Enabled)
607 {
608 return 0;
609 }
610
611 // touch events handled by WM_TOUCH
612 if ((GetMessageExtraInfo() & MOUSEEVENTF_FROMTOUCH) == MOUSEEVENTF_FROMTOUCH)
613 {
614 return 0;
615 }
616
617 this->SetEventInformationFlipY(X, Y, nFlags & MK_CONTROL, nFlags & MK_SHIFT);
618 this->SetAltKey((GetKeyState(VK_MENU) & 0x8000) != 0);
619 if (!this->MouseInWindow && (X >= 0 && X < this->Size[0] && Y >= 0 && Y < this->Size[1]))
620 {
621 this->InvokeEvent(vtkCommand::EnterEvent, nullptr);
622 this->MouseInWindow = 1;
623 // request WM_MOUSELEAVE generation
624 TRACKMOUSEEVENT tme;
625 tme.cbSize = sizeof(TRACKMOUSEEVENT);
626 tme.dwFlags = TME_LEAVE;
627 tme.hwndTrack = hWnd;
628 TrackMouseEvent(&tme);
629 }
630
631 return this->InvokeEvent(vtkCommand::MouseMoveEvent, nullptr);
632}
633
634//------------------------------------------------------------------------------
635int vtkWin32RenderWindowInteractor::OnNCMouseMove(HWND, UINT nFlags, int X, int Y)

Callers 3

onMouseMoveMethod · 0.45
vtkHandleMessage2Function · 0.45
ProcessEventsMethod · 0.45

Calls 1

InvokeEventMethod · 0.80

Tested by 1

onMouseMoveMethod · 0.36