tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / accessibility / source / extended / AccessibleIconView.cxx
blob82235c29b526bda725e84e04e18729487be74dd9
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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 */
10 #include <sal/config.h>
12 #include <com/sun/star/accessibility/AccessibleEventId.hpp>
14 #include <vcl/event.hxx>
15 #include <vcl/unohelp.hxx>
17 #include <extended/AccessibleIconView.hxx>
19 namespace accessibility
21 AccessibleIconView::AccessibleIconView(
22 SvTreeListBox& _rListBox, const css::uno::Reference<css::accessibility::XAccessible>& _xParent)
23 : AccessibleListBox(_rListBox, _xParent)
27 void AccessibleIconView::ProcessWindowEvent(const VclWindowEvent& rVclWindowEvent)
29 if (!isAlive())
30 return;
32 switch (rVclWindowEvent.GetId())
34 case VclEventId::WindowMouseMove:
35 if (MouseEvent* pMouseEvt = static_cast<MouseEvent*>(rVclWindowEvent.GetData()))
37 if (auto xChild = getAccessibleAtPoint(
38 vcl::unohelper::ConvertToAWTPoint(pMouseEvt->GetPosPixel())))
40 // Allow announcing the element on mouse hover
41 css::uno::Any aNew(xChild);
42 NotifyAccessibleEvent(
43 css::accessibility::AccessibleEventId::ACTIVE_DESCENDANT_CHANGED, {}, aNew);
46 break;
47 default:
48 AccessibleListBox::ProcessWindowEvent(rVclWindowEvent);
51 } // namespace accessibility
53 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */