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-11 03:07:31 +0200 |
commit | b3f2530aa2767ba43cd4702422fc3ed0d37821d6 (patch) | |
tree | 649d97782b7181509010f3757a014e95172a915d /include | |
parent | fca525d570f4fada3db1a9bbee2e88a5a02839d9 (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/+/103942
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/tabpage.hxx | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/include/vcl/tabpage.hxx b/include/vcl/tabpage.hxx index bd308a96a355..a357ec50f55e 100644 --- a/include/vcl/tabpage.hxx +++ b/include/vcl/tabpage.hxx @@ -24,6 +24,9 @@ #include <vcl/window.hxx> #include <vcl/IContext.hxx> +class ScrollBar; +class ScrollBarBox; + class VCL_DLLPUBLIC TabPage : public vcl::Window , public vcl::IContext @@ -32,10 +35,24 @@ 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 ); virtual ~TabPage() override; + virtual void dispose() override; virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; virtual void Draw( OutputDevice* pDev, const Point& rPos, DrawFlags nFlags ) override; @@ -48,6 +65,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 |