MCPcopy Create free account
hub / github.com/audacity/audacity / Select

Method Select

src/prefs/PrefsDialog.cpp:335–360  ·  view source on GitHub ↗

Modify focus or selection

Source from the content-addressed store, hash-verified

333
334// Modify focus or selection
335wxAccStatus 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

Callers

nothing calls this directly

Calls 1

FindItemFunction · 0.85

Tested by

no test coverage detected