xref: /aoo4110/main/cui/source/inc/tabstpge.hxx (revision b1cdbd2c)
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 #ifndef _SVX_TABSTPGE_HXX
24 #define _SVX_TABSTPGE_HXX
25 
26 // include ---------------------------------------------------------------
27 
28 #include <vcl/group.hxx>
29 #include <vcl/edit.hxx>
30 #include <vcl/field.hxx>
31 #include <vcl/fixed.hxx>
32 #include <sfx2/tabdlg.hxx>
33 
34 #include <editeng/tstpitem.hxx>
35 #include <svx/flagsdef.hxx>
36 
37 // forward ---------------------------------------------------------------
38 
39 class TabWin_Impl;
40 
41 // define ----------------------------------------------------------------
42 
43 // Bitfelder f"ur DisableControls()
44 //CHINA001 #define TABTYPE_LEFT		0x0001
45 //CHINA001 #define TABTYPE_RIGHT		0x0002
46 //CHINA001 #define TABTYPE_CENTER		0x0004
47 //CHINA001 #define TABTYPE_DEZIMAL		0x0008
48 //CHINA001 #define TABTYPE_ALL			0x000F
49 //CHINA001
50 //CHINA001 #define TABFILL_NONE		0x0010
51 //CHINA001 #define TABFILL_POINT		0x0020
52 //CHINA001 #define TABFILL_DASHLINE		0x0040
53 //CHINA001 #define TABFILL_SOLIDLINE	0x0080
54 //CHINA001 #define TABFILL_SPECIAL		0x0100
55 //CHINA001 #define TABFILL_ALL			0x01F0
56 
57 // class SvxTabulatorTabPage ---------------------------------------------
58 /*
59 	{k:\svx\prototyp\dialog\tabstop.bmp}
60 
61 	[Beschreibung]
62 	In dieser TabPage werden Tabulatoren verwaltet.
63 
64 	[Items]
65 	<SvxTabStopItem><SID_ATTR_TABSTOP>
66 	<SfxUInt16Item><SID_ATTR_TABSTOP_DEFAULTS>
67 	<SfxUInt16Item><SID_ATTR_TABSTOP_POS>
68 	<SfxInt32Item><SID_ATTR_TABSTOP_OFFSET>
69 */
70 
71 class SvxTabulatorTabPage : public SfxTabPage
72 {
73 	using TabPage::DeactivatePage;
74 
75 public:
76 	~SvxTabulatorTabPage();
77 
78 	static SfxTabPage* 	Create( Window* pParent, const SfxItemSet& rSet );
79 	static sal_uInt16*		GetRanges();
80 
81 	virtual sal_Bool 		FillItemSet( SfxItemSet& rSet );
82 	virtual void 		Reset( const SfxItemSet& rSet );
83 
84 	void				DisableControls( const sal_uInt16 nFlag );
85 
86 protected:
87 	virtual int			DeactivatePage( SfxItemSet* pSet = 0 );
88 
89 private:
90 	SvxTabulatorTabPage( Window* pParent, const SfxItemSet& rSet );
91 
92 	// Tabulatoren und Positionen
93     FixedLine       aTabLabel;
94 	MetricBox		aTabBox;
95     FixedLine       aTabLabelVert;
96 
97     FixedLine       aTabTypeLabel;
98 	// TabType
99 	RadioButton		aLeftTab;
100 	RadioButton		aRightTab;
101 	RadioButton		aCenterTab;
102 	RadioButton		aDezTab;
103 
104 	TabWin_Impl*	pLeftWin;
105 	TabWin_Impl*	pRightWin;
106 	TabWin_Impl*	pCenterWin;
107 	TabWin_Impl*	pDezWin;
108 
109 	FixedText		aDezCharLabel;
110 	Edit			aDezChar;
111 
112     FixedLine       aFillLabel;
113 	// Fuellzeichen
114 	RadioButton		aNoFillChar;
115 	RadioButton		aFillPoints;
116 	RadioButton		aFillDashLine ;
117 	RadioButton		aFillSolidLine;
118 	RadioButton		aFillSpecial;
119 	Edit			aFillChar;
120 	// Buttons
121 	PushButton		aNewBtn;
122 	PushButton		aDelAllBtn;
123 	PushButton		aDelBtn;
124 
125 	// lokale Variablen, interne Funktionen
126 	SvxTabStop     	aAktTab;
127 	SvxTabStopItem	aNewTabs;
128 	long			nDefDist;
129 	FieldUnit		eDefUnit;
130 	sal_Bool			bCheck;
131 
132 #ifdef _SVX_TABSTPGE_CXX
133 	void 			InitTabPos_Impl( sal_uInt16 nPos = 0 );
134 	void 			SetFillAndTabType_Impl();
135 
136 	// Handler
137 	DECL_LINK( NewHdl_Impl, Button* );
138 	DECL_LINK( DelHdl_Impl, Button* );
139 	DECL_LINK( DelAllHdl_Impl, Button* );
140 
141 	DECL_LINK( FillTypeCheckHdl_Impl, RadioButton* );
142 	DECL_LINK( TabTypeCheckHdl_Impl, RadioButton* );
143 
144 	DECL_LINK( SelectHdl_Impl, MetricBox* );
145 	DECL_LINK( ModifyHdl_Impl, MetricBox* );
146 	DECL_LINK( GetFillCharHdl_Impl, Edit* );
147 	DECL_LINK( GetDezCharHdl_Impl, Edit* );
148 #endif
149 	virtual void 			PageCreated(SfxAllItemSet aSet); // add CHINA001
150 };
151 
152 #endif // #ifndef _SVX_TABSTPGE_HXX
153 
154 
155