| 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 | { |