1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-20 17:41:13 +02:00
Files
audacity/src/widgets/WindowAccessible.cpp
James Crook c0e1c82be9 Add missing files to Mac build.
Also moved the constructor into the .cpp file, so that wxWindow is a fully defined class.
2018-04-04 14:14:59 +01:00

41 lines
967 B
C++

/**********************************************************************
Audacity: A Digital Audio Editor
WindowAccessible.cpp
David Bailes
*******************************************************************//**
\class WindowAccessible
\brief An alternative to using wxWindowAccessible, which in wxWidgets 3.1.1
contained GetParent() which was incorrect.
*//*******************************************************************/
#include "WindowAccessible.h"
#include <wx/window.h>
#if wxUSE_ACCESSIBILITY
WindowAccessible::WindowAccessible(wxWindow* win)
: wxAccessible(win)
{
if (win) win->SetAccessible(this);
}
wxAccStatus WindowAccessible::GetName(int childId, wxString* name)
{
wxCHECK( GetWindow() != nullptr, wxACC_FAIL);
// If the control has children, don't override their names
if (childId > 0)
return wxACC_NOT_IMPLEMENTED;
*name = GetWindow()->GetName();
return wxACC_OK;
}
#endif // wxUSE_ACCESSIBILITY