fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / sd / source / ui / inc / AccessibleViewForwarder.hxx
blob55696f634dfa5f09f8a2a61da63907001cc8497d
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
20 #ifndef _SD_ACCESSIBILITY_ACCESSIBLE_VIEW_FORWARDER_HXX
21 #define _SD_ACCESSIBILITY_ACCESSIBLE_VIEW_FORWARDER_HXX
23 #include <svx/IAccessibleViewForwarder.hxx>
25 class SdrPaintView;
26 class OutputDevice;
28 namespace accessibility {
31 /** <p>This class provides the means to transform between internal coordinates
32 and screen coordinates without giving direct access to the underlying
33 view. It represents a certain window. A call to
34 <method>GetVisArea</method> returns the corresponding visible
35 rectangle.</p>
37 @attention
38 Note, that modifications of the underlying view that lead to
39 different transformations between internal and screen coordinates or
40 change the validity of the forwarder have to be signaled separately.
42 class AccessibleViewForwarder
43 : public IAccessibleViewForwarder
45 public:
46 //===== internal ========================================================
48 AccessibleViewForwarder (SdrPaintView* pView, OutputDevice& rDevice);
50 virtual ~AccessibleViewForwarder (void);
52 //===== IAccessibleViewforwarder ========================================
54 /** This method informs you about the state of the forwarder. Do not
55 use it when the returned value is <false/>.
57 @return
58 Return <true/> if the view forwarder is valid and <false/> else.
60 virtual sal_Bool IsValid (void) const;
62 /** Returns the area of the underlying document that is visible in the
63 * corresponding window.
65 @return
66 The rectangle of the visible part of the document.
68 virtual Rectangle GetVisibleArea() const;
70 /** Transform the specified point from internal coordinates to an
71 absolute screen position.
73 @param rPoint
74 Point in internal coordinates.
76 @return
77 The same point but in screen coordinates relative to the upper
78 left corner of the (current) screen.
80 virtual Point LogicToPixel (const Point& rPoint) const;
82 /** Transform the specified size from internal coordinates to a screen
83 * position.
85 @param rSize
86 Size in internal coordinates.
88 @return
89 The same size but in screen coordinates.
91 virtual Size LogicToPixel (const Size& rSize) const;
93 /** Transform the specified point from absolute screen coordinates to
94 internal coordinates.
96 @param rPoint
97 Point in screen coordinates relative to the upper left corner of
98 the (current) screen.
100 @return
101 The same point but in internal coordinates.
103 virtual Point PixelToLogic (const Point& rPoint) const;
105 /** Transform the specified Size from screen coordinates to internal
106 coordinates.
108 @param rSize
109 Size in screen coordinates.
111 @return
112 The same size but in internal coordinates.
114 virtual Size PixelToLogic (const Size& rSize) const;
116 protected:
117 SdrPaintView* mpView;
118 sal_uInt16 mnWindowId;
119 OutputDevice& mrDevice;
121 private:
122 AccessibleViewForwarder (AccessibleViewForwarder&);
123 AccessibleViewForwarder& operator= (AccessibleViewForwarder&);
126 } // end of namespace accessibility
128 #endif
130 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */