Add accessibility support for wxDataViewCtrl and wxDataViewTreeCtrl
Implemented wxDataViewCtrlAccessible and wxDataViewTreeCtrlAccessible classes.
This commit is contained in:
@@ -17,9 +17,15 @@
|
||||
#include "wx/scrolwin.h"
|
||||
#include "wx/icon.h"
|
||||
#include "wx/vector.h"
|
||||
#if wxUSE_ACCESSIBILITY
|
||||
#include "wx/access.h"
|
||||
#endif // wxUSE_ACCESSIBILITY
|
||||
|
||||
class WXDLLIMPEXP_FWD_ADV wxDataViewMainWindow;
|
||||
class WXDLLIMPEXP_FWD_ADV wxDataViewHeaderWindow;
|
||||
#if wxUSE_ACCESSIBILITY
|
||||
class WXDLLIMPEXP_FWD_ADV wxDataViewCtrlAccessible;
|
||||
#endif // wxUSE_ACCESSIBILITY
|
||||
|
||||
// ---------------------------------------------------------
|
||||
// wxDataViewColumn
|
||||
@@ -172,6 +178,9 @@ class WXDLLIMPEXP_ADV wxDataViewCtrl : public wxDataViewCtrlBase,
|
||||
friend class wxDataViewHeaderWindow;
|
||||
friend class wxDataViewHeaderWindowMSW;
|
||||
friend class wxDataViewColumn;
|
||||
#if wxUSE_ACCESSIBILITY
|
||||
friend class wxDataViewCtrlAccessible;
|
||||
#endif // wxUSE_ACCESSIBILITY
|
||||
|
||||
public:
|
||||
wxDataViewCtrl() : wxScrollHelper(this)
|
||||
@@ -376,5 +385,58 @@ private:
|
||||
wxDECLARE_EVENT_TABLE();
|
||||
};
|
||||
|
||||
#if wxUSE_ACCESSIBILITY
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxDataViewCtrlAccessible
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_ADV wxDataViewCtrlAccessible: public wxWindowAccessible
|
||||
{
|
||||
public:
|
||||
wxDataViewCtrlAccessible(wxDataViewCtrl* win);
|
||||
virtual ~wxDataViewCtrlAccessible() {};
|
||||
|
||||
virtual wxAccStatus HitTest(const wxPoint& pt, int* childId,
|
||||
wxAccessible** childObject) wxOVERRIDE;
|
||||
|
||||
virtual wxAccStatus GetLocation(wxRect& rect, int elementId) wxOVERRIDE;
|
||||
|
||||
virtual wxAccStatus Navigate(wxNavDir navDir, int fromId,
|
||||
int* toId, wxAccessible** toObject) wxOVERRIDE;
|
||||
|
||||
virtual wxAccStatus GetName(int childId, wxString* name) wxOVERRIDE;
|
||||
|
||||
virtual wxAccStatus GetChildCount(int* childCount) wxOVERRIDE;
|
||||
|
||||
virtual wxAccStatus GetChild(int childId, wxAccessible** child) wxOVERRIDE;
|
||||
|
||||
// wxWindowAccessible::GetParent() implementation is enough.
|
||||
// virtual wxAccStatus GetParent(wxAccessible** parent) wxOVERRIDE;
|
||||
|
||||
virtual wxAccStatus DoDefaultAction(int childId) wxOVERRIDE;
|
||||
|
||||
virtual wxAccStatus GetDefaultAction(int childId, wxString* actionName) wxOVERRIDE;
|
||||
|
||||
virtual wxAccStatus GetDescription(int childId, wxString* description) wxOVERRIDE;
|
||||
|
||||
virtual wxAccStatus GetHelpText(int childId, wxString* helpText) wxOVERRIDE;
|
||||
|
||||
virtual wxAccStatus GetKeyboardShortcut(int childId, wxString* shortcut) wxOVERRIDE;
|
||||
|
||||
virtual wxAccStatus GetRole(int childId, wxAccRole* role) wxOVERRIDE;
|
||||
|
||||
virtual wxAccStatus GetState(int childId, long* state) wxOVERRIDE;
|
||||
|
||||
virtual wxAccStatus GetValue(int childId, wxString* strValue) wxOVERRIDE;
|
||||
|
||||
virtual wxAccStatus Select(int childId, wxAccSelectionFlags selectFlags) wxOVERRIDE;
|
||||
|
||||
virtual wxAccStatus GetFocus(int* childId, wxAccessible** child) wxOVERRIDE;
|
||||
|
||||
#if wxUSE_VARIANT
|
||||
virtual wxAccStatus GetSelections(wxVariant* selections) wxOVERRIDE;
|
||||
#endif // wxUSE_VARIANT
|
||||
};
|
||||
#endif // wxUSE_ACCESSIBILITY
|
||||
|
||||
#endif // __GENERICDATAVIEWCTRLH__
|
||||
|
Reference in New Issue
Block a user