20#include <wx/checkbox.h>
22#include <wx/radiobut.h>
24#include <wx/statbox.h>
25#include <wx/textctrl.h>
27#if wxUSE_ACCESSIBILITY
31template<
typename...
Types>
34 std::tuple<std::add_pointer_t<Types>...> types;
37 [window](
auto... args) ->
bool
38 {
return ((
dynamic_cast<decltype(args)
>(window) !=
nullptr) || ...); },
44 std::deque<wxWindow*> elementsQueue;
45 elementsQueue.push_back(window);
47 while (!elementsQueue.empty())
49 auto element = elementsQueue.front();
50 elementsQueue.pop_front();
52 for (
auto child : element->GetChildren())
53 elementsQueue.push_back(child);
55#if wxUSE_ACCESSIBILITY
56 if (element->GetAccessible() ==
nullptr)
59 wxCheckBox, wxChoice, wxSlider, wxTextCtrl, wxStaticBox,
60 wxRadioButton>(element))
65 const auto label = element->GetLabel();
68 element->SetName(wxStripMenuCodes(
label));
void SetupAccessibility(wxWindow *window)
bool IsOfType(wxWindow *window)
An alternative to using wxWindowAccessible, which in wxWidgets 3.1.1 contained GetParent() which was ...
std::vector< Type > Types