| 606 | CUIWindow* CUIWindow::GetCurrentMouseHandler() { return GetTop()->GetChildMouseHandler(); } |
| 607 | |
| 608 | CUIWindow* CUIWindow::GetChildMouseHandler() |
| 609 | { |
| 610 | CUIWindow* pWndResult; |
| 611 | WINDOW_LIST::reverse_iterator it = m_ChildWndList.rbegin(); |
| 612 | |
| 613 | for (; it != m_ChildWndList.rend(); ++it) |
| 614 | { |
| 615 | Frect wndRect = (*it)->GetWndRect(); |
| 616 | // very strange code.... i can't understand difference between |
| 617 | // first and second condition. I Got It from OnMouse() method; |
| 618 | if (wndRect.in(cursor_pos)) |
| 619 | { |
| 620 | if ((*it)->IsEnabled()) |
| 621 | { |
| 622 | return pWndResult = (*it)->GetChildMouseHandler(); |
| 623 | } |
| 624 | } |
| 625 | else if ((*it)->IsEnabled() && (*it)->CursorOverWindow()) |
| 626 | { |
| 627 | return pWndResult = (*it)->GetChildMouseHandler(); |
| 628 | } |
| 629 | } |
| 630 | |
| 631 | return this; |
| 632 | } |
| 633 | |
| 634 | //перемесчтить окно на вершину. |
| 635 | // false если такого дочернего окна нет |
no test coverage detected