xref: /aoo41x/main/sw/source/ui/inc/scroll.hxx (revision 1d2dbeb0)
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 #ifndef _SCROLL_HXX
24 #define _SCROLL_HXX
25 #ifndef _SCRBAR_HXX //autogen
26 #include <vcl/scrbar.hxx>
27 #endif
28 
29 class SwScrollbar: public ScrollBar
30 {
31 	Size    aDocSz;
32 	sal_Bool 	bHori		:1;		// Horizontal = sal_True, sonst Vertikal
33 	sal_Bool	bAuto		:1;		// fuer Scrollingmode
34 	sal_Bool	bThumbEnabled:1;
35 	sal_Bool	bVisible	:1;		// Show/Hide sollen nur noch dieses Flag setzen
36 	sal_Bool	bSizeSet	:1;		// wurde die Groesse bereits gesetzt?
37 
38 	void	AutoShow();
39 
40     using Window::Hide;
41     using Window::SetPosSizePixel;
42     using Window::IsVisible;
43 
44 public:
45 
46     void    ExtendedShow( sal_Bool bVisible = sal_True );
Hide()47 	void	Hide() { Show( sal_False ); }
48 	void	SetPosSizePixel( const Point& rNewPos, const Size& rNewSize );
IsVisible(sal_Bool bReal) const49 	sal_Bool	IsVisible(sal_Bool bReal) const { return bReal ? ScrollBar::IsVisible() : bVisible; }
50 
51 		// Aenderung der Dokumentgroesse
52 	void 	DocSzChgd(const Size &rNewSize);
53 		// Aenderung des sichtbaren Bereiches
54 	void 	ViewPortChgd(const Rectangle &rRectangle);
55 		// was fuer einer ist es denn ??
IsHoriScroll() const56     sal_Bool    IsHoriScroll() const { return bHori; }
57 
58 	void 	SetAuto(sal_Bool bSet);
IsAuto()59 	sal_Bool 	IsAuto() { return bAuto;}
60 
61     SwScrollbar(Window *pParent, sal_Bool bHori = sal_True );
62 	~SwScrollbar();
63 };
64 
65 
66 
67 #endif
68