| 571 | } |
| 572 | |
| 573 | void Widget::OnWindowMouseDown(const Point& pos, EInputKey key) |
| 574 | { |
| 575 | if (CaptureWidget) |
| 576 | { |
| 577 | CaptureWidget->OnMouseDown(CaptureWidget->MapFrom(this, pos), key); |
| 578 | } |
| 579 | else |
| 580 | { |
| 581 | Widget* widget = ChildAt(pos); |
| 582 | if (!widget) |
| 583 | widget = this; |
| 584 | while (widget) |
| 585 | { |
| 586 | bool stopPropagation = widget->OnMouseDown(widget->MapFrom(this, pos), key); |
| 587 | if (stopPropagation || widget == this) |
| 588 | break; |
| 589 | widget = widget->Parent(); |
| 590 | } |
| 591 | } |
| 592 | } |
| 593 | |
| 594 | void Widget::OnWindowMouseDoubleclick(const Point& pos, EInputKey key) |
| 595 | { |
no test coverage detected