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

Method GetState

src/prefs/PrefsDialog.cpp:298–318  ·  view source on GitHub ↗

Returns a state constant.

Source from the content-addressed store, hash-verified

296
297// Returns a state constant.
298wxAccStatus 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.

Callers

nothing calls this directly

Calls 2

FindItemFunction · 0.85
GetSelectionMethod · 0.45

Tested by

no test coverage detected