1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
11 #ifndef INCLUDED_VCL_ITILEDRENDERABLE_HXX
12 #define INCLUDED_VCL_ITILEDRENDERABLE_HXX
14 #define LOK_USE_UNSTABLE_API
15 #include <LibreOfficeKit/LibreOfficeKitTypes.h>
16 #include <tools/gen.hxx>
17 #include <vcl/virdev.hxx>
22 class VCL_DLLPUBLIC ITiledRenderable
25 virtual ~ITiledRenderable();
28 * Paint a tile to a given VirtualDevice.
30 * Output parameters are measured in pixels, tile parameters are in
33 virtual void paintTile( VirtualDevice
&rDevice
,
39 long nTileHeight
) = 0;
42 * Get the document size in twips.
44 virtual Size
getDocumentSize() = 0;
47 * Set the document "part", i.e. slide for a slideshow, and
48 * tab for a spreadsheet.
50 virtual void setPart( int nPart
)
56 * Get the number of parts -- see setPart for further details.
58 virtual int getParts()
64 * Get the currently displayed/selected part -- see setPart for further
73 * Get the name of the currently displayed part, i.e. sheet in a spreadsheet
74 * or slide in a presentation.
76 virtual OUString
getPartName(int nPart
)
82 /// @see lok::Document::setPartMode().
83 virtual void setPartMode(int nPartMode
)
89 * Setup various document properties that are needed for the document to
90 * be renderable via tiled rendering.
92 virtual void initializeForTiledRendering() = 0;
95 * Registers a callback that will be invoked whenever the tiled renderer
96 * wants to notify the client about an event.
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
101 virtual void registerCallback(LibreOfficeKitCallback pCallback
, void* pData
) = 0;
104 * Posts a keyboard event on the document.
106 * @see lok::Document::postKeyEvent().
108 virtual void postKeyEvent(int nType
, int nCharCode
, int nKeyCode
) = 0;
111 * Posts a mouse event on the document.
113 * @see lok::Document::postMouseEvent().
115 virtual void postMouseEvent(int nType
, int nX
, int nY
, int nCount
) = 0;
118 * Sets the start or end of a text selection.
120 * @see lok::Document::setTextSelection().
122 virtual void setTextSelection(int nType
, int nX
, int nY
) = 0;
125 * Gets the text selection.
127 * @see lok::Document::getTextSelection().
129 virtual OString
getTextSelection(const char* /*pMimeType*/, OString
& /*rUsedMimeType*/) { return OString(); }
132 * Adjusts the graphic selection.
134 * @see lok::Document::setGraphicSelection().
136 virtual void setGraphicSelection(int nType
, int nX
, int nY
) = 0;
139 * @see lok::Document::resetSelection().
141 virtual void resetSelection() = 0;
146 #endif // INCLUDED_VCL_ITILEDRENDERABLE_HXX