bump product version to 6.3.0.0.beta1
[LibreOffice.git] / sd / source / ui / inc / AccessibleViewForwarder.hxx
blob4172f17b4b77f0aadc89f48fe99779760a6b71c0
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_SD_SOURCE_UI_INC_ACCESSIBLEVIEWFORWARDER_HXX
21 #define INCLUDED_SD_SOURCE_UI_INC_ACCESSIBLEVIEWFORWARDER_HXX
23 #include <svx/IAccessibleViewForwarder.hxx>
25 class SdrPaintView;
26 class OutputDevice;
28 namespace accessibility {
30 /** <p>This class provides the means to transform between internal coordinates
31 and screen coordinates without giving direct access to the underlying
32 view. It represents a certain window. A call to
33 <method>GetVisArea</method> returns the corresponding visible
34 rectangle.</p>
36 @attention
37 Note, that modifications of the underlying view that lead to
38 different transformations between internal and screen coordinates or
39 change the validity of the forwarder have to be signaled separately.
41 class AccessibleViewForwarder final
42 : public IAccessibleViewForwarder
44 public:
45 //===== internal ========================================================
47 AccessibleViewForwarder (SdrPaintView* pView, OutputDevice& rDevice);
49 virtual ~AccessibleViewForwarder() override;
51 //===== IAccessibleViewforwarder ========================================
53 /** Returns the area of the underlying document that is visible in the
54 * corresponding window.
56 @return
57 The rectangle of the visible part of the document.
59 virtual ::tools::Rectangle GetVisibleArea() const override;
61 /** Transform the specified point from internal coordinates to an
62 absolute screen position.
64 @param rPoint
65 Point in internal coordinates.
67 @return
68 The same point but in screen coordinates relative to the upper
69 left corner of the (current) screen.
71 virtual Point LogicToPixel (const Point& rPoint) const override;
73 /** Transform the specified size from internal coordinates to a screen
74 * position.
76 @param rSize
77 Size in internal coordinates.
79 @return
80 The same size but in screen coordinates.
82 virtual Size LogicToPixel (const Size& rSize) const override;
84 private:
85 SdrPaintView* const mpView;
86 sal_uInt16 mnWindowId;
88 AccessibleViewForwarder (AccessibleViewForwarder const &) = delete;
89 AccessibleViewForwarder& operator= (AccessibleViewForwarder const &) = delete;
92 } // end of namespace accessibility
94 #endif
96 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */