diff options
author | Noel Power <noel.power@suse.com> | 2012-09-04 20:12:45 +0100 |
---|---|---|
committer | Noel Power <noel.power@suse.com> | 2012-09-11 16:04:10 +0100 |
commit | 613f8a3137e0af2e97214b4b1c2da8c87b3f8889 (patch) | |
tree | ab77014d527534998bb0ca29a0752a6f5f965322 /toolkit/inc | |
parent | 744d6e22bb087854b0535c660dcc5b4b85de2874 (diff) |
attempt own scroll
Change-Id: I4abc00bf4fcebb098b63cc2c3638e0d573381ca5
Diffstat (limited to 'toolkit/inc')
-rw-r--r-- | toolkit/inc/toolkit/awt/scrollabledialog.hxx | 21 | ||||
-rw-r--r-- | toolkit/inc/toolkit/helper/property.hxx | 2 |
2 files changed, 22 insertions, 1 deletions
diff --git a/toolkit/inc/toolkit/awt/scrollabledialog.hxx b/toolkit/inc/toolkit/awt/scrollabledialog.hxx index 19cd1e150f9c..968771b56e6c 100644 --- a/toolkit/inc/toolkit/awt/scrollabledialog.hxx +++ b/toolkit/inc/toolkit/awt/scrollabledialog.hxx @@ -36,16 +36,35 @@ namespace toolkit { class ScrollableDialog : public Dialog { - Window maContents; ScrollBar maHScrollBar; ScrollBar maVScrollBar; + Size maScrollArea; bool mbHasHoriBar; bool mbHasVertBar; Point mnScrollPos; + long mnScrWidth; + + public: + enum ScrollBarVisibility { None, Vert, Hori, Both }; + private: + ScrollBarVisibility maScrollVis; + void lcl_Scroll( long nX, long nY ); public: ScrollableDialog( Window* pParent, WinBits nStyle = WB_STDDIALOG ); virtual ~ScrollableDialog(); + void SetScrollWidth( long nWidth ); + long GetScrollWidth() { return maScrollArea.Width(); } + void SetScrollHeight( long nHeight ); + long GetScrollHeight() { return maScrollArea.Height(); } + void SetScrollLeft( long nLeft ); + long GetScrollLeft() { return mnScrollPos.X(); } + void SetScrollTop( long Top ); + long GetScrollTop() { return mnScrollPos.Y() ; } Window* getContentWindow(); + ScrollBarVisibility getScrollVisibility() { return maScrollVis; } + void setScrollVisibility( ScrollBarVisibility rState ); + virtual void Paint( const Rectangle& rRect ); + virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ); DECL_LINK( ScrollBarHdl, ScrollBar* ); DECL_LINK( ContainerScrolled, void* ); // Window diff --git a/toolkit/inc/toolkit/helper/property.hxx b/toolkit/inc/toolkit/helper/property.hxx index a44db628a346..4a1c07bb102f 100644 --- a/toolkit/inc/toolkit/helper/property.hxx +++ b/toolkit/inc/toolkit/helper/property.hxx @@ -211,6 +211,8 @@ namespace rtl { #define BASEPROPERTY_ROW_HEADER_WIDTH 158 #define BASEPROPERTY_COLUMN_HEADER_HEIGHT 159 #define BASEPROPERTY_USE_GRID_LINES 160 +#define BASEPROPERTY_HORISCROLL 161 +#define BASEPROPERTY_VERTSCROLL 162 // These properties are not bound, they are always extracted from the BASEPROPERTY_FONTDESCRIPTOR property |