1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef LAYOUT_AWT_VCLXSCROLLER_HXX 29 #define LAYOUT_AWT_VCLXSCROLLER_HXX 30 31 #include <comphelper/uno3.hxx> 32 #include <layout/core/bin.hxx> 33 #include <toolkit/awt/vclxwindow.hxx> 34 35 class ScrollBar; 36 class FixedImage; 37 38 namespace layoutimpl 39 { 40 41 class VCLXScroller :public VCLXWindow 42 ,public Bin 43 { 44 public: 45 VCLXScroller(); 46 47 protected: 48 ~VCLXScroller(); 49 50 // XInterface 51 DECLARE_XINTERFACE() 52 53 // XTypeProvider 54 DECLARE_XTYPEPROVIDER() 55 56 // XComponent 57 void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException); 58 59 // ::com::sun::star::awt::XLayoutContainer 60 virtual void SAL_CALL allocateArea( const ::com::sun::star::awt::Rectangle &rArea ) 61 throw (::com::sun::star::uno::RuntimeException); 62 virtual ::com::sun::star::awt::Size SAL_CALL getMinimumSize() 63 throw(::com::sun::star::uno::RuntimeException); 64 65 // VclWindowPeer 66 virtual void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException); 67 virtual ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException); 68 69 // VCLXWindow 70 void ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent ); 71 72 private: 73 VCLXScroller( const VCLXScroller& ); // never implemented 74 VCLXScroller& operator=( const VCLXScroller& ); // never implemented 75 76 // because the underlying window is only setup-ed after construction, init 77 // scrollbars at play-time 78 void ensureScrollBars(); 79 80 FixedImage *mpContent; // dummy 81 ScrollBar *mpHorScrollBar, *mpVerScrollBar; 82 DECL_LINK( ScrollHdl, ScrollBar* ); 83 }; 84 85 } // namespace layoutimpl 86 87 #endif /* LAYOUT_AWT_VCLXSCROLLER_HXX */ 88