1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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>
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
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
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/>.
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.
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.
74 Point in internal coordinates.
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
86 Size in internal coordinates.
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
97 Point in screen coordinates relative to the upper left corner of
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
109 Size in screen coordinates.
112 The same size but in internal coordinates.
114 virtual Size
PixelToLogic (const Size
& rSize
) const;
117 SdrPaintView
* mpView
;
118 sal_uInt16 mnWindowId
;
119 OutputDevice
& mrDevice
;
122 AccessibleViewForwarder (AccessibleViewForwarder
&);
123 AccessibleViewForwarder
& operator= (AccessibleViewForwarder
&);
126 } // end of namespace accessibility
130 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */