Returns a state constant.
| 440 | |
| 441 | // Returns a state constant. |
| 442 | wxAccStatus TrackPanelAx::GetState( int childId, long* state ) |
| 443 | { |
| 444 | #if defined(__WXMSW__) |
| 445 | auto pFocus = mwFocus.lock(); |
| 446 | if (!pFocus) |
| 447 | return wxACC_FAIL; |
| 448 | |
| 449 | if( childId > 0 ) |
| 450 | { |
| 451 | auto t = pFocus->FindTrack(childId); |
| 452 | |
| 453 | *state = wxACC_STATE_SYSTEM_FOCUSABLE | wxACC_STATE_SYSTEM_SELECTABLE; |
| 454 | if (t) |
| 455 | { |
| 456 | if (t == pFocus->PeekFocus() && GetWindow() == wxWindow::FindFocus()) |
| 457 | { |
| 458 | *state |= wxACC_STATE_SYSTEM_FOCUSED; |
| 459 | } |
| 460 | |
| 461 | if( t->GetSelected() && mTrackName ) |
| 462 | { |
| 463 | *state |= wxACC_STATE_SYSTEM_SELECTED; |
| 464 | } |
| 465 | } |
| 466 | } |
| 467 | else // childId == wxACC_SELF |
| 468 | { |
| 469 | // let wxWidgets use a standard accessible object for the state |
| 470 | return wxACC_NOT_IMPLEMENTED; |
| 471 | } |
| 472 | #endif |
| 473 | |
| 474 | #if defined(__WXMAC__) |
| 475 | auto pFocus = mwFocus.lock(); |
| 476 | if (!pFocus) |
| 477 | return wxACC_FAIL; |
| 478 | |
| 479 | *state = wxACC_STATE_SYSTEM_FOCUSABLE | wxACC_STATE_SYSTEM_SELECTABLE; |
| 480 | |
| 481 | if( childId > 0 ) |
| 482 | { |
| 483 | auto t = pFocus->FindTrack(childId); |
| 484 | |
| 485 | if (t) |
| 486 | { |
| 487 | if (t == pFocus->PeekFocus()) |
| 488 | { |
| 489 | *state |= wxACC_STATE_SYSTEM_FOCUSED; |
| 490 | } |
| 491 | |
| 492 | if( t->GetSelected() ) |
| 493 | { |
| 494 | *state |= wxACC_STATE_SYSTEM_SELECTED; |
| 495 | } |
| 496 | } |
| 497 | } |
| 498 | #endif |
| 499 |
nothing calls this directly
no test coverage detected