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 INCLUDED_SD_SOURCE_UI_INC_ACCESSIBLEVIEWFORWARDER_HXX
21 #define INCLUDED_SD_SOURCE_UI_INC_ACCESSIBLEVIEWFORWARDER_HXX
23 #include <svx/IAccessibleViewForwarder.hxx>
28 namespace accessibility
{
30 /** <p>This class provides the means to transform between internal coordinates
31 and screen coordinates without giving direct access to the underlying
32 view. It represents a certain window. A call to
33 <method>GetVisArea</method> returns the corresponding visible
37 Note, that modifications of the underlying view that lead to
38 different transformations between internal and screen coordinates or
39 change the validity of the forwarder have to be signaled separately.
41 class AccessibleViewForwarder
42 : public IAccessibleViewForwarder
45 //===== internal ========================================================
47 AccessibleViewForwarder (SdrPaintView
* pView
, OutputDevice
& rDevice
);
49 virtual ~AccessibleViewForwarder();
51 //===== IAccessibleViewforwarder ========================================
53 /** This method informs you about the state of the forwarder. Do not
54 use it when the returned value is <false/>.
57 Return <true/> if the view forwarder is valid and <false/> else.
59 virtual bool IsValid() const SAL_OVERRIDE
;
61 /** Returns the area of the underlying document that is visible in the
62 * corresponding window.
65 The rectangle of the visible part of the document.
67 virtual Rectangle
GetVisibleArea() const SAL_OVERRIDE
;
69 /** Transform the specified point from internal coordinates to an
70 absolute screen position.
73 Point in internal coordinates.
76 The same point but in screen coordinates relative to the upper
77 left corner of the (current) screen.
79 virtual Point
LogicToPixel (const Point
& rPoint
) const SAL_OVERRIDE
;
81 /** Transform the specified size from internal coordinates to a screen
85 Size in internal coordinates.
88 The same size but in screen coordinates.
90 virtual Size
LogicToPixel (const Size
& rSize
) const SAL_OVERRIDE
;
92 /** Transform the specified point from absolute screen coordinates to
96 Point in screen coordinates relative to the upper left corner of
100 The same point but in internal coordinates.
102 virtual Point
PixelToLogic (const Point
& rPoint
) const SAL_OVERRIDE
;
104 /** Transform the specified Size from screen coordinates to internal
108 Size in screen coordinates.
111 The same size but in internal coordinates.
113 virtual Size
PixelToLogic (const Size
& rSize
) const SAL_OVERRIDE
;
116 SdrPaintView
* mpView
;
117 sal_uInt16 mnWindowId
;
118 OutputDevice
& mrDevice
;
121 AccessibleViewForwarder (AccessibleViewForwarder
&) SAL_DELETED_FUNCTION
;
122 AccessibleViewForwarder
& operator= (AccessibleViewForwarder
&) SAL_DELETED_FUNCTION
;
125 } // end of namespace accessibility
129 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */