bump product version to 6.3.0.0.beta1
[LibreOffice.git] / include / svx / hdft.hxx
bloba062476931a59fa45192e9d8d7e0fb93797eefb8
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 using TabPage::ActivatePage;
40 using TabPage::DeactivatePage;
42 public:
44 virtual bool FillItemSet( SfxItemSet* rOutSet ) override;
45 virtual void Reset( const SfxItemSet* rSet ) override;
47 virtual ~SvxHFPage() override;
49 void DisableDeleteQueryBox() { mbDisableQueryBox = true; }
51 virtual void PageCreated(const SfxAllItemSet&) override;
53 void EnableDynamicSpacing();
55 protected:
56 static const sal_uInt16 pRanges[];
58 virtual void ActivatePage( const SfxItemSet& rSet ) override;
59 virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
61 SvxHFPage(TabPageParent pParent, const SfxItemSet& rSet, sal_uInt16 nSetId);
63 sal_uInt16 const nId;
64 std::unique_ptr<SfxItemSet> pBBSet;
65 bool mbDisableQueryBox : 1;
66 bool mbEnableDrawingLayerFillStyles : 1;
68 SvxPageWindow m_aBspWin;
69 std::unique_ptr<weld::Label> m_xPageLbl;
70 std::unique_ptr<weld::CheckButton> m_xTurnOnBox;
71 std::unique_ptr<weld::CheckButton> m_xCntSharedBox;
72 std::unique_ptr<weld::CheckButton> m_xCntSharedFirstBox;
73 std::unique_ptr<weld::Label> m_xLMLbl;
74 std::unique_ptr<weld::MetricSpinButton>m_xLMEdit;
75 std::unique_ptr<weld::Label> m_xRMLbl;
76 std::unique_ptr<weld::MetricSpinButton> m_xRMEdit;
77 std::unique_ptr<weld::Label> m_xDistFT;
78 std::unique_ptr<weld::MetricSpinButton> m_xDistEdit;
79 std::unique_ptr<weld::CheckButton> m_xDynSpacingCB;
80 std::unique_ptr<weld::Label> m_xHeightFT;
81 std::unique_ptr<weld::MetricSpinButton> m_xHeightEdit;
82 std::unique_ptr<weld::CheckButton> m_xHeightDynBtn;
83 std::unique_ptr<weld::Button> m_xBackgroundBtn;
84 std::unique_ptr<weld::CustomWeld> m_xBspWin;
86 void InitHandler();
87 void TurnOn(const weld::ToggleButton* pButton);
88 DECL_LINK(TurnOnHdl, weld::ToggleButton&, void);
89 DECL_LINK(BackgroundHdl, weld::Button&, void);
90 DECL_LINK(ValueChangeHdl, weld::MetricSpinButton&, void);
91 void RangeHdl();
92 void UpdateExample();
94 private:
95 SVX_DLLPRIVATE void ResetBackground_Impl( const SfxItemSet& rSet );
98 class SVX_DLLPUBLIC SvxHeaderPage : public SvxHFPage
100 public:
101 static VclPtr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rSet );
102 // returns the Which values to the range
103 static const sal_uInt16* GetRanges() { return pRanges; }
104 SVX_DLLPRIVATE SvxHeaderPage(TabPageParent pParent, const SfxItemSet& rSet);
107 class SVX_DLLPUBLIC SvxFooterPage : public SvxHFPage
109 public:
110 static VclPtr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rSet );
111 static const sal_uInt16* GetRanges() { return pRanges; }
112 SVX_DLLPRIVATE SvxFooterPage(TabPageParent pParent, const SfxItemSet& rSet);
115 class SVX_DLLPUBLIC DeleteHeaderDialog : public weld::MessageDialogController
117 public:
118 DeleteHeaderDialog(weld::Widget* pParent)
119 : MessageDialogController(pParent, "svx/ui/deleteheaderdialog.ui",
120 "DeleteHeaderDialog")
125 class SVX_DLLPUBLIC DeleteFooterDialog : public weld::MessageDialogController
127 public:
128 DeleteFooterDialog(weld::Widget* pParent)
129 : MessageDialogController(pParent, "svx/ui/deletefooterdialog.ui",
130 "DeleteFooterDialog")
135 #endif
137 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */