Implement wxDataViewRenderer::GetAccessibleDescription() method

The purpose of this method is to provide a textual description of the renderer's content to the class implementing accessibility framework in wxDVC (wxDataViewCtrlAccessible).
It is exposed if wxUSE_ACCESSIBILITY is set to 1.
This commit is contained in:
Artur Wieczorek
2016-10-24 21:52:22 +02:00
parent c9ec981a28
commit d9fbde805b
7 changed files with 153 additions and 2 deletions

View File

@@ -466,6 +466,35 @@ public:
return false;
}
#if wxUSE_ACCESSIBILITY
virtual wxString GetAccessibleDescription() const wxOVERRIDE
{
wxString text = m_value.GetText();
if ( !text.empty() )
{
text += wxS(" ");
}
switch ( m_value.m_checkedState )
{
case wxCHK_CHECKED:
/* TRANSLATORS: Checkbox state name */
text += _("checked");
break;
case wxCHK_UNCHECKED:
/* TRANSLATORS: Checkbox state name */
text += _("unchecked");
break;
case wxCHK_UNDETERMINED:
/* TRANSLATORS: Checkbox state name */
text += _("undetermined");
break;
}
return text;
}
#endif // wxUSE_ACCESSIBILITY
wxSize GetSize() const wxOVERRIDE
{
wxSize size = GetCheckSize();