1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
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/.
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
)
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
);
48 AccessibleListBox::ProcessWindowEvent(rVclWindowEvent
);
51 } // namespace accessibility
53 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */