diff options
author | Pranav Kant <pranavk@collabora.co.uk> | 2017-11-22 22:25:20 +0530 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2017-11-29 10:16:53 +0100 |
commit | 871eb68e14631d22aeb00ec33f0e5d801291942e (patch) | |
tree | d1f3407d7f94dc18461bce7d1260f56db5209637 /include/vcl | |
parent | 2d508dcc9d6e9d589af32a76468ef3247f8c6674 (diff) |
lokdialog: Changed dialog painting to allow for modal dialogs
Split IDialogNotifier from IDialogRenderable and make SfxViewShell
implement it.
We now just send the dialog UNO command to the backend and wait for core
to emit a 'created' dialog callback which signals dialog creation in the
backend. The client is then supposed to send the paint commands for
rendering the dialog.
Change-Id: I1bfbce83c17955fa0212408376d6bcd1b2d2d1dd
Diffstat (limited to 'include/vcl')
-rw-r--r-- | include/vcl/IDialogRenderable.hxx | 6 | ||||
-rw-r--r-- | include/vcl/dialog.hxx | 10 |
2 files changed, 11 insertions, 5 deletions
diff --git a/include/vcl/IDialogRenderable.hxx b/include/vcl/IDialogRenderable.hxx index 4137e960edb9..9a63830566f0 100644 --- a/include/vcl/IDialogRenderable.hxx +++ b/include/vcl/IDialogRenderable.hxx @@ -45,6 +45,12 @@ public: virtual void postDialogChildMouseEvent(const DialogID& rDialogID, int nType, int nX, int nY, int nCount, int nButtons, int nModifier) = 0; +}; + +class VCL_DLLPUBLIC IDialogNotifier +{ +public: + virtual ~IDialogNotifier() {} // Callbacks virtual void notifyDialog(const DialogID& rDialogID, diff --git a/include/vcl/dialog.hxx b/include/vcl/dialog.hxx index 8d84aab17606..874828f92a0e 100644 --- a/include/vcl/dialog.hxx +++ b/include/vcl/dialog.hxx @@ -57,7 +57,7 @@ private: VclPtr<VclButtonBox> mpActionArea; VclPtr<VclBox> mpContentArea; - vcl::IDialogRenderable* mpDialogRenderable; // to emit LOK callbacks + vcl::IDialogNotifier* mpDialogNotifier; // to emit LOK callbacks SAL_DLLPRIVATE void ImplInitDialogData(); SAL_DLLPRIVATE void ImplInitSettings(); @@ -73,8 +73,10 @@ private: protected: using Window::ImplInit; SAL_DLLPRIVATE void ImplInit( vcl::Window* pParent, WinBits nStyle, InitFlag eFlag = InitFlag::Default ); - OUString maID; // Dialog ID (UNO name) for this dialog (set - // and used by LOK for now) + /// Dialog ID (UNO name) for this dialog + OUString maID; + /// Necessary to register dialog notifier instance to emit LOK callbacks + void registerDialogNotifier(vcl::IDialogNotifier* pDialogNotifier); public: SAL_DLLPRIVATE bool IsInClose() const { return mbInClose; } @@ -84,8 +86,6 @@ public: void CloseFloatingWindow(); Size PaintActiveFloatingWindow(VirtualDevice& rDevice) const; - /// Necessary to register dialog renderable instance to emit LOK callbacks - void registerDialogRenderable(vcl::IDialogRenderable* pDialogRenderable, const OUString& aDialogId); /// Paints the current dialog to the given virtual device void paintDialog(VirtualDevice& rDevice); void LogicMouseButtonDown(const MouseEvent& rMouseEvent); |