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 private: 52 //UUUU EnableDrawingLayerFillStyles(bool bNew)53 void EnableDrawingLayerFillStyles(bool bNew) { mbEnableDrawingLayerFillStyles = bNew; } 54 55 public: 56 57 virtual sal_Bool FillItemSet( SfxItemSet& rOutSet ); 58 virtual void Reset( const SfxItemSet& rSet ); 59 60 virtual ~SvxHFPage(); 61 DisableDeleteQueryBox()62 void DisableDeleteQueryBox() { mbDisableQueryBox = true; } EnableBackgroundSelector(bool bNew)63 void EnableBackgroundSelector(bool bNew) { mbEnableBackgroundSelector = bNew; } 64 65 //UUUU 66 virtual void PageCreated(SfxAllItemSet aSet); 67 68 void EnableDynamicSpacing(); 69 70 protected: 71 virtual void ActivatePage( const SfxItemSet& rSet ); 72 virtual int DeactivatePage( SfxItemSet* pSet = 0 ); 73 74 SvxHFPage( Window* pParent, sal_uInt16 nResId, const SfxItemSet& rSet, 75 sal_uInt16 nSetId ); 76 77 FixedLine aFrm; 78 CheckBox aTurnOnBox; 79 CheckBox aCntSharedBox; 80 FixedText aLMLbl; 81 MetricField aLMEdit; 82 FixedText aRMLbl; 83 MetricField aRMEdit; 84 FixedText aDistFT; 85 MetricField aDistEdit; 86 CheckBox aDynSpacingCB; 87 FixedText aHeightFT; 88 MetricField aHeightEdit; 89 CheckBox aHeightDynBtn; 90 SvxPageWindow aBspWin; 91 PushButton aBackgroundBtn; 92 93 sal_uInt16 nId; 94 SfxItemSet* pBBSet; 95 96 /// bitfield 97 bool mbDisableQueryBox : 1; 98 bool mbEnableBackgroundSelector : 1; 99 bool mbEnableDrawingLayerFillStyles : 1; 100 101 void InitHandler(); 102 DECL_LINK( TurnOnHdl, CheckBox*); 103 DECL_LINK( DistModify, MetricField*); 104 DECL_LINK( HeightModify, MetricField*); 105 DECL_LINK( BorderModify, MetricField*); 106 DECL_LINK( BackgroundHdl, Button*); 107 108 void UpdateExample(); 109 DECL_LINK( RangeHdl, Edit*); 110 111 private: 112 #ifdef _SVX_HDFT_CXX 113 SVX_DLLPRIVATE void ResetBackground_Impl( const SfxItemSet& rSet ); 114 #endif 115 }; 116 117 // class SvxHeaderPage --------------------------------------------------- 118 119 class SVX_DLLPUBLIC SvxHeaderPage : public SvxHFPage 120 { 121 public: 122 static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet ); 123 static sal_uInt16* GetRanges(); 124 125 private: 126 SvxHeaderPage( Window* pParent, const SfxItemSet& rSet ); 127 }; 128 129 // class SvxFooterPage --------------------------------------------------- 130 131 class SVX_DLLPUBLIC SvxFooterPage : public SvxHFPage 132 { 133 public: 134 static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet ); 135 static sal_uInt16* GetRanges(); 136 137 private: 138 SVX_DLLPRIVATE SvxFooterPage( Window* pParent, const SfxItemSet& rSet ); 139 }; 140 141 #endif 142 143