MCPcopy Create free account
hub / github.com/ZDoom/Raze / OnWindowMouseMove

Method OnWindowMouseMove

libraries/ZWidget/src/core/widget.cpp:532–571  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

530}
531
532void Widget::OnWindowMouseMove(const Point& pos)
533{
534 if (CaptureWidget)
535 {
536 DispWindow->SetCursor(CaptureWidget->CurrentCursor);
537 CaptureWidget->OnMouseMove(CaptureWidget->MapFrom(this, pos));
538 }
539 else
540 {
541 Widget* widget = ChildAt(pos);
542 if (!widget)
543 widget = this;
544
545 if (HoverWidget != widget)
546 {
547 if (HoverWidget)
548 {
549 for (Widget* w = HoverWidget; w != widget && w != this; w = w->Parent())
550 {
551 Widget* p = w->Parent();
552 if (!w->FrameGeometry.contains(p->MapFrom(this, pos)))
553 {
554 w->OnMouseLeave();
555 }
556 }
557 }
558 HoverWidget = widget;
559 }
560
561 DispWindow->SetCursor(widget->CurrentCursor);
562
563 do
564 {
565 widget->OnMouseMove(widget->MapFrom(this, pos));
566 if (widget == this)
567 break;
568 widget = widget->Parent();
569 } while (widget);
570 }
571}
572
573void Widget::OnWindowMouseDown(const Point& pos, EInputKey key)
574{

Callers 2

OnMouseMotionMethod · 0.80
OnWindowMessageMethod · 0.80

Calls 6

MapFromMethod · 0.80
ParentMethod · 0.80
SetCursorMethod · 0.45
OnMouseMoveMethod · 0.45
containsMethod · 0.45
OnMouseLeaveMethod · 0.45

Tested by

no test coverage detected