make ValueTransfer easier to understand
[LibreOffice.git] / include / svx / hdft.hxx
blob8eadfa366e6645b47adc5cb1f3036a37509343ff
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_SVX_HDFT_HXX
20 #define INCLUDED_SVX_HDFT_HXX
22 #include <sfx2/tabdlg.hxx>
24 #include <vcl/weld.hxx>
26 #include <svx/pagectrl.hxx>
27 #include <svx/svxdllapi.h>
28 #include <memory>
30 namespace weld { class CustomWeld; }
32 namespace svx
34 SVX_DLLPUBLIC bool ShowBorderBackgroundDlg(weld::Window* pParent, SfxItemSet* pBBSet);
37 class SVX_DLLPUBLIC SvxHFPage : public SfxTabPage
39 public:
41 virtual bool FillItemSet( SfxItemSet* rOutSet ) override;
42 virtual void Reset( const SfxItemSet* rSet ) override;
44 virtual ~SvxHFPage() override;
46 void DisableDeleteQueryBox() { mbDisableQueryBox = true; }
48 virtual void PageCreated(const SfxAllItemSet&) override;
50 void EnableDynamicSpacing();
52 protected:
53 static const WhichRangesContainer pRanges;
55 virtual void ActivatePage( const SfxItemSet& rSet ) override;
56 virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
58 SvxHFPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet, sal_uInt16 nSetId);
60 sal_uInt16 nId;
61 std::unique_ptr<SfxItemSet> pBBSet;
62 bool mbDisableQueryBox : 1;
63 bool mbEnableDrawingLayerFillStyles : 1;
65 SvxPageWindow m_aBspWin;
66 std::unique_ptr<weld::Label> m_xPageLbl;
67 std::unique_ptr<weld::CheckButton> m_xTurnOnBox;
68 std::unique_ptr<weld::CheckButton> m_xCntSharedBox;
69 std::unique_ptr<weld::CheckButton> m_xCntSharedFirstBox;
70 std::unique_ptr<weld::Label> m_xLMLbl;
71 std::unique_ptr<weld::MetricSpinButton>m_xLMEdit;
72 std::unique_ptr<weld::Label> m_xRMLbl;
73 std::unique_ptr<weld::MetricSpinButton> m_xRMEdit;
74 std::unique_ptr<weld::Label> m_xDistFT;
75 std::unique_ptr<weld::MetricSpinButton> m_xDistEdit;
76 std::unique_ptr<weld::CheckButton> m_xDynSpacingCB;
77 std::unique_ptr<weld::Label> m_xHeightFT;
78 std::unique_ptr<weld::MetricSpinButton> m_xHeightEdit;
79 std::unique_ptr<weld::CheckButton> m_xHeightDynBtn;
80 std::unique_ptr<weld::Button> m_xBackgroundBtn;
81 std::unique_ptr<weld::CustomWeld> m_xBspWin;
83 void InitHandler();
84 void TurnOn(const weld::Toggleable* pButton);
85 DECL_LINK(TurnOnHdl, weld::Toggleable&, void);
86 DECL_DLLPRIVATE_LINK(BackgroundHdl, weld::Button&, void);
87 DECL_DLLPRIVATE_LINK(ValueChangeHdl, weld::MetricSpinButton&, void);
88 void RangeHdl();
89 void UpdateExample();
91 private:
92 SVX_DLLPRIVATE void ResetBackground_Impl( const SfxItemSet& rSet );
95 class SVX_DLLPUBLIC SvxHeaderPage final : public SvxHFPage
97 public:
98 static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet );
99 // returns the Which values to the range
100 static WhichRangesContainer GetRanges() { return pRanges; }
101 SVX_DLLPRIVATE SvxHeaderPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
104 class SVX_DLLPUBLIC SvxFooterPage final : public SvxHFPage
106 public:
107 static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet );
108 static WhichRangesContainer GetRanges() { return pRanges; }
109 SVX_DLLPRIVATE SvxFooterPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
112 class SVX_DLLPUBLIC DeleteHeaderDialog final : public weld::MessageDialogController
114 public:
115 DeleteHeaderDialog(weld::Widget* pParent)
116 : MessageDialogController(pParent, "svx/ui/deleteheaderdialog.ui",
117 "DeleteHeaderDialog")
122 class SVX_DLLPUBLIC DeleteFooterDialog final : public weld::MessageDialogController
124 public:
125 DeleteFooterDialog(weld::Widget* pParent)
126 : MessageDialogController(pParent, "svx/ui/deletefooterdialog.ui",
127 "DeleteFooterDialog")
132 #endif
134 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */