LibreOffice Module vcl (master) 1
ITiledRenderable.hxx
Go to the documentation of this file.
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#pragma once
12
13#include <tools/gen.hxx>
14#include <rtl/ustring.hxx>
15#include <vcl/dllapi.h>
16#include <vcl/ptrstyle.hxx>
17#include <vcl/vclptr.hxx>
18#include <map>
19#include <com/sun/star/datatransfer/XTransferable.hpp>
21
22namespace com::sun::star::beans { struct PropertyValue; }
23namespace com::sun::star::datatransfer::clipboard { class XClipboard; }
24namespace com::sun::star::uno { template <class interface_type> class Reference; }
25namespace com::sun::star::uno { template <typename > class Sequence; }
26namespace vcl { class Window; }
27namespace tools { class JsonWriter; }
28
29class VirtualDevice;
30
31namespace vcl
32{
33 /*
34 * Map directly to css cursor styles to avoid further mapping in the client.
35 * Gtk (via gdk_cursor_new_from_name) also supports the same css cursor styles.
36 *
37 * This was created partially with help of the mappings in gtkdata.cxx.
38 * The list is incomplete as some cursor style simply aren't supported
39 * by css, it might turn out to be worth mapping some of these missing cursors
40 * to available cursors?
41 */
42 extern const std::map <PointerStyle, OString> gaLOKPointerMap;
43
44
45class VCL_DLLPUBLIC SAL_LOPLUGIN_ANNOTATE("crosscast") ITiledRenderable
46{
47public:
48
49 typedef std::map<OUString, OUString> StringMap;
50
51 virtual ~ITiledRenderable();
52
59 virtual void paintTile( VirtualDevice &rDevice,
60 int nOutputWidth,
61 int nOutputHeight,
62 int nTilePosX,
63 int nTilePosY,
64 tools::Long nTileWidth,
65 tools::Long nTileHeight ) = 0;
66
70 virtual Size getDocumentSize() = 0;
71
75 virtual Size getDataArea(long /*nPart*/)
76 {
77 return Size(1, 1);
78 }
79
86 virtual void setPart( int /*nPart*/, bool /*bAllowChangeFocus*/ = true ) {}
87
91 virtual int getParts()
92 {
93 return 1;
94 }
95
100 virtual int getPart()
101 {
102 return 0;
103 }
104
109 virtual OUString getPartName(int)
110 {
111 return OUString();
112 }
113
117 virtual VclPtr<vcl::Window> getDocWindow() = 0;
118
123 virtual OUString getPartHash(int nPart) = 0;
124
126 virtual void setPartMode(int) {}
127
131 virtual int getEditMode()
132 {
133 return 0;
134 }
135
139 virtual void setEditMode(int) {}
140
145 virtual void initializeForTiledRendering(const css::uno::Sequence<css::beans::PropertyValue>& rArguments) = 0;
146
152 virtual void postKeyEvent(int nType, int nCharCode, int nKeyCode) = 0;
153
159 virtual void postMouseEvent(int nType, int nX, int nY, int nCount, int nButtons, int nModifier) = 0;
160
166 virtual void setTextSelection(int nType, int nX, int nY) = 0;
167
171 virtual css::uno::Reference<css::datatransfer::XTransferable> getSelection() = 0;
172
178 virtual void setGraphicSelection(int nType, int nX, int nY) = 0;
179
183 virtual void resetSelection() = 0;
184
188 virtual OUString getPartPageRectangles()
189 {
190 return OUString();
191 }
192
199 virtual void getRowColumnHeaders(const tools::Rectangle& /*rRectangle*/, tools::JsonWriter& /*rJsonWriter*/)
200 {
201 }
202
222 virtual OString getSheetGeometryData(bool /*bColumns*/, bool /*bRows*/, bool /*bSizes*/,
223 bool /*bHidden*/, bool /*bFiltered*/, bool /*bGroups*/)
224 {
225 return "";
226 }
227
233 virtual void getCellCursor(tools::JsonWriter& /*rJsonWriter*/)
234 {
235 }
236
237 virtual PointerStyle getPointer() = 0;
238
240 virtual void setClipboard(const css::uno::Reference<css::datatransfer::clipboard::XClipboard>& xClipboard) = 0;
241
243 virtual bool isMimeTypeSupported() = 0;
244
253 virtual void setClientZoom(int /*nTilePixelWidth*/,
254 int /*nTilePixelHeight*/,
255 int /*nTileTwipWidth*/,
256 int /*nTileTwipHeight*/)
257 {}
258
260 virtual void setClientVisibleArea(const tools::Rectangle& /*rRectangle*/)
261 {
262 }
263
272 virtual void setOutlineState(bool /*bColumn*/, int /*nLevel*/, int /*nIndex*/, bool /*bHidden*/)
273 {
274 return;
275 }
276
280 virtual void getTrackedChanges(tools::JsonWriter&)
281 {
282 }
283
286 virtual void getTrackedChangeAuthors(tools::JsonWriter& /*rJsonWriter*/)
287 {
288 }
289
292 virtual void getPostIts(tools::JsonWriter& /*rJsonWriter*/)
293 {
294 }
295
298 virtual void getPostItsPos(tools::JsonWriter& /*rJsonWriter*/)
299 {
300 }
301
304 virtual void getRulerState(tools::JsonWriter& /*rJsonWriter*/)
305 {
306 }
307
308 /*
309 * Used for sheets in spreadsheet documents,
310 * and slides in presentation documents.
311 */
312 virtual OUString getPartInfo(int /*nPart*/)
313 {
314 return OUString();
315 }
316
322 virtual void selectPart(int /*nPart*/, int /*nSelect*/) {}
323
329 virtual void moveSelectedParts(int /*nPosition*/, bool /*bDuplicate*/) {}
330
332 virtual void completeFunction(const OUString& /*rFunctionName*/)
333 {
334 }
335
340 virtual bool isDisposed() const
341 {
342 return false;
343 }
344
349 virtual void executeFromFieldEvent(const StringMap&)
350 {
351 }
352
356 virtual std::vector<basegfx::B2DRange> getSearchResultRectangles(const char* /*pPayload*/)
357 {
358 return std::vector<basegfx::B2DRange>();
359 }
360
365 virtual void executeContentControlEvent(const StringMap&) {}
366
370 virtual void setPaintTextEdit(bool) {}
371
373 virtual bool supportsCommand(std::u16string_view /*rCommand*/) { return false; }
374
376 virtual void getCommandValues(tools::JsonWriter& /*rJsonWriter*/, std::string_view /*rCommand*/)
377 {
378 }
379
384 virtual OString getViewRenderState() { return rtl::OString(); }
385};
386} // namespace vcl
387
388/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
Reference
long Long
class VCL_DLLPUBLIC SAL_LOPLUGIN_ANNOTATE("crosscast") IPrioritable
const std::map< PointerStyle, OString > gaLOKPointerMap
PointerStyle
Definition: ptrstyle.hxx:26
std::map< OUString, OUString > StringMap
Definition: uiobject.hxx:47
std::map< OUString, OUString > StringMap