xref: /aoo42x/main/cui/source/inc/tabstpge.hxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 #ifndef _SVX_TABSTPGE_HXX
28 #define _SVX_TABSTPGE_HXX
29 
30 // include ---------------------------------------------------------------
31 
32 #include <vcl/group.hxx>
33 #include <vcl/edit.hxx>
34 #include <vcl/field.hxx>
35 #include <vcl/fixed.hxx>
36 #include <sfx2/tabdlg.hxx>
37 
38 #include <editeng/tstpitem.hxx>
39 #include <svx/flagsdef.hxx>
40 
41 // forward ---------------------------------------------------------------
42 
43 class TabWin_Impl;
44 
45 // define ----------------------------------------------------------------
46 
47 // Bitfelder f"ur DisableControls()
48 //CHINA001 #define TABTYPE_LEFT		0x0001
49 //CHINA001 #define TABTYPE_RIGHT		0x0002
50 //CHINA001 #define TABTYPE_CENTER		0x0004
51 //CHINA001 #define TABTYPE_DEZIMAL		0x0008
52 //CHINA001 #define TABTYPE_ALL			0x000F
53 //CHINA001
54 //CHINA001 #define TABFILL_NONE		0x0010
55 //CHINA001 #define TABFILL_POINT		0x0020
56 //CHINA001 #define TABFILL_DASHLINE		0x0040
57 //CHINA001 #define TABFILL_SOLIDLINE	0x0080
58 //CHINA001 #define TABFILL_SPECIAL		0x0100
59 //CHINA001 #define TABFILL_ALL			0x01F0
60 
61 // class SvxTabulatorTabPage ---------------------------------------------
62 /*
63 	{k:\svx\prototyp\dialog\tabstop.bmp}
64 
65 	[Beschreibung]
66 	In dieser TabPage werden Tabulatoren verwaltet.
67 
68 	[Items]
69 	<SvxTabStopItem><SID_ATTR_TABSTOP>
70 	<SfxUInt16Item><SID_ATTR_TABSTOP_DEFAULTS>
71 	<SfxUInt16Item><SID_ATTR_TABSTOP_POS>
72 	<SfxInt32Item><SID_ATTR_TABSTOP_OFFSET>
73 */
74 
75 class SvxTabulatorTabPage : public SfxTabPage
76 {
77 	using TabPage::DeactivatePage;
78 
79 public:
80 	~SvxTabulatorTabPage();
81 
82 	static SfxTabPage* 	Create( Window* pParent, const SfxItemSet& rSet );
83 	static sal_uInt16*		GetRanges();
84 
85 	virtual sal_Bool 		FillItemSet( SfxItemSet& rSet );
86 	virtual void 		Reset( const SfxItemSet& rSet );
87 
88 	void				DisableControls( const sal_uInt16 nFlag );
89 
90 protected:
91 	virtual int			DeactivatePage( SfxItemSet* pSet = 0 );
92 
93 private:
94 	SvxTabulatorTabPage( Window* pParent, const SfxItemSet& rSet );
95 
96 	// Tabulatoren und Positionen
97     FixedLine       aTabLabel;
98 	MetricBox		aTabBox;
99     FixedLine       aTabLabelVert;
100 
101     FixedLine       aTabTypeLabel;
102 	// TabType
103 	RadioButton		aLeftTab;
104 	RadioButton		aRightTab;
105 	RadioButton		aCenterTab;
106 	RadioButton		aDezTab;
107 
108 	TabWin_Impl*	pLeftWin;
109 	TabWin_Impl*	pRightWin;
110 	TabWin_Impl*	pCenterWin;
111 	TabWin_Impl*	pDezWin;
112 
113 	FixedText		aDezCharLabel;
114 	Edit			aDezChar;
115 
116     FixedLine       aFillLabel;
117 	// Fuellzeichen
118 	RadioButton		aNoFillChar;
119 	RadioButton		aFillPoints;
120 	RadioButton		aFillDashLine ;
121 	RadioButton		aFillSolidLine;
122 	RadioButton		aFillSpecial;
123 	Edit			aFillChar;
124 	// Buttons
125 	PushButton		aNewBtn;
126 	PushButton		aDelAllBtn;
127 	PushButton		aDelBtn;
128 
129 	// lokale Variablen, interne Funktionen
130 	SvxTabStop     	aAktTab;
131 	SvxTabStopItem	aNewTabs;
132 	long			nDefDist;
133 	FieldUnit		eDefUnit;
134 	sal_Bool			bCheck;
135 
136 #ifdef _SVX_TABSTPGE_CXX
137 	void 			InitTabPos_Impl( sal_uInt16 nPos = 0 );
138 	void 			SetFillAndTabType_Impl();
139 
140 	// Handler
141 	DECL_LINK( NewHdl_Impl, Button* );
142 	DECL_LINK( DelHdl_Impl, Button* );
143 	DECL_LINK( DelAllHdl_Impl, Button* );
144 
145 	DECL_LINK( FillTypeCheckHdl_Impl, RadioButton* );
146 	DECL_LINK( TabTypeCheckHdl_Impl, RadioButton* );
147 
148 	DECL_LINK( SelectHdl_Impl, MetricBox* );
149 	DECL_LINK( ModifyHdl_Impl, MetricBox* );
150 	DECL_LINK( GetFillCharHdl_Impl, Edit* );
151 	DECL_LINK( GetDezCharHdl_Impl, Edit* );
152 #endif
153 	virtual void 			PageCreated(SfxAllItemSet aSet); // add CHINA001
154 };
155 
156 #endif // #ifndef _SVX_TABSTPGE_HXX
157 
158 
159