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