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