Branch libreoffice-5-0-4
[LibreOffice.git] / include / vcl / ITiledRenderable.hxx
blobd212519bc9befb59b88096c4420d7fc7c2fdb907
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 */
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>
19 namespace vcl
22 class VCL_DLLPUBLIC ITiledRenderable
24 public:
25 virtual ~ITiledRenderable();
27 /**
28 * Paint a tile to a given VirtualDevice.
30 * Output parameters are measured in pixels, tile parameters are in
31 * twips.
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;
41 /**
42 * Get the document size in twips.
44 virtual Size getDocumentSize() = 0;
46 /**
47 * Set the document "part", i.e. slide for a slideshow, and
48 * tab for a spreadsheet.
50 virtual void setPart( int nPart )
52 (void) nPart;
55 /**
56 * Get the number of parts -- see setPart for further details.
58 virtual int getParts()
60 return 1;
63 /**
64 * Get the currently displayed/selected part -- see setPart for further
65 * details.
67 virtual int getPart()
69 return 0;
72 /**
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)
78 (void) nPart;
79 return OUString("");
82 /// @see lok::Document::setPartMode().
83 virtual void setPartMode(int nPartMode)
85 (void) nPartMode;
88 /**
89 * Setup various document properties that are needed for the document to
90 * be renderable via tiled rendering.
92 virtual void initializeForTiledRendering() = 0;
94 /**
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;
144 } // namespace vcl
146 #endif // INCLUDED_VCL_ITILEDRENDERABLE_HXX