Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : : #ifndef _SVX_HDFT_HXX
29 : : #define _SVX_HDFT_HXX
30 : :
31 : : #include <sfx2/tabdlg.hxx>
32 : :
33 : : #include <vcl/fixed.hxx>
34 : :
35 : : #include <vcl/field.hxx>
36 : :
37 : : #include <vcl/group.hxx>
38 : : #include <svx/pagectrl.hxx>
39 : : #include "svx/svxdllapi.h"
40 : :
41 : : namespace svx
42 : : {
43 : : SVX_DLLPUBLIC bool ShowBorderBackgroundDlg( Window* pParent, SfxItemSet* pBBSet,
44 : : bool bEnableBackgroundSelector );
45 : : }
46 : :
47 : : // class SvxHFPage ------------------------------------------------------
48 : :
49 : : class SVX_DLLPUBLIC SvxHFPage: public SfxTabPage
50 : : {
51 : : using TabPage::ActivatePage;
52 : : using TabPage::DeactivatePage;
53 : :
54 : : public:
55 : :
56 : : virtual sal_Bool FillItemSet( SfxItemSet& rOutSet );
57 : : virtual void Reset( const SfxItemSet& rSet );
58 : :
59 : : virtual ~SvxHFPage();
60 : :
61 : 0 : void DisableDeleteQueryBox() { bDisableQueryBox = sal_True; }
62 : : void EnableBackgroundSelector( sal_Bool bNew ) { bEnableBackgroundSelector = bNew; }
63 : : void EnableDynamicSpacing();
64 : :
65 : : protected:
66 : : virtual void ActivatePage( const SfxItemSet& rSet );
67 : : virtual int DeactivatePage( SfxItemSet* pSet = 0 );
68 : :
69 : : SvxHFPage( Window* pParent, sal_uInt16 nResId, const SfxItemSet& rSet,
70 : : sal_uInt16 nSetId );
71 : :
72 : : FixedLine aFrm;
73 : : CheckBox aTurnOnBox;
74 : : CheckBox aCntSharedBox;
75 : : FixedText aLMLbl;
76 : : MetricField aLMEdit;
77 : : FixedText aRMLbl;
78 : : MetricField aRMEdit;
79 : : FixedText aDistFT;
80 : : MetricField aDistEdit;
81 : : CheckBox aDynSpacingCB;
82 : : FixedText aHeightFT;
83 : : MetricField aHeightEdit;
84 : : CheckBox aHeightDynBtn;
85 : : SvxPageWindow aBspWin;
86 : : PushButton aBackgroundBtn;
87 : :
88 : : sal_uInt16 nId;
89 : : SfxItemSet* pBBSet;
90 : : sal_Bool bDisableQueryBox;
91 : : sal_Bool bEnableBackgroundSelector;
92 : : bool bInReset;
93 : :
94 : : void InitHandler();
95 : : DECL_LINK( TurnOnHdl, CheckBox*);
96 : : DECL_LINK(DistModify, void *);
97 : : DECL_LINK(HeightModify, void *);
98 : : DECL_LINK(BorderModify, void *);
99 : : DECL_LINK(BackgroundHdl, void *);
100 : :
101 : : void UpdateExample();
102 : : DECL_LINK(RangeHdl, void *);
103 : :
104 : : private:
105 : : #ifdef _SVX_HDFT_CXX
106 : : SVX_DLLPRIVATE void ResetBackground_Impl( const SfxItemSet& rSet );
107 : : #endif
108 : : };
109 : :
110 : : // class SvxHeaderPage ---------------------------------------------------
111 : :
112 : : class SVX_DLLPUBLIC SvxHeaderPage : public SvxHFPage
113 : : {
114 : : public:
115 : : static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet );
116 : : static sal_uInt16* GetRanges();
117 : :
118 : : private:
119 : : SvxHeaderPage( Window* pParent, const SfxItemSet& rSet );
120 : : };
121 : :
122 : : // class SvxFooterPage ---------------------------------------------------
123 : :
124 : : class SVX_DLLPUBLIC SvxFooterPage : public SvxHFPage
125 : : {
126 : : public:
127 : : static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet );
128 : : static sal_uInt16* GetRanges();
129 : :
130 : : private:
131 : : SVX_DLLPRIVATE SvxFooterPage( Window* pParent, const SfxItemSet& rSet );
132 : : };
133 : :
134 : : #endif
135 : :
136 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|