1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef LAYOUT_AWT_VCLXSCROLLER_HXX
25 #define LAYOUT_AWT_VCLXSCROLLER_HXX
26 
27 #include <comphelper/uno3.hxx>
28 #include <layout/core/bin.hxx>
29 #include <toolkit/awt/vclxwindow.hxx>
30 
31 class ScrollBar;
32 class FixedImage;
33 
34 namespace layoutimpl
35 {
36 
37 class VCLXScroller :public VCLXWindow
38                    ,public Bin
39 {
40 public:
41     VCLXScroller();
42 
43 protected:
44     ~VCLXScroller();
45 
46     // XInterface
47     DECLARE_XINTERFACE()
48 
49     // XTypeProvider
50     DECLARE_XTYPEPROVIDER()
51 
52     // XComponent
53     void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException);
54 
55     // ::com::sun::star::awt::XLayoutContainer
56     virtual void SAL_CALL allocateArea( const ::com::sun::star::awt::Rectangle &rArea )
57         throw (::com::sun::star::uno::RuntimeException);
58     virtual ::com::sun::star::awt::Size SAL_CALL getMinimumSize()
59         throw(::com::sun::star::uno::RuntimeException);
60 
61     // VclWindowPeer
62     virtual void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException);
63     virtual ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException);
64 
65     // VCLXWindow
66     void ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent );
67 
68 private:
69     VCLXScroller( const VCLXScroller& );            // never implemented
70     VCLXScroller& operator=( const VCLXScroller& ); // never implemented
71 
72     // because the underlying window is only setup-ed after construction, init
73     // scrollbars at play-time
74     void ensureScrollBars();
75 
76     FixedImage *mpContent;  // dummy
77     ScrollBar *mpHorScrollBar, *mpVerScrollBar;
78     DECL_LINK( ScrollHdl, ScrollBar* );
79 };
80 
81 } // namespace layoutimpl
82 
83 #endif /* LAYOUT_AWT_VCLXSCROLLER_HXX */
84