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

Method DoDefaultAction

src/PluginDataViewCtrl.cpp:340–361  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

338 }
339
340 wxAccStatus DoDefaultAction(int childId) override
341 {
342 const auto ctrl = GetCtrl();
343 wxCHECK(ctrl, wxACC_FAIL);
344
345 if(childId == wxACC_SELF)
346 return wxACC_NOT_SUPPORTED;
347
348 const auto model = GetModel();
349 if(model == nullptr)
350 return wxACC_NOT_SUPPORTED;
351
352 const auto item = ctrl->GetItemByRow(childId - 1);
353 if(!item.IsOk())
354 return wxACC_INVALID_ARG;
355
356 wxVariant enabled;
357 model->GetValue(enabled, item, PluginDataModel::ColumnState);
358 model->SetValue(wxVariant(!enabled.GetBool()), item, PluginDataModel::ColumnState);
359
360 return wxACC_OK;
361 }
362
363 wxAccStatus GetSelections(wxVariant* selections) override
364 {

Callers

nothing calls this directly

Calls 5

GetBoolMethod · 0.80
wxVariantClass · 0.50
IsOkMethod · 0.45
GetValueMethod · 0.45
SetValueMethod · 0.45

Tested by

no test coverage detected