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_SVX_IACCESSIBLEVIEWFORWARDER_HXX
21 #define INCLUDED_SVX_IACCESSIBLEVIEWFORWARDER_HXX
23 #include <tools/gen.hxx>
26 namespace accessibility
{
29 /** <p>This interface provides the means to transform between internal
30 coordinates in 100th of mm and screen coordinates without giving direct
31 access to the underlying view. Each view forwarder represents a
32 specific real or virtual window. A call to
33 <method>GetVisibleArea</method> returns the visible rectangle that
34 corresponds to this window.</p>
36 <p>This interface is similar to the SvxViewForwarder but
37 differs in two important points: Firstly the <member>GetVisArea</member>
38 method returns a rectangle in internal coordinates and secondly the
39 transformation methods do not require explicit mapmodes. These have to
40 be provided implicitly by the classes that implement this
41 interface. A third, less important, difference are the additional
42 transformation methods for sizes. The reasons for their existence are
43 convenience and improved performance.</p>
46 Note, that modifications of the underlying view that lead to
47 different transformations between internal and screen coordinates or
48 change the validity of the forwarder have to be signaled separately.
50 class IAccessibleViewForwarder
53 IAccessibleViewForwarder() = default;
54 IAccessibleViewForwarder(IAccessibleViewForwarder
const &) = default;
55 IAccessibleViewForwarder(IAccessibleViewForwarder
&&) = default;
56 IAccessibleViewForwarder
& operator =(IAccessibleViewForwarder
const &) = default;
57 IAccessibleViewForwarder
& operator =(IAccessibleViewForwarder
&&) = default;
59 virtual ~IAccessibleViewForwarder(){};
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. The values
66 are, contrary to the base class, in internal coordinates of
69 virtual tools::Rectangle
GetVisibleArea() const = 0;
71 /** Transform the specified point from internal coordinates in 100th of
72 mm to an absolute screen position.
75 Point in internal coordinates (100th of mm).
78 The same point but in screen coordinates relative to the upper
79 left corner of the (current) screen.
81 virtual Point
LogicToPixel (const Point
& rPoint
) const = 0;
83 /** Transform the specified size from internal coordinates in 100th of
84 mm to a screen oriented pixel size.
87 Size in internal coordinates (100th of mm).
90 The same size but in screen coordinates.
92 virtual Size
LogicToPixel (const Size
& rSize
) const = 0;
96 } // end of namespace accessibility
100 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */