1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: backgrnd.hxx,v $
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>
38 #include <svtools/stdctrl.hxx>
39 #ifndef _GRAPH_HXX //autogen
40 #include <vcl/graph.hxx>
42 #include <svtools/valueset.hxx>
43 #include <svx/dlgctrl.hxx>
45 // class SvxBackgroundTabPage --------------------------------------------
47 {k:\svx\prototyp\dialog\backgrnd.bmp}
49 Mit dieser TabPage kann eine Brush (z.B. fuer die Hintergrundfarbe eines
50 Rahmens) eingestellt werden.
52 <SvxBrushItem>: <SID_ATTR_BRUSH>;
55 //------------------------------------------------------------------------
58 class BackgroundPreviewImpl
;
59 class SvxOpenGraphicDialog
;
60 struct SvxBackgroundTable_Impl
;
61 struct SvxBackgroundPara_Impl
;
62 struct SvxBackgroundPage_Impl
;
64 //------------------------------------------------------------------------
66 class SvxBackgroundTabPage
: public SvxTabPage
68 using TabPage::DeactivatePage
;
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
84 virtual int DeactivatePage( SfxItemSet
* pSet
= 0 );
87 SvxBackgroundTabPage( Window
* pParent
, const SfxItemSet
& rCoreSet
);
88 ~SvxBackgroundTabPage();
90 // Hintergrundfarbe ------------------------------------
92 ValueSet aBackgroundColorSet
;
93 FixedLine aBackgroundColorBox
;
94 BackgroundPreviewImpl
* pPreviewWin1
;
96 FixedText aColTransFT
;
97 MetricField aColTransMF
;
98 // Hintergrund-Bitmap ----------------------------------
99 PushButton aBtnBrowse
;
101 CheckBox aBtnPreview
;
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
;
117 const String aStrBrowse
;
118 const String aStrUnlinked
;
120 // DDListBox fuer Writer -------------------------------
126 //------------------------------------------------------
129 BOOL bAllowShowSelector
: 1;
130 BOOL bIsGraphicValid
: 1;
133 BOOL bColTransparency
: 1;
134 BOOL bGraphTransparency
: 1;
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
* );
171 #endif // #ifndef _SVX_BACKGRND_HXX