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