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

Method GetName

src/toolbars/MeterToolBar.cpp:54–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52 { }
53
54 wxAccStatus GetName(int childId, wxString* name) override
55 {
56 if(childId != wxACC_SELF)
57 return wxACC_NOT_IMPLEMENTED;
58
59 if(mAccSilent)
60 *name = wxEmptyString; // Jaws reads nothing, and nvda reads "unknown"
61 else
62 {
63 const auto button = static_cast<AButton*>(GetWindow());
64
65 *name = button->GetName();
66
67 if(const auto panel = mAssociatedMeterPanel.get())
68 {
69 // translations of strings such as " Monitoring " did not
70 // always retain the leading space. Therefore a space has
71 // been added to ensure at least one space, and stop
72 // words from being merged
73 if(panel->IsMonitoring())
74 *name += wxT(" ") + _(" Monitoring ");
75 else if(panel->IsActive())
76 *name += wxT(" ") + _(" Active ");
77
78 const auto dbRange = panel->GetDBRange();
79 if (dbRange != -1)
80 *name += wxT(" ") + wxString::Format(_(" Peak %2.f dB"), panel->GetPeakHold() * dbRange - dbRange);
81 else
82 *name += wxT(" ") + wxString::Format(_(" Peak %.2f "), panel->GetPeakHold());
83
84 if(panel->IsClipping())
85 *name += wxT(" ") + _(" Clipped ");
86 }
87 }
88 return wxACC_OK;
89 }
90
91 wxAccStatus GetRole(int childId, wxAccRole* role) override
92 {

Callers 15

OnSpectrogramSettingsMethod · 0.45
DrawMethod · 0.45
StartEditClipNameMethod · 0.45
OnTextEditFinishedMethod · 0.45
OnWaveColorChangeMethod · 0.45
OnFormatChangeMethod · 0.45
SetRateMethod · 0.45
OnMergeStereoMethod · 0.45
OnSwapChannelsMethod · 0.45
OnSplitStereoMethod · 0.45
OnSplitStereoMonoMethod · 0.45

Calls 6

GetPeakHoldMethod · 0.80
getMethod · 0.45
IsMonitoringMethod · 0.45
IsActiveMethod · 0.45
GetDBRangeMethod · 0.45
IsClippingMethod · 0.45

Tested by 1

OnSpectrogramSettingsMethod · 0.36