xref: /trunk/main/sw/source/ui/envelp/envprt.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 
24 #ifndef _ENVPRT_HXX
25 #define _ENVPRT_HXX
26 
27 
28 #include <sfx2/tabdlg.hxx>
29 #include <vcl/toolbox.hxx>
30 #include <vcl/field.hxx>
31 #include <vcl/fixed.hxx>
32 #include <vcl/group.hxx>
33 #ifndef _SV_BUTTON_HXX //autogen
34 #include <vcl/button.hxx>
35 #endif
36 #include <svtools/stdctrl.hxx>
37 
38 
39 
40 #include "envimg.hxx"
41 
42 class SwEnvDlg;
43 
44 // class SwEnvPrtPage ---------------------------------------------------------
45 
46 class SwEnvPrtPage : public SfxTabPage
47 {
48 	ToolBox      aAlignBox;
49 	RadioButton  aTopButton;
50 	RadioButton  aBottomButton;
51 	FixedText    aRightText;
52 	MetricField  aRightField;
53 	FixedText    aDownText;
54 	MetricField  aDownField;
55 	FixedInfo    aPrinterInfo;
56     FixedLine    aNoNameFL;
57     FixedLine    aPrinterFL;
58 	PushButton   aPrtSetup;
59 
60 	Printer* pPrt;
61 
62 	 SwEnvPrtPage(Window* pParent, const SfxItemSet& rSet);
63 	~SwEnvPrtPage();
64 
65 	DECL_LINK( ClickHdl, Button * );
66 	DECL_LINK( AlignHdl, ToolBox * );
67 	DECL_LINK( ButtonHdl, Button * );
68 
69 	using Window::GetParent;
GetParent()70 	SwEnvDlg* GetParent() {return (SwEnvDlg*) SfxTabPage::GetParent()->GetParent();}
71 
72     using TabPage::ActivatePage;
73     using TabPage::DeactivatePage;
74 
75 public:
76 
77 	static SfxTabPage* Create(Window* pParent, const SfxItemSet& rSet);
78 
79 	virtual void ActivatePage(const SfxItemSet& rSet);
80 	virtual int  DeactivatePage(SfxItemSet* pSet = 0);
81 			void FillItem(SwEnvItem& rItem);
82 	virtual sal_Bool FillItemSet(SfxItemSet& rSet);
83 	virtual void Reset(const SfxItemSet& rSet);
84 
SetPrt(Printer * pPrinter)85 	inline void SetPrt(Printer* pPrinter) { pPrt = pPrinter; }
86 };
87 
88 #endif
89 
90