Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 :
20 : #ifndef INCLUDED_SW_SOURCE_UI_ENVELP_ENVPRT_HXX
21 : #define INCLUDED_SW_SOURCE_UI_ENVELP_ENVPRT_HXX
22 :
23 : #include <sfx2/tabdlg.hxx>
24 : #include <vcl/toolbox.hxx>
25 : #include <vcl/field.hxx>
26 : #include <vcl/fixed.hxx>
27 : #include <vcl/group.hxx>
28 : #include <vcl/button.hxx>
29 : #include <svtools/stdctrl.hxx>
30 :
31 : #include "envimg.hxx"
32 :
33 : class SwEnvDlg;
34 :
35 0 : class SwEnvPrtPage : public SfxTabPage
36 : {
37 : ToolBox* m_pAlignBox;
38 : RadioButton* m_pTopButton;
39 : RadioButton* m_pBottomButton;
40 : MetricField* m_pRightField;
41 : MetricField* m_pDownField;
42 : FixedText* m_pPrinterInfo;
43 : PushButton* m_pPrtSetup;
44 :
45 : sal_uInt16 m_aIds[ENV_VER_RGHT-ENV_HOR_LEFT+1];
46 :
47 : Printer* pPrt;
48 :
49 : SwEnvPrtPage(vcl::Window* pParent, const SfxItemSet& rSet);
50 :
51 : DECL_LINK(ClickHdl, void *);
52 : DECL_LINK(AlignHdl, void *);
53 : DECL_LINK( ButtonHdl, Button * );
54 :
55 0 : SwEnvDlg* GetParentSwEnvDlg() {return (SwEnvDlg*) GetParentDialog();}
56 :
57 : using TabPage::ActivatePage;
58 : using TabPage::DeactivatePage;
59 :
60 : public:
61 :
62 : static SfxTabPage* Create(vcl::Window* pParent, const SfxItemSet* rSet);
63 :
64 : virtual void ActivatePage(const SfxItemSet& rSet) SAL_OVERRIDE;
65 : virtual int DeactivatePage(SfxItemSet* pSet = 0) SAL_OVERRIDE;
66 : void FillItem(SwEnvItem& rItem);
67 : virtual bool FillItemSet(SfxItemSet* rSet) SAL_OVERRIDE;
68 : virtual void Reset(const SfxItemSet* rSet) SAL_OVERRIDE;
69 :
70 0 : inline void SetPrt(Printer* pPrinter) { pPrt = pPrinter; }
71 : };
72 :
73 : #endif
74 :
75 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|