Modify focus or selection
| 333 | |
| 334 | // Modify focus or selection |
| 335 | wxAccStatus TreeCtrlAx::Select(int childId, wxAccSelectionFlags selectFlags) |
| 336 | { |
| 337 | auto ctrl = GetCtrl(); |
| 338 | if (!ctrl) |
| 339 | return wxACC_FAIL; |
| 340 | |
| 341 | if (childId != wxACC_SELF) { |
| 342 | int childCount; |
| 343 | GetChildCount( &childCount ); |
| 344 | if (childId > childCount) |
| 345 | return wxACC_FAIL; |
| 346 | |
| 347 | auto item = FindItem( *ctrl, childId ); |
| 348 | if ( item ) { |
| 349 | if (selectFlags == wxACC_SEL_TAKEFOCUS) |
| 350 | ctrl->SetFocusedItem( item ); |
| 351 | else if (selectFlags == wxACC_SEL_TAKESELECTION) |
| 352 | ctrl->SelectItem( item ); |
| 353 | else |
| 354 | return wxACC_NOT_IMPLEMENTED; |
| 355 | return wxACC_OK; |
| 356 | } |
| 357 | } |
| 358 | |
| 359 | return wxACC_NOT_IMPLEMENTED; |
| 360 | } |
| 361 | |
| 362 | #endif |
| 363 |
nothing calls this directly
no test coverage detected