/src/libreoffice/include/svx/hdft.hxx
Line | Count | Source |
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 | | #ifndef INCLUDED_SVX_HDFT_HXX |
20 | | #define INCLUDED_SVX_HDFT_HXX |
21 | | |
22 | | #include <sfx2/tabdlg.hxx> |
23 | | |
24 | | #include <vcl/weld/MetricSpinButton.hxx> |
25 | | #include <vcl/weld/weld.hxx> |
26 | | |
27 | | #include <svx/pagectrl.hxx> |
28 | | #include <svx/svxdllapi.h> |
29 | | #include <memory> |
30 | | |
31 | | namespace weld { class CustomWeld; } |
32 | | |
33 | | namespace svx |
34 | | { |
35 | | SVX_DLLPUBLIC bool ShowBorderBackgroundDlg(weld::Window* pParent, SfxItemSet* pBBSet); |
36 | | } |
37 | | |
38 | | class SVX_DLLPUBLIC SvxHFPage : public SfxTabPage |
39 | | { |
40 | | public: |
41 | | |
42 | | virtual bool FillItemSet( SfxItemSet* rOutSet ) override; |
43 | | virtual void Reset( const SfxItemSet* rSet ) override; |
44 | | |
45 | | virtual ~SvxHFPage() override; |
46 | | |
47 | 0 | void DisableDeleteQueryBox() { mbDisableQueryBox = true; } |
48 | | |
49 | | virtual void PageCreated(const SfxAllItemSet&) override; |
50 | | |
51 | | void EnableDynamicSpacing(); |
52 | | |
53 | | protected: |
54 | | static const WhichRangesContainer pRanges; |
55 | | |
56 | | virtual void ActivatePage( const SfxItemSet& rSet ) override; |
57 | | virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override; |
58 | | |
59 | | SvxHFPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet, sal_uInt16 nSetId); |
60 | | |
61 | | sal_uInt16 m_nId; |
62 | | std::unique_ptr<SfxItemSet> m_pBBSet; |
63 | | bool mbDisableQueryBox : 1; |
64 | | bool mbEnableDrawingLayerFillStyles : 1; |
65 | | |
66 | | SvxPageWindow m_aBspWin; |
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::Frame> m_xFrame; |
82 | | std::unique_ptr<weld::CustomWeld> m_xBspWin; |
83 | | |
84 | | void InitHandler(); |
85 | | void TurnOn(const weld::Toggleable* pButton); |
86 | | DECL_LINK(TurnOnHdl, weld::Toggleable&, void); |
87 | | DECL_DLLPRIVATE_LINK(BackgroundHdl, weld::Button&, void); |
88 | | DECL_DLLPRIVATE_LINK(ValueChangeHdl, weld::MetricSpinButton&, void); |
89 | | void RangeHdl(); |
90 | | void UpdateExample(); |
91 | | |
92 | | private: |
93 | | SVX_DLLPRIVATE void ResetBackground_Impl( const SfxItemSet& rSet ); |
94 | | bool m_bIsCalc; |
95 | | }; |
96 | | |
97 | | class SVX_DLLPUBLIC SvxHeaderPage final : public SvxHFPage |
98 | | { |
99 | | public: |
100 | | static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet ); |
101 | | // returns the Which values to the range |
102 | 0 | static const WhichRangesContainer & GetRanges() { return pRanges; } |
103 | | SVX_DLLPRIVATE SvxHeaderPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet); |
104 | | }; |
105 | | |
106 | | class SVX_DLLPUBLIC SvxFooterPage final : public SvxHFPage |
107 | | { |
108 | | public: |
109 | | static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet ); |
110 | 0 | static const WhichRangesContainer & GetRanges() { return pRanges; } |
111 | | SVX_DLLPRIVATE SvxFooterPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet); |
112 | | }; |
113 | | |
114 | | class SVX_DLLPUBLIC DeleteHeaderDialog final : public weld::MessageDialogController |
115 | | { |
116 | | public: |
117 | | DeleteHeaderDialog(weld::Widget* pParent) |
118 | 0 | : MessageDialogController(pParent, u"svx/ui/deleteheaderdialog.ui"_ustr, |
119 | 0 | u"DeleteHeaderDialog"_ustr) |
120 | 0 | { |
121 | 0 | } |
122 | | }; |
123 | | |
124 | | class SVX_DLLPUBLIC DeleteFooterDialog final : public weld::MessageDialogController |
125 | | { |
126 | | public: |
127 | | DeleteFooterDialog(weld::Widget* pParent) |
128 | 0 | : MessageDialogController(pParent, u"svx/ui/deletefooterdialog.ui"_ustr, |
129 | 0 | u"DeleteFooterDialog"_ustr) |
130 | 0 | { |
131 | 0 | } |
132 | | }; |
133 | | |
134 | | #endif |
135 | | |
136 | | /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |