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 #pragma once
21 
22 #include <standard/accessiblemenubasecomponent.hxx>
23 #include <com/sun/star/accessibility/XAccessibleSelection.hpp>
24 #include <cppuhelper/implbase1.hxx>
25 
26 
27 
28 typedef ::cppu::ImplHelper1<
29     css::accessibility::XAccessibleSelection > OAccessibleMenuComponent_BASE;
30 
31 class OAccessibleMenuComponent : public OAccessibleMenuBaseComponent,
32                                  public OAccessibleMenuComponent_BASE
33 {
34 protected:
35     virtual bool            IsEnabled() override;
36     virtual bool            IsVisible() override;
37 
38     virtual void            FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) override;
39 
40     // OCommonAccessibleComponent
41     virtual css::awt::Rectangle implGetBounds(  ) override;
42 
43     using OAccessibleMenuBaseComponent::OAccessibleMenuBaseComponent;
44 
45 public:
46 
47     // XInterface
48     DECLARE_XINTERFACE()
49 
50     // XTypeProvider
51     DECLARE_XTYPEPROVIDER()
52 
53     // XAccessibleContext
54     virtual sal_Int32 SAL_CALL getAccessibleChildCount(  ) override;
55     virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) override;
56     virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent(  ) override;
57     virtual sal_Int16 SAL_CALL getAccessibleRole(  ) override;
58     virtual OUString SAL_CALL getAccessibleDescription(  ) override;
59     virtual OUString SAL_CALL getAccessibleName(  ) override;
60     virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet(  ) override;
61     virtual css::lang::Locale SAL_CALL getLocale(  ) override;
62 
63     // XAccessibleComponent
64     virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const css::awt::Point& aPoint ) override;
65     virtual css::awt::Point SAL_CALL getLocationOnScreen(  ) override;
66     virtual void SAL_CALL grabFocus(  ) override;
67     virtual sal_Int32 SAL_CALL getForeground(  ) override;
68     virtual sal_Int32 SAL_CALL getBackground(  ) override;
69 
70     // XAccessibleExtendedComponent
71     virtual css::uno::Reference< css::awt::XFont > SAL_CALL getFont(  ) override;
72     virtual OUString SAL_CALL getTitledBorderText(  ) override;
73     virtual OUString SAL_CALL getToolTipText(  ) override;
74 
75     // XAccessibleSelection
76     virtual void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex ) override;
77     virtual sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ) override;
78     virtual void SAL_CALL clearAccessibleSelection(  ) override;
79     virtual void SAL_CALL selectAllAccessibleChildren(  ) override;
80     virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount(  ) override;
81     virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) override;
82     virtual void SAL_CALL deselectAccessibleChild( sal_Int32 nChildIndex ) override;
83 };
84 
85 
86 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
87