Coverage Report

Created: 2025-12-31 10:39

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/include/svx/IAccessibleViewForwarder.hxx
Line
Count
Source
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
/*
3
 * This file is part of the LibreOffice project.
4
 *
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/.
8
 *
9
 * This file incorporates work covered by the following license notice:
10
 *
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 .
18
 */
19
20
#ifndef INCLUDED_SVX_IACCESSIBLEVIEWFORWARDER_HXX
21
#define INCLUDED_SVX_IACCESSIBLEVIEWFORWARDER_HXX
22
23
#include <tools/gen.hxx>
24
25
namespace accessibility
26
{
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>
33
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>
42
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.
47
*/
48
class IAccessibleViewForwarder
49
{
50
public:
51
0
    IAccessibleViewForwarder() = default;
52
    IAccessibleViewForwarder(IAccessibleViewForwarder const&) = default;
53
0
    IAccessibleViewForwarder(IAccessibleViewForwarder&&) = default;
54
    IAccessibleViewForwarder& operator=(IAccessibleViewForwarder const&) = default;
55
0
    IAccessibleViewForwarder& operator=(IAccessibleViewForwarder&&) = default;
56
57
0
    virtual ~IAccessibleViewForwarder(){};
58
59
    /** Returns the area of the underlying document that is visible in the
60
    * corresponding window.
61
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.
66
     */
67
    virtual tools::Rectangle GetVisibleArea() const = 0;
68
69
    /** Transform the specified point from internal coordinates in 100th of
70
        mm to an absolute screen position.
71
72
        @param rPoint
73
            Point in internal coordinates (100th of mm).
74
75
        @return
76
            The same point but in screen coordinates relative to the upper
77
            left corner of the (current) screen.
78
     */
79
    virtual Point LogicToPixel(const Point& rPoint) const = 0;
80
81
    /** Transform the specified size from internal coordinates in 100th of
82
        mm to a screen oriented pixel size.
83
84
        @param rSize
85
            Size in internal coordinates (100th of mm).
86
87
        @return
88
            The same size but in screen coordinates.
89
     */
90
    virtual Size LogicToPixel(const Size& rSize) const = 0;
91
};
92
93
} // end of namespace accessibility
94
95
#endif
96
97
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */