Updates to Mac accessibility for wx3.1.3

This commit is contained in:
Leland Lucius 2020-05-03 01:15:31 -05:00
parent 96c700c7e9
commit c0b1c1b00e
2 changed files with 12 additions and 11 deletions

View File

@ -144,6 +144,10 @@ public:
const wxDataViewItem& item,
unsigned col) wxOVERRIDE;
#if wxUSE_ACCESSIBILITY
virtual wxString GetAccessibleDescription() const wxOVERRIDE { return {}; }
#endif // wxUSE_ACCESSIBILITY
private:
wxArrayString m_choices;
@ -167,6 +171,10 @@ public:
virtual void OSXOnCellChanged(NSObject *value,
const wxDataViewItem& item,
unsigned col) wxOVERRIDE;
#if wxUSE_ACCESSIBILITY
virtual wxString GetAccessibleDescription() const wxOVERRIDE { return {}; }
#endif // wxUSE_ACCESSIBILITY
};
// ---------------------------------------------------------
@ -255,6 +263,9 @@ public:
const wxDataViewItem& item,
unsigned col) wxOVERRIDE;
#if wxUSE_ACCESSIBILITY
virtual wxString GetAccessibleDescription() const wxOVERRIDE { return {}; }
#endif // wxUSE_ACCESSIBILITY
private:
void DoInitButtonCell(int buttonType);

View File

@ -1096,16 +1096,6 @@ BOOL wxOSX_performDragOperation( id self, SEL _cmd, id <NSDraggingInfo> sender )
}
namespace {
// Return an autoreleased NSString
inline NSString* wxNSStringWithWxString(const wxString &wxstring)
{
#if wxUSE_UNICODE
return [NSString stringWithUTF8String: wxstring.utf8_str()];
#else
return [NSString stringWithCString: wxstring.c_str() length:wxstring.Len()];
#endif // wxUSE_UNICODE
}
wxAccessible *findAccessible( id view )
{
wxWidgetCocoaImpl* impl;
@ -1323,7 +1313,7 @@ namespace {
{
wxString result;
if (wxACC_OK == (accessible.*pmf)(childID, &result))
return wxNSStringWithWxString(result);
return (id) wxNSStringWithWxString(result);
else
return @"";
}