1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: AccessibleViewForwarder.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _SD_ACCESSIBILITY_ACCESSIBLE_VIEW_FORWARDER_HXX
32 #define _SD_ACCESSIBILITY_ACCESSIBLE_VIEW_FORWARDER_HXX
34 #include <svx/IAccessibleViewForwarder.hxx>
39 namespace accessibility
{
42 /** <p>This class provides the means to transform between internal coordinates
43 and screen coordinates without giving direct access to the underlying
44 view. It represents a certain window. A call to
45 <method>GetVisArea</method> returns the corresponding visible
49 Note, that modifications of the underlying view that lead to
50 different transformations between internal and screen coordinates or
51 change the validity of the forwarder have to be signaled seperately.
53 class AccessibleViewForwarder
54 : public IAccessibleViewForwarder
57 //===== internal ========================================================
59 AccessibleViewForwarder (SdrPaintView
* pView
, USHORT nWindowId
);
60 AccessibleViewForwarder (SdrPaintView
* pView
, OutputDevice
& rDevice
);
62 virtual ~AccessibleViewForwarder (void);
64 void SetView (SdrPaintView
* pView
);
66 //===== IAccessibleViewforwarder ========================================
68 /** This method informs you about the state of the forwarder. Do not
69 use it when the returned value is <false/>.
72 Return <true/> if the view forwarder is valid and <false/> else.
74 virtual BOOL
IsValid (void) const;
76 /** Returns the area of the underlying document that is visible in the
77 * corresponding window.
80 The rectangle of the visible part of the document.
82 virtual Rectangle
GetVisibleArea() const;
84 /** Transform the specified point from internal coordinates to an
85 absolute screen position.
88 Point in internal coordinates.
91 The same point but in screen coordinates relative to the upper
92 left corner of the (current) screen.
94 virtual Point
LogicToPixel (const Point
& rPoint
) const;
96 /** Transform the specified size from internal coordinates to a screen
100 Size in internal coordinates.
103 The same size but in screen coordinates.
105 virtual Size
LogicToPixel (const Size
& rSize
) const;
107 /** Transform the specified point from absolute screen coordinates to
108 internal coordinates.
111 Point in screen coordinates relative to the upper left corner of
112 the (current) screen.
115 The same point but in internal coordinates.
117 virtual Point
PixelToLogic (const Point
& rPoint
) const;
119 /** Transform the specified Size from screen coordinates to internal
123 Size in screen coordinates.
126 The same size but in internal coordinates.
128 virtual Size
PixelToLogic (const Size
& rSize
) const;
131 SdrPaintView
* mpView
;
133 OutputDevice
& mrDevice
;
136 AccessibleViewForwarder (AccessibleViewForwarder
&);
137 AccessibleViewForwarder
& operator= (AccessibleViewForwarder
&);
140 } // end of namespace accessibility