Add wxWidgetCocoaImpl::GetAccessibleView() to avoid code duplication

Extract code duplicated in wxWidgetCocoaImpl::SetAccessibilityLabel()
and SetAccessibilityTitleElement() into a new function.

No real changes.

See #27056, #27060.
This commit is contained in:
Vadim Zeitlin
2026-09-27 21:36:23 +02:00
parent 07590bec33
commit 776a9a2787
2 changed files with 22 additions and 20 deletions
+8
View File
@@ -268,6 +268,14 @@ protected:
// Return the view to apply the font/colour to.
NSView* GetViewWithText() const;
// Return the view used for accessibility purposes, which is different
// from m_osxView for controls inside a scroll view, e.g. multiline
// wxTextCtrl, as VoiceOver reads the document view and not the scroll view.
//
// Note that the element actually used by VoiceOver may be a descendant
// of this view, e.g. its cell.
NSView* GetAccessibleView() const;
NSEvent* m_lastKeyDownEvent;
bool m_lastKeyDownWXSent;
bool m_lastLeftDownWasDClick;