LibreOffice Module sw (master)  1
envprt.hxx
Go to the documentation of this file.
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/print.hxx>
25 #include <vcl/weld.hxx>
26 
27 #include <envimg.hxx>
28 #include <envlop.hxx>
29 
30 class SwEnvDlg;
31 
32 class SwEnvPrtPage : public SfxTabPage
33 {
34  std::unique_ptr<weld::Widget> m_xUpper;
35  std::unique_ptr<weld::Widget> m_xLower;
36  std::unique_ptr<weld::RadioButton> m_xTopButton;
37  std::unique_ptr<weld::RadioButton> m_xBottomButton;
38  std::unique_ptr<weld::MetricSpinButton> m_xRightField;
39  std::unique_ptr<weld::MetricSpinButton> m_xDownField;
40  std::unique_ptr<weld::Label> m_xPrinterInfo;
41  std::unique_ptr<weld::Button> m_xPrtSetup;
42 
43  std::unique_ptr<weld::RadioButton> m_aIdsL[ENV_VER_RGHT-ENV_HOR_LEFT+1];
44  std::unique_ptr<weld::RadioButton> m_aIdsU[ENV_VER_RGHT-ENV_HOR_LEFT+1];
45 
47 
48  DECL_LINK(LowerHdl, weld::ToggleButton&, void);
49  DECL_LINK(UpperHdl, weld::ToggleButton&, void);
50  DECL_LINK(ClickHdl, weld::ToggleButton&, void);
51  DECL_LINK(AlignHdl, weld::ToggleButton&, void);
52  DECL_LINK(ButtonHdl, weld::Button&, void );
53 
54  SwEnvDlg* GetParentSwEnvDlg() {return static_cast<SwEnvDlg*>(GetDialogController()); }
55 
58 
59 public:
60  SwEnvPrtPage(TabPageParent pParent, const SfxItemSet& rSet);
61  virtual void dispose() override
62  {
63  m_xPrt.clear();
65  }
66  virtual ~SwEnvPrtPage() override;
67 
68  static VclPtr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rSet);
69 
70  virtual void ActivatePage(const SfxItemSet& rSet) override;
71  virtual DeactivateRC DeactivatePage(SfxItemSet* pSet) override;
72  void FillItem(SwEnvItem& rItem);
73  virtual bool FillItemSet(SfxItemSet* rSet) override;
74  virtual void Reset(const SfxItemSet* rSet) override;
75 
76  void SetPrt(Printer* pPrinter) { m_xPrt = pPrinter; }
77 };
78 
79 #endif
80 
81 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void ActivatePage(const SfxItemSet &rSet) override
Definition: envprt.cxx:135
const SfxItemSet * pSet
void SetPrt(Printer *pPrinter)
Definition: envprt.hxx:76
std::unique_ptr< weld::Widget > m_xUpper
Definition: envprt.hxx:34
virtual void Reset(const SfxItemSet *rSet) override
Definition: envprt.cxx:174
std::unique_ptr< weld::RadioButton > m_aIdsL[ENV_VER_RGHT-ENV_HOR_LEFT+1]
Definition: envprt.hxx:43
std::unique_ptr< weld::Label > m_xPrinterInfo
Definition: envprt.hxx:40
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: envprt.cxx:167
DECL_LINK(LowerHdl, weld::ToggleButton &, void)
std::unique_ptr< weld::MetricSpinButton > m_xDownField
Definition: envprt.hxx:39
static VclPtr< SfxTabPage > Create(TabPageParent pParent, const SfxItemSet *rSet)
Definition: envprt.cxx:130
virtual void dispose() override
virtual void ActivatePage()
virtual ~SwEnvPrtPage() override
Definition: envprt.cxx:77
void FillItem(SwEnvItem &rItem)
Definition: envprt.cxx:148
std::unique_ptr< weld::RadioButton > m_aIdsU[ENV_VER_RGHT-ENV_HOR_LEFT+1]
Definition: envprt.hxx:44
std::unique_ptr< weld::Widget > m_xLower
Definition: envprt.hxx:35
std::unique_ptr< weld::Button > m_xPrtSetup
Definition: envprt.hxx:41
SwEnvPrtPage(TabPageParent pParent, const SfxItemSet &rSet)
Definition: envprt.cxx:32
std::unique_ptr< weld::MetricSpinButton > m_xRightField
Definition: envprt.hxx:38
std::unique_ptr< weld::RadioButton > m_xTopButton
Definition: envprt.hxx:36
virtual void dispose() override
Definition: envprt.hxx:61
SwEnvDlg * GetParentSwEnvDlg()
Definition: envprt.hxx:54
SfxOkDialogController * GetDialogController() const
VclPtr< Printer > m_xPrt
Definition: envprt.hxx:46
std::unique_ptr< weld::RadioButton > m_xBottomButton
Definition: envprt.hxx:37
DeactivateRC
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
Definition: envprt.cxx:141
virtual void DeactivatePage()