diff options
author | Noel Power <noel.power@suse.com> | 2012-09-06 19:25:12 +0100 |
---|---|---|
committer | Noel Power <noel.power@suse.com> | 2012-09-11 16:04:11 +0100 |
commit | b241005c51a6705425937218e6893b4be2165128 (patch) | |
tree | 0b276704f86e49402beb48c6f7ca47db02c7bd0d /toolkit/inc | |
parent | some more tweaking to import scrollbar data for mso Frame & Userform (diff) | |
download | core-b241005c51a6705425937218e6893b4be2165128.tar.gz core-b241005c51a6705425937218e6893b4be2165128.zip |
make interface for scrollablity properties to allow more code sharing
Change-Id: I0e03360808e73426848820d807f741c13c76abf8
Diffstat (limited to 'toolkit/inc')
-rw-r--r-- | toolkit/inc/toolkit/awt/scrollabledialog.hxx | 37 | ||||
-rw-r--r-- | toolkit/inc/toolkit/awt/vclxcontainer.hxx | 3 |
2 files changed, 28 insertions, 12 deletions
diff --git a/toolkit/inc/toolkit/awt/scrollabledialog.hxx b/toolkit/inc/toolkit/awt/scrollabledialog.hxx index 01ba525dbdcf..19b0ab0c799b 100644 --- a/toolkit/inc/toolkit/awt/scrollabledialog.hxx +++ b/toolkit/inc/toolkit/awt/scrollabledialog.hxx @@ -34,8 +34,21 @@ //........................................................................ namespace toolkit { + class ScrollableInterface + { + public: + virtual void SetScrollWidth( long nWidth ) = 0; + virtual long GetScrollWidth() = 0; + virtual void SetScrollHeight( long nHeight ) = 0; + virtual long GetScrollHeight() = 0; + virtual void SetScrollLeft( long nLeft ) = 0; + virtual long GetScrollLeft() = 0; + virtual void SetScrollTop( long Top ) = 0; + virtual long GetScrollTop() = 0; + }; + template < class T > - class ScrollableDialog : public T + class ScrollableWrapper : public T, public ScrollableInterface { ScrollBar maHScrollBar; ScrollBar maVScrollBar; @@ -51,17 +64,17 @@ namespace toolkit 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(); + ScrollableWrapper( Window* pParent, WinBits nStyle = WB_STDDIALOG ); + virtual ~ScrollableWrapper(); + virtual void SetScrollWidth( long nWidth ); + virtual long GetScrollWidth() { return maScrollArea.Width(); } + virtual void SetScrollHeight( long nHeight ); + virtual long GetScrollHeight() { return maScrollArea.Height(); } + virtual void SetScrollLeft( long nLeft ); + virtual long GetScrollLeft() { return mnScrollPos.X(); } + virtual void SetScrollTop( long Top ); + virtual long GetScrollTop() { return mnScrollPos.Y() ; } + ScrollBarVisibility getScrollVisibility() { return maScrollVis; } void setScrollVisibility( ScrollBarVisibility rState ); DECL_LINK( ScrollBarHdl, ScrollBar* ); diff --git a/toolkit/inc/toolkit/awt/vclxcontainer.hxx b/toolkit/inc/toolkit/awt/vclxcontainer.hxx index 8a94682d178a..eda253106282 100644 --- a/toolkit/inc/toolkit/awt/vclxcontainer.hxx +++ b/toolkit/inc/toolkit/awt/vclxcontainer.hxx @@ -61,6 +61,9 @@ public: void SAL_CALL setTabOrder( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > >& WindowOrder, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Tabs, sal_Bool GroupControl ) throw(::com::sun::star::uno::RuntimeException); void SAL_CALL setGroup( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > >& Windows ) throw(::com::sun::star::uno::RuntimeException); + // ::com::sun::star::awt::XVclWindowPeer + void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException); + static void ImplGetPropertyIds( std::list< sal_uInt16 > &aIds ); virtual void GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); } }; |