diff options
author | Jan Holesovsky <kendy@collabora.com> | 2017-11-24 18:50:05 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2017-11-29 10:16:57 +0100 |
commit | e2ae221f6164ba240da7d6470fd52c1982fa07d2 (patch) | |
tree | b8d37d7566c0bc4435c6c02e03d632912843ee0e /include | |
parent | 5de24bea47e7ae971a53b51ee7d1b85d134bbe52 (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')
-rw-r--r-- | include/sfx2/lokhelper.hxx | 4 | ||||
-rw-r--r-- | include/sfx2/viewsh.hxx | 4 | ||||
-rw-r--r-- | include/vcl/IDialogRenderable.hxx | 36 | ||||
-rw-r--r-- | include/vcl/ITiledRenderable.hxx | 6 | ||||
-rw-r--r-- | include/vcl/dialog.hxx | 13 | ||||
-rw-r--r-- | include/vcl/window.hxx | 20 |
6 files changed, 36 insertions, 47 deletions
diff --git a/include/sfx2/lokhelper.hxx b/include/sfx2/lokhelper.hxx index 170d65a794d0..00288d04faac 100644 --- a/include/sfx2/lokhelper.hxx +++ b/include/sfx2/lokhelper.hxx @@ -42,11 +42,11 @@ public: /// Same as notifyOtherViews(), but works on a selected "other" view, not on all of them. static void notifyOtherView(SfxViewShell* pThisView, SfxViewShell const* pOtherView, int nType, const OString& rKey, const OString& rPayload); /// Emits a LOK_CALLBACK_DIALOG - static void notifyDialog(vcl::LOKWindowId nDialogId, + static void notifyWindow(vcl::LOKWindowId nDialogId, const OUString& rAction, const std::vector<vcl::LOKPayloadItem>& rPayload = std::vector<vcl::LOKPayloadItem>()); /// Emits a LOK_CALLBACK_DIALOG_CHILD - static void notifyDialogChild(vcl::LOKWindowId nDialogId, const OUString& rAction, const Point& rPos); + static void notifyWindowChild(vcl::LOKWindowId nDialogId, const OUString& rAction, const Point& rPos); /// Emits a LOK_CALLBACK_INVALIDATE_TILES, but tweaks it according to setOptionalFeatures() if needed. static void notifyInvalidation(SfxViewShell const* pThisView, const OString& rPayload); /// A special value to signify 'infinity'. diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx index 2fcf7283399a..d0d68b3b48ae 100644 --- a/include/sfx2/viewsh.hxx +++ b/include/sfx2/viewsh.hxx @@ -227,8 +227,8 @@ public: void UnregisterDlg(vcl::LOKWindowId nDialogId); // ILibreOfficeKitNotifier - virtual void notifyDialog(const vcl::LOKWindowId& rDialogId, const OUString& rAction, const std::vector<vcl::LOKPayloadItem>& rPayload = std::vector<vcl::LOKPayloadItem>()) const override; - virtual void notifyDialogChild(const vcl::LOKWindowId& rDialogId, const OUString& rAction, const Point& rPos) const override; + virtual void notifyWindow(vcl::LOKWindowId nLOKWindowId, const OUString& rAction, const std::vector<vcl::LOKPayloadItem>& rPayload = std::vector<vcl::LOKPayloadItem>()) const override; + virtual void notifyWindowChild(vcl::LOKWindowId nLOKWindowId, const OUString& rAction, const Point& rPos) const override; // Focus, KeyInput, Cursor virtual void ShowCursor( bool bOn = true ); 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 */ ///@{ |