diff options
Diffstat (limited to 'include/vcl')
-rw-r--r-- | include/vcl/IDialogRenderable.hxx | 24 | ||||
-rw-r--r-- | include/vcl/dialog.hxx | 8 | ||||
-rw-r--r-- | include/vcl/window.hxx | 8 |
3 files changed, 19 insertions, 21 deletions
diff --git a/include/vcl/IDialogRenderable.hxx b/include/vcl/IDialogRenderable.hxx index ccb99cb0adb2..db3831ccd5c6 100644 --- a/include/vcl/IDialogRenderable.hxx +++ b/include/vcl/IDialogRenderable.hxx @@ -25,41 +25,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 3586c116b31d..76952b2f3cc5 100644 --- a/include/vcl/dialog.hxx +++ b/include/vcl/dialog.hxx @@ -48,10 +48,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(); @@ -65,10 +61,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 496a0743562c..08faef8e8519 100644 --- a/include/vcl/window.hxx +++ b/include/vcl/window.hxx @@ -435,6 +435,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; @@ -484,6 +485,8 @@ public: Color* pPaintColor = nullptr); }; +typedef sal_uInt32 LOKWindowId; + class VCL_DLLPUBLIC Window : public ::OutputDevice, public Resource { 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 */ ///@{ |