Returns a state constant.
| 296 | |
| 297 | // Returns a state constant. |
| 298 | wxAccStatus TreeCtrlAx::GetState(int childId, long* state) |
| 299 | { |
| 300 | auto ctrl = GetCtrl(); |
| 301 | if (!ctrl) |
| 302 | return wxACC_FAIL; |
| 303 | |
| 304 | *state = wxACC_STATE_SYSTEM_FOCUSABLE | wxACC_STATE_SYSTEM_SELECTABLE; |
| 305 | |
| 306 | if ( childId != wxACC_SELF ) { |
| 307 | auto item = FindItem( *ctrl, childId ); |
| 308 | if (item) { |
| 309 | if( item == ctrl->GetFocusedItem() ) |
| 310 | *state |= wxACC_STATE_SYSTEM_FOCUSED; |
| 311 | |
| 312 | if( item == ctrl->GetSelection() ) |
| 313 | *state |= wxACC_STATE_SYSTEM_SELECTED; |
| 314 | } |
| 315 | } |
| 316 | |
| 317 | return wxACC_OK; |
| 318 | } |
| 319 | |
| 320 | // Returns a localized string representing the value for the object |
| 321 | // or child. |
nothing calls this directly
no test coverage detected