diff options
author | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2020-10-02 23:38:46 +0200 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2020-10-06 12:18:07 +0200 |
commit | 27a3f9772c050c2d788703a07082dde4ba929c13 (patch) | |
tree | e72b8abd08c43a2240d2dfc1630dfe1a0d81aa8a /include | |
parent | e3daa3b3aa88ada77d4680a2df9ef534341cb618 (diff) |
Permit scrollable AWT tab pages a la scrolled Dialog
UNO dialogs since LibreOffice 4.0 permitted setting HScroll /
VScroll properties to enable scrolling for too large a content.
Conceptually clone this code over to TabPage as well, and register
necessary UNO properties in the toolkit UNO wrappers.
Add missing API documentation also to UnoControlDialogModel,
plus the new properties to the UnoControlTabPageModel.
Change-Id: Iff90f60d0152ca21e4fe61c31315b9e1feab0dea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103999
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/tabpage.hxx | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/include/vcl/tabpage.hxx b/include/vcl/tabpage.hxx index 17270d9b6c0f..10fe3d588ee3 100644 --- a/include/vcl/tabpage.hxx +++ b/include/vcl/tabpage.hxx @@ -25,6 +25,9 @@ #include <vcl/window.hxx> #include <vcl/IContext.hxx> +class ScrollBar; +class ScrollBarBox; + class VCL_DLLPUBLIC TabPage : public vcl::Window , public VclBuilderContainer @@ -34,6 +37,19 @@ private: using Window::ImplInit; SAL_DLLPRIVATE void ImplInit( vcl::Window* pParent, WinBits nStyle ); SAL_DLLPRIVATE void ImplInitSettings(); + void lcl_Scroll( long nX, long nY ); + DECL_LINK( ScrollBarHdl, ScrollBar*, void ); + + VclPtr<ScrollBar> m_pVScroll; + VclPtr<ScrollBar> m_pHScroll; + VclPtr<ScrollBarBox> m_aScrollBarBox; + Size maScrollArea; + bool mbHasHoriBar; + bool mbHasVertBar; + Point mnScrollPos; + long mnScrWidth; + enum ScrollBarVisibility { None, Vert, Hori, Both }; + ScrollBarVisibility maScrollVis; public: explicit TabPage( vcl::Window* pParent, WinBits nStyle = 0 ); @@ -54,6 +70,16 @@ public: virtual void SetPosPixel(const Point& rNewPos) override; virtual void SetSizePixel(const Size& rNewSize) override; virtual Size GetOptimalSize() const override; + + // for scrollable tabpage + virtual void Resize() override; + + void SetScrollWidth( long nWidth ); + void SetScrollHeight( long nHeight ); + void SetScrollLeft( long nLeft ); + void SetScrollTop( long Top ); + void setScrollVisibility( ScrollBarVisibility rState ); + void ResetScrollBars(); }; #endif // INCLUDED_VCL_TABPAGE_HXX |