LCOV - code coverage report
Current view: top level - include/svx - IAccessibleViewForwarder.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 2 2 100.0 %
Date: 2015-06-13 12:38:46 Functions: 3 5 60.0 %
Legend: Lines: hit not hit

          Line data    Source code
       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 <sal/types.h>
      24             : #include <tools/gen.hxx>
      25             : 
      26             : 
      27             : namespace accessibility {
      28             : 
      29             : 
      30             : 
      31             : /** <p>This interface provides the means to transform between internal
      32             :     coordinates in 100th of mm and screen coordinates without giving direct
      33             :     access to the underlying view.  Each view forwarder represents a
      34             :     specific real or virtual window.  A call to
      35             :     <method>GetVisibleArea</method> returns the visible rectangle that
      36             :     corresponds to this window.</p>
      37             : 
      38             :     <p>This interface is similar to the SvxViewForwarder but
      39             :     differs in two important points: Firstly the <member>GetVisArea</member>
      40             :     method returns a rectangle in internal coordinates and secondly the
      41             :     transformation methods do not require explicit mapmodes.  These have to
      42             :     be provided implicitly by the classes that implement this
      43             :     interface.  A third, less important, difference are the additional
      44             :     transfomation methods for sizes.  The reasons for their existence are
      45             :     convenience and improved performance.</p>
      46             : 
      47             :     @attention
      48             :         Note, that modifications of the underlying view that lead to
      49             :         different transformations between internal and screen coordinates or
      50             :         change the validity of the forwarder have to be signaled separately.
      51             : */
      52         113 : class IAccessibleViewForwarder
      53             : {
      54             : public:
      55         113 :     virtual ~IAccessibleViewForwarder(){};
      56             : 
      57             :     /** This method informs you about the state of the forwarder.  Do not
      58             :         use it when the returned value is <false/>.
      59             : 
      60             :         @return
      61             :             Return <true/> if the view forwarder is valid and <false/> else.
      62             :      */
      63             :     virtual bool IsValid() const = 0;
      64             : 
      65             :     /** Returns the area of the underlying document that is visible in the
      66             :     * corresponding window.
      67             : 
      68             :         @return
      69             :             The rectangle of the visible part of the document. The values
      70             :             are, contrary to the base class, in internal coordinates of
      71             :             100th of mm.
      72             :      */
      73             :     virtual Rectangle GetVisibleArea() const = 0;
      74             : 
      75             :     /** Transform the specified point from internal coordinates in 100th of
      76             :         mm to an absolute screen position.
      77             : 
      78             :         @param rPoint
      79             :             Point in internal coordinates (100th of mm).
      80             : 
      81             :         @return
      82             :             The same point but in screen coordinates relative to the upper
      83             :             left corner of the (current) screen.
      84             :      */
      85             :     virtual Point LogicToPixel (const Point& rPoint) const = 0;
      86             : 
      87             :     /** Transform the specified size from internal coordinates in 100th of
      88             :         mm to a screen oriented pixel size.
      89             : 
      90             :         @param rSize
      91             :             Size in internal coordinates (100th of mm).
      92             : 
      93             :         @return
      94             :             The same size but in screen coordinates.
      95             :      */
      96             :     virtual Size LogicToPixel (const Size& rSize) const = 0;
      97             : 
      98             :     /** Transform the specified point from absolute screen coordinates to
      99             :         internal coordinates (100th of mm).
     100             : 
     101             :         @param rPoint
     102             :             Point in screen coordinates relative to the upper left corner of
     103             :             the (current) screen.
     104             : 
     105             :         @return
     106             :             The same point but in internal coordinates (100th of mm).
     107             :      */
     108             :     virtual Point PixelToLogic (const Point& rPoint) const = 0;
     109             : 
     110             :     /** Transform the specified size from screen coordinates to internal
     111             :         coordinates (100th of mm).
     112             : 
     113             :         @param rSize
     114             :             Size in screen coordinates.
     115             : 
     116             :         @return
     117             :             The same size but in internal coordinates (100th of mm).
     118             :      */
     119             :     virtual Size PixelToLogic (const Size& rSize) const = 0;
     120             : };
     121             : 
     122             : } // end of namespace accessibility
     123             : 
     124             : #endif
     125             : 
     126             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11