Gets the window with the keyboard focus. If childId is 0 and child is NULL, no object in this subhierarchy has the focus. If this object has the focus, child should be 'this'.
| 561 | // this subhierarchy has the focus. |
| 562 | // If this object has the focus, child should be 'this'. |
| 563 | wxAccStatus TrackPanelAx::GetFocus( int *childId, wxAccessible **child ) |
| 564 | { |
| 565 | auto pFocus = mwFocus.lock(); |
| 566 | if (!pFocus) |
| 567 | return wxACC_FAIL; |
| 568 | |
| 569 | #if defined(__WXMSW__) |
| 570 | |
| 571 | if (GetWindow() == wxWindow::FindFocus()) |
| 572 | { |
| 573 | auto focusedTrack = pFocus->PeekFocus(); |
| 574 | if (focusedTrack) |
| 575 | { |
| 576 | *childId = pFocus->TrackNum(focusedTrack); |
| 577 | } |
| 578 | else |
| 579 | { |
| 580 | *child = this; |
| 581 | } |
| 582 | } |
| 583 | |
| 584 | return wxACC_OK; |
| 585 | #endif |
| 586 | |
| 587 | #if defined(__WXMAC__) |
| 588 | if( GetWindow() == wxWindow::FindFocus() ) |
| 589 | { |
| 590 | auto focusedTrack = pFocus->PeekFocus(); |
| 591 | if( focusedTrack ) |
| 592 | { |
| 593 | *childId = pFocus->TrackNum(focusedTrack); |
| 594 | } |
| 595 | else |
| 596 | { |
| 597 | *childId = wxACC_SELF; |
| 598 | } |
| 599 | |
| 600 | return wxACC_OK; |
| 601 | } |
| 602 | |
| 603 | return wxACC_NOT_IMPLEMENTED; |
| 604 | #endif |
| 605 | } |
| 606 | |
| 607 | // Navigates from fromId to toId/toObject |
| 608 | wxAccStatus TrackPanelAx::Navigate(wxNavDir navDir, int fromId, int* toId, wxAccessible** toObject) |