summaryrefslogtreecommitdiff
path: root/include/vcl
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2017-11-24 10:20:47 +0100
committerJan Holesovsky <kendy@collabora.com>2017-11-29 10:16:56 +0100
commitba8154d857aa815ba3c5b52987dc17be6eba7f48 (patch)
treeb1fe470f5123b1a15a4fb128cc706ff197ee3e2a /include/vcl
parentf2b6bffdedb12983d4ca2bab21fb68eeb3c3d08d (diff)
lokdialog: Move the Notifier down to vcl::Window.
We need to tunnel more than just dialogs, so this is the 1st step to get the Autofilter popup rendered. Change-Id: I6523a39ddc7a6eb2a204e48ab364130a5822f548
Diffstat (limited to 'include/vcl')
-rw-r--r--include/vcl/IDialogRenderable.hxx24
-rw-r--r--include/vcl/dialog.hxx8
-rw-r--r--include/vcl/window.hxx8
3 files changed, 19 insertions, 21 deletions
diff --git a/include/vcl/IDialogRenderable.hxx b/include/vcl/IDialogRenderable.hxx
index f606782692e3..20515c86d2a6 100644
--- a/include/vcl/IDialogRenderable.hxx
+++ b/include/vcl/IDialogRenderable.hxx
@@ -23,41 +23,39 @@ namespace vcl
typedef std::pair<const OString, const OString> LOKPayloadItem;
-typedef sal_uInt32 DialogID;
-
class VCL_DLLPUBLIC IDialogRenderable
{
public:
virtual ~IDialogRenderable();
- virtual void paintDialog(const DialogID& rDialogID, VirtualDevice &rDevice) = 0;
+ virtual void paintDialog(const LOKWindowId& rLOKWindowId, VirtualDevice &rDevice) = 0;
- virtual void getDialogInfo(const DialogID& rDialogID, OUString& rDialogTitle, int& rWidth, int& rHeight) = 0;
+ virtual void getDialogInfo(const LOKWindowId& rLOKWindowId, OUString& rDialogTitle, int& rWidth, int& rHeight) = 0;
- virtual void paintActiveFloatingWindow(const DialogID& rDialogID, VirtualDevice &rDevice,
+ virtual void paintActiveFloatingWindow(const LOKWindowId& rLOKWindowId, VirtualDevice &rDevice,
int& nOutputWidth, int& nOutputHeight) = 0;
- virtual void postDialogKeyEvent(const DialogID& rDialogID, int nType,
+ virtual void postDialogKeyEvent(const LOKWindowId& rLOKWindowId, int nType,
int nCharCode, int nKeyCode) = 0;
- virtual void postDialogMouseEvent(const DialogID& rDialogID, int nType, int nX, int nY,
+ virtual void postDialogMouseEvent(const LOKWindowId& rLOKWindowId, int nType, int nX, int nY,
int nCount, int nButtons, int nModifier) = 0;
- virtual void postDialogChildMouseEvent(const DialogID& rDialogID, int nType, int nX, int nY,
+ virtual void postDialogChildMouseEvent(const LOKWindowId& rLOKWindowId, int nType, int nX, int nY,
int nCount, int nButtons, int nModifier) = 0;
};
-class VCL_DLLPUBLIC IDialogNotifier
+class VCL_DLLPUBLIC ILibreOfficeKitNotifier
{
public:
- virtual ~IDialogNotifier() {}
+ virtual ~ILibreOfficeKitNotifier() {}
// Callbacks
- virtual void notifyDialog(const DialogID& rDialogID,
+ virtual void notifyDialog(const LOKWindowId& rLOKWindowId,
const OUString& rAction,
- const std::vector<LOKPayloadItem>& rPayload = std::vector<LOKPayloadItem>()) = 0;
+ const std::vector<LOKPayloadItem>& rPayload = std::vector<LOKPayloadItem>()) const = 0;
- virtual void notifyDialogChild(const DialogID& rDialogID, const OUString& rAction, const Point& rPos) = 0;
+ virtual void notifyDialogChild(const LOKWindowId& rLOKWindowId, const OUString& rAction, const Point& rPos) const = 0;
};
} // namespace vcl
diff --git a/include/vcl/dialog.hxx b/include/vcl/dialog.hxx
index e4d9f88f6d83..4347917b7675 100644
--- a/include/vcl/dialog.hxx
+++ b/include/vcl/dialog.hxx
@@ -57,10 +57,6 @@ private:
VclPtr<VclButtonBox> mpActionArea;
VclPtr<VclBox> mpContentArea;
- vcl::IDialogNotifier* mpDialogNotifier; // to emit LOK callbacks
-
- static vcl::DialogID mnLastDialogId;
-
SAL_DLLPRIVATE void ImplInitDialogData();
SAL_DLLPRIVATE void ImplInitSettings();
SAL_DLLPRIVATE VclPtr<vcl::Window> AddBorderWindow(vcl::Window* pParent, WinBits nBits);
@@ -75,10 +71,6 @@ private:
protected:
using Window::ImplInit;
SAL_DLLPRIVATE void ImplInit( vcl::Window* pParent, WinBits nStyle, InitFlag eFlag = InitFlag::Default );
- /// Dialog ID (used for LOK)
- vcl::DialogID maID;
- /// Necessary to register dialog notifier instance to emit LOK callbacks
- void registerDialogNotifier(vcl::IDialogNotifier* pDialogNotifier);
public:
SAL_DLLPRIVATE bool IsInClose() const { return mbInClose; }
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 42cbfcc79df9..be9d88d48adc 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -430,6 +430,7 @@ const char* ImplDbgCheckWindow( const void* pObj );
namespace vcl { class Window; }
namespace vcl { class Cursor; }
+namespace vcl { class ILibreOfficeKitNotifier; }
class Dialog;
class WindowImpl;
class PaintHelper;
@@ -488,6 +489,8 @@ public:
Color const * pPaintColor = nullptr);
};
+typedef sal_uInt32 LOKWindowId;
+
class VCL_DLLPUBLIC Window : public ::OutputDevice
{
friend class ::vcl::Cursor;
@@ -1200,6 +1203,11 @@ public:
void SetComponentInterface( css::uno::Reference< css::awt::XWindowPeer > const & xIFace );
+ /// Interface to register for dialog tunneling.
+ void SetLOKNotifier(const vcl::ILibreOfficeKitNotifier* pNotifier);
+ const vcl::ILibreOfficeKitNotifier* GetLOKNotifier() const;
+ vcl::LOKWindowId GetLOKWindowId() const;
+
/** @name Accessibility
*/
///@{