xref: /aoo42x/main/cui/source/inc/tabstpge.hxx (revision c4eee24d)
1*c4eee24dSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*c4eee24dSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*c4eee24dSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*c4eee24dSAndrew Rist  * distributed with this work for additional information
6*c4eee24dSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*c4eee24dSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*c4eee24dSAndrew Rist  * "License"); you may not use this file except in compliance
9*c4eee24dSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*c4eee24dSAndrew Rist  *
11*c4eee24dSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*c4eee24dSAndrew Rist  *
13*c4eee24dSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*c4eee24dSAndrew Rist  * software distributed under the License is distributed on an
15*c4eee24dSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*c4eee24dSAndrew Rist  * KIND, either express or implied.  See the License for the
17*c4eee24dSAndrew Rist  * specific language governing permissions and limitations
18*c4eee24dSAndrew Rist  * under the License.
19*c4eee24dSAndrew Rist  *
20*c4eee24dSAndrew Rist  *************************************************************/
21*c4eee24dSAndrew Rist 
22*c4eee24dSAndrew Rist 
23cdf0e10cSrcweir #ifndef _SVX_TABSTPGE_HXX
24cdf0e10cSrcweir #define _SVX_TABSTPGE_HXX
25cdf0e10cSrcweir 
26cdf0e10cSrcweir // include ---------------------------------------------------------------
27cdf0e10cSrcweir 
28cdf0e10cSrcweir #include <vcl/group.hxx>
29cdf0e10cSrcweir #include <vcl/edit.hxx>
30cdf0e10cSrcweir #include <vcl/field.hxx>
31cdf0e10cSrcweir #include <vcl/fixed.hxx>
32cdf0e10cSrcweir #include <sfx2/tabdlg.hxx>
33cdf0e10cSrcweir 
34cdf0e10cSrcweir #include <editeng/tstpitem.hxx>
35cdf0e10cSrcweir #include <svx/flagsdef.hxx>
36cdf0e10cSrcweir 
37cdf0e10cSrcweir // forward ---------------------------------------------------------------
38cdf0e10cSrcweir 
39cdf0e10cSrcweir class TabWin_Impl;
40cdf0e10cSrcweir 
41cdf0e10cSrcweir // define ----------------------------------------------------------------
42cdf0e10cSrcweir 
43cdf0e10cSrcweir // Bitfelder f"ur DisableControls()
44cdf0e10cSrcweir //CHINA001 #define TABTYPE_LEFT		0x0001
45cdf0e10cSrcweir //CHINA001 #define TABTYPE_RIGHT		0x0002
46cdf0e10cSrcweir //CHINA001 #define TABTYPE_CENTER		0x0004
47cdf0e10cSrcweir //CHINA001 #define TABTYPE_DEZIMAL		0x0008
48cdf0e10cSrcweir //CHINA001 #define TABTYPE_ALL			0x000F
49cdf0e10cSrcweir //CHINA001
50cdf0e10cSrcweir //CHINA001 #define TABFILL_NONE		0x0010
51cdf0e10cSrcweir //CHINA001 #define TABFILL_POINT		0x0020
52cdf0e10cSrcweir //CHINA001 #define TABFILL_DASHLINE		0x0040
53cdf0e10cSrcweir //CHINA001 #define TABFILL_SOLIDLINE	0x0080
54cdf0e10cSrcweir //CHINA001 #define TABFILL_SPECIAL		0x0100
55cdf0e10cSrcweir //CHINA001 #define TABFILL_ALL			0x01F0
56cdf0e10cSrcweir 
57cdf0e10cSrcweir // class SvxTabulatorTabPage ---------------------------------------------
58cdf0e10cSrcweir /*
59cdf0e10cSrcweir 	{k:\svx\prototyp\dialog\tabstop.bmp}
60cdf0e10cSrcweir 
61cdf0e10cSrcweir 	[Beschreibung]
62cdf0e10cSrcweir 	In dieser TabPage werden Tabulatoren verwaltet.
63cdf0e10cSrcweir 
64cdf0e10cSrcweir 	[Items]
65cdf0e10cSrcweir 	<SvxTabStopItem><SID_ATTR_TABSTOP>
66cdf0e10cSrcweir 	<SfxUInt16Item><SID_ATTR_TABSTOP_DEFAULTS>
67cdf0e10cSrcweir 	<SfxUInt16Item><SID_ATTR_TABSTOP_POS>
68cdf0e10cSrcweir 	<SfxInt32Item><SID_ATTR_TABSTOP_OFFSET>
69cdf0e10cSrcweir */
70cdf0e10cSrcweir 
71cdf0e10cSrcweir class SvxTabulatorTabPage : public SfxTabPage
72cdf0e10cSrcweir {
73cdf0e10cSrcweir 	using TabPage::DeactivatePage;
74cdf0e10cSrcweir 
75cdf0e10cSrcweir public:
76cdf0e10cSrcweir 	~SvxTabulatorTabPage();
77cdf0e10cSrcweir 
78cdf0e10cSrcweir 	static SfxTabPage* 	Create( Window* pParent, const SfxItemSet& rSet );
79cdf0e10cSrcweir 	static sal_uInt16*		GetRanges();
80cdf0e10cSrcweir 
81cdf0e10cSrcweir 	virtual sal_Bool 		FillItemSet( SfxItemSet& rSet );
82cdf0e10cSrcweir 	virtual void 		Reset( const SfxItemSet& rSet );
83cdf0e10cSrcweir 
84cdf0e10cSrcweir 	void				DisableControls( const sal_uInt16 nFlag );
85cdf0e10cSrcweir 
86cdf0e10cSrcweir protected:
87cdf0e10cSrcweir 	virtual int			DeactivatePage( SfxItemSet* pSet = 0 );
88cdf0e10cSrcweir 
89cdf0e10cSrcweir private:
90cdf0e10cSrcweir 	SvxTabulatorTabPage( Window* pParent, const SfxItemSet& rSet );
91cdf0e10cSrcweir 
92cdf0e10cSrcweir 	// Tabulatoren und Positionen
93cdf0e10cSrcweir     FixedLine       aTabLabel;
94cdf0e10cSrcweir 	MetricBox		aTabBox;
95cdf0e10cSrcweir     FixedLine       aTabLabelVert;
96cdf0e10cSrcweir 
97cdf0e10cSrcweir     FixedLine       aTabTypeLabel;
98cdf0e10cSrcweir 	// TabType
99cdf0e10cSrcweir 	RadioButton		aLeftTab;
100cdf0e10cSrcweir 	RadioButton		aRightTab;
101cdf0e10cSrcweir 	RadioButton		aCenterTab;
102cdf0e10cSrcweir 	RadioButton		aDezTab;
103cdf0e10cSrcweir 
104cdf0e10cSrcweir 	TabWin_Impl*	pLeftWin;
105cdf0e10cSrcweir 	TabWin_Impl*	pRightWin;
106cdf0e10cSrcweir 	TabWin_Impl*	pCenterWin;
107cdf0e10cSrcweir 	TabWin_Impl*	pDezWin;
108cdf0e10cSrcweir 
109cdf0e10cSrcweir 	FixedText		aDezCharLabel;
110cdf0e10cSrcweir 	Edit			aDezChar;
111cdf0e10cSrcweir 
112cdf0e10cSrcweir     FixedLine       aFillLabel;
113cdf0e10cSrcweir 	// Fuellzeichen
114cdf0e10cSrcweir 	RadioButton		aNoFillChar;
115cdf0e10cSrcweir 	RadioButton		aFillPoints;
116cdf0e10cSrcweir 	RadioButton		aFillDashLine ;
117cdf0e10cSrcweir 	RadioButton		aFillSolidLine;
118cdf0e10cSrcweir 	RadioButton		aFillSpecial;
119cdf0e10cSrcweir 	Edit			aFillChar;
120cdf0e10cSrcweir 	// Buttons
121cdf0e10cSrcweir 	PushButton		aNewBtn;
122cdf0e10cSrcweir 	PushButton		aDelAllBtn;
123cdf0e10cSrcweir 	PushButton		aDelBtn;
124cdf0e10cSrcweir 
125cdf0e10cSrcweir 	// lokale Variablen, interne Funktionen
126cdf0e10cSrcweir 	SvxTabStop     	aAktTab;
127cdf0e10cSrcweir 	SvxTabStopItem	aNewTabs;
128cdf0e10cSrcweir 	long			nDefDist;
129cdf0e10cSrcweir 	FieldUnit		eDefUnit;
130cdf0e10cSrcweir 	sal_Bool			bCheck;
131cdf0e10cSrcweir 
132cdf0e10cSrcweir #ifdef _SVX_TABSTPGE_CXX
133cdf0e10cSrcweir 	void 			InitTabPos_Impl( sal_uInt16 nPos = 0 );
134cdf0e10cSrcweir 	void 			SetFillAndTabType_Impl();
135cdf0e10cSrcweir 
136cdf0e10cSrcweir 	// Handler
137cdf0e10cSrcweir 	DECL_LINK( NewHdl_Impl, Button* );
138cdf0e10cSrcweir 	DECL_LINK( DelHdl_Impl, Button* );
139cdf0e10cSrcweir 	DECL_LINK( DelAllHdl_Impl, Button* );
140cdf0e10cSrcweir 
141cdf0e10cSrcweir 	DECL_LINK( FillTypeCheckHdl_Impl, RadioButton* );
142cdf0e10cSrcweir 	DECL_LINK( TabTypeCheckHdl_Impl, RadioButton* );
143cdf0e10cSrcweir 
144cdf0e10cSrcweir 	DECL_LINK( SelectHdl_Impl, MetricBox* );
145cdf0e10cSrcweir 	DECL_LINK( ModifyHdl_Impl, MetricBox* );
146cdf0e10cSrcweir 	DECL_LINK( GetFillCharHdl_Impl, Edit* );
147cdf0e10cSrcweir 	DECL_LINK( GetDezCharHdl_Impl, Edit* );
148cdf0e10cSrcweir #endif
149cdf0e10cSrcweir 	virtual void 			PageCreated(SfxAllItemSet aSet); // add CHINA001
150cdf0e10cSrcweir };
151cdf0e10cSrcweir 
152cdf0e10cSrcweir #endif // #ifndef _SVX_TABSTPGE_HXX
153cdf0e10cSrcweir 
154cdf0e10cSrcweir 
155