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#pragma once
21
22#include <sfx2/tabdlg.hxx>
23#include <vcl/print.hxx>
24#include <vcl/weld.hxx>
25
26#include <envimg.hxx>
27#include <envlop.hxx>
28
29class SwEnvDlg;
30
32{
33 std::unique_ptr<weld::Widget> m_xUpper;
34 std::unique_ptr<weld::Widget> m_xLower;
35 std::unique_ptr<weld::RadioButton> m_xTopButton;
36 std::unique_ptr<weld::RadioButton> m_xBottomButton;
37 std::unique_ptr<weld::MetricSpinButton> m_xRightField;
38 std::unique_ptr<weld::MetricSpinButton> m_xDownField;
39 std::unique_ptr<weld::Label> m_xPrinterInfo;
40 std::unique_ptr<weld::Button> m_xPrtSetup;
41
42 std::unique_ptr<weld::RadioButton> m_aIdsL[ENV_VER_RGHT - ENV_HOR_LEFT + 1];
43 std::unique_ptr<weld::RadioButton> m_aIdsU[ENV_VER_RGHT - ENV_HOR_LEFT + 1];
44
46
47 DECL_LINK(LowerHdl, weld::Toggleable&, void);
48 DECL_LINK(UpperHdl, weld::Toggleable&, void);
49 DECL_LINK(ClickHdl, weld::Toggleable&, void);
50 DECL_LINK(ButtonHdl, weld::Button&, void);
51
53
54public:
56 const SfxItemSet& rSet);
57 virtual ~SwEnvPrtPage() override;
58
59 static std::unique_ptr<SfxTabPage>
60 Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet);
61
62 virtual void ActivatePage(const SfxItemSet& rSet) override;
63 virtual DeactivateRC DeactivatePage(SfxItemSet* pSet) override;
64 void FillItem(SwEnvItem& rItem);
65 virtual bool FillItemSet(SfxItemSet* rSet) override;
66 virtual void Reset(const SfxItemSet* rSet) override;
67
68 void SetPrt(Printer* pPrinter) { m_xPrt = pPrinter; }
69};
70
71/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SfxOkDialogController * GetDialogController() const
std::unique_ptr< weld::RadioButton > m_aIdsL[ENV_VER_RGHT - ENV_HOR_LEFT+1]
Definition: envprt.hxx:42
std::unique_ptr< weld::Widget > m_xLower
Definition: envprt.hxx:34
void FillItem(SwEnvItem &rItem)
Definition: envprt.cxx:145
void SetPrt(Printer *pPrinter)
Definition: envprt.hxx:68
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: envprt.cxx:164
DECL_LINK(UpperHdl, weld::Toggleable &, void)
std::unique_ptr< weld::Widget > m_xUpper
Definition: envprt.hxx:33
DECL_LINK(LowerHdl, weld::Toggleable &, void)
std::unique_ptr< weld::MetricSpinButton > m_xRightField
Definition: envprt.hxx:37
std::unique_ptr< weld::Label > m_xPrinterInfo
Definition: envprt.hxx:39
SwEnvDlg * GetParentSwEnvDlg()
Definition: envprt.hxx:52
std::unique_ptr< weld::RadioButton > m_xTopButton
Definition: envprt.hxx:35
std::unique_ptr< weld::Button > m_xPrtSetup
Definition: envprt.hxx:40
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
Definition: envprt.cxx:138
std::unique_ptr< weld::RadioButton > m_xBottomButton
Definition: envprt.hxx:36
std::unique_ptr< weld::RadioButton > m_aIdsU[ENV_VER_RGHT - ENV_HOR_LEFT+1]
Definition: envprt.hxx:43
DECL_LINK(ClickHdl, weld::Toggleable &, void)
virtual void Reset(const SfxItemSet *rSet) override
Definition: envprt.cxx:171
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
Definition: envprt.cxx:127
SwEnvPrtPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
Definition: envprt.cxx:29
std::unique_ptr< weld::MetricSpinButton > m_xDownField
Definition: envprt.hxx:38
virtual ~SwEnvPrtPage() override
Definition: envprt.cxx:74
DECL_LINK(ButtonHdl, weld::Button &, void)
VclPtr< Printer > m_xPrt
Definition: envprt.hxx:45
virtual void ActivatePage(const SfxItemSet &rSet) override
Definition: envprt.cxx:132
@ ENV_VER_RGHT
Definition: envimg.hxx:35
@ ENV_HOR_LEFT
Definition: envimg.hxx:30
DeactivateRC