1*2e2212a7SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*2e2212a7SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*2e2212a7SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*2e2212a7SAndrew Rist  * distributed with this work for additional information
6*2e2212a7SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*2e2212a7SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*2e2212a7SAndrew Rist  * "License"); you may not use this file except in compliance
9*2e2212a7SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*2e2212a7SAndrew Rist  *
11*2e2212a7SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*2e2212a7SAndrew Rist  *
13*2e2212a7SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*2e2212a7SAndrew Rist  * software distributed under the License is distributed on an
15*2e2212a7SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*2e2212a7SAndrew Rist  * KIND, either express or implied.  See the License for the
17*2e2212a7SAndrew Rist  * specific language governing permissions and limitations
18*2e2212a7SAndrew Rist  * under the License.
19*2e2212a7SAndrew Rist  *
20*2e2212a7SAndrew Rist  *************************************************************/
21*2e2212a7SAndrew Rist 
22*2e2212a7SAndrew Rist 
23cdf0e10cSrcweir #ifndef DBACCESS_CONNECTIONLINEACCESS_HXX
24cdf0e10cSrcweir #define DBACCESS_CONNECTIONLINEACCESS_HXX
25cdf0e10cSrcweir 
26cdf0e10cSrcweir #ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLERELATIONSET_HPP_
27cdf0e10cSrcweir #include <com/sun/star/accessibility/XAccessibleRelationSet.hpp>
28cdf0e10cSrcweir #endif
29cdf0e10cSrcweir #ifndef _CPPUHELPER_IMPLBASE2_HXX_
30cdf0e10cSrcweir #include <cppuhelper/implbase2.hxx>
31cdf0e10cSrcweir #endif
32cdf0e10cSrcweir #ifndef _TOOLKIT_AWT_VCLXACCESSIBLECOMPONENT_HXX_
33cdf0e10cSrcweir #include <toolkit/awt/vclxaccessiblecomponent.hxx>
34cdf0e10cSrcweir #endif
35cdf0e10cSrcweir 
36cdf0e10cSrcweir namespace dbaui
37cdf0e10cSrcweir {
38cdf0e10cSrcweir 	typedef ::cppu::ImplHelper2< ::com::sun::star::accessibility::XAccessibleRelationSet,
39cdf0e10cSrcweir 								 ::com::sun::star::accessibility::XAccessible
40cdf0e10cSrcweir 											> OConnectionLineAccess_BASE;
41cdf0e10cSrcweir 	class OTableConnection;
42cdf0e10cSrcweir 	/** the class OConnectionLineAccess represents the accessible object for the connection between two table windows
43cdf0e10cSrcweir 		like they are used in the QueryDesign and the RelationDesign
44cdf0e10cSrcweir 	*/
45cdf0e10cSrcweir 	class OConnectionLineAccess		:	public VCLXAccessibleComponent
46cdf0e10cSrcweir 									,	public OConnectionLineAccess_BASE
47cdf0e10cSrcweir 	{
48cdf0e10cSrcweir 		const OTableConnection*				m_pLine; // the window which I should give accessibility to
49cdf0e10cSrcweir 	protected:
50cdf0e10cSrcweir 		/** this function is called upon disposing the component
51cdf0e10cSrcweir 		*/
52cdf0e10cSrcweir 		virtual void SAL_CALL disposing();
53cdf0e10cSrcweir 
54cdf0e10cSrcweir 		/** isEditable returns the current editable state
55cdf0e10cSrcweir 			@return	true if it is editable otherwise false
56cdf0e10cSrcweir 		*/
57cdf0e10cSrcweir 		virtual sal_Bool isEditable() const;
58cdf0e10cSrcweir 	public:
59cdf0e10cSrcweir 		OConnectionLineAccess(OTableConnection* _pLine);
60cdf0e10cSrcweir 
61cdf0e10cSrcweir 		// XInterface
62cdf0e10cSrcweir 		virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException);
acquire()63cdf0e10cSrcweir 		virtual void SAL_CALL acquire(  ) throw ()
64cdf0e10cSrcweir 		{ // here inline is allowed because we do not use this class outside this dll
65cdf0e10cSrcweir 			VCLXAccessibleComponent::acquire(  );
66cdf0e10cSrcweir 		}
release()67cdf0e10cSrcweir 		virtual void SAL_CALL release(  ) throw ()
68cdf0e10cSrcweir 		{ // here inline is allowed because we do not use this class outside this dll
69cdf0e10cSrcweir 			VCLXAccessibleComponent::release(  );
70cdf0e10cSrcweir 		}
71cdf0e10cSrcweir 
72cdf0e10cSrcweir 		// XTypeProvider
73cdf0e10cSrcweir 		virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(  ) throw (::com::sun::star::uno::RuntimeException);
74cdf0e10cSrcweir 
75cdf0e10cSrcweir 		// XServiceInfo - static methods
76cdf0e10cSrcweir 		static ::rtl::OUString getImplementationName_Static(void) throw( com::sun::star::uno::RuntimeException );
77cdf0e10cSrcweir 		// XServiceInfo
78cdf0e10cSrcweir 		virtual ::rtl::OUString SAL_CALL getImplementationName() throw(com::sun::star::uno::RuntimeException);
79cdf0e10cSrcweir 
80cdf0e10cSrcweir 		// XAccessible
81cdf0e10cSrcweir 		virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext(  ) throw (::com::sun::star::uno::RuntimeException);
82cdf0e10cSrcweir 
83cdf0e10cSrcweir 		// XAccessibleContext
84cdf0e10cSrcweir 		virtual sal_Int32 SAL_CALL getAccessibleChildCount(  ) throw (::com::sun::star::uno::RuntimeException);
85cdf0e10cSrcweir 		virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (::com::sun::star::uno::RuntimeException);
86cdf0e10cSrcweir 		virtual sal_Int32 SAL_CALL getAccessibleIndexInParent(  ) throw (::com::sun::star::uno::RuntimeException);
87cdf0e10cSrcweir 		virtual sal_Int16 SAL_CALL getAccessibleRole(  ) throw (::com::sun::star::uno::RuntimeException);
88cdf0e10cSrcweir 		virtual ::rtl::OUString SAL_CALL getAccessibleDescription(  ) throw (::com::sun::star::uno::RuntimeException);
89cdf0e10cSrcweir 		virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet(  ) throw (::com::sun::star::uno::RuntimeException);
90cdf0e10cSrcweir 
91cdf0e10cSrcweir 		// XAccessibleComponent
92cdf0e10cSrcweir 		virtual sal_Bool SAL_CALL contains( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
93cdf0e10cSrcweir 		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);
94cdf0e10cSrcweir 		virtual ::com::sun::star::awt::Rectangle SAL_CALL getBounds(  ) throw (::com::sun::star::uno::RuntimeException);
95cdf0e10cSrcweir 		virtual ::com::sun::star::awt::Point SAL_CALL getLocation(  ) throw (::com::sun::star::uno::RuntimeException);
96cdf0e10cSrcweir 		virtual ::com::sun::star::awt::Point SAL_CALL getLocationOnScreen(  ) throw (::com::sun::star::uno::RuntimeException);
97cdf0e10cSrcweir 		virtual ::com::sun::star::awt::Size SAL_CALL getSize(  ) throw (::com::sun::star::uno::RuntimeException);
98cdf0e10cSrcweir 		virtual sal_Bool SAL_CALL isShowing(  ) throw (::com::sun::star::uno::RuntimeException);
99cdf0e10cSrcweir 		virtual sal_Bool SAL_CALL isVisible(  ) throw (::com::sun::star::uno::RuntimeException);
100cdf0e10cSrcweir 		virtual sal_Bool SAL_CALL isFocusTraversable(  ) throw (::com::sun::star::uno::RuntimeException);
101cdf0e10cSrcweir 
102cdf0e10cSrcweir 		// XAccessibleRelationSet
103cdf0e10cSrcweir 		virtual sal_Int32 SAL_CALL getRelationCount(  ) throw (::com::sun::star::uno::RuntimeException);
104cdf0e10cSrcweir 		virtual ::com::sun::star::accessibility::AccessibleRelation SAL_CALL getRelation( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
105cdf0e10cSrcweir 		virtual sal_Bool SAL_CALL containsRelation( sal_Int16 aRelationType ) throw (::com::sun::star::uno::RuntimeException);
106cdf0e10cSrcweir 		virtual ::com::sun::star::accessibility::AccessibleRelation SAL_CALL getRelationByType( sal_Int16 aRelationType ) throw (::com::sun::star::uno::RuntimeException);
107cdf0e10cSrcweir 	};
108cdf0e10cSrcweir }
109cdf0e10cSrcweir #endif // DBACCESS_CONNECTIONLINEACCESS_HXX
110