1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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>
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
;
47 void EnableDrawingLayerFillStyles(bool bNew
) { mbEnableDrawingLayerFillStyles
= bNew
; }
51 virtual bool FillItemSet( SfxItemSet
* rOutSet
) SAL_OVERRIDE
;
52 virtual void Reset( const SfxItemSet
* rSet
) SAL_OVERRIDE
;
55 virtual void dispose() SAL_OVERRIDE
;
57 void DisableDeleteQueryBox() { mbDisableQueryBox
= true; }
58 void EnableBackgroundSelector(bool bNew
) { mbEnableBackgroundSelector
= bNew
; }
61 virtual void PageCreated(const SfxAllItemSet
&) SAL_OVERRIDE
;
63 void EnableDynamicSpacing();
66 static const sal_uInt16 pRanges
[];
68 virtual void ActivatePage( const SfxItemSet
& rSet
) SAL_OVERRIDE
;
69 virtual sfxpg
DeactivatePage( SfxItemSet
* pSet
= 0 ) SAL_OVERRIDE
;
71 SvxHFPage( vcl::Window
* pParent
, const SfxItemSet
& rSet
, sal_uInt16 nSetId
);
73 VclPtr
<FixedText
> m_pPageLbl
;
74 VclPtr
<CheckBox
> m_pTurnOnBox
;
75 VclPtr
<CheckBox
> m_pCntSharedBox
;
76 VclPtr
<CheckBox
> m_pCntSharedFirstBox
;
77 VclPtr
<FixedText
> m_pLMLbl
;
78 VclPtr
<MetricField
> m_pLMEdit
;
79 VclPtr
<FixedText
> m_pRMLbl
;
80 VclPtr
<MetricField
> m_pRMEdit
;
81 VclPtr
<FixedText
> m_pDistFT
;
82 VclPtr
<MetricField
> m_pDistEdit
;
83 VclPtr
<CheckBox
> m_pDynSpacingCB
;
84 VclPtr
<FixedText
> m_pHeightFT
;
85 VclPtr
<MetricField
> m_pHeightEdit
;
86 VclPtr
<CheckBox
> m_pHeightDynBtn
;
87 VclPtr
<SvxPageWindow
> m_pBspWin
;
88 VclPtr
<PushButton
> m_pBackgroundBtn
;
93 bool mbDisableQueryBox
: 1;
94 bool mbEnableBackgroundSelector
: 1;
95 bool mbEnableDrawingLayerFillStyles
: 1;
98 DECL_LINK( TurnOnHdl
, CheckBox
*);
99 DECL_LINK(DistModify
, void *);
100 DECL_LINK(HeightModify
, void *);
101 DECL_LINK(BorderModify
, void *);
102 DECL_LINK(BackgroundHdl
, void *);
104 void UpdateExample();
105 DECL_LINK(RangeHdl
, void *);
108 SVX_DLLPRIVATE
void ResetBackground_Impl( const SfxItemSet
& rSet
);
111 // class SvxHeaderPage ---------------------------------------------------
113 class SVX_DLLPUBLIC SvxHeaderPage
: public SvxHFPage
116 static VclPtr
<SfxTabPage
> Create( vcl::Window
* pParent
, const SfxItemSet
* rSet
);
117 // returns the Which values to the range
118 static const sal_uInt16
* GetRanges() { return pRanges
; }
119 SVX_DLLPRIVATE
SvxHeaderPage( vcl::Window
* pParent
, const SfxItemSet
& rSet
);
122 // class SvxFooterPage ---------------------------------------------------
124 class SVX_DLLPUBLIC SvxFooterPage
: public SvxHFPage
127 static VclPtr
<SfxTabPage
> Create( vcl::Window
* pParent
, const SfxItemSet
* rSet
);
128 static const sal_uInt16
* GetRanges() { return pRanges
; }
129 SVX_DLLPRIVATE
SvxFooterPage( vcl::Window
* pParent
, const SfxItemSet
& rSet
);
132 class SVX_DLLPUBLIC DeleteHeaderDialog
: public MessageDialog
135 DeleteHeaderDialog(vcl::Window
*pParent
)
136 : MessageDialog(pParent
, "DeleteHeaderDialog",
137 "svx/ui/deleteheaderdialog.ui")
142 class SVX_DLLPUBLIC DeleteFooterDialog
: public MessageDialog
145 DeleteFooterDialog(vcl::Window
*pParent
)
146 : MessageDialog(pParent
, "DeleteFooterDialog",
147 "svx/ui/deletefooterdialog.ui")
154 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */