xref: /aoo41x/main/cui/source/inc/cuioptgenrl.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_CUIOPTGENRL_HXX
24cdf0e10cSrcweir #define _SVX_CUIOPTGENRL_HXX
25cdf0e10cSrcweir 
26cdf0e10cSrcweir // include ---------------------------------------------------------------
27cdf0e10cSrcweir 
28cdf0e10cSrcweir #include <svx/optgenrl.hxx>
29cdf0e10cSrcweir #include <sfx2/tabdlg.hxx>
30cdf0e10cSrcweir #include <vcl/fixed.hxx>
31cdf0e10cSrcweir #include <vcl/edit.hxx>
32cdf0e10cSrcweir #include <vcl/group.hxx>
33cdf0e10cSrcweir 
34cdf0e10cSrcweir // forward ---------------------------------------------------------------
35cdf0e10cSrcweir 
36cdf0e10cSrcweir struct GeneralTabPage_Impl;
37cdf0e10cSrcweir 
38cdf0e10cSrcweir #define SfxGeneralTabPage   SvxGeneralTabPage
39cdf0e10cSrcweir #define INDEX_NOTSET        ((sal_Int16)-1)
40cdf0e10cSrcweir 
41cdf0e10cSrcweir // class SvxUserEdit -----------------------------------------------------
42cdf0e10cSrcweir 
43cdf0e10cSrcweir class SvxUserEdit : public Edit
44cdf0e10cSrcweir {
45cdf0e10cSrcweir private:
46cdf0e10cSrcweir     sal_Int16   m_nIndex;
47cdf0e10cSrcweir     FixedText*  m_pLabel;
48cdf0e10cSrcweir 
49cdf0e10cSrcweir public:
SvxUserEdit(Window * pParent,const ResId & rResId,sal_Int16 nIndex=INDEX_NOTSET,FixedText * pLabel=NULL)50cdf0e10cSrcweir     SvxUserEdit( Window* pParent, const ResId& rResId,
51cdf0e10cSrcweir                  sal_Int16 nIndex = INDEX_NOTSET, FixedText* pLabel = NULL ) :
52cdf0e10cSrcweir         Edit( pParent, rResId, true ), m_nIndex( nIndex ), m_pLabel( pLabel ) {}
53cdf0e10cSrcweir 
SetIndex(sal_Int16 nIndex)54cdf0e10cSrcweir     inline void         SetIndex( sal_Int16 nIndex ) { m_nIndex = nIndex; }
GetIndex() const55cdf0e10cSrcweir     inline sal_Int16    GetIndex() const { return m_nIndex; }
SetLabel(FixedText * pLabel)56cdf0e10cSrcweir     inline void         SetLabel( FixedText* pLabel ) { m_pLabel = pLabel; }
GetLabel() const57cdf0e10cSrcweir     inline FixedText*   GetLabel() const { return m_pLabel; }
58cdf0e10cSrcweir };
59cdf0e10cSrcweir 
60cdf0e10cSrcweir // class SvxGeneralTabPage -----------------------------------------------
61cdf0e10cSrcweir 
62cdf0e10cSrcweir class SvxGeneralTabPage : public SfxTabPage
63cdf0e10cSrcweir {
64cdf0e10cSrcweir 	using TabPage::DeactivatePage;
65cdf0e10cSrcweir private:
66cdf0e10cSrcweir     FixedLine           aAddrFrm;
67cdf0e10cSrcweir 	FixedText 			aCompanyLbl;
68cdf0e10cSrcweir     SvxUserEdit         aCompanyEdit;
69cdf0e10cSrcweir 	FixedText 			aNameLbl;
70cdf0e10cSrcweir 	FixedText 			aNameLblRuss;
71cdf0e10cSrcweir 	FixedText 			aNameLblEastern;
72cdf0e10cSrcweir     SvxUserEdit         aFirstName;
73cdf0e10cSrcweir     SvxUserEdit         aFatherName;
74cdf0e10cSrcweir     SvxUserEdit         aName;
75cdf0e10cSrcweir     SvxUserEdit         aShortName;
76cdf0e10cSrcweir 	FixedText 			aStreetLbl;
77cdf0e10cSrcweir 	FixedText 			aStreetLblRuss;
78cdf0e10cSrcweir     SvxUserEdit         aStreetEdit;
79cdf0e10cSrcweir     SvxUserEdit         aApartmentNrEdit;
80cdf0e10cSrcweir 	FixedText 			aCityLbl;
81cdf0e10cSrcweir     SvxUserEdit         aPLZEdit;
82cdf0e10cSrcweir     SvxUserEdit         aCityEdit;
83cdf0e10cSrcweir     SvxUserEdit         aUsCityEdit;
84cdf0e10cSrcweir     SvxUserEdit         aUsStateEdit;
85cdf0e10cSrcweir     SvxUserEdit         aUsZipEdit;
86cdf0e10cSrcweir 	FixedText			aCountryLbl;
87cdf0e10cSrcweir     SvxUserEdit         aCountryEdit;
88cdf0e10cSrcweir 	FixedText 			aTitlePosLbl;
89cdf0e10cSrcweir     SvxUserEdit         aTitleEdit;
90cdf0e10cSrcweir     SvxUserEdit         aPositionEdit;
91cdf0e10cSrcweir 	FixedText 			aPhoneLbl;
92cdf0e10cSrcweir     SvxUserEdit         aTelPrivEdit;
93cdf0e10cSrcweir     SvxUserEdit         aTelCompanyEdit;
94cdf0e10cSrcweir 	FixedText 			aFaxMailLbl;
95cdf0e10cSrcweir     SvxUserEdit         aFaxEdit;
96cdf0e10cSrcweir     SvxUserEdit         aEmailEdit;
97cdf0e10cSrcweir 	CheckBox			aUseDataCB;
98cdf0e10cSrcweir 
99cdf0e10cSrcweir 	GeneralTabPage_Impl*	pImpl;
100cdf0e10cSrcweir 
101cdf0e10cSrcweir #ifdef _SVX_OPTGENRL_CXX
102cdf0e10cSrcweir 	DECL_LINK( ModifyHdl_Impl, Edit * );
103cdf0e10cSrcweir 
104cdf0e10cSrcweir     sal_Bool            GetAddress_Impl();
105cdf0e10cSrcweir     void                SetAddress_Impl();
106cdf0e10cSrcweir #endif
107cdf0e10cSrcweir 
108cdf0e10cSrcweir protected:
109cdf0e10cSrcweir 	virtual int			DeactivatePage( SfxItemSet* pSet );
110cdf0e10cSrcweir 
111cdf0e10cSrcweir public:
112cdf0e10cSrcweir 	SvxGeneralTabPage( Window* pParent, const SfxItemSet& rSet );
113cdf0e10cSrcweir 	~SvxGeneralTabPage();
114cdf0e10cSrcweir 
115cdf0e10cSrcweir 	static SfxTabPage*	Create( Window* pParent, const SfxItemSet& rAttrSet );
116cdf0e10cSrcweir 
117cdf0e10cSrcweir 	virtual	sal_Bool 		FillItemSet( SfxItemSet& rSet );
118cdf0e10cSrcweir 	virtual	void 		Reset( const SfxItemSet& rSet );
119cdf0e10cSrcweir };
120cdf0e10cSrcweir 
121cdf0e10cSrcweir #endif // #ifndef _SVX_CUIOPTGENRL_HXX
122cdf0e10cSrcweir 
123cdf0e10cSrcweir 
124