xref: /aoo4110/main/svx/inc/svx/hdft.hxx (revision b1cdbd2c)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef _SVX_HDFT_HXX
24 #define _SVX_HDFT_HXX
25 
26 // include ---------------------------------------------------------------
27 
28 #include <sfx2/tabdlg.hxx>
29 
30 #ifndef _FIXED_HXX //autogen
31 #include <vcl/fixed.hxx>
32 #endif
33 
34 #ifndef _FIELD_HXX //autogen
35 #include <vcl/field.hxx>
36 #endif
37 
38 #ifndef _GROUP_HXX //autogen
39 #include <vcl/group.hxx>
40 #endif
41 #include <svx/pagectrl.hxx>
42 #include "svx/svxdllapi.h"
43 
44 // class  SvxHFPage ------------------------------------------------------
45 
46 class SVX_DLLPUBLIC SvxHFPage: public SfxTabPage
47 {
48 	using TabPage::ActivatePage;
49 	using TabPage::DeactivatePage;
50 
51 public:
52 
53 	virtual sal_Bool 	FillItemSet( SfxItemSet& rOutSet );
54 	virtual void	Reset( const SfxItemSet& rSet );
55 
56 	virtual 		~SvxHFPage();
57 
DisableDeleteQueryBox()58 	void			DisableDeleteQueryBox() { bDisableQueryBox = sal_True; }
EnableBackgroundSelector(sal_Bool bNew)59 	void			EnableBackgroundSelector( sal_Bool bNew ) { bEnableBackgroundSelector = bNew; }
60     void            EnableDynamicSpacing();
61 
62 protected:
63 	virtual void	ActivatePage( const SfxItemSet& rSet );
64 	virtual int		DeactivatePage( SfxItemSet* pSet = 0 );
65 
66 	SvxHFPage( Window* pParent, sal_uInt16 nResId, const SfxItemSet& rSet,
67 			   sal_uInt16 nSetId );
68 
69 	FixedLine       aFrm;
70 	CheckBox        aTurnOnBox;
71 	CheckBox        aCntSharedBox;
72 	FixedText       aLMLbl;
73 	MetricField     aLMEdit;
74 	FixedText       aRMLbl;
75 	MetricField     aRMEdit;
76 	FixedText		aDistFT;
77 	MetricField     aDistEdit;
78     CheckBox        aDynSpacingCB;
79 	FixedText		aHeightFT;
80 	MetricField     aHeightEdit;
81 	CheckBox     	aHeightDynBtn;
82 	SvxPageWindow	aBspWin;
83 	PushButton		aBackgroundBtn;
84 
85 	sal_uInt16			nId;
86 	SfxItemSet*		pBBSet;
87 	sal_Bool			bDisableQueryBox;
88 	sal_Bool			bEnableBackgroundSelector;
89 	FASTBOOL		bInReset;
90 
91 	void 			InitHandler();
92 	DECL_LINK( TurnOnHdl, CheckBox*);
93 	DECL_LINK( DistModify, MetricField*);
94 	DECL_LINK( HeightModify, MetricField*);
95 	DECL_LINK( BorderModify, MetricField*);
96 	DECL_LINK( BackgroundHdl, Button*);
97 
98 	void			UpdateExample();
99 	DECL_LINK( RangeHdl, Edit*);
100 
101 private:
102 #ifdef _SVX_HDFT_CXX
103 	SVX_DLLPRIVATE void			ResetBackground_Impl( const SfxItemSet& rSet );
104 #endif
105 };
106 
107 // class SvxHeaderPage ---------------------------------------------------
108 
109 class SVX_DLLPUBLIC SvxHeaderPage : public SvxHFPage
110 {
111 public:
112 	static SfxTabPage* 	Create(	Window* pParent, const SfxItemSet& rSet );
113 	static sal_uInt16*		GetRanges();
114 
115 private:
116 	SvxHeaderPage( Window* pParent, const SfxItemSet& rSet );
117 };
118 
119 // class SvxFooterPage ---------------------------------------------------
120 
121 class SVX_DLLPUBLIC SvxFooterPage : public SvxHFPage
122 {
123 public:
124 	static SfxTabPage* 	Create(	Window* pParent, const SfxItemSet& rSet );
125 	static sal_uInt16*		GetRanges();
126 
127 private:
128 	SVX_DLLPRIVATE SvxFooterPage( 	Window* pParent, const SfxItemSet& rSet );
129 };
130 
131 #endif
132 
133