1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
19 #ifndef INCLUDED_SVTOOLS_INC_VCLXACCESSIBLEHEADERBARITEM_HXX
20 #define INCLUDED_SVTOOLS_INC_VCLXACCESSIBLEHEADERBARITEM_HXX
22 #include <com/sun/star/accessibility/XAccessible.hpp>
23 #include <com/sun/star/lang/XServiceInfo.hpp>
24 #include <comphelper/accessiblecomponenthelper.hxx>
25 #include <cppuhelper/implbase2.hxx>
27 #include <tools/link.hxx>
28 #include <vcl/vclptr.hxx>
33 class VCLExternalSolarLock
;
38 class AccessibleStateSetHelper
;
42 // ----------------------------------------------------
43 // class VCLXAccessibleHeaderBarItem
44 // ----------------------------------------------------
46 typedef ::comphelper::OAccessibleExtendedComponentHelper AccessibleExtendedComponentHelper_BASE
;
48 typedef ::cppu::ImplHelper2
<
49 ::com::sun::star::accessibility::XAccessible
,
50 ::com::sun::star::lang::XServiceInfo
> VCLXAccessibleHeaderBarItem_BASE
;
52 class VCLXAccessibleHeaderBarItem
: public AccessibleExtendedComponentHelper_BASE
,
53 public VCLXAccessibleHeaderBarItem_BASE
56 VCLExternalSolarLock
* m_pExternalLock
;
57 VclPtr
<HeaderBar
> m_pHeadBar
;
58 sal_Int32 m_nIndexInParent
;
62 void FillAccessibleStateSet( utl::AccessibleStateSetHelper
& rStateSet
);
64 // OCommonAccessibleComponent
65 virtual ::com::sun::star::awt::Rectangle
implGetBounds( ) throw (::com::sun::star::uno::RuntimeException
) SAL_OVERRIDE
;
68 virtual void SAL_CALL
disposing() SAL_OVERRIDE
;
71 VCLXAccessibleHeaderBarItem( HeaderBar
* pHeadBar
, sal_Int32 _nIndexInParent
);
72 virtual ~VCLXAccessibleHeaderBarItem();
78 DECLARE_XTYPEPROVIDER()
81 virtual OUString SAL_CALL
getImplementationName() throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
82 virtual sal_Bool SAL_CALL
supportsService( const OUString
& rServiceName
) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
83 virtual ::com::sun::star::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
86 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessibleContext
> SAL_CALL
getAccessibleContext( ) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
89 virtual sal_Int32 SAL_CALL
getAccessibleChildCount( ) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
90 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessible
> SAL_CALL
getAccessibleChild( sal_Int32 i
) throw (::com::sun::star::lang::IndexOutOfBoundsException
, ::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
91 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessible
> SAL_CALL
getAccessibleParent( ) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
92 virtual sal_Int32 SAL_CALL
getAccessibleIndexInParent( ) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
93 virtual sal_Int16 SAL_CALL
getAccessibleRole( ) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
94 virtual OUString SAL_CALL
getAccessibleDescription( ) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
95 virtual OUString SAL_CALL
getAccessibleName( ) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
96 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessibleRelationSet
> SAL_CALL
getAccessibleRelationSet( ) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
97 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessibleStateSet
> SAL_CALL
getAccessibleStateSet( ) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
98 virtual ::com::sun::star::lang::Locale SAL_CALL
getLocale( ) throw (::com::sun::star::accessibility::IllegalAccessibleComponentStateException
, ::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
100 // XAccessibleComponent
101 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessible
> SAL_CALL
getAccessibleAtPoint( const ::com::sun::star::awt::Point
& aPoint
) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
102 virtual void SAL_CALL
grabFocus( ) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
{};
103 virtual sal_Int32 SAL_CALL
getForeground() throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
104 virtual sal_Int32 SAL_CALL
getBackground() throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
106 // XAccessibleExtendedComponent
107 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::awt::XFont
> SAL_CALL
getFont( ) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
108 virtual OUString SAL_CALL
getTitledBorderText( ) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
109 virtual OUString SAL_CALL
getToolTipText( ) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
112 #endif // INCLUDED_SVTOOLS_INC_VCLXACCESSIBLEHEADERBARITEM_HXX
114 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */