1*b1cdbd2cSJim Jagielski /**************************************************************
2*b1cdbd2cSJim Jagielski  *
3*b1cdbd2cSJim Jagielski  * Licensed to the Apache Software Foundation (ASF) under one
4*b1cdbd2cSJim Jagielski  * or more contributor license agreements.  See the NOTICE file
5*b1cdbd2cSJim Jagielski  * distributed with this work for additional information
6*b1cdbd2cSJim Jagielski  * regarding copyright ownership.  The ASF licenses this file
7*b1cdbd2cSJim Jagielski  * to you under the Apache License, Version 2.0 (the
8*b1cdbd2cSJim Jagielski  * "License"); you may not use this file except in compliance
9*b1cdbd2cSJim Jagielski  * with the License.  You may obtain a copy of the License at
10*b1cdbd2cSJim Jagielski  *
11*b1cdbd2cSJim Jagielski  *   http://www.apache.org/licenses/LICENSE-2.0
12*b1cdbd2cSJim Jagielski  *
13*b1cdbd2cSJim Jagielski  * Unless required by applicable law or agreed to in writing,
14*b1cdbd2cSJim Jagielski  * software distributed under the License is distributed on an
15*b1cdbd2cSJim Jagielski  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*b1cdbd2cSJim Jagielski  * KIND, either express or implied.  See the License for the
17*b1cdbd2cSJim Jagielski  * specific language governing permissions and limitations
18*b1cdbd2cSJim Jagielski  * under the License.
19*b1cdbd2cSJim Jagielski  *
20*b1cdbd2cSJim Jagielski  *************************************************************/
21*b1cdbd2cSJim Jagielski 
22*b1cdbd2cSJim Jagielski 
23*b1cdbd2cSJim Jagielski 
24*b1cdbd2cSJim Jagielski #ifndef ACCESSIBILITY_EXT_ACCESSIBLETABBARPAGE_HXX_
25*b1cdbd2cSJim Jagielski #define ACCESSIBILITY_EXT_ACCESSIBLETABBARPAGE_HXX_
26*b1cdbd2cSJim Jagielski 
27*b1cdbd2cSJim Jagielski #include <com/sun/star/accessibility/XAccessible.hpp>
28*b1cdbd2cSJim Jagielski #include <com/sun/star/lang/XServiceInfo.hpp>
29*b1cdbd2cSJim Jagielski #include <cppuhelper/implbase2.hxx>
30*b1cdbd2cSJim Jagielski #include "accessibility/extended/accessibletabbarbase.hxx"
31*b1cdbd2cSJim Jagielski 
32*b1cdbd2cSJim Jagielski #include <vector>
33*b1cdbd2cSJim Jagielski 
34*b1cdbd2cSJim Jagielski namespace utl {
35*b1cdbd2cSJim Jagielski class AccessibleStateSetHelper;
36*b1cdbd2cSJim Jagielski }
37*b1cdbd2cSJim Jagielski 
38*b1cdbd2cSJim Jagielski //.........................................................................
39*b1cdbd2cSJim Jagielski namespace accessibility
40*b1cdbd2cSJim Jagielski {
41*b1cdbd2cSJim Jagielski //.........................................................................
42*b1cdbd2cSJim Jagielski 
43*b1cdbd2cSJim Jagielski 	//	----------------------------------------------------
44*b1cdbd2cSJim Jagielski 	//	class AccessibleTabBarPage
45*b1cdbd2cSJim Jagielski 	//	----------------------------------------------------
46*b1cdbd2cSJim Jagielski 
47*b1cdbd2cSJim Jagielski 	typedef ::cppu::ImplHelper2<
48*b1cdbd2cSJim Jagielski 		::com::sun::star::accessibility::XAccessible,
49*b1cdbd2cSJim Jagielski 		::com::sun::star::lang::XServiceInfo > AccessibleTabBarPage_BASE;
50*b1cdbd2cSJim Jagielski 
51*b1cdbd2cSJim Jagielski     class AccessibleTabBarPage :    public AccessibleTabBarBase,
52*b1cdbd2cSJim Jagielski 									public AccessibleTabBarPage_BASE
53*b1cdbd2cSJim Jagielski 	{
54*b1cdbd2cSJim Jagielski 		friend class AccessibleTabBarPageList;
55*b1cdbd2cSJim Jagielski 
56*b1cdbd2cSJim Jagielski 	private:
57*b1cdbd2cSJim Jagielski 		sal_uInt16				m_nPageId;
58*b1cdbd2cSJim Jagielski 		sal_Bool				m_bEnabled;
59*b1cdbd2cSJim Jagielski 		sal_Bool				m_bShowing;
60*b1cdbd2cSJim Jagielski 		sal_Bool				m_bSelected;
61*b1cdbd2cSJim Jagielski 		::rtl::OUString			m_sPageText;
62*b1cdbd2cSJim Jagielski 
63*b1cdbd2cSJim Jagielski 		::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >		m_xParent;
64*b1cdbd2cSJim Jagielski 
65*b1cdbd2cSJim Jagielski 	protected:
66*b1cdbd2cSJim Jagielski 		sal_Bool				IsEnabled();
67*b1cdbd2cSJim Jagielski 		sal_Bool				IsShowing();
68*b1cdbd2cSJim Jagielski 		sal_Bool				IsSelected();
69*b1cdbd2cSJim Jagielski 
70*b1cdbd2cSJim Jagielski 		void					SetEnabled( sal_Bool bEnabled );
71*b1cdbd2cSJim Jagielski 		void					SetShowing( sal_Bool bShowing );
72*b1cdbd2cSJim Jagielski 		void					SetSelected( sal_Bool bSelected );
73*b1cdbd2cSJim Jagielski 		void					SetPageText( const ::rtl::OUString& sPageText );
74*b1cdbd2cSJim Jagielski 
GetPageId() const75*b1cdbd2cSJim Jagielski 		sal_uInt16				GetPageId() const { return m_nPageId; }
76*b1cdbd2cSJim Jagielski 
77*b1cdbd2cSJim Jagielski 		virtual void			FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet );
78*b1cdbd2cSJim Jagielski 
79*b1cdbd2cSJim Jagielski 		// OCommonAccessibleComponent
80*b1cdbd2cSJim Jagielski 		virtual ::com::sun::star::awt::Rectangle SAL_CALL	implGetBounds(  ) throw (::com::sun::star::uno::RuntimeException);
81*b1cdbd2cSJim Jagielski 
82*b1cdbd2cSJim Jagielski 		// XComponent
83*b1cdbd2cSJim Jagielski 		virtual void SAL_CALL	disposing();
84*b1cdbd2cSJim Jagielski 
85*b1cdbd2cSJim Jagielski 	public:
86*b1cdbd2cSJim Jagielski 		AccessibleTabBarPage( TabBar* pTabBar, sal_uInt16 nPageId,
87*b1cdbd2cSJim Jagielski 							  const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rxParent );
88*b1cdbd2cSJim Jagielski 		virtual ~AccessibleTabBarPage();
89*b1cdbd2cSJim Jagielski 
90*b1cdbd2cSJim Jagielski 		// XInterface
91*b1cdbd2cSJim Jagielski 		DECLARE_XINTERFACE()
92*b1cdbd2cSJim Jagielski 
93*b1cdbd2cSJim Jagielski 		// XTypeProvider
94*b1cdbd2cSJim Jagielski 		DECLARE_XTYPEPROVIDER()
95*b1cdbd2cSJim Jagielski 
96*b1cdbd2cSJim Jagielski 		// XServiceInfo
97*b1cdbd2cSJim Jagielski 		virtual ::rtl::OUString SAL_CALL getImplementationName() throw (::com::sun::star::uno::RuntimeException);
98*b1cdbd2cSJim Jagielski 		virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& rServiceName ) throw (::com::sun::star::uno::RuntimeException);
99*b1cdbd2cSJim Jagielski 		virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw (::com::sun::star::uno::RuntimeException);
100*b1cdbd2cSJim Jagielski 
101*b1cdbd2cSJim Jagielski 		// XAccessible
102*b1cdbd2cSJim Jagielski 		virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext(  ) throw (::com::sun::star::uno::RuntimeException);
103*b1cdbd2cSJim Jagielski 
104*b1cdbd2cSJim Jagielski 		// XAccessibleContext
105*b1cdbd2cSJim Jagielski 		virtual sal_Int32 SAL_CALL getAccessibleChildCount(  ) throw (::com::sun::star::uno::RuntimeException);
106*b1cdbd2cSJim Jagielski 		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);
107*b1cdbd2cSJim Jagielski 		virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleParent(  ) throw (::com::sun::star::uno::RuntimeException);
108*b1cdbd2cSJim Jagielski 		virtual sal_Int32 SAL_CALL getAccessibleIndexInParent(  ) throw (::com::sun::star::uno::RuntimeException);
109*b1cdbd2cSJim Jagielski 		virtual sal_Int16 SAL_CALL getAccessibleRole(  ) throw (::com::sun::star::uno::RuntimeException);
110*b1cdbd2cSJim Jagielski 		virtual ::rtl::OUString SAL_CALL getAccessibleDescription(  ) throw (::com::sun::star::uno::RuntimeException);
111*b1cdbd2cSJim Jagielski 		virtual ::rtl::OUString SAL_CALL getAccessibleName(  ) throw (::com::sun::star::uno::RuntimeException);
112*b1cdbd2cSJim Jagielski 		virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet(  ) throw (::com::sun::star::uno::RuntimeException);
113*b1cdbd2cSJim Jagielski 		virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet(  ) throw (::com::sun::star::uno::RuntimeException);
114*b1cdbd2cSJim Jagielski 		virtual ::com::sun::star::lang::Locale SAL_CALL getLocale(  ) throw (::com::sun::star::accessibility::IllegalAccessibleComponentStateException, ::com::sun::star::uno::RuntimeException);
115*b1cdbd2cSJim Jagielski 
116*b1cdbd2cSJim Jagielski 		// XAccessibleComponent
117*b1cdbd2cSJim Jagielski 		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);
118*b1cdbd2cSJim Jagielski 		virtual void SAL_CALL grabFocus(  ) throw (::com::sun::star::uno::RuntimeException);
119*b1cdbd2cSJim Jagielski 		virtual sal_Int32 SAL_CALL getForeground(  ) throw (::com::sun::star::uno::RuntimeException);
120*b1cdbd2cSJim Jagielski 		virtual sal_Int32 SAL_CALL getBackground(  ) throw (::com::sun::star::uno::RuntimeException);
121*b1cdbd2cSJim Jagielski 
122*b1cdbd2cSJim Jagielski 		// XAccessibleExtendedComponent
123*b1cdbd2cSJim Jagielski 		virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont > SAL_CALL getFont(	) throw (::com::sun::star::uno::RuntimeException);
124*b1cdbd2cSJim Jagielski 		virtual ::rtl::OUString SAL_CALL getTitledBorderText(  ) throw (::com::sun::star::uno::RuntimeException);
125*b1cdbd2cSJim Jagielski 		virtual ::rtl::OUString SAL_CALL getToolTipText(  ) throw (::com::sun::star::uno::RuntimeException);
126*b1cdbd2cSJim Jagielski 	};
127*b1cdbd2cSJim Jagielski 
128*b1cdbd2cSJim Jagielski //.........................................................................
129*b1cdbd2cSJim Jagielski }	// namespace accessibility
130*b1cdbd2cSJim Jagielski //.........................................................................
131*b1cdbd2cSJim Jagielski 
132*b1cdbd2cSJim Jagielski #endif // ACCESSIBILITY_EXT_ACCESSIBLETABBARPAGE_HXX_
133*b1cdbd2cSJim Jagielski 
134