Version 6.1.4.1, tag libreoffice-6.1.4.1
[LibreOffice.git] / accessibility / inc / standard / accessiblemenuitemcomponent.hxx
blob0827ef9ba16c13b6ec1839d46a9580494744b41e
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_ACCESSIBILITY_INC_STANDARD_ACCESSIBLEMENUITEMCOMPONENT_HXX
21 #define INCLUDED_ACCESSIBILITY_INC_STANDARD_ACCESSIBLEMENUITEMCOMPONENT_HXX
23 #include <standard/accessiblemenubasecomponent.hxx>
26 // class OAccessibleMenuItemComponent
29 class OAccessibleMenuItemComponent : public OAccessibleMenuBaseComponent
31 friend class OAccessibleMenuBaseComponent;
33 protected:
34 VclPtr<Menu> m_pParent;
35 sal_uInt16 m_nItemPos;
36 OUString m_sAccessibleName;
37 OUString m_sItemText;
39 virtual bool IsEnabled() override;
40 virtual bool IsVisible() override;
41 void Select();
42 void DeSelect();
43 virtual void Click() override;
45 void SetItemPos( sal_uInt16 nItemPos );
46 void SetAccessibleName( const OUString& sAccessibleName );
47 OUString GetAccessibleName();
48 void SetItemText( const OUString& sItemText );
49 OUString GetItemText();
51 virtual bool IsMenuHideDisabledEntries() override;
53 virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) override;
55 // OCommonAccessibleComponent
56 virtual css::awt::Rectangle implGetBounds( ) override;
58 // XComponent
59 virtual void SAL_CALL disposing() override;
61 public:
62 OAccessibleMenuItemComponent( Menu* pParent, sal_uInt16 nItemPos, Menu* pMenu );
63 virtual ~OAccessibleMenuItemComponent() override;
65 // XAccessibleContext
66 virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) override;
67 virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) override;
68 virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent( ) override;
69 virtual sal_Int32 SAL_CALL getAccessibleIndexInParent( ) override;
70 virtual sal_Int16 SAL_CALL getAccessibleRole( ) override;
71 virtual OUString SAL_CALL getAccessibleDescription( ) override;
72 virtual OUString SAL_CALL getAccessibleName( ) override;
73 virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet( ) override;
74 virtual css::lang::Locale SAL_CALL getLocale( ) override;
76 // XAccessibleComponent
77 virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const css::awt::Point& aPoint ) override;
78 virtual void SAL_CALL grabFocus( ) override;
79 virtual sal_Int32 SAL_CALL getForeground( ) override;
80 virtual sal_Int32 SAL_CALL getBackground( ) override;
82 // XAccessibleExtendedComponent
83 virtual css::uno::Reference< css::awt::XFont > SAL_CALL getFont( ) override;
84 virtual OUString SAL_CALL getTitledBorderText( ) override;
85 virtual OUString SAL_CALL getToolTipText( ) override;
88 #endif // INCLUDED_ACCESSIBILITY_INC_STANDARD_ACCESSIBLEMENUITEMCOMPONENT_HXX
90 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */