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_BACKGRND_HXX 24 #define _SVX_BACKGRND_HXX 25 26 // include --------------------------------------------------------------- 27 28 #ifndef _GROUP_HXX //autogen 29 #include <vcl/group.hxx> 30 #endif 31 #include <svtools/stdctrl.hxx> 32 #ifndef _GRAPH_HXX //autogen 33 #include <vcl/graph.hxx> 34 #endif 35 #include <svtools/valueset.hxx> 36 #include <svx/dlgctrl.hxx> 37 38 // class SvxBackgroundTabPage -------------------------------------------- 39 /* 40 {k:\svx\prototyp\dialog\backgrnd.bmp} 41 [Beschreibung] 42 Mit dieser TabPage kann eine Brush (z.B. fuer die Hintergrundfarbe eines 43 Rahmens) eingestellt werden. 44 [Items] 45 <SvxBrushItem>: <SID_ATTR_BRUSH>; 46 */ 47 48 //------------------------------------------------------------------------ 49 // forwards: 50 51 class BackgroundPreviewImpl; 52 class SvxOpenGraphicDialog; 53 struct SvxBackgroundTable_Impl; 54 struct SvxBackgroundPara_Impl; 55 struct SvxBackgroundPage_Impl; 56 class SvxBrushItem; 57 //------------------------------------------------------------------------ 58 59 class SvxBackgroundTabPage : public SvxTabPage 60 { 61 using TabPage::DeactivatePage; 62 public: 63 static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); 64 static sal_uInt16* GetRanges(); 65 66 virtual sal_Bool FillItemSet( SfxItemSet& rSet ); 67 virtual void Reset( const SfxItemSet& rSet ); 68 virtual void FillUserData(); 69 virtual void PointChanged( Window* pWindow, RECT_POINT eRP ); 70 71 void ShowSelector(); // Umschalt-ListBox aktivieren 72 void ShowTblControl(); // fuer den Writer (Zellen/Zeilen/Tabelle) 73 void ShowParaControl(sal_Bool bCharOnly = sal_False); // fuer den Writer (Absatz/Zeichen) 74 void EnableTransparency(sal_Bool bColor, sal_Bool bGraphic); 75 virtual void PageCreated (SfxAllItemSet aSet); //add CHINA001 76 protected: 77 virtual int DeactivatePage( SfxItemSet* pSet = 0 ); 78 79 private: 80 SvxBackgroundTabPage( Window* pParent, const SfxItemSet& rCoreSet ); 81 ~SvxBackgroundTabPage(); 82 83 FixedText aSelectTxt; 84 ListBox aLbSelect; 85 const String aStrBrowse; 86 const String aStrUnlinked; 87 FixedText aTblDesc; 88 ListBox aTblLBox; 89 ListBox aParaLBox; 90 // Hintergrundfarbe ------------------------------------ 91 Control aBorderWin; 92 ValueSet aBackgroundColorSet; 93 FixedLine aBackgroundColorBox; 94 BackgroundPreviewImpl* pPreviewWin1; 95 //color transparency 96 FixedText aColTransFT; 97 MetricField aColTransMF; 98 CheckBox aBtnPreview; 99 // Hintergrund-Bitmap ---------------------------------- 100 FixedLine aGbFile; 101 PushButton aBtnBrowse; 102 CheckBox aBtnLink; 103 FixedLine aGbPosition; 104 RadioButton aBtnPosition; 105 RadioButton aBtnArea; 106 RadioButton aBtnTile; 107 SvxRectCtl aWndPosition; 108 FixedInfo aFtFile; 109 //transparency of graphics 110 FixedLine aGraphTransFL; 111 MetricField aGraphTransMF; 112 113 BackgroundPreviewImpl* pPreviewWin2; 114 115 // DDListBox fuer Writer ------------------------------- 116 //------------------------------------------------------ 117 Color aBgdColor; 118 sal_uInt16 nHtmlMode; 119 sal_Bool bAllowShowSelector : 1; 120 sal_Bool bIsGraphicValid : 1; 121 sal_Bool bLinkOnly : 1; 122 sal_Bool bResized : 1; 123 sal_Bool bColTransparency : 1; 124 sal_Bool bGraphTransparency : 1; 125 Graphic aBgdGraphic; 126 String aBgdGraphicPath; 127 String aBgdGraphicFilter; 128 129 SvxBackgroundPage_Impl* pPageImpl; 130 SvxOpenGraphicDialog* pImportDlg; 131 132 // Items fuer Sw-Tabelle muessen gesammelt werden 133 SvxBackgroundTable_Impl* pTableBck_Impl; 134 // auch fuer die Absatzvorlage 135 SvxBackgroundPara_Impl* pParaBck_Impl; 136 137 #ifdef _SVX_BACKGRND_CXX 138 void FillColorValueSets_Impl(); 139 void ShowColorUI_Impl(); 140 void ShowBitmapUI_Impl(); 141 sal_Bool LoadLinkedGraphic_Impl(); 142 void RaiseLoadError_Impl(); 143 void SetGraphicPosition_Impl( SvxGraphicPosition ePos ); 144 SvxGraphicPosition GetGraphicPosition_Impl(); 145 void FillControls_Impl(const SvxBrushItem& rBgdAttr, 146 const String& rUserData); 147 sal_Bool FillItemSetWithWallpaperItem( SfxItemSet& rCoreSet, sal_uInt16 nSlot); 148 void ResetFromWallpaperItem( const SfxItemSet& rSet ); 149 150 DECL_LINK( LoadTimerHdl_Impl, Timer* ); 151 DECL_LINK( SelectHdl_Impl, ListBox* ); 152 DECL_LINK( BrowseHdl_Impl, PushButton* ); 153 DECL_LINK( RadioClickHdl_Impl, RadioButton* ); 154 DECL_LINK( FileClickHdl_Impl, CheckBox* ); 155 DECL_LINK( BackgroundColorHdl_Impl, ValueSet* ); 156 DECL_LINK( TblDestinationHdl_Impl, ListBox* ); 157 DECL_LINK( ParaDestinationHdl_Impl, ListBox* ); 158 #endif 159 }; 160 161 #endif // #ifndef _SVX_BACKGRND_HXX 162 163 164