1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: colrowba.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef SC_COLROWBAR_HXX
32 #define SC_COLROWBAR_HXX
34 #include "hdrcont.hxx"
35 #include "viewdata.hxx"
37 class ScHeaderFunctionSet
;
38 class ScHeaderSelectionEngine
;
40 // ---------------------------------------------------------------------------
43 class ScColBar
: public ScHeaderControl
45 ScViewData
* pViewData
;
47 ScHeaderFunctionSet
* pFuncSet
;
48 ScHeaderSelectionEngine
* pSelEngine
;
51 ScColBar( Window
* pParent
, ScViewData
* pData
, ScHSplitPos eWhichPos
,
52 ScHeaderFunctionSet
* pFunc
, ScHeaderSelectionEngine
* pEng
);
55 virtual SCCOLROW
GetPos();
56 virtual USHORT
GetEntrySize( SCCOLROW nEntryNo
);
57 virtual String
GetEntryText( SCCOLROW nEntryNo
);
59 virtual BOOL
IsLayoutRTL(); // only for columns
61 virtual void SetEntrySize( SCCOLROW nPos
, USHORT nNewSize
);
62 virtual void HideEntries( SCCOLROW nStart
, SCCOLROW nEnd
);
64 virtual void SetMarking( BOOL bSet
);
65 virtual void SelectWindow();
66 virtual BOOL
IsDisabled();
67 virtual BOOL
ResizeAllowed();
69 virtual void DrawInvert( long nDragPos
);
71 virtual String
GetDragHelp( long nVal
);
73 BOOL
UseNumericHeader() const;
77 class ScRowBar
: public ScHeaderControl
79 ScViewData
* pViewData
;
81 ScHeaderFunctionSet
* pFuncSet
;
82 ScHeaderSelectionEngine
* pSelEngine
;
85 ScRowBar( Window
* pParent
, ScViewData
* pData
, ScVSplitPos eWhichPos
,
86 ScHeaderFunctionSet
* pFunc
, ScHeaderSelectionEngine
* pEng
);
89 virtual SCCOLROW
GetPos();
90 virtual USHORT
GetEntrySize( SCCOLROW nEntryNo
);
91 virtual String
GetEntryText( SCCOLROW nEntryNo
);
93 virtual BOOL
IsMirrored(); // only for columns
94 virtual SCROW
GetHiddenCount( SCROW nEntryNo
); // only for columns
96 virtual void SetEntrySize( SCCOLROW nPos
, USHORT nNewSize
);
97 virtual void HideEntries( SCCOLROW nStart
, SCCOLROW nEnd
);
99 virtual void SetMarking( BOOL bSet
);
100 virtual void SelectWindow();
101 virtual BOOL
IsDisabled();
102 virtual BOOL
ResizeAllowed();
104 virtual void DrawInvert( long nDragPos
);
106 virtual String
GetDragHelp( long nVal
);