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 SC_COLROWBAR_HXX 29 #define SC_COLROWBAR_HXX 30 31 #include "hdrcont.hxx" 32 #include "viewdata.hxx" 33 34 class ScHeaderFunctionSet; 35 class ScHeaderSelectionEngine; 36 37 // --------------------------------------------------------------------------- 38 39 40 class ScColBar : public ScHeaderControl 41 { 42 ScViewData* pViewData; 43 ScHSplitPos eWhich; 44 ScHeaderFunctionSet* pFuncSet; 45 ScHeaderSelectionEngine* pSelEngine; 46 47 public: 48 ScColBar( Window* pParent, ScViewData* pData, ScHSplitPos eWhichPos, 49 ScHeaderFunctionSet* pFunc, ScHeaderSelectionEngine* pEng ); 50 ~ScColBar(); 51 52 virtual SCCOLROW GetPos(); 53 virtual sal_uInt16 GetEntrySize( SCCOLROW nEntryNo ); 54 virtual String GetEntryText( SCCOLROW nEntryNo ); 55 56 virtual sal_Bool IsLayoutRTL(); // only for columns 57 58 virtual void SetEntrySize( SCCOLROW nPos, sal_uInt16 nNewSize ); 59 virtual void HideEntries( SCCOLROW nStart, SCCOLROW nEnd ); 60 61 virtual void SetMarking( sal_Bool bSet ); 62 virtual void SelectWindow(); 63 virtual sal_Bool IsDisabled(); 64 virtual sal_Bool ResizeAllowed(); 65 66 virtual void DrawInvert( long nDragPos ); 67 68 virtual String GetDragHelp( long nVal ); 69 70 sal_Bool UseNumericHeader() const; 71 }; 72 73 74 class ScRowBar : public ScHeaderControl 75 { 76 ScViewData* pViewData; 77 ScVSplitPos eWhich; 78 ScHeaderFunctionSet* pFuncSet; 79 ScHeaderSelectionEngine* pSelEngine; 80 81 public: 82 ScRowBar( Window* pParent, ScViewData* pData, ScVSplitPos eWhichPos, 83 ScHeaderFunctionSet* pFunc, ScHeaderSelectionEngine* pEng ); 84 ~ScRowBar(); 85 86 virtual SCCOLROW GetPos(); 87 virtual sal_uInt16 GetEntrySize( SCCOLROW nEntryNo ); 88 virtual String GetEntryText( SCCOLROW nEntryNo ); 89 90 virtual sal_Bool IsMirrored(); // only for columns 91 virtual SCROW GetHiddenCount( SCROW nEntryNo ); // only for columns 92 93 virtual void SetEntrySize( SCCOLROW nPos, sal_uInt16 nNewSize ); 94 virtual void HideEntries( SCCOLROW nStart, SCCOLROW nEnd ); 95 96 virtual void SetMarking( sal_Bool bSet ); 97 virtual void SelectWindow(); 98 virtual sal_Bool IsDisabled(); 99 virtual sal_Bool ResizeAllowed(); 100 101 virtual void DrawInvert( long nDragPos ); 102 103 virtual String GetDragHelp( long nVal ); 104 }; 105 106 107 108 #endif 109 110 111