summaryrefslogtreecommitdiff
path: root/include/vcl
diff options
context:
space:
mode:
authorMarco Cecchetti <marco.cecchetti@collabora.com>2023-02-05 17:47:34 +0100
committerMarco Cecchetti <marco.cecchetti@collabora.com>2023-03-07 19:30:11 +0000
commit7adfecb0f5947ae258226c8d1652546f81577026 (patch)
tree722ef84394ffe68f635945d4fc3ebc48e5b0e122 /include/vcl
parentc596fd59dc75823002bdfd3676d600a56e3bfb5e (diff)
lok: form controls: rendering and mouse event forwarding
What we got - Most controls rendered on Writer and Impress (on Calc already implemented by Tomaž Vajngerl) - Text labels rendered correctly - Mouse events forwarded to controls - Control state changed on click for Writer and Calc - Control invalidation for all apps - Fixed broken LOK_CALLBACK_MOUSE_POINTER msg - Correct pointer style when mouse is hovering over a control Need to be improved - in impress click method for a control is not executed even if the mouse event is forwarded correctly - avoid not needed control invalidations (as the one occurring on document autosaving) Change-Id: I4d5012af7f90a2c726b6b6b5b068e2be1ed5568a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146569 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147320 Tested-by: Jenkins Reviewed-by: Marco Cecchetti <marco.cecchetti@collabora.com>
Diffstat (limited to 'include/vcl')
-rw-r--r--include/vcl/DocWindow.hxx30
-rw-r--r--include/vcl/IDialogRenderable.hxx6
-rw-r--r--include/vcl/ctrl.hxx3
-rw-r--r--include/vcl/svapp.hxx2
-rw-r--r--include/vcl/window.hxx2
5 files changed, 41 insertions, 2 deletions
diff --git a/include/vcl/DocWindow.hxx b/include/vcl/DocWindow.hxx
new file mode 100644
index 000000000000..681ad110410d
--- /dev/null
+++ b/include/vcl/DocWindow.hxx
@@ -0,0 +1,30 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#ifndef INCLUDED_VCL_DOCWINDOW_HXX
+#define INCLUDED_VCL_DOCWINDOW_HXX
+
+#include <vcl/window.hxx>
+
+namespace vcl
+{
+class VCL_DLLPUBLIC DocWindow : public Window
+{
+ // inherit all Window constructors
+ using Window::Window;
+
+public:
+ virtual void SetPointer(PointerStyle) override;
+};
+} // namespace vcl
+
+#endif // INCLUDED_VCL_DOCWINDOW_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/IDialogRenderable.hxx b/include/vcl/IDialogRenderable.hxx
index bb5480f1bf4f..d280aad3f006 100644
--- a/include/vcl/IDialogRenderable.hxx
+++ b/include/vcl/IDialogRenderable.hxx
@@ -13,11 +13,12 @@
#include <config_options.h>
#include <vcl/dllapi.h>
-
#include <rtl/ustring.hxx>
#include <vector>
+namespace tools { class Rectangle; }
+
class SfxItemSet;
namespace vcl
@@ -38,6 +39,9 @@ public:
const std::vector<LOKPayloadItem>& rPayload = std::vector<LOKPayloadItem>()) const = 0;
virtual void libreOfficeKitViewCallback(int nType, const char* pPayload) const = 0;
+
+ /// Emits a LOK_CALLBACK_INVALIDATE_TILES.
+ virtual void notifyInvalidation(tools::Rectangle const *) const = 0;
};
} // namespace vcl
diff --git a/include/vcl/ctrl.hxx b/include/vcl/ctrl.hxx
index 6300e27a747a..c71105731cb1 100644
--- a/include/vcl/ctrl.hxx
+++ b/include/vcl/ctrl.hxx
@@ -229,6 +229,9 @@ public:
vcl::Font GetUnzoomedControlPointFont() const;
void SetShowAccelerator (bool val);
+
+ /// Notify the LOK client about an invalidated area.
+ virtual void LogicInvalidate( const tools::Rectangle* pRectangle ) override;
};
#endif // INCLUDED_VCL_CTRL_HXX
diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx
index 326b8b3761ea..eacf9e779b5e 100644
--- a/include/vcl/svapp.hxx
+++ b/include/vcl/svapp.hxx
@@ -1365,6 +1365,8 @@ public:
const OUString& rAction,
const std::vector<vcl::LOKPayloadItem>& rPayload = std::vector<vcl::LOKPayloadItem>()) const override;
virtual void libreOfficeKitViewCallback(int nType, const char* pPayload) const override;
+ virtual void notifyInvalidation(tools::Rectangle const *) const override;
+
private:
DECL_DLLPRIVATE_STATIC_LINK( Application, PostEventHandler, void*, void );
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 18c590ac9c5c..e595a2ba1690 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -1018,7 +1018,7 @@ public:
void ReleaseMouse();
bool IsMouseCaptured() const;
- void SetPointer( PointerStyle );
+ virtual void SetPointer( PointerStyle );
PointerStyle GetPointer() const;
void EnableChildPointerOverwrite( bool bOverwrite );
void SetPointerPosPixel( const Point& rPos );