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  pMemberOfWindow = nullptr;
50 }
51 
53 {
54 }
55 
56 namespace vcl {
57 
58 css::uno::Reference< css::accessibility::XAccessible > Window::GetAccessible( bool bCreate )
59 {
60  // do not optimize hierarchy for the top level border win (ie, when there is no parent)
61  /* // do not optimize accessible hierarchy at all to better reflect real VCL hierarchy
62  if ( GetParent() && ( GetType() == WindowType::BORDERWINDOW ) && ( GetChildCount() == 1 ) )
63  //if( !ImplIsAccessibleCandidate() )
64  {
65  vcl::Window* pChild = GetAccessibleChildWindow( 0 );
66  if ( pChild )
67  return pChild->GetAccessible();
68  }
69  */
70  if ( !mpWindowImpl )
71  return css::uno::Reference< css::accessibility::XAccessible >();
72  if ( !mpWindowImpl->mxAccessible.is() && bCreate )
73  mpWindowImpl->mxAccessible = CreateAccessible();
74 
75  return mpWindowImpl->mxAccessible;
76 }
77 
78 css::uno::Reference< css::accessibility::XAccessible > Window::CreateAccessible()
79 {
80  css::uno::Reference< css::accessibility::XAccessible > xAcc( GetComponentInterface(), css::uno::UNO_QUERY );
81  return xAcc;
82 }
83 
84 void Window::SetAccessible( const css::uno::Reference< css::accessibility::XAccessible >& x )
85 {
86  if (!mpWindowImpl)
87  return;
88 
89  mpWindowImpl->mxAccessible = x;
90 }
91 
92 // skip all border windows that are not top level frames
94 {
95  if( !mpWindowImpl->mbBorderWin )
96  return true;
97  else
98  // #101741 do not check for WB_CLOSEABLE because undecorated floaters (like menus!) are closeable
99  if( mpWindowImpl->mbFrame && mpWindowImpl->mnStyle & (WB_MOVEABLE | WB_SIZEABLE) )
100  return true;
101  else
102  return false;
103 }
104 
106 {
107  if( mpWindowImpl->mbFrame )
108  // #101741 do not check for WB_CLOSEABLE because undecorated floaters (like menus!) are closeable
109  if( mpWindowImpl->mnStyle & (WB_MOVEABLE | WB_SIZEABLE) )
110  return true;
111  else
112  return false;
113  else
114  return false;
115 }
116 
118 {
120  return nullptr;
121 
122  vcl::Window* pParent = mpWindowImpl->mpParent;
123  if( GetType() == WindowType::MENUBARWINDOW )
124  {
125  // report the menubar as a child of THE workwindow
126  vcl::Window *pWorkWin = GetParent()->mpWindowImpl->mpFirstChild;
127  while( pWorkWin && (pWorkWin == this) )
128  pWorkWin = pWorkWin->mpWindowImpl->mpNext;
129  pParent = pWorkWin;
130  }
131  // If this is a floating window which has a native border window, then that border should be reported as
132  // the accessible parent
133  else if( GetType() == WindowType::FLOATINGWINDOW &&
134  mpWindowImpl->mpBorderWindow && mpWindowImpl->mpBorderWindow->mpWindowImpl->mbFrame )
135  {
136  pParent = mpWindowImpl->mpBorderWindow;
137  }
138  else if( pParent && !pParent->ImplIsAccessibleCandidate() )
139  {
140  pParent = pParent->mpWindowImpl->mpParent;
141  }
142  return pParent;
143 }
144 
146 {
147  if (!mpWindowImpl)
148  return 0;
149 
150  sal_uInt16 nChildren = 0;
151  vcl::Window* pChild = mpWindowImpl->mpFirstChild;
152  while( pChild )
153  {
154  if( pChild->IsVisible() )
155  nChildren++;
156  pChild = pChild->mpWindowImpl->mpNext;
157  }
158 
159  // report the menubarwindow as a child of THE workwindow
160  if( GetType() == WindowType::BORDERWINDOW )
161  {
162  ImplBorderWindow *pBorderWindow = static_cast<ImplBorderWindow*>(this);
163  if( pBorderWindow->mpMenuBarWindow &&
164  pBorderWindow->mpMenuBarWindow->IsVisible()
165  )
166  --nChildren;
167  }
168  else if( GetType() == WindowType::WORKWINDOW )
169  {
170  WorkWindow *pWorkWindow = static_cast<WorkWindow*>(this);
171  if( pWorkWindow->GetMenuBar() &&
172  pWorkWindow->GetMenuBar()->GetWindow() &&
173  pWorkWindow->GetMenuBar()->GetWindow()->IsVisible()
174  )
175  ++nChildren;
176  }
177 
178  return nChildren;
179 }
180 
182 {
183  // report the menubarwindow as the first child of THE workwindow
184  if( GetType() == WindowType::WORKWINDOW && static_cast<WorkWindow *>(this)->GetMenuBar() )
185  {
186  if( n == 0 )
187  {
188  MenuBar *pMenuBar = static_cast<WorkWindow *>(this)->GetMenuBar();
189  if( pMenuBar->GetWindow() && pMenuBar->GetWindow()->IsVisible() )
190  return pMenuBar->GetWindow();
191  }
192  else
193  --n;
194  }
195 
196  // transform n to child number including invisible children
197  sal_uInt16 nChildren = n;
198  vcl::Window* pChild = mpWindowImpl->mpFirstChild;
199  while( pChild )
200  {
201  if( pChild->IsVisible() )
202  {
203  if( ! nChildren )
204  break;
205  nChildren--;
206  }
207  pChild = pChild->mpWindowImpl->mpNext;
208  }
209 
210  if( GetType() == WindowType::BORDERWINDOW && pChild && pChild->GetType() == WindowType::MENUBARWINDOW )
211  {
212  do pChild = pChild->mpWindowImpl->mpNext; while( pChild && ! pChild->IsVisible() );
213  SAL_WARN_IF( !pChild, "vcl", "GetAccessibleChildWindow(): wrong index in border window");
214  }
215 
216  if ( pChild && ( pChild->GetType() == WindowType::BORDERWINDOW ) && ( pChild->GetChildCount() == 1 ) )
217  {
218  pChild = pChild->GetChild( 0 );
219  }
220  return pChild;
221 }
222 
223 void Window::SetAccessibleRole( sal_uInt16 nRole )
224 {
225  if ( !mpWindowImpl->mpAccessibleInfos )
226  mpWindowImpl->mpAccessibleInfos.reset( new ImplAccessibleInfos );
227 
228  SAL_WARN_IF( mpWindowImpl->mpAccessibleInfos->nAccessibleRole != 0xFFFF, "vcl", "AccessibleRole already set!" );
229  mpWindowImpl->mpAccessibleInfos->nAccessibleRole = nRole;
230 }
231 
233 {
234  sal_uInt16 nRole = 0xFFFF;
235  switch ( GetType() )
236  {
237  case WindowType::MESSBOX: // MT: Would be nice to have special roles!
238  case WindowType::INFOBOX:
239  case WindowType::WARNINGBOX:
240  case WindowType::ERRORBOX:
241  case WindowType::QUERYBOX: nRole = accessibility::AccessibleRole::ALERT; break;
242 
243  case WindowType::MODELESSDIALOG:
244  case WindowType::TABDIALOG:
245  case WindowType::BUTTONDIALOG:
246  case WindowType::DIALOG: nRole = accessibility::AccessibleRole::DIALOG; break;
247 
248  case WindowType::PUSHBUTTON:
249  case WindowType::OKBUTTON:
250  case WindowType::CANCELBUTTON:
251  case WindowType::HELPBUTTON:
252  case WindowType::IMAGEBUTTON:
253  case WindowType::MOREBUTTON:
254  case WindowType::SPINBUTTON: nRole = accessibility::AccessibleRole::PUSH_BUTTON; break;
255  case WindowType::MENUBUTTON: nRole = accessibility::AccessibleRole::BUTTON_MENU; break;
256 
257  case WindowType::RADIOBUTTON: nRole = accessibility::AccessibleRole::RADIO_BUTTON; break;
258  case WindowType::TRISTATEBOX:
259  case WindowType::CHECKBOX: nRole = accessibility::AccessibleRole::CHECK_BOX; break;
260 
261  case WindowType::MULTILINEEDIT: nRole = accessibility::AccessibleRole::SCROLL_PANE; break;
262 
263  case WindowType::PATTERNFIELD:
264  case WindowType::EDIT: nRole = static_cast<Edit const *>(this)->IsPassword() ? accessibility::AccessibleRole::PASSWORD_TEXT : accessibility::AccessibleRole::TEXT; break;
265 
266  case WindowType::CALCINPUTLINE: nRole = accessibility::AccessibleRole::TEXT; break;
267 
268  case WindowType::PATTERNBOX:
269  case WindowType::NUMERICBOX:
270  case WindowType::METRICBOX:
271  case WindowType::CURRENCYBOX:
272  case WindowType::LONGCURRENCYBOX:
273  case WindowType::COMBOBOX: nRole = accessibility::AccessibleRole::COMBO_BOX; break;
274 
275  case WindowType::LISTBOX:
276  case WindowType::MULTILISTBOX: nRole = accessibility::AccessibleRole::LIST; break;
277 
278  case WindowType::TREELISTBOX: nRole = accessibility::AccessibleRole::TREE; break;
279 
280  case WindowType::FIXEDTEXT: nRole = accessibility::AccessibleRole::LABEL; break;
281  case WindowType::FIXEDLINE:
282  if( !GetText().isEmpty() )
283  nRole = accessibility::AccessibleRole::LABEL;
284  else
285  nRole = accessibility::AccessibleRole::SEPARATOR;
286  break;
287 
288  case WindowType::FIXEDBITMAP:
289  case WindowType::FIXEDIMAGE: nRole = accessibility::AccessibleRole::ICON; break;
290  case WindowType::GROUPBOX: nRole = accessibility::AccessibleRole::GROUP_BOX; break;
291  case WindowType::SCROLLBAR: nRole = accessibility::AccessibleRole::SCROLL_BAR; break;
292 
293  case WindowType::SLIDER:
294  case WindowType::SPLITTER:
295  case WindowType::SPLITWINDOW: nRole = accessibility::AccessibleRole::SPLIT_PANE; break;
296 
297  case WindowType::DATEBOX:
298  case WindowType::TIMEBOX:
299  case WindowType::DATEFIELD:
300  case WindowType::TIMEFIELD: nRole = accessibility::AccessibleRole::DATE_EDITOR; break;
301 
302  case WindowType::METRICFIELD:
303  case WindowType::CURRENCYFIELD:
304  case WindowType::SPINFIELD:
305  case WindowType::FORMATTEDFIELD: nRole = accessibility::AccessibleRole::SPIN_BOX; break;
306 
307  case WindowType::TOOLBOX: nRole = accessibility::AccessibleRole::TOOL_BAR; break;
308  case WindowType::STATUSBAR: nRole = accessibility::AccessibleRole::STATUS_BAR; break;
309 
310  case WindowType::TABPAGE: nRole = accessibility::AccessibleRole::PANEL; break;
311  case WindowType::TABCONTROL: nRole = accessibility::AccessibleRole::PAGE_TAB_LIST; break;
312 
313  case WindowType::DOCKINGWINDOW: nRole = (mpWindowImpl->mbFrame) ? accessibility::AccessibleRole::FRAME :
314  accessibility::AccessibleRole::PANEL; break;
315 
316  case WindowType::FLOATINGWINDOW: nRole = ( mpWindowImpl->mbFrame ||
317  (mpWindowImpl->mpBorderWindow && mpWindowImpl->mpBorderWindow->mpWindowImpl->mbFrame) ||
318  (GetStyle() & WB_OWNERDRAWDECORATION) ) ? accessibility::AccessibleRole::FRAME :
319  accessibility::AccessibleRole::WINDOW; break;
320 
321  case WindowType::WORKWINDOW: nRole = accessibility::AccessibleRole::ROOT_PANE; break;
322 
323  case WindowType::SCROLLBARBOX: nRole = accessibility::AccessibleRole::FILLER; break;
324 
325  case WindowType::HELPTEXTWINDOW: nRole = accessibility::AccessibleRole::TOOL_TIP; break;
326 
327  case WindowType::RULER: nRole = accessibility::AccessibleRole::RULER; break;
328 
329  case WindowType::SCROLLWINDOW: nRole = accessibility::AccessibleRole::SCROLL_PANE; break;
330 
331  case WindowType::WINDOW:
332  case WindowType::CONTROL:
333  case WindowType::BORDERWINDOW:
334  case WindowType::SYSTEMCHILDWINDOW:
335  default:
337  nRole = accessibility::AccessibleRole::FRAME;
338  else if( IsScrollable() )
339  nRole = accessibility::AccessibleRole::SCROLL_PANE;
340  else if( this->ImplGetWindow()->IsMenuFloatingWindow() )
341  nRole = accessibility::AccessibleRole::WINDOW; // #106002#, contextmenus are windows (i.e. toplevel)
342  else
343  // #104051# WINDOW seems to be a bad default role, use LAYEREDPANE instead
344  // a WINDOW is interpreted as a top-level window, which is typically not the case
345  //nRole = accessibility::AccessibleRole::WINDOW;
346  nRole = accessibility::AccessibleRole::PANEL;
347  }
348  return nRole;
349 }
350 
351 sal_uInt16 Window::GetAccessibleRole() const
352 {
353  if (!mpWindowImpl)
354  return 0;
355 
356  sal_uInt16 nRole = mpWindowImpl->mpAccessibleInfos ? mpWindowImpl->mpAccessibleInfos->nAccessibleRole : 0xFFFF;
357  if ( nRole == 0xFFFF )
358  nRole = getDefaultAccessibleRole();
359  return nRole;
360 }
361 
362 void Window::SetAccessibleName( const OUString& rName )
363 {
364  if ( !mpWindowImpl->mpAccessibleInfos )
365  mpWindowImpl->mpAccessibleInfos.reset( new ImplAccessibleInfos );
366 
367  OUString oldName = GetAccessibleName();
368 
369  mpWindowImpl->mpAccessibleInfos->pAccessibleName = rName;
370 
372 }
373 
375 {
376  if (!mpWindowImpl)
377  return OUString();
378 
379  if (mpWindowImpl->mpAccessibleInfos && mpWindowImpl->mpAccessibleInfos->pAccessibleName)
380  return *mpWindowImpl->mpAccessibleInfos->pAccessibleName;
381  return getDefaultAccessibleName();
382 }
383 
385 {
386  OUString aAccessibleName;
387  switch ( GetType() )
388  {
389  case WindowType::MULTILINEEDIT:
390  case WindowType::PATTERNFIELD:
391  case WindowType::METRICFIELD:
392  case WindowType::CURRENCYFIELD:
393  case WindowType::CALCINPUTLINE:
394  case WindowType::EDIT:
395 
396  case WindowType::DATEBOX:
397  case WindowType::TIMEBOX:
398  case WindowType::CURRENCYBOX:
399  case WindowType::LONGCURRENCYBOX:
400  case WindowType::DATEFIELD:
401  case WindowType::TIMEFIELD:
402  case WindowType::SPINFIELD:
403  case WindowType::FORMATTEDFIELD:
404 
405  case WindowType::COMBOBOX:
406  case WindowType::LISTBOX:
407  case WindowType::MULTILISTBOX:
408  case WindowType::TREELISTBOX:
409  case WindowType::METRICBOX:
410  {
412  if ( pLabel && pLabel != this )
413  aAccessibleName = pLabel->GetText();
414  if (aAccessibleName.isEmpty())
415  aAccessibleName = GetQuickHelpText();
416  }
417  break;
418 
419  case WindowType::IMAGEBUTTON:
420  case WindowType::PUSHBUTTON:
421  aAccessibleName = GetText();
422  if (aAccessibleName.isEmpty())
423  {
424  aAccessibleName = GetQuickHelpText();
425  if (aAccessibleName.isEmpty())
426  aAccessibleName = GetHelpText();
427  }
428  break;
429 
430  case WindowType::TOOLBOX:
431  aAccessibleName = GetText();
432  break;
433 
434  case WindowType::MOREBUTTON:
435  aAccessibleName = mpWindowImpl->maText;
436  break;
437 
438  default:
439  aAccessibleName = GetText();
440  break;
441  }
442 
443  return GetNonMnemonicString( aAccessibleName );
444 }
445 
446 void Window::SetAccessibleDescription( const OUString& rDescription )
447 {
448  if ( ! mpWindowImpl->mpAccessibleInfos )
449  mpWindowImpl->mpAccessibleInfos.reset( new ImplAccessibleInfos );
450 
451  SAL_WARN_IF( mpWindowImpl->mpAccessibleInfos->pAccessibleDescription, "vcl", "AccessibleDescription already set!" );
452  mpWindowImpl->mpAccessibleInfos->pAccessibleDescription = rDescription;
453 }
454 
456 {
457  if (!mpWindowImpl)
458  return OUString();
459 
460  OUString aAccessibleDescription;
461  if ( mpWindowImpl->mpAccessibleInfos && mpWindowImpl->mpAccessibleInfos->pAccessibleDescription )
462  {
463  aAccessibleDescription = *mpWindowImpl->mpAccessibleInfos->pAccessibleDescription;
464  }
465  else
466  {
467  // Special code for help text windows. ZT asks the border window for the
468  // description so we have to forward this request to our inner window.
469  const vcl::Window* pWin = this->ImplGetWindow();
470  if ( pWin->GetType() == WindowType::HELPTEXTWINDOW )
471  aAccessibleDescription = pWin->GetHelpText();
472  else
473  aAccessibleDescription = GetHelpText();
474  }
475 
476  return aAccessibleDescription;
477 }
478 
480 {
481  if ( !mpWindowImpl->mpAccessibleInfos )
482  mpWindowImpl->mpAccessibleInfos.reset( new ImplAccessibleInfos );
483  mpWindowImpl->mpAccessibleInfos->pLabeledByWindow = pLabeledBy;
484 }
485 
487 {
488  if ( !mpWindowImpl->mpAccessibleInfos )
489  mpWindowImpl->mpAccessibleInfos.reset( new ImplAccessibleInfos );
490  mpWindowImpl->mpAccessibleInfos->pLabelForWindow = pLabelFor;
491 }
492 
494 {
495  if ( !mpWindowImpl->mpAccessibleInfos )
496  mpWindowImpl->mpAccessibleInfos.reset( new ImplAccessibleInfos );
497  mpWindowImpl->mpAccessibleInfos->pMemberOfWindow = pMemberOfWin;
498 }
499 
501 {
502  if (mpWindowImpl->mpAccessibleInfos && mpWindowImpl->mpAccessibleInfos->pMemberOfWindow)
503  return mpWindowImpl->mpAccessibleInfos->pMemberOfWindow;
504 
507 
508  return nullptr;
509 }
510 
512 {
513  if (mpWindowImpl->mpAccessibleInfos && mpWindowImpl->mpAccessibleInfos->pLabelForWindow)
514  return mpWindowImpl->mpAccessibleInfos->pLabelForWindow;
515 
516  return nullptr;
517 }
518 
520 {
522 
523  if (pWindow)
524  return pWindow;
525 
528 
529  return nullptr;
530 }
531 
533 {
534  if (mpWindowImpl->mpAccessibleInfos && mpWindowImpl->mpAccessibleInfos->pLabeledByWindow)
535  return mpWindowImpl->mpAccessibleInfos->pLabeledByWindow;
536 
537  std::vector<VclPtr<FixedText> > aMnemonicLabels(list_mnemonic_labels());
538  if (!aMnemonicLabels.empty())
539  {
540  //if we have multiple labels, then prefer the first that is visible
541  for (auto const & rCandidate : aMnemonicLabels)
542  {
543  if (rCandidate->IsVisible())
544  return rCandidate;
545  }
546  return aMnemonicLabels[0];
547  }
548 
551 
552  return nullptr;
553 }
554 
555 bool Window::IsAccessibilityEventsSuppressed( bool bTraverseParentPath )
556 {
557  if( !bTraverseParentPath )
558  return mpWindowImpl->mbSuppressAccessibilityEvents;
559  else
560  {
561  vcl::Window *pParent = this;
562  while ( pParent && pParent->mpWindowImpl)
563  {
564  if( pParent->mpWindowImpl->mbSuppressAccessibilityEvents )
565  return true;
566  else
567  pParent = pParent->mpWindowImpl->mpParent; // do not use GetParent() to find borderwindows that are frames
568  }
569  return false;
570  }
571 }
572 
574 {
575  mpWindowImpl->mbSuppressAccessibilityEvents = bSuppressed;
576 }
577 
578 } /* namespace vcl */
579 
580 uno::Reference<accessibility::XAccessibleEditableText>
581 FindFocusedEditableText(uno::Reference<accessibility::XAccessibleContext> const& xContext)
582 {
583  if (!xContext.is())
584  return uno::Reference<accessibility::XAccessibleEditableText>();
585 
586  uno::Reference<accessibility::XAccessibleStateSet> xState = xContext->getAccessibleStateSet();
587  if (xState.is())
588  {
589  if (xState->contains(accessibility::AccessibleStateType::FOCUSED))
590  {
591  uno::Reference<accessibility::XAccessibleEditableText> xText(xContext, uno::UNO_QUERY);
592  if (xText.is())
593  return xText;
594  if (xState->contains(accessibility::AccessibleStateType::MANAGES_DESCENDANTS))
595  return uno::Reference<accessibility::XAccessibleEditableText>();
596  }
597  }
598 
599  bool bSafeToIterate = true;
600  sal_Int32 nCount = xContext->getAccessibleChildCount();
601  if (nCount < 0 || nCount > SAL_MAX_UINT16 /* slow enough for anyone */)
602  bSafeToIterate = false;
603  if (!bSafeToIterate)
604  return uno::Reference<accessibility::XAccessibleEditableText>();
605 
606  for (sal_Int32 i = 0; i < xContext->getAccessibleChildCount(); ++i)
607  {
608  uno::Reference<accessibility::XAccessible> xChild = xContext->getAccessibleChild(i);
609  if (!xChild.is())
610  continue;
611  uno::Reference<accessibility::XAccessibleContext> xChildContext
612  = xChild->getAccessibleContext();
613  if (!xChildContext.is())
614  continue;
615  uno::Reference<accessibility::XAccessibleEditableText> xText
616  = FindFocusedEditableText(xChildContext);
617  if (xText.is())
618  return xText;
619  }
620  return uno::Reference<accessibility::XAccessibleEditableText>();
621 }
622 
623 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
vcl::Window * ImplGetWindow() const
if this is a proxy return the client, otherwise itself
Definition: window2.cxx:835
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:191
const OUString & GetHelpText() const
Definition: window.cxx:3074
const OUString & GetQuickHelpText() const
Definition: window2.cxx:1232
const std::vector< VclPtr< FixedText > > & list_mnemonic_labels() const
Definition: window2.cxx:1968
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:3120
sal_uInt16 nAccessibleRole
Definition: window.h:186
#define SAL_MAX_UINT16
css::uno::Reference< css::accessibility::XAccessible > GetAccessible(bool bCreate=true)
int nCount
void SetAccessibleRelationMemberOf(vcl::Window *pMemberOf)
virtual OUString GetText() const
Definition: window.cxx:3039
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:841
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:1007
std::unique_ptr< WindowImpl > mpWindowImpl
Definition: window.hxx:519
virtual sal_uInt16 getDefaultAccessibleRole() const
vcl::Window * GetParent() const
Definition: window2.cxx:1097
vcl::Window * GetAccessibleRelationMemberOf() const
VclPtr< vcl::Window > pLabelForWindow
Definition: window.h:192
WinBits const WB_SIZEABLE
sal_uInt16 GetChildCount() const
Definition: stacking.cxx:1005
vcl::Window * GetAccessibleRelationLabelFor() const
SAL_DLLPRIVATE bool ImplIsAccessibleNativeFrame() const
#define SAL_WARN_IF(condition, area, stream)
MenuBar * GetMenuBar() const
Definition: syswin.hxx:160
vcl::Window * GetWindow() const
Definition: menu.hxx:373
void SetAccessibleDescription(const OUString &rDescr)
bool IsVisible() const
Definition: window2.cxx:1102
virtual OUString getDefaultAccessibleName() const
WindowType GetType() const
Definition: window2.cxx:974
WinBits GetStyle() const
Definition: window2.cxx:953
WinBits const WB_MOVEABLE
void SetAccessibleRole(sal_uInt16 nRole)
sal_uInt16 GetAccessibleRole() const
void CallEventListeners(VclEventId nEvent, void *pData=nullptr)
Definition: event.cxx:217
vcl::Window * GetAccessibleRelationLabeledBy() const
static OUString GetNonMnemonicString(const OUString &rStr, sal_Int32 &rMnemonicPos)
Definition: text.cxx:2230
VclPtr< vcl::Window > pMemberOfWindow
Definition: window.h:193
bool IsScrollable() const
Definition: window.cxx:3546
SAL_DLLPRIVATE vcl::Window * getLegacyNonLayoutAccessibleRelationLabeledBy() const
SAL_DLLPRIVATE vcl::Window * getLegacyNonLayoutAccessibleRelationLabelFor() const
vcl::Window * GetChild(sal_uInt16 nChild) const
Definition: stacking.cxx:1021