update dev300-m58
[ooovba.git] / svx / source / cui / backgrnd.hxx
blob7c8f3bfe258671950404999e55c177a413041762
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: backgrnd.hxx,v $
10 * $Revision: 1.7 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _SVX_BACKGRND_HXX
31 #define _SVX_BACKGRND_HXX
33 // include ---------------------------------------------------------------
35 #ifndef _GROUP_HXX //autogen
36 #include <vcl/group.hxx>
37 #endif
38 #include <svtools/stdctrl.hxx>
39 #ifndef _GRAPH_HXX //autogen
40 #include <vcl/graph.hxx>
41 #endif
42 #include <svtools/valueset.hxx>
43 #include <svx/dlgctrl.hxx>
45 // class SvxBackgroundTabPage --------------------------------------------
47 {k:\svx\prototyp\dialog\backgrnd.bmp}
48 [Beschreibung]
49 Mit dieser TabPage kann eine Brush (z.B. fuer die Hintergrundfarbe eines
50 Rahmens) eingestellt werden.
51 [Items]
52 <SvxBrushItem>: <SID_ATTR_BRUSH>;
55 //------------------------------------------------------------------------
56 // forwards:
58 class BackgroundPreviewImpl;
59 class SvxOpenGraphicDialog;
60 struct SvxBackgroundTable_Impl;
61 struct SvxBackgroundPara_Impl;
62 struct SvxBackgroundPage_Impl;
63 class SvxBrushItem;
64 //------------------------------------------------------------------------
66 class SvxBackgroundTabPage : public SvxTabPage
68 using TabPage::DeactivatePage;
69 public:
70 static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet );
71 static USHORT* GetRanges();
73 virtual BOOL FillItemSet( SfxItemSet& rSet );
74 virtual void Reset( const SfxItemSet& rSet );
75 virtual void FillUserData();
76 virtual void PointChanged( Window* pWindow, RECT_POINT eRP );
78 void ShowSelector(); // Umschalt-ListBox aktivieren
79 void ShowTblControl(); // fuer den Writer (Zellen/Zeilen/Tabelle)
80 void ShowParaControl(BOOL bCharOnly = FALSE); // fuer den Writer (Absatz/Zeichen)
81 void EnableTransparency(BOOL bColor, BOOL bGraphic);
82 virtual void PageCreated (SfxAllItemSet aSet); //add CHINA001
83 protected:
84 virtual int DeactivatePage( SfxItemSet* pSet = 0 );
86 private:
87 SvxBackgroundTabPage( Window* pParent, const SfxItemSet& rCoreSet );
88 ~SvxBackgroundTabPage();
90 // Hintergrundfarbe ------------------------------------
91 Control aBorderWin;
92 ValueSet aBackgroundColorSet;
93 FixedLine aBackgroundColorBox;
94 BackgroundPreviewImpl* pPreviewWin1;
95 //color transparency
96 FixedText aColTransFT;
97 MetricField aColTransMF;
98 // Hintergrund-Bitmap ----------------------------------
99 PushButton aBtnBrowse;
100 CheckBox aBtnLink;
101 CheckBox aBtnPreview;
102 FixedInfo aFtFile;
103 FixedLine aGbFile;
104 RadioButton aBtnPosition;
105 RadioButton aBtnArea;
106 RadioButton aBtnTile;
107 SvxRectCtl aWndPosition;
108 FixedLine aGbPosition;
109 //transparency of graphics
110 FixedLine aGraphTransFL;
111 MetricField aGraphTransMF;
113 BackgroundPreviewImpl* pPreviewWin2;
114 // Selektor --------------------------------------------
115 FixedText aSelectTxt;
116 ListBox aLbSelect;
117 const String aStrBrowse;
118 const String aStrUnlinked;
120 // DDListBox fuer Writer -------------------------------
122 FixedText aTblDesc;
123 ListBox aTblLBox;
124 ListBox aParaLBox;
126 //------------------------------------------------------
127 Color aBgdColor;
128 USHORT nHtmlMode;
129 BOOL bAllowShowSelector : 1;
130 BOOL bIsGraphicValid : 1;
131 BOOL bLinkOnly : 1;
132 BOOL bResized : 1;
133 BOOL bColTransparency : 1;
134 BOOL bGraphTransparency : 1;
135 Graphic aBgdGraphic;
136 String aBgdGraphicPath;
137 String aBgdGraphicFilter;
139 SvxBackgroundPage_Impl* pPageImpl;
140 SvxOpenGraphicDialog* pImportDlg;
142 // Items fuer Sw-Tabelle muessen gesammelt werden
143 SvxBackgroundTable_Impl* pTableBck_Impl;
144 // auch fuer die Absatzvorlage
145 SvxBackgroundPara_Impl* pParaBck_Impl;
147 #ifdef _SVX_BACKGRND_CXX
148 void FillColorValueSets_Impl();
149 void ShowColorUI_Impl();
150 void ShowBitmapUI_Impl();
151 BOOL LoadLinkedGraphic_Impl();
152 void RaiseLoadError_Impl();
153 void SetGraphicPosition_Impl( SvxGraphicPosition ePos );
154 SvxGraphicPosition GetGraphicPosition_Impl();
155 void FillControls_Impl(const SvxBrushItem& rBgdAttr,
156 const String& rUserData);
157 BOOL FillItemSetWithWallpaperItem( SfxItemSet& rCoreSet, USHORT nSlot);
158 void ResetFromWallpaperItem( const SfxItemSet& rSet );
160 DECL_LINK( LoadTimerHdl_Impl, Timer* );
161 DECL_LINK( SelectHdl_Impl, ListBox* );
162 DECL_LINK( BrowseHdl_Impl, PushButton* );
163 DECL_LINK( RadioClickHdl_Impl, RadioButton* );
164 DECL_LINK( FileClickHdl_Impl, CheckBox* );
165 DECL_LINK( BackgroundColorHdl_Impl, ValueSet* );
166 DECL_LINK( TblDestinationHdl_Impl, ListBox* );
167 DECL_LINK( ParaDestinationHdl_Impl, ListBox* );
168 #endif
171 #endif // #ifndef _SVX_BACKGRND_HXX