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 #ifndef _SCROLL_HXX 23 #define _SCROLL_HXX 24 #ifndef _SCRBAR_HXX //autogen 25 #include <vcl/scrbar.hxx> 26 #endif 27 28 class SwScrollbar: public ScrollBar 29 { 30 Size aDocSz; 31 sal_Bool bHori :1; // Horizontal = sal_True, sonst Vertikal 32 sal_Bool bAuto :1; // für Scrollingmode 33 sal_Bool bThumbEnabled:1; 34 sal_Bool bVisible :1; // Show/Hide sollen nur noch dieses Flag setzen 35 sal_Bool bSizeSet :1; // wurde die Größe bereits gesetzt? 36 37 void AutoShow(); 38 39 using Window::Hide; 40 using Window::SetPosSizePixel; 41 using Window::IsVisible; 42 43 public: 44 45 void ExtendedShow( sal_Bool bVisible = sal_True ); Hide()46 void Hide() { Show( sal_False ); } 47 void SetPosSizePixel( const Point& rNewPos, const Size& rNewSize ); IsVisible(sal_Bool bReal) const48 sal_Bool IsVisible(sal_Bool bReal) const { return bReal ? ScrollBar::IsVisible() : bVisible; } 49 50 // Änderung der Dokumentgröße 51 void DocSzChgd(const Size &rNewSize); 52 // Änderung des sichtbaren Bereiches 53 void ViewPortChgd(const Rectangle &rRectangle); 54 // was für einer ist es denn? IsHoriScroll() const55 sal_Bool IsHoriScroll() const { return bHori; } 56 57 void SetAuto(sal_Bool bSet); IsAuto()58 sal_Bool IsAuto() { return bAuto;} 59 60 SwScrollbar(Window *pParent, sal_Bool bHori = sal_True ); 61 ~SwScrollbar(); 62 }; 63 64 #endif 65 66 /* vim: set noet sw=4 ts=4: */ 67