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