LibreOffice Module comphelper (master)  1
accessiblecomponenthelper.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 
20 #ifndef INCLUDED_COMPHELPER_ACCESSIBLECOMPONENTHELPER_HXX
21 #define INCLUDED_COMPHELPER_ACCESSIBLECOMPONENTHELPER_HXX
22 
23 #include <com/sun/star/accessibility/XAccessibleComponent.hpp>
24 #include <com/sun/star/accessibility/XAccessibleExtendedComponent.hpp>
26 #include <cppuhelper/implbase1.hxx>
27 #include <comphelper/uno3.hxx>
29 
30 
31 namespace comphelper
32 {
33 
34 
35  //= OCommonAccessibleComponent
36 
41  {
42  protected:
45  virtual ~OCommonAccessibleComponent() override;
46 
47  protected:
51  virtual css::awt::Rectangle implGetBounds( ) = 0;
52 
53  protected:
60  bool containsPoint( const css::awt::Point& aPoint );
62  css::awt::Point getLocation( );
64  css::awt::Point getLocationOnScreen( );
66  css::awt::Size getSize( );
68  css::awt::Rectangle getBounds( );
69  };
70 
71 
72  //= OAccessibleComponentHelper
73 
74 
76  public ::cppu::ImplHelper1< css::accessibility::XAccessibleComponent >
77  {
78  protected:
80  };
81 
88  {
89  protected:
91 
92  public:
93  // XInterface
96 
97  // XAccessibleComponent - default implementations
98  virtual sal_Bool SAL_CALL containsPoint( const css::awt::Point& aPoint ) override;
99  virtual css::awt::Point SAL_CALL getLocation( ) override;
100  virtual css::awt::Point SAL_CALL getLocationOnScreen( ) override;
101  virtual css::awt::Size SAL_CALL getSize( ) override;
102  virtual css::awt::Rectangle SAL_CALL getBounds( ) override;
103  };
104 
105 
106  //= OAccessibleExtendedComponentHelper
107 
108 
109  typedef ::cppu::ImplHelper1 < css::accessibility::XAccessibleExtendedComponent
111 
118  {
119  protected:
121 
122  public:
123  // XInterface
126 
127  // XAccessibleComponent - default implementations
128  virtual sal_Bool SAL_CALL containsPoint( const css::awt::Point& aPoint ) override;
129  virtual css::awt::Point SAL_CALL getLocation( ) override;
130  virtual css::awt::Point SAL_CALL getLocationOnScreen( ) override;
131  virtual css::awt::Size SAL_CALL getSize( ) override;
132  virtual css::awt::Rectangle SAL_CALL getBounds( ) override;
133  };
134 
135 
136 } // namespace comphelper
137 
138 
139 #endif // INCLUDED_COMPHELPER_ACCESSIBLECOMPONENTHELPER_HXX
140 
141 
142 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
a helper class for implementing an AccessibleContext which at the same time supports an XAccessibleCo...
base class encapsulating common functionality for the helper classes implementing the XAccessibleComp...
::cppu::ImplHelper1< css::accessibility::XAccessibleExtendedComponent > OAccessibleExtendedComponentHelper_Base
#define DECLARE_XTYPEPROVIDER()
Definition: uno3.hxx:126
unsigned char sal_Bool
a helper class for implementing an AccessibleContext which at the same time supports an XAccessibleEx...
helper class for implementing an AccessibleContext
#define COMPHELPER_DLLPUBLIC
#define DECLARE_XINTERFACE()
Definition: uno3.hxx:90