diff options
Diffstat (limited to 'include/vcl')
-rw-r--r-- | include/vcl/ITiledRenderable.hxx | 44 | ||||
-rw-r--r-- | include/vcl/window.hxx | 7 |
2 files changed, 51 insertions, 0 deletions
diff --git a/include/vcl/ITiledRenderable.hxx b/include/vcl/ITiledRenderable.hxx index ab7b4f027a45..9b0e7dbe8e3a 100644 --- a/include/vcl/ITiledRenderable.hxx +++ b/include/vcl/ITiledRenderable.hxx @@ -14,6 +14,8 @@ #include <LibreOfficeKit/LibreOfficeKitTypes.h> #include <tools/gen.hxx> #include <svx/ruler.hxx> +#include <vcl/event.hxx> +#include <vcl/vclevent.hxx> #include <vcl/pointr.hxx> #include <vcl/ptrstyle.hxx> #include <vcl/virdev.hxx> @@ -88,6 +90,48 @@ protected: int mnTilePixelWidth, mnTilePixelHeight; int mnTileTwipWidth, mnTileTwipHeight; public: + struct LOKAsyncEventData + { + VclPtr<vcl::Window> mpWindow; + VclEventId mnEvent; + MouseEvent maMouseEvent; + KeyEvent maKeyEvent; + }; + + static void LOKPostAsyncEvent(void* pEv, void*) + { + LOKAsyncEventData* pLOKEv = static_cast<LOKAsyncEventData*>(pEv); + switch (pLOKEv->mnEvent) + { + case VclEventId::WindowKeyInput: + pLOKEv->mpWindow->KeyInput(pLOKEv->maKeyEvent); + break; + case VclEventId::WindowKeyUp: + pLOKEv->mpWindow->KeyUp(pLOKEv->maKeyEvent); + break; + case VclEventId::WindowMouseButtonDown: + pLOKEv->mpWindow->LogicMouseButtonDown(pLOKEv->maMouseEvent); + // Invoke the context menu + if (pLOKEv->maMouseEvent.GetButtons() & MOUSE_RIGHT) + { + const CommandEvent aCEvt(pLOKEv->maMouseEvent.GetPosPixel(), CommandEventId::ContextMenu, true, nullptr); + pLOKEv->mpWindow->Command(aCEvt); + } + break; + case VclEventId::WindowMouseButtonUp: + pLOKEv->mpWindow->LogicMouseButtonUp(pLOKEv->maMouseEvent); + break; + case VclEventId::WindowMouseMove: + pLOKEv->mpWindow->LogicMouseMove(pLOKEv->maMouseEvent); + break; + default: + assert(false); + break; + } + + delete pLOKEv; + } + virtual ~ITiledRenderable(); /** diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx index 9acf3450a391..e6a56466d6e6 100644 --- a/include/vcl/window.hxx +++ b/include/vcl/window.hxx @@ -1229,6 +1229,13 @@ public: /// Dialog / window tunneling related methods. Size PaintActiveFloatingWindow(VirtualDevice& rDevice) const; + /// Same as MouseButtonDown(), but coordinates are in logic unit. used for LOK + virtual void LogicMouseButtonDown(const MouseEvent&) {}; + /// Same as MouseButtonUp(), but coordinates are in logic unit. used for LOK + virtual void LogicMouseButtonUp(const MouseEvent&) {}; + /// Same as MouseMove(), but coordinates are in logic unit. used for LOK + virtual void LogicMouseMove(const MouseEvent&) {}; + /** @name Accessibility */ ///@{ |