summaryrefslogtreecommitdiff
path: root/include/LibreOfficeKit
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2018-10-21 19:29:38 -0400
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-07-25 19:25:01 +0200
commitca8f1ff34e291b74068dace619e58c37ef169f88 (patch)
tree3746aeb309ebc75f38d017d5f01a2d21e7b88368 /include/LibreOfficeKit
parent987c03d5c237c6a86ac886991435220e7381ced1 (diff)
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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/LibreOfficeKit')
-rw-r--r--include/LibreOfficeKit/LibreOfficeKit.h5
-rw-r--r--include/LibreOfficeKit/LibreOfficeKit.hxx14
2 files changed, 19 insertions, 0 deletions
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
};