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