fix build
[LibreOffice.git] / include / svx / IAccessibleViewForwarder.hxx
blobfd9a5f638941f6ed01f79aa1b283d89cc638905b
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 INCLUDED_SVX_IACCESSIBLEVIEWFORWARDER_HXX
21 #define INCLUDED_SVX_IACCESSIBLEVIEWFORWARDER_HXX
23 #include <tools/gen.hxx>
25 namespace accessibility
27 /** <p>This interface provides the means to transform between internal
28 coordinates in 100th of mm and screen coordinates without giving direct
29 access to the underlying view. Each view forwarder represents a
30 specific real or virtual window. A call to
31 <method>GetVisibleArea</method> returns the visible rectangle that
32 corresponds to this window.</p>
34 <p>This interface is similar to the SvxViewForwarder but
35 differs in two important points: Firstly the <member>GetVisArea</member>
36 method returns a rectangle in internal coordinates and secondly the
37 transformation methods do not require explicit mapmodes. These have to
38 be provided implicitly by the classes that implement this
39 interface. A third, less important, difference are the additional
40 transformation methods for sizes. The reasons for their existence are
41 convenience and improved performance.</p>
43 @attention
44 Note, that modifications of the underlying view that lead to
45 different transformations between internal and screen coordinates or
46 change the validity of the forwarder have to be signaled separately.
48 class IAccessibleViewForwarder
50 public:
51 IAccessibleViewForwarder() = default;
52 IAccessibleViewForwarder(IAccessibleViewForwarder const&) = default;
53 IAccessibleViewForwarder(IAccessibleViewForwarder&&) = default;
54 IAccessibleViewForwarder& operator=(IAccessibleViewForwarder const&) = default;
55 IAccessibleViewForwarder& operator=(IAccessibleViewForwarder&&) = default;
57 virtual ~IAccessibleViewForwarder(){};
59 /** Returns the area of the underlying document that is visible in the
60 * corresponding window.
62 @return
63 The rectangle of the visible part of the document. The values
64 are, contrary to the base class, in internal coordinates of
65 100th of mm.
67 virtual tools::Rectangle GetVisibleArea() const = 0;
69 /** Transform the specified point from internal coordinates in 100th of
70 mm to an absolute screen position.
72 @param rPoint
73 Point in internal coordinates (100th of mm).
75 @return
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 = 0;
81 /** Transform the specified size from internal coordinates in 100th of
82 mm to a screen oriented pixel size.
84 @param rSize
85 Size in internal coordinates (100th of mm).
87 @return
88 The same size but in screen coordinates.
90 virtual Size LogicToPixel(const Size& rSize) const = 0;
93 } // end of namespace accessibility
95 #endif
97 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */