Audacity 3.2.0
Functions
AccessibilityUtils.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

WX_WRAPPERS_API void SetupAccessibility (wxWindow *window)
 

Function Documentation

◆ SetupAccessibility()

WX_WRAPPERS_API void SetupAccessibility ( wxWindow *  window)

Definition at line 42 of file AccessibilityUtils.cpp.

43{
44 std::deque<wxWindow*> elementsQueue;
45 elementsQueue.push_back(window);
46
47 while (!elementsQueue.empty())
48 {
49 auto element = elementsQueue.front();
50 elementsQueue.pop_front();
51
52 for (auto child : element->GetChildren())
53 elementsQueue.push_back(child);
54
55#if wxUSE_ACCESSIBILITY
56 if (element->GetAccessible() == nullptr)
57 {
58 if (IsOfType<
59 wxCheckBox, wxChoice, wxSlider, wxTextCtrl, wxStaticBox,
60 wxRadioButton>(element))
61 element->SetAccessible(safenew WindowAccessible(element));
62 }
63#endif
64
65 const auto label = element->GetLabel();
66
67 if (!label.empty())
68 element->SetName(wxStripMenuCodes(label));
69 }
70}
bool IsOfType(wxWindow *window)
#define safenew
Definition: MemoryX.h:10
TranslatableString label
Definition: TagsEditor.cpp:165
An alternative to using wxWindowAccessible, which in wxWidgets 3.1.1 contained GetParent() which was ...

References TranslatableString::empty(), IsOfType(), label, and safenew.

Referenced by audacity::cloud::audiocom::sync::CloudProjectPropertiesDialog::CloudProjectPropertiesDialog(), and audacity::cloud::audiocom::sync::AudioComDialogBase::ShowDialog().

Here is the call graph for this function:
Here is the caller graph for this function: