| 225 | } |
| 226 | |
| 227 | wxAccStatus GetName(int childId, wxString* name) override |
| 228 | { |
| 229 | const auto ctrl = GetCtrl(); |
| 230 | wxCHECK(ctrl, wxACC_FAIL); |
| 231 | |
| 232 | name->clear(); |
| 233 | |
| 234 | if(childId == wxACC_SELF) |
| 235 | { |
| 236 | *name = ctrl->GetName(); |
| 237 | return wxACC_OK; |
| 238 | } |
| 239 | |
| 240 | const auto model = GetModel(); |
| 241 | if(model == nullptr) |
| 242 | return wxACC_INVALID_ARG; |
| 243 | |
| 244 | const auto item = ctrl->GetItemByRow(childId - 1); |
| 245 | if(!item.IsOk()) |
| 246 | return wxACC_INVALID_ARG; |
| 247 | |
| 248 | const auto plugin = model->GetPlugin(item); |
| 249 | if(plugin == nullptr) |
| 250 | return wxACC_INVALID_ARG; |
| 251 | |
| 252 | wxVariant state; |
| 253 | model->GetValue(state, item, PluginDataModel::ColumnState); |
| 254 | |
| 255 | //separate type and path parts with comma so that |
| 256 | //screen reader would make a short pause between them |
| 257 | *name = wxString::Format("%s %s %s, %s", |
| 258 | plugin->GetPluginType() == PluginTypeEffect |
| 259 | ? plugin->GetSymbol().Translation() |
| 260 | : wxFileName(plugin->GetPath()).GetName(), |
| 261 | state.GetBool() |
| 262 | ? _("Enabled") |
| 263 | : _("Disabled"), |
| 264 | plugin->GetEffectFamily(), |
| 265 | plugin->GetPath()); |
| 266 | |
| 267 | return wxACC_OK; |
| 268 | } |
| 269 | |
| 270 | wxAccStatus GetFocus(int* childId, wxAccessible** accessible) override |
| 271 | { |
nothing calls this directly
no test coverage detected