LibreOffice Module accessibility (master) 1
AccessibleIconView.cxx
Go to the documentation of this file.
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.
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
10#include <sal/config.h>
11
12#include <com/sun/star/accessibility/AccessibleEventId.hpp>
13
15#include <vcl/event.hxx>
16
18
19namespace accessibility
20{
22 SvTreeListBox const& _rListBox,
23 const css::uno::Reference<css::accessibility::XAccessible>& _xParent)
24 : AccessibleListBox(_rListBox, _xParent)
25{
26}
27
29{
30 if (!isAlive())
31 return;
32
33 switch (rVclWindowEvent.GetId())
34 {
35 case VclEventId::WindowMouseMove:
36 if (MouseEvent* pMouseEvt = static_cast<MouseEvent*>(rVclWindowEvent.GetData()))
37 {
38 if (auto xChild = getAccessibleAtPoint(AWTPoint(pMouseEvt->GetPosPixel())))
39 {
40 // Allow announcing the element on mouse hover
41 css::uno::Any aNew(xChild);
42 NotifyAccessibleEvent(
43 css::accessibility::AccessibleEventId::ACTIVE_DESCENDANT_CHANGED, {}, aNew);
44 }
45 }
46 break;
47 default:
49 }
50}
51} // namespace accessibility
52
53/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
VclEventId GetId() const
void * GetData() const
AccessibleIconView(SvTreeListBox const &_rListBox, const css::uno::Reference< css::accessibility::XAccessible > &_xParent)
virtual void ProcessWindowEvent(const VclWindowEvent &rVclWindowEvent) override
the class OAccessibleListBoxEntry represents the base class for an accessible object of a listbox ent...
virtual void ProcessWindowEvent(const VclWindowEvent &rVclWindowEvent) override
css::awt::Point AWTPoint(const ::Point &rVCLPoint)
bool isAlive()