LibreOffice Module vcl (master)  1
accessibility.cxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #include <vcl/layout.hxx>
21 #include <vcl/toolkit/fixed.hxx>
22 #include <vcl/window.hxx>
23 #include <vcl/menu.hxx>
24 #include <vcl/wrkwin.hxx>
25 
26 #include <window.h>
27 #include <brdwin.hxx>
28 
29 #include <com/sun/star/accessibility/XAccessible.hpp>
30 #include <com/sun/star/accessibility/AccessibleRole.hpp>
31 #include <com/sun/star/accessibility/AccessibleStateType.hpp>
32 #include <com/sun/star/accessibility/XAccessibleEditableText.hpp>
33 #include <com/sun/star/awt/XWindowPeer.hpp>
34 
35 #include <sal/log.hxx>
36 
37 using namespace ::com::sun::star::uno;
38 using namespace ::com::sun::star::lang;
40 using namespace ::com::sun::star::datatransfer::dnd;
41 using namespace ::com::sun::star;
42 
43 
45 {
46  nAccessibleRole = 0xFFFF;
47  pLabeledByWindow = nullptr;
48  pLabelForWindow = nullptr;
49 }
50 
52 {
53 }
54 
55 namespace vcl {
56 
57 css::uno::Reference< css::accessibility::XAccessible > Window::GetAccessible( bool bCreate )
58 {
59  // do not optimize hierarchy for the top level border win (ie, when there is no parent)
60  /* // do not optimize accessible hierarchy at all to better reflect real VCL hierarchy
61  if ( GetParent() && ( GetType() == WindowType::BORDERWINDOW ) && ( GetChildCount() == 1 ) )
62  //if( !ImplIsAccessibleCandidate() )
63  {
64  vcl::Window* pChild = GetAccessibleChildWindow( 0 );
65  if ( pChild )
66  return pChild->GetAccessible();
67  }
68  */
69  if ( !mpWindowImpl )
70  return css::uno::Reference< css::accessibility::XAccessible >();
71  if ( !mpWindowImpl->mxAccessible.is() && bCreate )
72  mpWindowImpl->mxAccessible = CreateAccessible();
73 
74  return mpWindowImpl->mxAccessible;
75 }
76 
77 css::uno::Reference< css::accessibility::XAccessible > Window::CreateAccessible()
78 {
79  css::uno::Reference< css::accessibility::XAccessible > xAcc( GetComponentInterface(), css::uno::UNO_QUERY );
80  return xAcc;
81 }
82 
83 void Window::SetAccessible( const css::uno::Reference< css::accessibility::XAccessible >& x )
84 {
85  if (!mpWindowImpl)
86  return;
87 
88  mpWindowImpl->mxAccessible = x;
89 }
90 
91 // skip all border windows that are not top level frames
93 {
94  if( !mpWindowImpl->mbBorderWin )
95  return true;
96  else
97  // #101741 do not check for WB_CLOSEABLE because undecorated floaters (like menus!) are closeable
98  if( mpWindowImpl->mbFrame && mpWindowImpl->mnStyle & (WB_MOVEABLE | WB_SIZEABLE) )
99  return true;
100  else
101  return false;
102 }
103 
105 {
106  if( mpWindowImpl->mbFrame )
107  // #101741 do not check for WB_CLOSEABLE because undecorated floaters (like menus!) are closeable
108  if( mpWindowImpl->mnStyle & (WB_MOVEABLE | WB_SIZEABLE) )
109  return true;
110  else
111  return false;
112  else
113  return false;
114 }
115 
117 {
119  return nullptr;
120 
121  vcl::Window* pParent = mpWindowImpl->mpParent;
122  if( GetType() == WindowType::MENUBARWINDOW )
123  {
124  // report the menubar as a child of THE workwindow
125  vcl::Window *pWorkWin = GetParent()->mpWindowImpl->mpFirstChild;
126  while( pWorkWin && (pWorkWin == this) )
127  pWorkWin = pWorkWin->mpWindowImpl->mpNext;
128  pParent = pWorkWin;
129  }
130  // If this is a floating window which has a native border window, then that border should be reported as
131  // the accessible parent
132  else if( GetType() == WindowType::FLOATINGWINDOW &&
133  mpWindowImpl->mpBorderWindow && mpWindowImpl->mpBorderWindow->mpWindowImpl->mbFrame )
134  {
135  pParent = mpWindowImpl->mpBorderWindow;
136  }
137  else if( pParent && !pParent->ImplIsAccessibleCandidate() )
138  {
139  pParent = pParent->mpWindowImpl->mpParent;
140  }
141  return pParent;
142 }
143 
145 {
146  if (!mpWindowImpl)
147  return 0;
148 
149  sal_uInt16 nChildren = 0;
150  vcl::Window* pChild = mpWindowImpl->mpFirstChild;
151  while( pChild )
152  {
153  if( pChild->IsVisible() )
154  nChildren++;
155  pChild = pChild->mpWindowImpl->mpNext;
156  }
157 
158  // report the menubarwindow as a child of THE workwindow
159  if( GetType() == WindowType::BORDERWINDOW )
160  {
161  ImplBorderWindow *pBorderWindow = static_cast<ImplBorderWindow*>(this);
162  if( pBorderWindow->mpMenuBarWindow &&
163  pBorderWindow->mpMenuBarWindow->IsVisible()
164  )
165  --nChildren;
166  }
167  else if( GetType() == WindowType::WORKWINDOW )
168  {
169  WorkWindow *pWorkWindow = static_cast<WorkWindow*>(this);
170  if( pWorkWindow->GetMenuBar() &&
171  pWorkWindow->GetMenuBar()->GetWindow() &&
172  pWorkWindow->GetMenuBar()->GetWindow()->IsVisible()
173  )
174  ++nChildren;
175  }
176 
177  return nChildren;
178 }
179 
181 {
182  // report the menubarwindow as the first child of THE workwindow
183  if( GetType() == WindowType::WORKWINDOW && static_cast<WorkWindow *>(this)->GetMenuBar() )
184  {
185  if( n == 0 )
186  {
187  MenuBar *pMenuBar = static_cast<WorkWindow *>(this)->GetMenuBar();
188  if( pMenuBar->GetWindow() && pMenuBar->GetWindow()->IsVisible() )
189  return pMenuBar->GetWindow();
190  }
191  else
192  --n;
193  }
194 
195  // transform n to child number including invisible children
196  sal_uInt16 nChildren = n;
197  vcl::Window* pChild = mpWindowImpl->mpFirstChild;
198  while( pChild )
199  {
200  if( pChild->IsVisible() )
201  {
202  if( ! nChildren )
203  break;
204  nChildren--;
205  }
206  pChild = pChild->mpWindowImpl->mpNext;
207  }
208 
209  if( GetType() == WindowType::BORDERWINDOW && pChild && pChild->GetType() == WindowType::MENUBARWINDOW )
210  {
211  do pChild = pChild->mpWindowImpl->mpNext; while( pChild && ! pChild->IsVisible() );
212  SAL_WARN_IF( !pChild, "vcl", "GetAccessibleChildWindow(): wrong index in border window");
213  }
214 
215  if ( pChild && ( pChild->GetType() == WindowType::BORDERWINDOW ) && ( pChild->GetChildCount() == 1 ) )
216  {
217  pChild = pChild->GetChild( 0 );
218  }
219  return pChild;
220 }
221 
222 void Window::SetAccessibleRole( sal_uInt16 nRole )
223 {
224  if ( !mpWindowImpl->mpAccessibleInfos )
225  mpWindowImpl->mpAccessibleInfos.reset( new ImplAccessibleInfos );
226 
227  SAL_WARN_IF( mpWindowImpl->mpAccessibleInfos->nAccessibleRole != 0xFFFF, "vcl", "AccessibleRole already set!" );
228  mpWindowImpl->mpAccessibleInfos->nAccessibleRole = nRole;
229 }
230 
232 {
233  sal_uInt16 nRole = 0xFFFF;
234  switch ( GetType() )
235  {
236  case WindowType::MESSBOX: // MT: Would be nice to have special roles!
237  case WindowType::INFOBOX:
238  case WindowType::WARNINGBOX:
239  case WindowType::ERRORBOX:
240  case WindowType::QUERYBOX: nRole = accessibility::AccessibleRole::ALERT; break;
241 
242  case WindowType::MODELESSDIALOG:
243  case WindowType::TABDIALOG:
244  case WindowType::BUTTONDIALOG:
245  case WindowType::DIALOG: nRole = accessibility::AccessibleRole::DIALOG; break;
246 
247  case WindowType::PUSHBUTTON:
248  case WindowType::OKBUTTON:
249  case WindowType::CANCELBUTTON:
250  case WindowType::HELPBUTTON:
251  case WindowType::IMAGEBUTTON:
252  case WindowType::MOREBUTTON: nRole = accessibility::AccessibleRole::PUSH_BUTTON; break;
253  case WindowType::MENUBUTTON: nRole = accessibility::AccessibleRole::BUTTON_MENU; break;
254 
255  case WindowType::RADIOBUTTON: nRole = accessibility::AccessibleRole::RADIO_BUTTON; break;
256  case WindowType::TRISTATEBOX:
257  case WindowType::CHECKBOX: nRole = accessibility::AccessibleRole::CHECK_BOX; break;
258 
259  case WindowType::MULTILINEEDIT: nRole = accessibility::AccessibleRole::SCROLL_PANE; break;
260 
261  case WindowType::PATTERNFIELD:
262  case WindowType::EDIT: nRole = static_cast<Edit const *>(this)->IsPassword() ? accessibility::AccessibleRole::PASSWORD_TEXT : accessibility::AccessibleRole::TEXT; break;
263 
264  case WindowType::PATTERNBOX:
265  case WindowType::NUMERICBOX:
266  case WindowType::METRICBOX:
267  case WindowType::CURRENCYBOX:
268  case WindowType::LONGCURRENCYBOX:
269  case WindowType::COMBOBOX: nRole = accessibility::AccessibleRole::COMBO_BOX; break;
270 
271  case WindowType::LISTBOX:
272  case WindowType::MULTILISTBOX: nRole = accessibility::AccessibleRole::LIST; break;
273 
274  case WindowType::TREELISTBOX: nRole = accessibility::AccessibleRole::TREE; break;
275 
276  case WindowType::FIXEDTEXT: nRole = accessibility::AccessibleRole::LABEL; break;
277  case WindowType::FIXEDLINE:
278  if( !GetText().isEmpty() )
279  nRole = accessibility::AccessibleRole::LABEL;
280  else
281  nRole = accessibility::AccessibleRole::SEPARATOR;
282  break;
283 
284  case WindowType::FIXEDBITMAP:
285  case WindowType::FIXEDIMAGE: nRole = accessibility::AccessibleRole::ICON; break;
286  case WindowType::GROUPBOX: nRole = accessibility::AccessibleRole::GROUP_BOX; break;
287  case WindowType::SCROLLBAR: nRole = accessibility::AccessibleRole::SCROLL_BAR; break;
288 
289  case WindowType::SLIDER:
290  case WindowType::SPLITTER:
291  case WindowType::SPLITWINDOW: nRole = accessibility::AccessibleRole::SPLIT_PANE; break;
292 
293  case WindowType::DATEBOX:
294  case WindowType::TIMEBOX:
295  case WindowType::DATEFIELD:
296  case WindowType::TIMEFIELD: nRole = accessibility::AccessibleRole::DATE_EDITOR; break;
297 
298  case WindowType::METRICFIELD:
299  case WindowType::CURRENCYFIELD:
300  case WindowType::SPINBUTTON:
301  case WindowType::SPINFIELD:
302  case WindowType::FORMATTEDFIELD: nRole = accessibility::AccessibleRole::SPIN_BOX; break;
303 
304  case WindowType::TOOLBOX: nRole = accessibility::AccessibleRole::TOOL_BAR; break;
305  case WindowType::STATUSBAR: nRole = accessibility::AccessibleRole::STATUS_BAR; break;
306 
307  case WindowType::TABPAGE: nRole = accessibility::AccessibleRole::PANEL; break;
308  case WindowType::TABCONTROL: nRole = accessibility::AccessibleRole::PAGE_TAB_LIST; break;
309 
310  case WindowType::DOCKINGWINDOW: nRole = (mpWindowImpl->mbFrame) ? accessibility::AccessibleRole::FRAME :
311  accessibility::AccessibleRole::PANEL; break;
312 
313  case WindowType::FLOATINGWINDOW: nRole = ( mpWindowImpl->mbFrame ||
314  (mpWindowImpl->mpBorderWindow && mpWindowImpl->mpBorderWindow->mpWindowImpl->mbFrame) ||
315  (GetStyle() & WB_OWNERDRAWDECORATION) ) ? accessibility::AccessibleRole::FRAME :
316  accessibility::AccessibleRole::WINDOW; break;
317 
318  case WindowType::WORKWINDOW: nRole = accessibility::AccessibleRole::ROOT_PANE; break;
319 
320  case WindowType::SCROLLBARBOX: nRole = accessibility::AccessibleRole::FILLER; break;
321 
322  case WindowType::HELPTEXTWINDOW: nRole = accessibility::AccessibleRole::TOOL_TIP; break;
323 
324  case WindowType::RULER: nRole = accessibility::AccessibleRole::RULER; break;
325 
326  case WindowType::SCROLLWINDOW: nRole = accessibility::AccessibleRole::SCROLL_PANE; break;
327 
328  case WindowType::WINDOW:
329  case WindowType::CONTROL:
330  case WindowType::BORDERWINDOW:
331  case WindowType::SYSTEMCHILDWINDOW:
332  default:
334  nRole = accessibility::AccessibleRole::FRAME;
335  else if( IsScrollable() )
336  nRole = accessibility::AccessibleRole::SCROLL_PANE;
337  else if( this->ImplGetWindow()->IsMenuFloatingWindow() )
338  nRole = accessibility::AccessibleRole::WINDOW; // #106002#, contextmenus are windows (i.e. toplevel)
339  else
340  // #104051# WINDOW seems to be a bad default role, use LAYEREDPANE instead
341  // a WINDOW is interpreted as a top-level window, which is typically not the case
342  //nRole = accessibility::AccessibleRole::WINDOW;
343  nRole = accessibility::AccessibleRole::PANEL;
344  }
345  return nRole;
346 }
347 
348 sal_uInt16 Window::GetAccessibleRole() const
349 {
350  if (!mpWindowImpl)
351  return 0;
352 
353  sal_uInt16 nRole = mpWindowImpl->mpAccessibleInfos ? mpWindowImpl->mpAccessibleInfos->nAccessibleRole : 0xFFFF;
354  if ( nRole == 0xFFFF )
355  nRole = getDefaultAccessibleRole();
356  return nRole;
357 }
358 
359 void Window::SetAccessibleName( const OUString& rName )
360 {
361  if ( !mpWindowImpl->mpAccessibleInfos )
362  mpWindowImpl->mpAccessibleInfos.reset( new ImplAccessibleInfos );
363 
364  OUString oldName = GetAccessibleName();
365 
366  mpWindowImpl->mpAccessibleInfos->pAccessibleName = rName;
367 
369 }
370 
372 {
373  if (!mpWindowImpl)
374  return OUString();
375 
376  if (mpWindowImpl->mpAccessibleInfos && mpWindowImpl->mpAccessibleInfos->pAccessibleName)
377  return *mpWindowImpl->mpAccessibleInfos->pAccessibleName;
378  return getDefaultAccessibleName();
379 }
380 
382 {
383  OUString aAccessibleName;
384  switch ( GetType() )
385  {
386  case WindowType::MULTILINEEDIT:
387  case WindowType::PATTERNFIELD:
388  case WindowType::METRICFIELD:
389  case WindowType::CURRENCYFIELD:
390  case WindowType::EDIT:
391 
392  case WindowType::DATEBOX:
393  case WindowType::TIMEBOX:
394  case WindowType::CURRENCYBOX:
395  case WindowType::LONGCURRENCYBOX:
396  case WindowType::DATEFIELD:
397  case WindowType::TIMEFIELD:
398  case WindowType::SPINFIELD:
399  case WindowType::FORMATTEDFIELD:
400 
401  case WindowType::COMBOBOX:
402  case WindowType::LISTBOX:
403  case WindowType::MULTILISTBOX:
404  case WindowType::TREELISTBOX:
405  case WindowType::METRICBOX:
406  {
408  if ( pLabel && pLabel != this )
409  aAccessibleName = pLabel->GetText();
410  if (aAccessibleName.isEmpty())
411  aAccessibleName = GetQuickHelpText();
412  if (aAccessibleName.isEmpty())
413  aAccessibleName = GetText();
414  }
415  break;
416 
417  case WindowType::IMAGEBUTTON:
418  case WindowType::PUSHBUTTON:
419  aAccessibleName = GetText();
420  if (aAccessibleName.isEmpty())
421  {
422  aAccessibleName = GetQuickHelpText();
423  if (aAccessibleName.isEmpty())
424  aAccessibleName = GetHelpText();
425  }
426  break;
427 
428  case WindowType::TOOLBOX:
429  aAccessibleName = GetText();
430  break;
431 
432  case WindowType::MOREBUTTON:
433  aAccessibleName = mpWindowImpl->maText;
434  break;
435 
436  default:
437  aAccessibleName = GetText();
438  break;
439  }
440 
441  return OutputDevice::GetNonMnemonicString( aAccessibleName );
442 }
443 
444 void Window::SetAccessibleDescription( const OUString& rDescription )
445 {
446  if ( ! mpWindowImpl->mpAccessibleInfos )
447  mpWindowImpl->mpAccessibleInfos.reset( new ImplAccessibleInfos );
448 
449  std::optional<OUString>& rCurrentDescription = mpWindowImpl->mpAccessibleInfos->pAccessibleDescription;
450  SAL_WARN_IF( rCurrentDescription && *rCurrentDescription != rDescription, "vcl", "AccessibleDescription already set" );
451  rCurrentDescription = rDescription;
452 }
453 
455 {
456  if (!mpWindowImpl)
457  return OUString();
458 
459  OUString aAccessibleDescription;
460  if ( mpWindowImpl->mpAccessibleInfos && mpWindowImpl->mpAccessibleInfos->pAccessibleDescription )
461  {
462  aAccessibleDescription = *mpWindowImpl->mpAccessibleInfos->pAccessibleDescription;
463  }
464  else
465  {
466  // Special code for help text windows. ZT asks the border window for the
467  // description so we have to forward this request to our inner window.
468  const vcl::Window* pWin = this->ImplGetWindow();
469  if ( pWin->GetType() == WindowType::HELPTEXTWINDOW )
470  aAccessibleDescription = pWin->GetHelpText();
471  else
472  aAccessibleDescription = GetHelpText();
473  }
474 
475  return aAccessibleDescription;
476 }
477 
479 {
480  if ( !mpWindowImpl->mpAccessibleInfos )
481  mpWindowImpl->mpAccessibleInfos.reset( new ImplAccessibleInfos );
482  mpWindowImpl->mpAccessibleInfos->pLabeledByWindow = pLabeledBy;
483 }
484 
486 {
487  if ( !mpWindowImpl->mpAccessibleInfos )
488  mpWindowImpl->mpAccessibleInfos.reset( new ImplAccessibleInfos );
489  mpWindowImpl->mpAccessibleInfos->pLabelForWindow = pLabelFor;
490 }
491 
493 {
496 
497  return nullptr;
498 }
499 
501 {
502  if (mpWindowImpl->mpAccessibleInfos && mpWindowImpl->mpAccessibleInfos->pLabelForWindow)
503  return mpWindowImpl->mpAccessibleInfos->pLabelForWindow;
504 
505  return nullptr;
506 }
507 
509 {
511 
512  if (pWindow)
513  return pWindow;
514 
517 
518  return nullptr;
519 }
520 
522 {
523  if (mpWindowImpl->mpAccessibleInfos && mpWindowImpl->mpAccessibleInfos->pLabeledByWindow)
524  return mpWindowImpl->mpAccessibleInfos->pLabeledByWindow;
525 
526  std::vector<VclPtr<FixedText> > aMnemonicLabels(list_mnemonic_labels());
527  if (!aMnemonicLabels.empty())
528  {
529  //if we have multiple labels, then prefer the first that is visible
530  for (auto const & rCandidate : aMnemonicLabels)
531  {
532  if (rCandidate->IsVisible())
533  return rCandidate;
534  }
535  return aMnemonicLabels[0];
536  }
537 
540 
541  return nullptr;
542 }
543 
544 bool Window::IsAccessibilityEventsSuppressed( bool bTraverseParentPath )
545 {
546  if( !bTraverseParentPath )
547  return mpWindowImpl->mbSuppressAccessibilityEvents;
548  else
549  {
550  vcl::Window *pParent = this;
551  while ( pParent && pParent->mpWindowImpl)
552  {
553  if( pParent->mpWindowImpl->mbSuppressAccessibilityEvents )
554  return true;
555  else
556  pParent = pParent->mpWindowImpl->mpParent; // do not use GetParent() to find borderwindows that are frames
557  }
558  return false;
559  }
560 }
561 
563 {
564  mpWindowImpl->mbSuppressAccessibilityEvents = bSuppressed;
565 }
566 
567 } /* namespace vcl */
568 
569 uno::Reference<accessibility::XAccessibleEditableText>
570 FindFocusedEditableText(uno::Reference<accessibility::XAccessibleContext> const& xContext)
571 {
572  if (!xContext.is())
573  return uno::Reference<accessibility::XAccessibleEditableText>();
574 
575  uno::Reference<accessibility::XAccessibleStateSet> xState = xContext->getAccessibleStateSet();
576  if (xState.is())
577  {
578  if (xState->contains(accessibility::AccessibleStateType::FOCUSED))
579  {
580  uno::Reference<accessibility::XAccessibleEditableText> xText(xContext, uno::UNO_QUERY);
581  if (xText.is())
582  return xText;
583  if (xState->contains(accessibility::AccessibleStateType::MANAGES_DESCENDANTS))
584  return uno::Reference<accessibility::XAccessibleEditableText>();
585  }
586  }
587 
588  bool bSafeToIterate = true;
589  sal_Int32 nCount = xContext->getAccessibleChildCount();
590  if (nCount < 0 || nCount > SAL_MAX_UINT16 /* slow enough for anyone */)
591  bSafeToIterate = false;
592  if (!bSafeToIterate)
593  return uno::Reference<accessibility::XAccessibleEditableText>();
594 
595  for (sal_Int32 i = 0; i < xContext->getAccessibleChildCount(); ++i)
596  {
597  uno::Reference<accessibility::XAccessible> xChild = xContext->getAccessibleChild(i);
598  if (!xChild.is())
599  continue;
600  uno::Reference<accessibility::XAccessibleContext> xChildContext
601  = xChild->getAccessibleContext();
602  if (!xChildContext.is())
603  continue;
604  uno::Reference<accessibility::XAccessibleEditableText> xText
605  = FindFocusedEditableText(xChildContext);
606  if (xText.is())
607  return xText;
608  }
609  return uno::Reference<accessibility::XAccessibleEditableText>();
610 }
611 
612 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
vcl::Window * ImplGetWindow() const
if this is a proxy return the client, otherwise itself
Definition: window2.cxx:853
SAL_DLLPRIVATE vcl::Window * getLegacyNonLayoutAccessibleRelationMemberOf() const
void SetAccessibilityEventsSuppressed(bool bSuppressed)
vcl::Window * GetAccessibleParentWindow() const
SAL_DLLPRIVATE bool ImplIsAccessibleCandidate() const
VclPtr< vcl::Window > pLabeledByWindow
Definition: window.h:194
const OUString & GetHelpText() const
Definition: window.cxx:3095
const OUString & GetQuickHelpText() const
Definition: window2.cxx:1255
const std::vector< VclPtr< FixedText > > & list_mnemonic_labels() const
Definition: window2.cxx:2013
void SetAccessibleName(const OUString &rName)
void SetAccessibleRelationLabelFor(vcl::Window *pLabelFor)
sal_uInt16 GetAccessibleChildWindowCount()
OUString GetAccessibleDescription() const
OUString GetAccessibleName() const
WinBits const WB_OWNERDRAWDECORATION
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible()
virtual css::uno::Reference< css::awt::XWindowPeer > GetComponentInterface(bool bCreate=true)
Definition: window.cxx:3150
sal_uInt16 nAccessibleRole
Definition: window.h:189
#define SAL_MAX_UINT16
css::uno::Reference< css::accessibility::XAccessible > GetAccessible(bool bCreate=true)
int nCount
virtual OUString GetText() const
Definition: window.cxx:3060
void SetAccessible(const css::uno::Reference< css::accessibility::XAccessible > &)
Definition: edit.hxx:55
vcl::Window * GetAccessibleChildWindow(sal_uInt16 n)
bool isContainerWindow(const vcl::Window &rWindow)
Definition: layout.hxx:816
uno::Reference< accessibility::XAccessibleEditableText > FindFocusedEditableText(uno::Reference< accessibility::XAccessibleContext > const &xContext)
bool IsAccessibilityEventsSuppressed(bool bTraverseParentPath=true)
int i
virtual vcl::Window * getAccessibleRelationLabelFor() const
void SetAccessibleRelationLabeledBy(vcl::Window *pLabeledBy)
VclPtr< vcl::Window > mpMenuBarWindow
Definition: brdwin.hxx:86
bool IsMenuFloatingWindow() const
Definition: window2.cxx:1030
std::unique_ptr< WindowImpl > mpWindowImpl
Definition: window.hxx:483
virtual sal_uInt16 getDefaultAccessibleRole() const
vcl::Window * GetParent() const
Definition: window2.cxx:1120
vcl::Window * GetAccessibleRelationMemberOf() const
VclPtr< vcl::Window > pLabelForWindow
Definition: window.h:195
WinBits const WB_SIZEABLE
sal_uInt16 GetChildCount() const
Definition: stacking.cxx:1001
vcl::Window * GetAccessibleRelationLabelFor() const
SAL_DLLPRIVATE bool ImplIsAccessibleNativeFrame() const
#define SAL_WARN_IF(condition, area, stream)
MenuBar * GetMenuBar() const
Definition: syswin.hxx:183
vcl::Window * GetWindow() const
Definition: menu.hxx:370
void SetAccessibleDescription(const OUString &rDescr)
bool IsVisible() const
Definition: window2.cxx:1125
virtual OUString getDefaultAccessibleName() const
WindowType GetType() const
Definition: window2.cxx:997
WinBits GetStyle() const
Definition: window2.cxx:976
WinBits const WB_MOVEABLE
void SetAccessibleRole(sal_uInt16 nRole)
sal_uInt16 GetAccessibleRole() const
void CallEventListeners(VclEventId nEvent, void *pData=nullptr)
Definition: event.cxx:219
vcl::Window * GetAccessibleRelationLabeledBy() const
static OUString GetNonMnemonicString(const OUString &rStr, sal_Int32 &rMnemonicPos)
Definition: text.cxx:2342
bool IsScrollable() const
Definition: window.cxx:3576
SAL_DLLPRIVATE vcl::Window * getLegacyNonLayoutAccessibleRelationLabeledBy() const
SAL_DLLPRIVATE vcl::Window * getLegacyNonLayoutAccessibleRelationLabelFor() const
vcl::Window * GetChild(sal_uInt16 nChild) const
Definition: stacking.cxx:1017