1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef SC_COLROWBAR_HXX
21 #define SC_COLROWBAR_HXX
23 #include "hdrcont.hxx"
24 #include "viewdata.hxx"
26 class ScHeaderFunctionSet
;
27 class ScHeaderSelectionEngine
;
29 // ---------------------------------------------------------------------------
32 class ScColBar
: public ScHeaderControl
34 ScViewData
* pViewData
;
36 ScHeaderFunctionSet
* pFuncSet
;
39 ScColBar( Window
* pParent
, ScViewData
* pData
, ScHSplitPos eWhichPos
,
40 ScHeaderFunctionSet
* pFunc
, ScHeaderSelectionEngine
* pEng
);
43 virtual SCCOLROW
GetPos();
44 virtual sal_uInt16
GetEntrySize( SCCOLROW nEntryNo
);
45 virtual String
GetEntryText( SCCOLROW nEntryNo
);
47 virtual sal_Bool
IsLayoutRTL(); // only for columns
49 virtual void SetEntrySize( SCCOLROW nPos
, sal_uInt16 nNewSize
);
50 virtual void HideEntries( SCCOLROW nStart
, SCCOLROW nEnd
);
52 virtual void SetMarking( sal_Bool bSet
);
53 virtual void SelectWindow();
54 virtual sal_Bool
IsDisabled();
55 virtual sal_Bool
ResizeAllowed();
57 virtual void DrawInvert( long nDragPos
);
59 virtual String
GetDragHelp( long nVal
);
61 sal_Bool
UseNumericHeader() const;
65 class ScRowBar
: public ScHeaderControl
67 ScViewData
* pViewData
;
69 ScHeaderFunctionSet
* pFuncSet
;
72 ScRowBar( Window
* pParent
, ScViewData
* pData
, ScVSplitPos eWhichPos
,
73 ScHeaderFunctionSet
* pFunc
, ScHeaderSelectionEngine
* pEng
);
76 virtual SCCOLROW
GetPos();
77 virtual sal_uInt16
GetEntrySize( SCCOLROW nEntryNo
);
78 virtual String
GetEntryText( SCCOLROW nEntryNo
);
80 virtual sal_Bool
IsMirrored(); // only for columns
81 virtual SCROW
GetHiddenCount( SCROW nEntryNo
); // only for columns
83 virtual void SetEntrySize( SCCOLROW nPos
, sal_uInt16 nNewSize
);
84 virtual void HideEntries( SCCOLROW nStart
, SCCOLROW nEnd
);
86 virtual void SetMarking( sal_Bool bSet
);
87 virtual void SelectWindow();
88 virtual sal_Bool
IsDisabled();
89 virtual sal_Bool
ResizeAllowed();
91 virtual void DrawInvert( long nDragPos
);
93 virtual String
GetDragHelp( long nVal
);
101 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */