LCOV - code coverage report
Current view: top level - include/vcl - ITiledRenderable.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 1 11 9.1 %
Date: 2015-06-13 12:38:46 Functions: 1 6 16.7 %
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             :  */
      10             : 
      11             : #ifndef INCLUDED_VCL_ITILEDRENDERABLE_HXX
      12             : #define INCLUDED_VCL_ITILEDRENDERABLE_HXX
      13             : 
      14             : #define LOK_USE_UNSTABLE_API
      15             : #include <LibreOfficeKit/LibreOfficeKitTypes.h>
      16             : #include <tools/gen.hxx>
      17             : #include <vcl/virdev.hxx>
      18             : 
      19             : namespace vcl
      20             : {
      21             : 
      22        4601 : class VCL_DLLPUBLIC ITiledRenderable
      23             : {
      24             : public:
      25             :     virtual ~ITiledRenderable();
      26             : 
      27             :     /**
      28             :      * Paint a tile to a given VirtualDevice.
      29             :      *
      30             :      * Output parameters are measured in pixels, tile parameters are in
      31             :      * twips.
      32             :      */
      33             :     virtual void paintTile( VirtualDevice &rDevice,
      34             :                             int nOutputWidth,
      35             :                             int nOutputHeight,
      36             :                             int nTilePosX,
      37             :                             int nTilePosY,
      38             :                             long nTileWidth,
      39             :                             long nTileHeight ) = 0;
      40             : 
      41             :     /**
      42             :      * Get the document size in twips.
      43             :      */
      44             :     virtual Size getDocumentSize() = 0;
      45             : 
      46             :     /**
      47             :      * Set the document "part", i.e. slide for a slideshow, and
      48             :      * tab for a spreadsheet.
      49             :      */
      50           0 :     virtual void setPart( int nPart )
      51             :     {
      52             :         (void) nPart;
      53           0 :     }
      54             : 
      55             :     /**
      56             :      * Get the number of parts -- see setPart for further details.
      57             :      */
      58           0 :     virtual int getParts()
      59             :     {
      60           0 :         return 1;
      61             :     }
      62             : 
      63             :     /**
      64             :      * Get the currently displayed/selected part -- see setPart for further
      65             :      * details.
      66             :      */
      67           0 :     virtual int getPart()
      68             :     {
      69           0 :         return 0;
      70             :     }
      71             : 
      72             :     /**
      73             :      * Get the name of the currently displayed part, i.e. sheet in a spreadsheet
      74             :      * or slide in a presentation.
      75             :      */
      76           0 :     virtual OUString getPartName(int nPart)
      77             :     {
      78             :         (void) nPart;
      79           0 :         return OUString("");
      80             :     }
      81             : 
      82             :     /// @see lok::Document::setPartMode().
      83           0 :     virtual void setPartMode(int nPartMode)
      84             :     {
      85             :         (void) nPartMode;
      86           0 :     }
      87             : 
      88             :     /**
      89             :      * Setup various document properties that are needed for the document to
      90             :      * be renderable via tiled rendering.
      91             :      */
      92             :     virtual void initializeForTiledRendering() = 0;
      93             : 
      94             :     /**
      95             :      * Registers a callback that will be invoked whenever the tiled renderer
      96             :      * wants to notify the client about an event.
      97             :      *
      98             :      * @param pCallBack is the callback function
      99             :      * @param pData is private data of the client that will be sent back when the callback is invoked
     100             :      */
     101             :     virtual void registerCallback(LibreOfficeKitCallback pCallback, void* pData) = 0;
     102             : 
     103             :     /**
     104             :      * Posts a keyboard event on the document.
     105             :      *
     106             :      * @see lok::Document::postKeyEvent().
     107             :      */
     108             :     virtual void postKeyEvent(int nType, int nCharCode, int nKeyCode) = 0;
     109             : 
     110             :     /**
     111             :      * Posts a mouse event on the document.
     112             :      *
     113             :      * @see lok::Document::postMouseEvent().
     114             :      */
     115             :     virtual void postMouseEvent(int nType, int nX, int nY, int nCount) = 0;
     116             : 
     117             :     /**
     118             :      * Sets the start or end of a text selection.
     119             :      *
     120             :      * @see lok::Document::setTextSelection().
     121             :      */
     122             :     virtual void setTextSelection(int nType, int nX, int nY) = 0;
     123             : 
     124             :     /**
     125             :      * Adjusts the graphic selection.
     126             :      *
     127             :      * @see lok::Document::setGraphicSelection().
     128             :      */
     129             :     virtual void setGraphicSelection(int nType, int nX, int nY) = 0;
     130             : 
     131             :     /**
     132             :      * @see lok::Document::resetSelection().
     133             :      */
     134             :     virtual void resetSelection() = 0;
     135             : };
     136             : 
     137             : } // namespace vcl
     138             : 
     139             : #endif // INCLUDED_VCL_ITILEDRENDERABLE_HXX

Generated by: LCOV version 1.11