From ca8f1ff34e291b74068dace619e58c37ef169f88 Mon Sep 17 00:00:00 2001 From: Ashod Nakashian Date: Sun, 21 Oct 2018 19:29:38 -0400 Subject: LOK: support resizing windows And delegate resizing of floating windows. Currently used for resizing sidebars in LOK. Change-Id: Iadc1b71c15a7d16a8c9dd7246490ae6bd645644c Reviewed-on: https://gerrit.libreoffice.org/73509 Tested-by: Jenkins Reviewed-by: Noel Grandin --- include/LibreOfficeKit/LibreOfficeKit.h | 5 +++++ include/LibreOfficeKit/LibreOfficeKit.hxx | 14 ++++++++++++++ 2 files changed, 19 insertions(+) (limited to 'include/LibreOfficeKit') diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h index 896b441ff715..dedb75995930 100644 --- a/include/LibreOfficeKit/LibreOfficeKit.h +++ b/include/LibreOfficeKit/LibreOfficeKit.h @@ -384,6 +384,11 @@ struct _LibreOfficeKitDocumentClass /// @see lok::Document::moveSelectedParts(). void (*moveSelectedParts) (LibreOfficeKitDocument* pThis, int nPosition, bool bDuplicate); + /// Resize window with given id. + /// @see lok::Document::resizeWindow(). + void (*resizeWindow) (LibreOfficeKitDocument* pThis, unsigned nWindowId, + const int width, const int height); + #endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY }; diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx index 3bd1c50bb0be..c6f90dc1ae24 100644 --- a/include/LibreOfficeKit/LibreOfficeKit.hxx +++ b/include/LibreOfficeKit/LibreOfficeKit.hxx @@ -664,6 +664,20 @@ public: mpDoc->pClass->moveSelectedParts(mpDoc, nPosition, bDuplicate); } + /** + * Resize a window (dialog, popup, etc.) with give id. + * + * @param nWindowId + * @param width The width of the window. + * @param height The height of the window. + */ + void resizeWindow(unsigned nWindowId, + const int width, + const int height) + { + return mpDoc->pClass->resizeWindow(mpDoc, nWindowId, width, height); + } + #endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY }; -- cgit