Line data Source code
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 _SVX_HDFT_HXX
20 : #define _SVX_HDFT_HXX
21 :
22 : #include <sfx2/tabdlg.hxx>
23 :
24 : #include <vcl/fixed.hxx>
25 :
26 : #include <vcl/field.hxx>
27 :
28 : #include <vcl/group.hxx>
29 : #include <svx/pagectrl.hxx>
30 : #include "svx/svxdllapi.h"
31 :
32 : namespace svx
33 : {
34 : SVX_DLLPUBLIC bool ShowBorderBackgroundDlg( Window* pParent, SfxItemSet* pBBSet,
35 : bool bEnableBackgroundSelector );
36 : }
37 :
38 : // class SvxHFPage ------------------------------------------------------
39 :
40 : class SVX_DLLPUBLIC SvxHFPage: public SfxTabPage
41 : {
42 : using TabPage::ActivatePage;
43 : using TabPage::DeactivatePage;
44 :
45 : public:
46 :
47 : virtual sal_Bool FillItemSet( SfxItemSet& rOutSet );
48 : virtual void Reset( const SfxItemSet& rSet );
49 :
50 : virtual ~SvxHFPage();
51 :
52 0 : void DisableDeleteQueryBox() { bDisableQueryBox = sal_True; }
53 : void EnableBackgroundSelector( sal_Bool bNew ) { bEnableBackgroundSelector = bNew; }
54 : void EnableDynamicSpacing();
55 :
56 : protected:
57 : virtual void ActivatePage( const SfxItemSet& rSet );
58 : virtual int DeactivatePage( SfxItemSet* pSet = 0 );
59 :
60 : SvxHFPage( Window* pParent, sal_uInt16 nResId, const SfxItemSet& rSet,
61 : sal_uInt16 nSetId );
62 :
63 : FixedLine aFrm;
64 : CheckBox aTurnOnBox;
65 : CheckBox aCntSharedBox;
66 : CheckBox aCntSharedFirstBox;
67 : FixedText aLMLbl;
68 : MetricField aLMEdit;
69 : FixedText aRMLbl;
70 : MetricField aRMEdit;
71 : FixedText aDistFT;
72 : MetricField aDistEdit;
73 : CheckBox aDynSpacingCB;
74 : FixedText aHeightFT;
75 : MetricField aHeightEdit;
76 : CheckBox aHeightDynBtn;
77 : SvxPageWindow aBspWin;
78 : PushButton aBackgroundBtn;
79 :
80 : sal_uInt16 nId;
81 : SfxItemSet* pBBSet;
82 : sal_Bool bDisableQueryBox;
83 : sal_Bool bEnableBackgroundSelector;
84 : bool bInReset;
85 :
86 : void InitHandler();
87 : DECL_LINK( TurnOnHdl, CheckBox*);
88 : DECL_LINK(DistModify, void *);
89 : DECL_LINK(HeightModify, void *);
90 : DECL_LINK(BorderModify, void *);
91 : DECL_LINK(BackgroundHdl, void *);
92 :
93 : void UpdateExample();
94 : DECL_LINK(RangeHdl, void *);
95 :
96 : private:
97 : #ifdef _SVX_HDFT_CXX
98 : SVX_DLLPRIVATE void ResetBackground_Impl( const SfxItemSet& rSet );
99 : #endif
100 : };
101 :
102 : // class SvxHeaderPage ---------------------------------------------------
103 :
104 : class SVX_DLLPUBLIC SvxHeaderPage : public SvxHFPage
105 : {
106 : public:
107 : static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet );
108 : static sal_uInt16* GetRanges();
109 :
110 : private:
111 : SvxHeaderPage( Window* pParent, const SfxItemSet& rSet );
112 : };
113 :
114 : // class SvxFooterPage ---------------------------------------------------
115 :
116 : class SVX_DLLPUBLIC SvxFooterPage : public SvxHFPage
117 : {
118 : public:
119 : static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet );
120 : static sal_uInt16* GetRanges();
121 :
122 : private:
123 : SVX_DLLPRIVATE SvxFooterPage( Window* pParent, const SfxItemSet& rSet );
124 : };
125 :
126 : #endif
127 :
128 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|