| 530 | } |
| 531 | |
| 532 | void 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 | |
| 573 | void Widget::OnWindowMouseDown(const Point& pos, EInputKey key) |
| 574 | { |
no test coverage detected