LibreOffice Module sfx2 (master) 1
lokcallback.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#pragma once
11
12#include <sal/types.h>
13
14namespace rtl
15{
16class OString;
17class OStringBuffer;
18}
19namespace tools
20{
21class Rectangle;
22}
23
24// An extended callback type that allows passing in also some binary data,
25// so that post-processing the messages does not require conversions
26// from and to strings.
27
28// TODO: It might possibly make sense to drop the generic type/payload function
29// and have only a dedicated function for each message type?
30
31class SAL_NO_VTABLE SAL_DLLPUBLIC_RTTI SfxLokCallbackInterface
32{
33public:
35 // LibreOfficeKitCallback equivalent.
36 virtual void libreOfficeKitViewCallback(int nType, const rtl::OString& pPayload) = 0;
37 // Callback that explicitly provides view id (which is also included in the payload).
38 virtual void libreOfficeKitViewCallbackWithViewId(int nType, const rtl::OString& pPayload,
39 int nViewId)
40 = 0;
41 // LOK_CALLBACK_INVALIDATE_TILES
42 // nPart is either part, -1 for all-parts, or INT_MIN if
43 // comphelper::LibreOfficeKit::isPartInInvalidation() is not set
44 virtual void libreOfficeKitViewInvalidateTilesCallback(const tools::Rectangle* pRect, int nPart,
45 int nMode)
46 = 0;
47 // A message of the given type should be sent, for performance purpose only a notification
48 // is given here, details about the message should be queried from SfxViewShell when necessary.
49 // This is used for messages that are generated often but only the last one is needed.
50 virtual void libreOfficeKitViewUpdatedCallback(int nType) = 0;
51 // Like libreOfficeKitViewUpdatedCallback(), but a last message is needed for each nViewId value.
52 // SfxViewShell:getLOKPayload() will be called on nSourceViewId view.
53 virtual void libreOfficeKitViewUpdatedCallbackPerViewId(int nType, int nViewId,
54 int nSourceViewId)
55 = 0;
56 // There are pending invalidate tiles calls that need to be processed.
57 // A call to SfxViewShell::flushPendingLOKInvalidateTiles() should be scheduled.
59 virtual void dumpState(rtl::OStringBuffer& rState) = 0;
60};
61
62/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void dumpState(rtl::OStringBuffer &rState)=0
virtual void libreOfficeKitViewCallbackWithViewId(int nType, const rtl::OString &pPayload, int nViewId)=0
virtual void libreOfficeKitViewCallback(int nType, const rtl::OString &pPayload)=0
virtual void libreOfficeKitViewAddPendingInvalidateTiles()=0
virtual void libreOfficeKitViewInvalidateTilesCallback(const tools::Rectangle *pRect, int nPart, int nMode)=0
virtual void libreOfficeKitViewUpdatedCallbackPerViewId(int nType, int nViewId, int nSourceViewId)=0
virtual void libreOfficeKitViewUpdatedCallback(int nType)=0
virtual ~SfxLokCallbackInterface()
Definition: lokcallback.hxx:34
#define SAL_NO_VTABLE