summaryrefslogtreecommitdiff
path: root/include/vcl
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2017-11-24 18:50:05 +0100
committerJan Holesovsky <kendy@collabora.com>2017-11-29 10:16:57 +0100
commite2ae221f6164ba240da7d6470fd52c1982fa07d2 (patch)
treeb8d37d7566c0bc4435c6c02e03d632912843ee0e /include/vcl
parent5de24bea47e7ae971a53b51ee7d1b85d134bbe52 (diff)
lokdialog: Move the painting down to Window, and enable Calc and Impress.
Tested with .uno:FormatCellDialog in Calc, Impress not tested. Change-Id: I6d911c29616988db0625be9e2a63cf2172c69ee8
Diffstat (limited to 'include/vcl')
-rw-r--r--include/vcl/IDialogRenderable.hxx36
-rw-r--r--include/vcl/ITiledRenderable.hxx6
-rw-r--r--include/vcl/dialog.hxx13
-rw-r--r--include/vcl/window.hxx20
4 files changed, 32 insertions, 43 deletions
diff --git a/include/vcl/IDialogRenderable.hxx b/include/vcl/IDialogRenderable.hxx
index 20515c86d2a6..281d04385aee 100644
--- a/include/vcl/IDialogRenderable.hxx
+++ b/include/vcl/IDialogRenderable.hxx
@@ -11,51 +11,31 @@
#ifndef INCLUDED_VCL_IDIALOGRENDERABLE_HXX
#define INCLUDED_VCL_IDIALOGRENDERABLE_HXX
+#include <vcl/dllapi.h>
+
#include <tools/gen.hxx>
-#include <vcl/pointr.hxx>
-#include <vcl/virdev.hxx>
-#include <vcl/window.hxx>
+#include <rtl/ustring.hxx>
-#include <map>
+#include <vector>
namespace vcl
{
typedef std::pair<const OString, const OString> LOKPayloadItem;
-class VCL_DLLPUBLIC IDialogRenderable
-{
-public:
- virtual ~IDialogRenderable();
-
- virtual void paintDialog(const LOKWindowId& rLOKWindowId, VirtualDevice &rDevice) = 0;
-
- virtual void getDialogInfo(const LOKWindowId& rLOKWindowId, OUString& rDialogTitle, int& rWidth, int& rHeight) = 0;
-
- virtual void paintActiveFloatingWindow(const LOKWindowId& rLOKWindowId, VirtualDevice &rDevice,
- int& nOutputWidth, int& nOutputHeight) = 0;
-
- virtual void postDialogKeyEvent(const LOKWindowId& rLOKWindowId, int nType,
- int nCharCode, int nKeyCode) = 0;
-
- virtual void postDialogMouseEvent(const LOKWindowId& rLOKWindowId, int nType, int nX, int nY,
- int nCount, int nButtons, int nModifier) = 0;
-
- virtual void postDialogChildMouseEvent(const LOKWindowId& rLOKWindowId, int nType, int nX, int nY,
- int nCount, int nButtons, int nModifier) = 0;
-};
+typedef sal_uInt32 LOKWindowId;
class VCL_DLLPUBLIC ILibreOfficeKitNotifier
{
public:
virtual ~ILibreOfficeKitNotifier() {}
- // Callbacks
- virtual void notifyDialog(const LOKWindowId& rLOKWindowId,
+ /// Callbacks
+ virtual void notifyWindow(vcl::LOKWindowId nLOKWindowId,
const OUString& rAction,
const std::vector<LOKPayloadItem>& rPayload = std::vector<LOKPayloadItem>()) const = 0;
- virtual void notifyDialogChild(const LOKWindowId& rLOKWindowId, const OUString& rAction, const Point& rPos) const = 0;
+ virtual void notifyWindowChild(vcl::LOKWindowId nLOKWindowId, const OUString& rAction, const Point& rPos) const = 0;
};
} // namespace vcl
diff --git a/include/vcl/ITiledRenderable.hxx b/include/vcl/ITiledRenderable.hxx
index 7b0720a429b7..016704bb09db 100644
--- a/include/vcl/ITiledRenderable.hxx
+++ b/include/vcl/ITiledRenderable.hxx
@@ -228,6 +228,12 @@ public:
{
return OUString();
}
+
+ /**
+ * Find the window/dialog with the right ID for tunneling of windows,
+ * dialogs or pop-ups.
+ */
+ virtual VclPtr<Window> findWindow(vcl::LOKWindowId nLOKWindowId) const = 0;
};
} // namespace vcl
diff --git a/include/vcl/dialog.hxx b/include/vcl/dialog.hxx
index 4347917b7675..30fae84afa9a 100644
--- a/include/vcl/dialog.hxx
+++ b/include/vcl/dialog.hxx
@@ -78,20 +78,9 @@ public:
virtual void LogicInvalidate(const tools::Rectangle* pRectangle) override;
void InvalidateFloatingWindow(const Point& rPos);
void CloseFloatingWindow();
- Size PaintActiveFloatingWindow(VirtualDevice& rDevice) const;
/// Paints the current dialog to the given virtual device
- void paintDialog(VirtualDevice& rDevice);
- void LogicMouseButtonDown(const MouseEvent& rMouseEvent);
- void LogicMouseButtonUp(const MouseEvent& rMouseEvent);
- void LogicMouseMove(const MouseEvent& rMouseEvent);
- void LogicMouseButtonDownChild(const MouseEvent& rMouseEvent);
- void LogicMouseButtonUpChild(const MouseEvent& rMouseEvent);
- void LogicMouseMoveChild(const MouseEvent& rMouseEvent);
-
- void LOKKeyInput(const KeyEvent& rKeyEvent);
- void LOKKeyUp(const KeyEvent& rKeyEvent);
- void LOKCursor(const OUString& rAction, const std::vector<vcl::LOKPayloadItem>& rPayload);
+ void paintDialog(VirtualDevice& rDevice) override;
protected:
explicit Dialog( WindowType nType );
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index be9d88d48adc..b0ae9d319d49 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -34,6 +34,7 @@
#include <vcl/salnativewidgets.hxx>
#include <vcl/uitest/factory.hxx>
#include <vcl/vclevent.hxx>
+#include <vcl/IDialogRenderable.hxx>
#include <rtl/ustring.hxx>
#include <rtl/ref.hxx>
#include <cppuhelper/weakref.hxx>
@@ -489,8 +490,6 @@ public:
Color const * pPaintColor = nullptr);
};
-typedef sal_uInt32 LOKWindowId;
-
class VCL_DLLPUBLIC Window : public ::OutputDevice
{
friend class ::vcl::Cursor;
@@ -1203,11 +1202,26 @@ public:
void SetComponentInterface( css::uno::Reference< css::awt::XWindowPeer > const & xIFace );
- /// Interface to register for dialog tunneling.
+ /// Interface to register for dialog / window tunneling.
void SetLOKNotifier(const vcl::ILibreOfficeKitNotifier* pNotifier);
const vcl::ILibreOfficeKitNotifier* GetLOKNotifier() const;
vcl::LOKWindowId GetLOKWindowId() const;
+ /// Dialog / window tunneling related methods.
+ virtual void paintDialog(VirtualDevice& rDevice);
+ Size PaintActiveFloatingWindow(VirtualDevice& rDevice) const;
+
+ void LogicMouseButtonDown(const MouseEvent& rMouseEvent);
+ void LogicMouseButtonUp(const MouseEvent& rMouseEvent);
+ void LogicMouseMove(const MouseEvent& rMouseEvent);
+ void LogicMouseButtonDownChild(const MouseEvent& rMouseEvent);
+ void LogicMouseButtonUpChild(const MouseEvent& rMouseEvent);
+ void LogicMouseMoveChild(const MouseEvent& rMouseEvent);
+
+ void LOKKeyInput(const KeyEvent& rKeyEvent);
+ void LOKKeyUp(const KeyEvent& rKeyEvent);
+ void LOKCursor(const OUString& rAction, const std::vector<vcl::LOKPayloadItem>& rPayload);
+
/** @name Accessibility
*/
///@{