Version 5.4.3.2, tag libreoffice-5.4.3.2
[LibreOffice.git] / include / svx / hdft.hxx
blob335f7aa74abb3209dd439ff4e263793b9d65f762
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/fixed.hxx>
25 #include <vcl/field.hxx>
26 #include <vcl/group.hxx>
27 #include <vcl/layout.hxx>
29 #include <svx/pagectrl.hxx>
30 #include <svx/svxdllapi.h>
32 namespace svx
34 SVX_DLLPUBLIC bool ShowBorderBackgroundDlg( vcl::Window* pParent, SfxItemSet* pBBSet,
35 bool bEnableBackgroundSelector );
38 // class SvxHFPage ------------------------------------------------------
40 class SVX_DLLPUBLIC SvxHFPage : public SfxTabPage
42 using TabPage::ActivatePage;
43 using TabPage::DeactivatePage;
45 public:
47 virtual bool FillItemSet( SfxItemSet* rOutSet ) override;
48 virtual void Reset( const SfxItemSet* rSet ) override;
50 virtual ~SvxHFPage() override;
51 virtual void dispose() override;
53 void DisableDeleteQueryBox() { mbDisableQueryBox = true; }
55 virtual void PageCreated(const SfxAllItemSet&) override;
57 void EnableDynamicSpacing();
59 protected:
60 static const sal_uInt16 pRanges[];
62 virtual void ActivatePage( const SfxItemSet& rSet ) override;
63 virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
65 SvxHFPage( vcl::Window* pParent, const SfxItemSet& rSet, sal_uInt16 nSetId );
67 VclPtr<FixedText> m_pPageLbl;
68 VclPtr<CheckBox> m_pTurnOnBox;
69 VclPtr<CheckBox> m_pCntSharedBox;
70 VclPtr<CheckBox> m_pCntSharedFirstBox;
71 VclPtr<FixedText> m_pLMLbl;
72 VclPtr<MetricField> m_pLMEdit;
73 VclPtr<FixedText> m_pRMLbl;
74 VclPtr<MetricField> m_pRMEdit;
75 VclPtr<FixedText> m_pDistFT;
76 VclPtr<MetricField> m_pDistEdit;
77 VclPtr<CheckBox> m_pDynSpacingCB;
78 VclPtr<FixedText> m_pHeightFT;
79 VclPtr<MetricField> m_pHeightEdit;
80 VclPtr<CheckBox> m_pHeightDynBtn;
81 VclPtr<SvxPageWindow> m_pBspWin;
82 VclPtr<PushButton> m_pBackgroundBtn;
84 sal_uInt16 nId;
85 SfxItemSet* pBBSet;
86 bool mbDisableQueryBox : 1;
87 bool mbEnableDrawingLayerFillStyles : 1;
89 void InitHandler();
90 DECL_LINK(TurnOnHdl, Button*, void);
91 DECL_LINK(DistModify, Edit&, void);
92 DECL_LINK(HeightModify, Edit&, void);
93 DECL_LINK(BorderModify, Edit&, void);
94 DECL_LINK(BackgroundHdl, Button*, void);
95 DECL_LINK(RangeFocusHdl, Control&, void);
96 void RangeHdl();
97 void UpdateExample();
99 private:
100 SVX_DLLPRIVATE void ResetBackground_Impl( const SfxItemSet& rSet );
103 // class SvxHeaderPage ---------------------------------------------------
105 class SVX_DLLPUBLIC SvxHeaderPage : public SvxHFPage
107 public:
108 static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rSet );
109 // returns the Which values to the range
110 static const sal_uInt16* GetRanges() { return pRanges; }
111 SVX_DLLPRIVATE SvxHeaderPage( vcl::Window* pParent, const SfxItemSet& rSet );
114 // class SvxFooterPage ---------------------------------------------------
116 class SVX_DLLPUBLIC SvxFooterPage : public SvxHFPage
118 public:
119 static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rSet );
120 static const sal_uInt16* GetRanges() { return pRanges; }
121 SVX_DLLPRIVATE SvxFooterPage( vcl::Window* pParent, const SfxItemSet& rSet );
124 class SVX_DLLPUBLIC DeleteHeaderDialog : public MessageDialog
126 public:
127 DeleteHeaderDialog(vcl::Window *pParent)
128 : MessageDialog(pParent, "DeleteHeaderDialog",
129 "svx/ui/deleteheaderdialog.ui")
134 class SVX_DLLPUBLIC DeleteFooterDialog : public MessageDialog
136 public:
137 DeleteFooterDialog(vcl::Window *pParent)
138 : MessageDialog(pParent, "DeleteFooterDialog",
139 "svx/ui/deletefooterdialog.ui")
144 #endif
146 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */