xref: /aoo42x/main/sw/source/ui/envelp/envfmt.hxx (revision 1d2dbeb0)
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 _ENVFMT_HXX
24 #define _ENVFMT_HXX
25 
26 
27 #ifndef _SVSTDARR_HXX
28 #define _SVSTDARR_USHORTS
29 #include <svl/svstdarr.hxx>
30 #endif
31 #include <svtools/stdctrl.hxx>
32 #ifndef _FIELD_HXX //autogen
33 #include <vcl/field.hxx>
34 #endif
35 #ifndef _MENUBTN_HXX //autogen
36 #include <vcl/menubtn.hxx>
37 #endif
38 #ifndef _GROUP_HXX //autogen
39 #include <vcl/group.hxx>
40 #endif
41 
42 #include "envlop.hxx"
43 
44 class SwTxtFmtColl;
45 
46 // class SwEnvFmtPage ---------------------------------------------------------
47 
48 class SwEnvFmtPage : public SfxTabPage
49 {
50 
51     FixedLine    aAddrFL;
52 	FixedInfo	 aAddrPosInfo;
53 	FixedText    aAddrLeftText;
54 	MetricField  aAddrLeftField;
55 	FixedText    aAddrTopText;
56 	MetricField  aAddrTopField;
57 	FixedInfo	 aAddrFormatInfo;
58 	MenuButton   aAddrEditButton;
59     FixedLine    aSendFL;
60 	FixedInfo	 aSendPosInfo;
61 	FixedText    aSendLeftText;
62 	MetricField  aSendLeftField;
63 	FixedText    aSendTopText;
64 	MetricField  aSendTopField;
65 	FixedInfo	 aSendFormatInfo;
66 	MenuButton   aSendEditButton;
67     FixedLine    aSizeFL;
68 	FixedText    aSizeFormatText;
69 	ListBox      aSizeFormatBox;
70 	FixedText    aSizeWidthText;
71 	MetricField  aSizeWidthField;
72 	FixedText    aSizeHeightText;
73 	MetricField  aSizeHeightField;
74 	SwEnvPreview aPreview;
75 
76 	SvUShorts  aIDs;
77 
78 	 SwEnvFmtPage(Window* pParent, const SfxItemSet& rSet);
79 	~SwEnvFmtPage();
80 
81 	DECL_LINK( ModifyHdl, Edit * );
82 	DECL_LINK( EditHdl, MenuButton * );
83 	DECL_LINK( FormatHdl, ListBox * );
84 
85 	void SetMinMax();
86 
87 	SfxItemSet	*GetCollItemSet(SwTxtFmtColl* pColl, sal_Bool bSender);
88 
89 	using Window::GetParent;
GetParent()90 	SwEnvDlg	*GetParent() {return (SwEnvDlg*) SfxTabPage::GetParent()->GetParent();}
91 
92     using TabPage::ActivatePage;
93     using TabPage::DeactivatePage;
94 
95 public:
96 
97 	static SfxTabPage* Create(Window* pParent, const SfxItemSet& rSet);
98 
99 	virtual void ActivatePage(const SfxItemSet& rSet);
100 	virtual int  DeactivatePage(SfxItemSet* pSet = 0);
101 			void FillItem(SwEnvItem& rItem);
102 	virtual sal_Bool FillItemSet(SfxItemSet& rSet);
103 	virtual void Reset(const SfxItemSet& rSet);
104 };
105 
106 #endif
107 
108 
109