xref: /aoo42x/main/cui/source/inc/cuitabarea.hxx (revision 28bcfa49)
1c4eee24dSAndrew Rist /**************************************************************
2c4eee24dSAndrew Rist  *
3c4eee24dSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4c4eee24dSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5c4eee24dSAndrew Rist  * distributed with this work for additional information
6c4eee24dSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7c4eee24dSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8c4eee24dSAndrew Rist  * "License"); you may not use this file except in compliance
9c4eee24dSAndrew Rist  * with the License.  You may obtain a copy of the License at
10c4eee24dSAndrew Rist  *
11c4eee24dSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
13c4eee24dSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14c4eee24dSAndrew Rist  * software distributed under the License is distributed on an
15c4eee24dSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16c4eee24dSAndrew Rist  * KIND, either express or implied.  See the License for the
17c4eee24dSAndrew Rist  * specific language governing permissions and limitations
18c4eee24dSAndrew Rist  * under the License.
19c4eee24dSAndrew Rist  *
20c4eee24dSAndrew Rist  *************************************************************/
21c4eee24dSAndrew Rist 
22c4eee24dSAndrew Rist 
23cdf0e10cSrcweir #ifndef _CUI_TAB_AREA_HXX
24cdf0e10cSrcweir #define _CUI_TAB_AREA_HXX
25cdf0e10cSrcweir 
26cdf0e10cSrcweir // include ---------------------------------------------------------------
27cdf0e10cSrcweir 
28cdf0e10cSrcweir #include <svx/tabarea.hxx>
29*28bcfa49SArmin Le Grand #include <svx/SvxColorValueSet.hxx>
30cdf0e10cSrcweir 
31cdf0e10cSrcweir /*************************************************************************
32cdf0e10cSrcweir |*
33cdf0e10cSrcweir |* Fl"achen-Tab-Dialog
34cdf0e10cSrcweir |*
35cdf0e10cSrcweir \************************************************************************/
36cdf0e10cSrcweir 
37cdf0e10cSrcweir class SvxAreaTabDialog : public SfxTabDialog
38cdf0e10cSrcweir {
39cdf0e10cSrcweir private:
40cdf0e10cSrcweir 	SdrModel*           mpDrawModel;
41cdf0e10cSrcweir //	const SdrView*		mpView;
42cdf0e10cSrcweir 
4397e8a929SArmin Le Grand 	XColorList*        mpColorTab;
4497e8a929SArmin Le Grand 	XColorList*        mpNewColorTab;
45cdf0e10cSrcweir 	XGradientList*      mpGradientList;
46cdf0e10cSrcweir 	XGradientList*      mpNewGradientList;
47cdf0e10cSrcweir 	XHatchList*         mpHatchingList;
48cdf0e10cSrcweir 	XHatchList*         mpNewHatchingList;
49cdf0e10cSrcweir 	XBitmapList*        mpBitmapList;
50cdf0e10cSrcweir 	XBitmapList*        mpNewBitmapList;
51cdf0e10cSrcweir 
52cdf0e10cSrcweir 	const SfxItemSet&   mrOutAttrs;
53cdf0e10cSrcweir 
54cdf0e10cSrcweir 	ChangeType          mnColorTableState;
55cdf0e10cSrcweir 	ChangeType          mnBitmapListState;
56cdf0e10cSrcweir 	ChangeType          mnGradientListState;
57cdf0e10cSrcweir 	ChangeType          mnHatchingListState;
58cdf0e10cSrcweir 
59cdf0e10cSrcweir 	sal_uInt16              mnPageType;
60cdf0e10cSrcweir 	sal_uInt16              mnDlgType;
61cdf0e10cSrcweir 	sal_uInt16              mnPos;
62cdf0e10cSrcweir 	sal_Bool                mbAreaTP;
63cdf0e10cSrcweir 	sal_Bool                mbDeleteColorTable;
64cdf0e10cSrcweir 
65cdf0e10cSrcweir 	virtual void        PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
66cdf0e10cSrcweir 
67cdf0e10cSrcweir protected:
68cdf0e10cSrcweir 	virtual short       Ok();
69cdf0e10cSrcweir #ifdef _SVX_TABAREA_CXX
70cdf0e10cSrcweir 	DECL_LINK( CancelHdlImpl, void * );
71cdf0e10cSrcweir 	void                SavePalettes();
72cdf0e10cSrcweir #endif
73cdf0e10cSrcweir 
74cdf0e10cSrcweir public:
75cdf0e10cSrcweir 	SvxAreaTabDialog( Window* pParent,
76cdf0e10cSrcweir 					  const SfxItemSet* pAttr, SdrModel* pModel,
77cdf0e10cSrcweir 					  const SdrView* pSdrView = NULL );
78cdf0e10cSrcweir 	~SvxAreaTabDialog();
79cdf0e10cSrcweir 
8097e8a929SArmin Le Grand 	void            	 SetNewColorTable( XColorList* pColTab )
81cdf0e10cSrcweir 							{ mpNewColorTab = pColTab; }
8297e8a929SArmin Le Grand 	XColorList*    	 GetNewColorTable() const { return mpNewColorTab; }
8397e8a929SArmin Le Grand 	const XColorList*	 GetColorTable() const { return mpColorTab; }
84cdf0e10cSrcweir 
85cdf0e10cSrcweir 	void            	 SetNewGradientList( XGradientList* pGrdLst)
86cdf0e10cSrcweir 							{ mpNewGradientList = pGrdLst; }
87cdf0e10cSrcweir 	XGradientList*  	 GetNewGradientList() const
88cdf0e10cSrcweir 							{ return mpNewGradientList; }
89cdf0e10cSrcweir 	const XGradientList* GetGradientList() const { return mpGradientList; }
90cdf0e10cSrcweir 
91cdf0e10cSrcweir 	void				 SetNewHatchingList( XHatchList* pHtchLst)
92cdf0e10cSrcweir 							{ mpNewHatchingList = pHtchLst; }
93cdf0e10cSrcweir 	XHatchList*     	 GetNewHatchingList() const
94cdf0e10cSrcweir 							{ return mpNewHatchingList; }
95cdf0e10cSrcweir 	const XHatchList*	 GetHatchingList() const { return mpHatchingList; }
96cdf0e10cSrcweir 
97cdf0e10cSrcweir 	void				 SetNewBitmapList( XBitmapList* pBmpLst)
98cdf0e10cSrcweir 							{ mpNewBitmapList = pBmpLst; }
99cdf0e10cSrcweir 	XBitmapList*		 GetNewBitmapList() const { return mpNewBitmapList; }
100cdf0e10cSrcweir 	const XBitmapList*	 GetBitmapList() const { return mpBitmapList; }
101cdf0e10cSrcweir 
102cdf0e10cSrcweir 	void				 DontDeleteColorTable() { mbDeleteColorTable = sal_False; }
103cdf0e10cSrcweir };
104cdf0e10cSrcweir 
105cdf0e10cSrcweir /*************************************************************************
106cdf0e10cSrcweir |*
107cdf0e10cSrcweir |* Transparence-Tab-Page
108cdf0e10cSrcweir |*
109cdf0e10cSrcweir \************************************************************************/
110cdf0e10cSrcweir 
111cdf0e10cSrcweir class SvxTransparenceTabPage : public SvxTabPage
112cdf0e10cSrcweir {
113cdf0e10cSrcweir 	using TabPage::ActivatePage;
114cdf0e10cSrcweir 	using TabPage::DeactivatePage;
115cdf0e10cSrcweir 
116cdf0e10cSrcweir 	const SfxItemSet&   rOutAttrs;
117cdf0e10cSrcweir 	RECT_POINT          eRP;
118cdf0e10cSrcweir 
119cdf0e10cSrcweir 	//CHINA001 sal_uInt16*             pPageType;
120cdf0e10cSrcweir 	//CHINA001 sal_uInt16*             pDlgType;
121cdf0e10cSrcweir 	sal_uInt16             nPageType; //add CHINA001
122cdf0e10cSrcweir 	sal_uInt16             nDlgType;  //add CHINA001
123cdf0e10cSrcweir 
124cdf0e10cSrcweir 	// main selection
125cdf0e10cSrcweir     FixedLine           aFlProp;
126cdf0e10cSrcweir     RadioButton         aRbtTransOff;
127cdf0e10cSrcweir     RadioButton         aRbtTransLinear;
128cdf0e10cSrcweir 	RadioButton         aRbtTransGradient;
129cdf0e10cSrcweir 
130cdf0e10cSrcweir 	// linear transparency
131cdf0e10cSrcweir 	MetricField         aMtrTransparent;
132cdf0e10cSrcweir 
133cdf0e10cSrcweir 	// gradient transparency
134cdf0e10cSrcweir 	FixedText           aFtTrgrType;
135cdf0e10cSrcweir 	ListBox             aLbTrgrGradientType;
136cdf0e10cSrcweir 	FixedText           aFtTrgrCenterX;
137cdf0e10cSrcweir 	MetricField         aMtrTrgrCenterX;
138cdf0e10cSrcweir 	FixedText           aFtTrgrCenterY;
139cdf0e10cSrcweir 	MetricField         aMtrTrgrCenterY;
140cdf0e10cSrcweir 	FixedText           aFtTrgrAngle;
141cdf0e10cSrcweir 	MetricField         aMtrTrgrAngle;
142cdf0e10cSrcweir 	FixedText           aFtTrgrBorder;
143cdf0e10cSrcweir 	MetricField         aMtrTrgrBorder;
144cdf0e10cSrcweir 	FixedText           aFtTrgrStartValue;
145cdf0e10cSrcweir 	MetricField         aMtrTrgrStartValue;
146cdf0e10cSrcweir 	FixedText           aFtTrgrEndValue;
147cdf0e10cSrcweir 	MetricField         aMtrTrgrEndValue;
148cdf0e10cSrcweir 
149cdf0e10cSrcweir 	// preview
150cdf0e10cSrcweir 	SvxXRectPreview     aCtlBitmapPreview;
151cdf0e10cSrcweir 	SvxXRectPreview     aCtlXRectPreview;
152cdf0e10cSrcweir 	sal_Bool				bBitmap;
153cdf0e10cSrcweir 
154cdf0e10cSrcweir 	XOutdevItemPool*    pXPool;
155cdf0e10cSrcweir 	XFillAttrSetItem    aXFillAttr;
156cdf0e10cSrcweir 	SfxItemSet&         rXFSet;
157cdf0e10cSrcweir 
158cdf0e10cSrcweir #ifdef _SVX_TPAREA_CXX
159cdf0e10cSrcweir 	DECL_LINK(ClickTransOffHdl_Impl, void * );
160cdf0e10cSrcweir 	DECL_LINK(ClickTransLinearHdl_Impl, void * );
161cdf0e10cSrcweir 	DECL_LINK(ClickTransGradientHdl_Impl, void * );
162cdf0e10cSrcweir 	DECL_LINK(ModifyTransparentHdl_Impl, void*);
163cdf0e10cSrcweir 	DECL_LINK(ChangeTrgrTypeHdl_Impl, void*);
164cdf0e10cSrcweir 	DECL_LINK(ModifiedTrgrHdl_Impl, void*);
165cdf0e10cSrcweir #endif
166cdf0e10cSrcweir 
167cdf0e10cSrcweir 	void ActivateLinear(sal_Bool bActivate);
168cdf0e10cSrcweir 	void ActivateGradient(sal_Bool bActivate);
169cdf0e10cSrcweir 	void SetControlState_Impl(XGradientStyle eXGS);
170cdf0e10cSrcweir 
171cdf0e10cSrcweir 	sal_Bool InitPreview ( const SfxItemSet& rSet );
172cdf0e10cSrcweir 	void InvalidatePreview (sal_Bool bEnable = sal_True );
173cdf0e10cSrcweir 
174cdf0e10cSrcweir public:
175cdf0e10cSrcweir 	SvxTransparenceTabPage(Window* pParent, const SfxItemSet& rInAttrs);
176cdf0e10cSrcweir 	void Construct();
177cdf0e10cSrcweir 
178cdf0e10cSrcweir 	static SfxTabPage* Create(Window*, const SfxItemSet&);
179cdf0e10cSrcweir 	static sal_uInt16* GetRanges();
180cdf0e10cSrcweir 
181cdf0e10cSrcweir 	virtual sal_Bool FillItemSet(SfxItemSet&);
182cdf0e10cSrcweir 	virtual void Reset(const SfxItemSet&);
183cdf0e10cSrcweir 	virtual void ActivatePage(const SfxItemSet& rSet);
184cdf0e10cSrcweir 	virtual int  DeactivatePage(SfxItemSet* pSet);
185cdf0e10cSrcweir 	virtual void PointChanged(Window* pWindow, RECT_POINT eRP);
186cdf0e10cSrcweir 
187cdf0e10cSrcweir 	//CHINA001 void SetPageType(sal_uInt16 *pInType) { pPageType = pInType; }
188cdf0e10cSrcweir 	//CHINA001 void SetDlgType(sal_uInt16* pInType) { pDlgType = pInType; }
189cdf0e10cSrcweir 	void SetPageType(sal_uInt16 nInType) { nPageType = nInType; } //add CHINA001
190cdf0e10cSrcweir 	void SetDlgType(sal_uInt16 nInType) { nDlgType = nInType; }//add CHINA001
191cdf0e10cSrcweir 	virtual void PageCreated (SfxAllItemSet aSet); //add CHINA001
192cdf0e10cSrcweir };
193cdf0e10cSrcweir 
194cdf0e10cSrcweir /*************************************************************************
195cdf0e10cSrcweir |*
196cdf0e10cSrcweir |* Fl"achen-Tab-Page
197cdf0e10cSrcweir |*
198cdf0e10cSrcweir \************************************************************************/
199cdf0e10cSrcweir 
200cdf0e10cSrcweir class SvxAreaTabPage : public SvxTabPage
201cdf0e10cSrcweir {
202cdf0e10cSrcweir 	using TabPage::ActivatePage;
203cdf0e10cSrcweir 	using TabPage::DeactivatePage;
204cdf0e10cSrcweir 
205cdf0e10cSrcweir private:
206cdf0e10cSrcweir     FixedLine           aFlProp;
207cdf0e10cSrcweir     ListBox             aTypeLB;
208cdf0e10cSrcweir 
209cdf0e10cSrcweir 	ColorLB             aLbColor;
210cdf0e10cSrcweir 	GradientLB          aLbGradient;
211cdf0e10cSrcweir 	HatchingLB          aLbHatching;
212cdf0e10cSrcweir 	BitmapLB            aLbBitmap;
213cdf0e10cSrcweir 	SvxXRectPreview     aCtlBitmapPreview;
214cdf0e10cSrcweir 
215cdf0e10cSrcweir 	TriStateBox         aTsbStepCount;
216cdf0e10cSrcweir     FixedLine           aFlStepCount;
217cdf0e10cSrcweir 	NumericField        aNumFldStepCount;
218cdf0e10cSrcweir 
219cdf0e10cSrcweir 	CheckBox			aCbxHatchBckgrd;
220cdf0e10cSrcweir 	ColorLB             aLbHatchBckgrdColor;
221cdf0e10cSrcweir 
222cdf0e10cSrcweir     FixedLine           aFlSize;
223cdf0e10cSrcweir 	TriStateBox			aTsbOriginal;
224cdf0e10cSrcweir 	TriStateBox			aTsbScale;
225cdf0e10cSrcweir 	FixedText			aFtXSize;
226cdf0e10cSrcweir 	MetricField			aMtrFldXSize;
227cdf0e10cSrcweir 	FixedText			aFtYSize;
228cdf0e10cSrcweir 	MetricField			aMtrFldYSize;
229cdf0e10cSrcweir     FixedLine           aFlPosition;
230cdf0e10cSrcweir 	SvxRectCtl			aCtlPosition;
231cdf0e10cSrcweir 	FixedText			aFtXOffset;
232cdf0e10cSrcweir 	MetricField			aMtrFldXOffset;
233cdf0e10cSrcweir 	FixedText			aFtYOffset;
234cdf0e10cSrcweir 	MetricField			aMtrFldYOffset;
235cdf0e10cSrcweir 	TriStateBox         aTsbTile;
236cdf0e10cSrcweir 	TriStateBox         aTsbStretch;
237cdf0e10cSrcweir     FixedLine           aFlOffset;
238cdf0e10cSrcweir 	RadioButton			aRbtRow;
239cdf0e10cSrcweir 	RadioButton			aRbtColumn;
240cdf0e10cSrcweir 	MetricField			aMtrFldOffset;
241cdf0e10cSrcweir 
242cdf0e10cSrcweir 	SvxXRectPreview     aCtlXRectPreview;
243cdf0e10cSrcweir 
244cdf0e10cSrcweir 	const SfxItemSet&   rOutAttrs;
245cdf0e10cSrcweir 	RECT_POINT          eRP;
246cdf0e10cSrcweir 
24797e8a929SArmin Le Grand 	XColorList*        pColorTab;
248cdf0e10cSrcweir 	XGradientList*      pGradientList;
249cdf0e10cSrcweir 	XHatchList*         pHatchingList;
250cdf0e10cSrcweir 	XBitmapList*        pBitmapList;
251cdf0e10cSrcweir 
252cdf0e10cSrcweir 	ChangeType*         pnColorTableState;
253cdf0e10cSrcweir 	ChangeType*         pnBitmapListState;
254cdf0e10cSrcweir 	ChangeType*         pnGradientListState;
255cdf0e10cSrcweir 	ChangeType*         pnHatchingListState;
256cdf0e10cSrcweir 
257cdf0e10cSrcweir 	//CHINA001 sal_uInt16*             pPageType;
258cdf0e10cSrcweir 	//CHINA001 sal_uInt16*             pDlgType;
259cdf0e10cSrcweir 	//CHINA001 sal_uInt16*             pPos;
260cdf0e10cSrcweir 	sal_uInt16 nPageType; //add CHINA001
261cdf0e10cSrcweir 	sal_uInt16 nDlgType;//add CHINA001
262cdf0e10cSrcweir 	sal_uInt16 nPos; //add CHINA001
263cdf0e10cSrcweir 
264cdf0e10cSrcweir 	sal_Bool*               pbAreaTP;
265cdf0e10cSrcweir 
266cdf0e10cSrcweir 	XOutdevItemPool*    pXPool;
267cdf0e10cSrcweir 	XFillAttrSetItem    aXFillAttr;
268cdf0e10cSrcweir 	SfxItemSet&         rXFSet;
269cdf0e10cSrcweir 
270cdf0e10cSrcweir 	SfxMapUnit			ePoolUnit;
271cdf0e10cSrcweir 	FieldUnit			eFUnit;
272cdf0e10cSrcweir 
273cdf0e10cSrcweir #ifdef _SVX_TPAREA_CXX
274cdf0e10cSrcweir 	DECL_LINK( SelectDialogTypeHdl_Impl, ListBox * );
275cdf0e10cSrcweir 	DECL_LINK( ClickInvisibleHdl_Impl, void * );
276cdf0e10cSrcweir 	DECL_LINK( ClickColorHdl_Impl, void * );
277cdf0e10cSrcweir 	DECL_LINK( ModifyColorHdl_Impl, void * );
278cdf0e10cSrcweir 	DECL_LINK( ModifyHatchBckgrdColorHdl_Impl, void * );
279cdf0e10cSrcweir 	DECL_LINK( ClickGradientHdl_Impl, void * );
280cdf0e10cSrcweir 	DECL_LINK( ModifyGradientHdl_Impl, void * );
281cdf0e10cSrcweir 	DECL_LINK( ClickHatchingHdl_Impl, void * );
282cdf0e10cSrcweir 	DECL_LINK( ModifyHatchingHdl_Impl, void * );
283cdf0e10cSrcweir 	DECL_LINK( ToggleHatchBckgrdColorHdl_Impl, void * );
284cdf0e10cSrcweir 	DECL_LINK( ClickBitmapHdl_Impl, void * );
285cdf0e10cSrcweir 	DECL_LINK( ModifyBitmapHdl_Impl, void * );
286cdf0e10cSrcweir //	DECL_LINK( ModifyTransparentHdl_Impl, void * );
287cdf0e10cSrcweir 	DECL_LINK( ModifyStepCountHdl_Impl, void * );
288cdf0e10cSrcweir 	DECL_LINK( ModifyTileHdl_Impl, void * );
289cdf0e10cSrcweir 	DECL_LINK( ClickScaleHdl_Impl, void * );
290cdf0e10cSrcweir #endif
291cdf0e10cSrcweir 
292cdf0e10cSrcweir public:
293cdf0e10cSrcweir 	SvxAreaTabPage( Window* pParent, const SfxItemSet& rInAttrs  );
294cdf0e10cSrcweir 
295cdf0e10cSrcweir 	void    Construct();
296cdf0e10cSrcweir 
297cdf0e10cSrcweir 	static  SfxTabPage* Create( Window*, const SfxItemSet& );
298cdf0e10cSrcweir 	static  sal_uInt16*	    GetRanges();
299cdf0e10cSrcweir 
300cdf0e10cSrcweir 	virtual sal_Bool FillItemSet( SfxItemSet& );
301cdf0e10cSrcweir 	virtual void Reset( const SfxItemSet & );
302cdf0e10cSrcweir 	virtual void ActivatePage( const SfxItemSet& rSet );
303cdf0e10cSrcweir 	virtual int  DeactivatePage( SfxItemSet* pSet );
304cdf0e10cSrcweir 	virtual void PointChanged( Window* pWindow, RECT_POINT eRP );
305cdf0e10cSrcweir 
30697e8a929SArmin Le Grand 	void    SetColorTable( XColorList* pColTab ) { pColorTab = pColTab; }
307cdf0e10cSrcweir 	void    SetGradientList( XGradientList* pGrdLst)
308cdf0e10cSrcweir 				{ pGradientList = pGrdLst; }
309cdf0e10cSrcweir 	void    SetHatchingList( XHatchList* pHtchLst)
310cdf0e10cSrcweir 				{ pHatchingList = pHtchLst; }
311cdf0e10cSrcweir 	void    SetBitmapList( XBitmapList* pBmpLst) { pBitmapList = pBmpLst; }
312cdf0e10cSrcweir 
313cdf0e10cSrcweir 	//CHINA001 void    SetPageType( sal_uInt16* pInType ) { pPageType = pInType; }
314cdf0e10cSrcweir 	void    SetPageType( sal_uInt16 nInType ) { nPageType = nInType; } //add CHINA001
315cdf0e10cSrcweir 	//CHINA001 void    SetDlgType( sal_uInt16* pInType ) { pDlgType = pInType; }
316cdf0e10cSrcweir 	void    SetDlgType( sal_uInt16 nInType ) { nDlgType = nInType; }//add CHINA001
317cdf0e10cSrcweir 	//CHINA001 void    SetPos( sal_uInt16* pInPos ) { pPos = pInPos; }
318cdf0e10cSrcweir 	void    SetPos( sal_uInt16 nInPos ) { nPos = nInPos; }//add CHINA001
319cdf0e10cSrcweir 	void    SetAreaTP( sal_Bool* pIn ) { pbAreaTP = pIn; }
320cdf0e10cSrcweir 	virtual void PageCreated (SfxAllItemSet aSet); //add CHINA001
321cdf0e10cSrcweir 	void    SetColorChgd( ChangeType* pIn ) { pnColorTableState = pIn; }
322cdf0e10cSrcweir 	void    SetGrdChgd( ChangeType* pIn ) { pnGradientListState = pIn; }
323cdf0e10cSrcweir 	void    SetHtchChgd( ChangeType* pIn ) { pnHatchingListState = pIn; }
324cdf0e10cSrcweir 	void    SetBmpChgd( ChangeType* pIn ) { pnBitmapListState = pIn; }
325cdf0e10cSrcweir };
326cdf0e10cSrcweir 
327cdf0e10cSrcweir /*************************************************************************
328cdf0e10cSrcweir |*
329cdf0e10cSrcweir |* Schatten-Tab-Page
330cdf0e10cSrcweir |*
331cdf0e10cSrcweir \************************************************************************/
332cdf0e10cSrcweir 
333cdf0e10cSrcweir class SvxShadowTabPage : public SvxTabPage
334cdf0e10cSrcweir {
335cdf0e10cSrcweir 	using TabPage::ActivatePage;
336cdf0e10cSrcweir 	using TabPage::DeactivatePage;
337cdf0e10cSrcweir 
338cdf0e10cSrcweir private:
339cdf0e10cSrcweir     FixedLine           aFlProp;
340cdf0e10cSrcweir     TriStateBox         aTsbShowShadow;
341cdf0e10cSrcweir 	FixedText           aFtPosition;
342cdf0e10cSrcweir 	SvxRectCtl          aCtlPosition;
343cdf0e10cSrcweir 	FixedText           aFtDistance;
344cdf0e10cSrcweir 	MetricField         aMtrDistance;
345cdf0e10cSrcweir 	FixedText           aFtShadowColor;
346cdf0e10cSrcweir 	ColorLB             aLbShadowColor;
347cdf0e10cSrcweir 	FixedText           aFtTransparent;
348cdf0e10cSrcweir 	MetricField         aMtrTransparent;
349cdf0e10cSrcweir 	SvxXShadowPreview	aCtlXRectPreview;
350cdf0e10cSrcweir 
351cdf0e10cSrcweir 	const SfxItemSet&   rOutAttrs;
352cdf0e10cSrcweir 	RECT_POINT          eRP;
353cdf0e10cSrcweir 
35497e8a929SArmin Le Grand 	XColorList*        pColorTab;
355cdf0e10cSrcweir 	ChangeType*         pnColorTableState;
356cdf0e10cSrcweir 	sal_uInt16				nPageType;	//add CHINA001
357cdf0e10cSrcweir 	sal_uInt16				nDlgType;	//add CHINA001
358cdf0e10cSrcweir 	sal_uInt16*             pPos;
359cdf0e10cSrcweir 	sal_Bool*               pbAreaTP;
360cdf0e10cSrcweir 
361cdf0e10cSrcweir 	sal_Bool				bDisable;
362cdf0e10cSrcweir 
363cdf0e10cSrcweir 	XOutdevItemPool*    pXPool;
364cdf0e10cSrcweir 	XFillAttrSetItem    aXFillAttr;
365cdf0e10cSrcweir 	SfxItemSet&         rXFSet;
366cdf0e10cSrcweir 	SfxMapUnit			ePoolUnit;
367cdf0e10cSrcweir 
368cdf0e10cSrcweir #ifdef _SVX_TPSHADOW_CXX
369cdf0e10cSrcweir 	DECL_LINK( ClickShadowHdl_Impl, void * );
370cdf0e10cSrcweir 	DECL_LINK( ModifyShadowHdl_Impl, void * );
371cdf0e10cSrcweir #endif
372cdf0e10cSrcweir 
373cdf0e10cSrcweir public:
374cdf0e10cSrcweir 	SvxShadowTabPage( Window* pParent, const SfxItemSet& rInAttrs  );
375cdf0e10cSrcweir 
376cdf0e10cSrcweir 	void    Construct();
377cdf0e10cSrcweir 	static  SfxTabPage* Create( Window*, const SfxItemSet& );
378cdf0e10cSrcweir 	static  sal_uInt16*	    GetRanges();
379cdf0e10cSrcweir 
380cdf0e10cSrcweir 	virtual sal_Bool FillItemSet( SfxItemSet& );
381cdf0e10cSrcweir 	virtual void Reset( const SfxItemSet & );
382cdf0e10cSrcweir 	virtual void ActivatePage( const SfxItemSet& rSet );
383cdf0e10cSrcweir 	virtual int  DeactivatePage( SfxItemSet* pSet );
384cdf0e10cSrcweir 	virtual void PointChanged( Window* pWindow, RECT_POINT eRP );
385cdf0e10cSrcweir 
38697e8a929SArmin Le Grand 	void    SetColorTable( XColorList* pColTab ) { pColorTab = pColTab; }
387cdf0e10cSrcweir //CHINA001	void    SetPageType( sal_uInt16* pInType ) { pPageType = pInType; }
388cdf0e10cSrcweir //CHINA001	void    SetDlgType( sal_uInt16* pInType ) { pDlgType = pInType; }
389cdf0e10cSrcweir 	void    SetPageType( sal_uInt16 nInType ) { nPageType = nInType; } //add CHINA001
390cdf0e10cSrcweir 	void    SetDlgType( sal_uInt16 nInType ) { nDlgType = nInType; }	//add CHINA001
391cdf0e10cSrcweir 	void    SetAreaTP( sal_Bool* pIn ) { pbAreaTP = pIn; }
392cdf0e10cSrcweir 	void    SetColorChgd( ChangeType* pIn ) { pnColorTableState = pIn; }
393cdf0e10cSrcweir 	virtual void PageCreated (SfxAllItemSet aSet); //add CHINA001
394cdf0e10cSrcweir 	void	DisablePage( sal_Bool bIn ) { bDisable = bIn; }
395cdf0e10cSrcweir };
396cdf0e10cSrcweir 
397cdf0e10cSrcweir /*************************************************************************
398cdf0e10cSrcweir |*
399cdf0e10cSrcweir |* Farbverlauf-Tab-Page
400cdf0e10cSrcweir |*
401cdf0e10cSrcweir \************************************************************************/
402cdf0e10cSrcweir 
403cdf0e10cSrcweir class SvxGradientTabPage : public SfxTabPage
404cdf0e10cSrcweir {
405cdf0e10cSrcweir 	using TabPage::ActivatePage;
406cdf0e10cSrcweir 	using TabPage::DeactivatePage;
407cdf0e10cSrcweir 
408cdf0e10cSrcweir private:
409cdf0e10cSrcweir     FixedLine           aFlProp;
410cdf0e10cSrcweir 	FixedText           aFtType;
411cdf0e10cSrcweir 	ListBox             aLbGradientType;
412cdf0e10cSrcweir 	FixedText           aFtCenterX;
413cdf0e10cSrcweir 	MetricField         aMtrCenterX;
414cdf0e10cSrcweir 	FixedText           aFtCenterY;
415cdf0e10cSrcweir 	MetricField         aMtrCenterY;
416cdf0e10cSrcweir 	FixedText           aFtAngle;
417cdf0e10cSrcweir 	MetricField         aMtrAngle;
418cdf0e10cSrcweir 	FixedText           aFtBorder;
419cdf0e10cSrcweir 	MetricField         aMtrBorder;
420cdf0e10cSrcweir 	FixedText           aFtColorFrom;
421cdf0e10cSrcweir 	ColorLB             aLbColorFrom;
422cdf0e10cSrcweir 	MetricField         aMtrColorFrom;
423cdf0e10cSrcweir 	FixedText           aFtColorTo;
424cdf0e10cSrcweir 	ColorLB             aLbColorTo;
425cdf0e10cSrcweir 	MetricField         aMtrColorTo;
426cdf0e10cSrcweir 	GradientLB          aLbGradients;
427cdf0e10cSrcweir 	SvxXRectPreview     aCtlPreview;
428cdf0e10cSrcweir 	PushButton          aBtnAdd;
429cdf0e10cSrcweir 	PushButton          aBtnModify;
430cdf0e10cSrcweir 	PushButton          aBtnDelete;
431cdf0e10cSrcweir 	ImageButton         aBtnLoad;
432cdf0e10cSrcweir 	ImageButton         aBtnSave;
433cdf0e10cSrcweir 
434cdf0e10cSrcweir 	const SfxItemSet&   rOutAttrs;
435cdf0e10cSrcweir 
43697e8a929SArmin Le Grand 	XColorList*        pColorTab;
437cdf0e10cSrcweir 	XGradientList*      pGradientList;
438cdf0e10cSrcweir 
439cdf0e10cSrcweir 	ChangeType*         pnGradientListState;
440cdf0e10cSrcweir 	ChangeType*         pnColorTableState;
441cdf0e10cSrcweir 	sal_uInt16*             pPageType;
442cdf0e10cSrcweir 	sal_uInt16*             pDlgType;
443cdf0e10cSrcweir 	sal_uInt16*             pPos;
444cdf0e10cSrcweir 	sal_Bool*               pbAreaTP;
445cdf0e10cSrcweir 
446cdf0e10cSrcweir 	XOutdevItemPool*    pXPool;
447cdf0e10cSrcweir 	XFillStyleItem      aXFStyleItem;
448cdf0e10cSrcweir 	XFillGradientItem   aXGradientItem;
449cdf0e10cSrcweir 	XFillAttrSetItem    aXFillAttr;
450cdf0e10cSrcweir 	SfxItemSet&         rXFSet;
451cdf0e10cSrcweir 
452cdf0e10cSrcweir #ifdef _SVX_TPGRADNT_CXX
453cdf0e10cSrcweir 	DECL_LINK( ClickAddHdl_Impl, void * );
454cdf0e10cSrcweir 	DECL_LINK( ClickModifyHdl_Impl, void * );
455cdf0e10cSrcweir 	DECL_LINK( ClickDeleteHdl_Impl, void * );
456cdf0e10cSrcweir 	DECL_LINK( ChangeGradientHdl_Impl, void * );
457cdf0e10cSrcweir 	DECL_LINK( ModifiedHdl_Impl, void * );
458cdf0e10cSrcweir 	DECL_LINK( ClickLoadHdl_Impl, void * );
459cdf0e10cSrcweir 	DECL_LINK( ClickSaveHdl_Impl, void * );
460cdf0e10cSrcweir 
461cdf0e10cSrcweir 	long CheckChanges_Impl();
462cdf0e10cSrcweir 	void SetControlState_Impl( XGradientStyle eXGS );
463cdf0e10cSrcweir #endif
464cdf0e10cSrcweir 
465cdf0e10cSrcweir public:
466cdf0e10cSrcweir 	SvxGradientTabPage( Window* pParent, const SfxItemSet& rInAttrs  );
467cdf0e10cSrcweir 
468cdf0e10cSrcweir 	void    Construct();
469cdf0e10cSrcweir 
470cdf0e10cSrcweir 	static  SfxTabPage* Create( Window*, const SfxItemSet& );
471cdf0e10cSrcweir 	virtual sal_Bool FillItemSet( SfxItemSet& );
472cdf0e10cSrcweir 	virtual void Reset( const SfxItemSet & );
473cdf0e10cSrcweir 
474cdf0e10cSrcweir 	virtual void ActivatePage( const SfxItemSet& rSet );
475cdf0e10cSrcweir 	virtual int  DeactivatePage( SfxItemSet* pSet );
476cdf0e10cSrcweir 
47797e8a929SArmin Le Grand 	void    SetColorTable( XColorList* pColTab ) { pColorTab = pColTab; }
478cdf0e10cSrcweir 	void    SetGradientList( XGradientList* pGrdLst)
479cdf0e10cSrcweir 				{ pGradientList = pGrdLst; }
480cdf0e10cSrcweir 
481cdf0e10cSrcweir 	void    SetPageType( sal_uInt16* pInType ) { pPageType = pInType; }
482cdf0e10cSrcweir 	void    SetDlgType( sal_uInt16* pInType ) { pDlgType = pInType; }
483cdf0e10cSrcweir 	void    SetPos( sal_uInt16* pInPos ) { pPos = pInPos; }
484cdf0e10cSrcweir 	void    SetAreaTP( sal_Bool* pIn ) { pbAreaTP = pIn; }
485cdf0e10cSrcweir 
486cdf0e10cSrcweir 	void    SetGrdChgd( ChangeType* pIn ) { pnGradientListState = pIn; }
487cdf0e10cSrcweir 	void    SetColorChgd( ChangeType* pIn ) { pnColorTableState = pIn; }
488cdf0e10cSrcweir };
489cdf0e10cSrcweir 
490cdf0e10cSrcweir /*************************************************************************
491cdf0e10cSrcweir |*
492cdf0e10cSrcweir |* Schraffuren-Tab-Page
493cdf0e10cSrcweir |*
494cdf0e10cSrcweir \************************************************************************/
495cdf0e10cSrcweir 
496cdf0e10cSrcweir class SvxHatchTabPage : public SvxTabPage
497cdf0e10cSrcweir {
498cdf0e10cSrcweir 	using TabPage::ActivatePage;
499cdf0e10cSrcweir 	using TabPage::DeactivatePage;
500cdf0e10cSrcweir 
501cdf0e10cSrcweir private:
502cdf0e10cSrcweir 	FixedText           aFtDistance;
503cdf0e10cSrcweir 	MetricField         aMtrDistance;
504cdf0e10cSrcweir 	FixedText           aFtAngle;
505cdf0e10cSrcweir 	MetricField         aMtrAngle;
506cdf0e10cSrcweir 	SvxRectCtl          aCtlAngle;
507cdf0e10cSrcweir     FixedLine           aFlProp;
508cdf0e10cSrcweir 	FixedText           aFtLineType;
509cdf0e10cSrcweir 	ListBox             aLbLineType;
510cdf0e10cSrcweir 	FixedText           aFtLineColor;
511cdf0e10cSrcweir 	ColorLB             aLbLineColor;
512cdf0e10cSrcweir 	HatchingLB          aLbHatchings;
513cdf0e10cSrcweir 	SvxXRectPreview     aCtlPreview;
514cdf0e10cSrcweir 	PushButton          aBtnAdd;
515cdf0e10cSrcweir 	PushButton          aBtnModify;
516cdf0e10cSrcweir 	PushButton          aBtnDelete;
517cdf0e10cSrcweir 	ImageButton         aBtnLoad;
518cdf0e10cSrcweir 	ImageButton         aBtnSave;
519cdf0e10cSrcweir 
520cdf0e10cSrcweir 	const SfxItemSet&   rOutAttrs;
521cdf0e10cSrcweir 	RECT_POINT          eRP;
522cdf0e10cSrcweir 
52397e8a929SArmin Le Grand 	XColorList*        pColorTab;
524cdf0e10cSrcweir 	XHatchList*         pHatchingList;
525cdf0e10cSrcweir 
526cdf0e10cSrcweir 	ChangeType*         pnHatchingListState;
527cdf0e10cSrcweir 	ChangeType*         pnColorTableState;
528cdf0e10cSrcweir 	sal_uInt16*             pPageType;
529cdf0e10cSrcweir 	sal_uInt16*             pDlgType;
530cdf0e10cSrcweir 	sal_uInt16*             pPos;
531cdf0e10cSrcweir 	sal_Bool*               pbAreaTP;
532cdf0e10cSrcweir 
533cdf0e10cSrcweir 	XOutdevItemPool*    pXPool;
534cdf0e10cSrcweir 	XFillStyleItem      aXFStyleItem;
535cdf0e10cSrcweir 	XFillHatchItem      aXHatchItem;
536cdf0e10cSrcweir 	XFillAttrSetItem    aXFillAttr;
537cdf0e10cSrcweir 	SfxItemSet&         rXFSet;
538cdf0e10cSrcweir 
539cdf0e10cSrcweir 	SfxMapUnit			ePoolUnit;
540cdf0e10cSrcweir 
541cdf0e10cSrcweir #ifdef _SVX_TPHATCH_CXX
542cdf0e10cSrcweir 	DECL_LINK( ChangeHatchHdl_Impl, void * );
543cdf0e10cSrcweir 	DECL_LINK( ModifiedHdl_Impl, void * );
544cdf0e10cSrcweir 	DECL_LINK( ClickAddHdl_Impl, void * );
545cdf0e10cSrcweir 	DECL_LINK( ClickModifyHdl_Impl, void * );
546cdf0e10cSrcweir 	DECL_LINK( ClickDeleteHdl_Impl, void * );
547cdf0e10cSrcweir 	DECL_LINK( ClickLoadHdl_Impl, void * );
548cdf0e10cSrcweir 	DECL_LINK( ClickSaveHdl_Impl, void * );
549cdf0e10cSrcweir 
550cdf0e10cSrcweir 	long CheckChanges_Impl();
551cdf0e10cSrcweir #endif
552cdf0e10cSrcweir 
553cdf0e10cSrcweir public:
554cdf0e10cSrcweir 	SvxHatchTabPage( Window* pParent, const SfxItemSet& rInAttrs  );
555cdf0e10cSrcweir 
556cdf0e10cSrcweir 	void    Construct();
557cdf0e10cSrcweir 
558cdf0e10cSrcweir 	static  SfxTabPage* Create( Window*, const SfxItemSet& );
559cdf0e10cSrcweir 	virtual sal_Bool FillItemSet( SfxItemSet& );
560cdf0e10cSrcweir 	virtual void Reset( const SfxItemSet & );
561cdf0e10cSrcweir 
562cdf0e10cSrcweir 	virtual void ActivatePage( const SfxItemSet& rSet );
563cdf0e10cSrcweir 	virtual int  DeactivatePage( SfxItemSet* pSet );
564cdf0e10cSrcweir 
565cdf0e10cSrcweir 	virtual void PointChanged( Window* pWindow, RECT_POINT eRP );
566cdf0e10cSrcweir 
56797e8a929SArmin Le Grand 	void    SetColorTable( XColorList* pColTab ) { pColorTab = pColTab; }
568cdf0e10cSrcweir 	void    SetHatchingList( XHatchList* pHtchLst)
569cdf0e10cSrcweir 				{ pHatchingList = pHtchLst; }
570cdf0e10cSrcweir 
571cdf0e10cSrcweir 	void    SetPageType( sal_uInt16* pInType ) { pPageType = pInType; }
572cdf0e10cSrcweir 	void    SetDlgType( sal_uInt16* pInType ) { pDlgType = pInType; }
573cdf0e10cSrcweir 	void    SetPos( sal_uInt16* pInPos ) { pPos = pInPos; }
574cdf0e10cSrcweir 	void    SetAreaTP( sal_Bool* pIn ) { pbAreaTP = pIn; }
575cdf0e10cSrcweir 
576cdf0e10cSrcweir 	void    SetHtchChgd( ChangeType* pIn ) { pnHatchingListState = pIn; }
577cdf0e10cSrcweir 	void    SetColorChgd( ChangeType* pIn ) { pnColorTableState = pIn; }
578cdf0e10cSrcweir 
579cdf0e10cSrcweir 	virtual void		DataChanged( const DataChangedEvent& rDCEvt );
580cdf0e10cSrcweir };
581cdf0e10cSrcweir 
582cdf0e10cSrcweir /*************************************************************************
583cdf0e10cSrcweir |*
584cdf0e10cSrcweir |* Bitmap-Tab-Page
585cdf0e10cSrcweir |*
586cdf0e10cSrcweir \************************************************************************/
587cdf0e10cSrcweir 
588cdf0e10cSrcweir class SvxBitmapTabPage : public SvxTabPage
589cdf0e10cSrcweir {
590cdf0e10cSrcweir 	using TabPage::ActivatePage;
591cdf0e10cSrcweir 	using TabPage::DeactivatePage;
592cdf0e10cSrcweir 
593cdf0e10cSrcweir private:
594cdf0e10cSrcweir 	SvxPixelCtl         aCtlPixel;
595cdf0e10cSrcweir     FixedText           aFtPixelEdit;
596cdf0e10cSrcweir 	FixedText           aFtColor;
597cdf0e10cSrcweir 	ColorLB             aLbColor;
598cdf0e10cSrcweir 	FixedText           aFtBackgroundColor;
599cdf0e10cSrcweir 	ColorLB             aLbBackgroundColor;
600cdf0e10cSrcweir 	FixedText           aLbBitmapsHidden;
601cdf0e10cSrcweir 	BitmapLB            aLbBitmaps;
602cdf0e10cSrcweir     FixedLine           aFlProp;
603cdf0e10cSrcweir 	SvxXRectPreview     aCtlPreview;
604cdf0e10cSrcweir 	PushButton          aBtnAdd;
605cdf0e10cSrcweir 	PushButton          aBtnModify;
606cdf0e10cSrcweir 	PushButton          aBtnImport;
607cdf0e10cSrcweir 	PushButton          aBtnDelete;
608cdf0e10cSrcweir 	ImageButton         aBtnLoad;
609cdf0e10cSrcweir 	ImageButton         aBtnSave;
610cdf0e10cSrcweir 
611cdf0e10cSrcweir 	SvxBitmapCtl        aBitmapCtl;
612cdf0e10cSrcweir 
613cdf0e10cSrcweir 	const SfxItemSet&   rOutAttrs;
614cdf0e10cSrcweir 
61597e8a929SArmin Le Grand 	XColorList*        pColorTab;
616cdf0e10cSrcweir 	XBitmapList*        pBitmapList;
617cdf0e10cSrcweir 
618cdf0e10cSrcweir 	ChangeType*         pnBitmapListState;
619cdf0e10cSrcweir 	ChangeType*         pnColorTableState;
620cdf0e10cSrcweir 	sal_uInt16*             pPageType;
621cdf0e10cSrcweir 	sal_uInt16*             pDlgType;
622cdf0e10cSrcweir 	sal_uInt16*             pPos;
623cdf0e10cSrcweir 	sal_Bool*               pbAreaTP;
624cdf0e10cSrcweir 
625cdf0e10cSrcweir 	sal_Bool                bBmpChanged;
626cdf0e10cSrcweir 
627cdf0e10cSrcweir 	XOutdevItemPool*    pXPool;
628cdf0e10cSrcweir 	XFillStyleItem      aXFStyleItem;
629cdf0e10cSrcweir 	XFillBitmapItem     aXBitmapItem;
630cdf0e10cSrcweir 	XFillAttrSetItem    aXFillAttr;
631cdf0e10cSrcweir 	SfxItemSet&         rXFSet;
632cdf0e10cSrcweir 
633cdf0e10cSrcweir #ifdef _SVX_TPBITMAP_CXX
634cdf0e10cSrcweir 	DECL_LINK( ClickAddHdl_Impl, void * );
635cdf0e10cSrcweir 	DECL_LINK( ClickImportHdl_Impl, void * );
636cdf0e10cSrcweir 	DECL_LINK( ClickModifyHdl_Impl, void * );
637cdf0e10cSrcweir 	DECL_LINK( ClickDeleteHdl_Impl, void * );
638cdf0e10cSrcweir 	DECL_LINK( ChangeBitmapHdl_Impl, void * );
639cdf0e10cSrcweir 	DECL_LINK( ChangePixelColorHdl_Impl, void * );
640cdf0e10cSrcweir 	DECL_LINK( ChangeBackgrndColorHdl_Impl, void * );
641cdf0e10cSrcweir 	DECL_LINK( ClickLoadHdl_Impl, void * );
642cdf0e10cSrcweir 	DECL_LINK( ClickSaveHdl_Impl, void * );
643cdf0e10cSrcweir 
644cdf0e10cSrcweir 	long CheckChanges_Impl();
645cdf0e10cSrcweir #endif
646cdf0e10cSrcweir 
647cdf0e10cSrcweir public:
648cdf0e10cSrcweir 	SvxBitmapTabPage( Window* pParent, const SfxItemSet& rInAttrs  );
649cdf0e10cSrcweir 
650cdf0e10cSrcweir 	void    Construct();
651cdf0e10cSrcweir 
652cdf0e10cSrcweir 	static  SfxTabPage* Create( Window*, const SfxItemSet& );
653cdf0e10cSrcweir 	virtual sal_Bool FillItemSet( SfxItemSet& );
654cdf0e10cSrcweir 	virtual void Reset( const SfxItemSet & );
655cdf0e10cSrcweir 
656cdf0e10cSrcweir 	virtual void ActivatePage( const SfxItemSet& rSet );
657cdf0e10cSrcweir 	virtual int  DeactivatePage( SfxItemSet* pSet );
658cdf0e10cSrcweir 
659cdf0e10cSrcweir 	virtual void PointChanged( Window* pWindow, RECT_POINT eRP );
660cdf0e10cSrcweir 
66197e8a929SArmin Le Grand 	void    SetColorTable( XColorList* pColTab ) { pColorTab = pColTab; }
662cdf0e10cSrcweir 	void    SetBitmapList( XBitmapList* pBmpLst) { pBitmapList = pBmpLst; }
663cdf0e10cSrcweir 
664cdf0e10cSrcweir 	void    SetPageType( sal_uInt16* pInType ) { pPageType = pInType; }
665cdf0e10cSrcweir 	void    SetDlgType( sal_uInt16* pInType ) { pDlgType = pInType; }
666cdf0e10cSrcweir 	void    SetPos( sal_uInt16* pInPos ) { pPos = pInPos; }
667cdf0e10cSrcweir 	void    SetAreaTP( sal_Bool* pIn ) { pbAreaTP = pIn; }
668cdf0e10cSrcweir 
669cdf0e10cSrcweir 	void    SetBmpChgd( ChangeType* pIn ) { pnBitmapListState = pIn; }
670cdf0e10cSrcweir 	void    SetColorChgd( ChangeType* pIn ) { pnColorTableState = pIn; }
671cdf0e10cSrcweir 
672cdf0e10cSrcweir     /** Return a label that is associated with the given control.  This
673cdf0e10cSrcweir         label is used to the determine the name for the control.
674cdf0e10cSrcweir         @param pLabeled
675cdf0e10cSrcweir             The control for which to return a label.
676cdf0e10cSrcweir         @return
677cdf0e10cSrcweir             Return a label control that provides a name for the specified
678cdf0e10cSrcweir             control.
679cdf0e10cSrcweir     */
680cdf0e10cSrcweir     virtual Window*	GetParentLabeledBy( const Window* pLabeled ) const;
681cdf0e10cSrcweir };
682cdf0e10cSrcweir 
683cdf0e10cSrcweir /*************************************************************************
684cdf0e10cSrcweir |*
685cdf0e10cSrcweir |* Farben-Tab-Page
686cdf0e10cSrcweir |*
687cdf0e10cSrcweir \************************************************************************/
688cdf0e10cSrcweir 
689cdf0e10cSrcweir class SvxColorTabPage : public SfxTabPage
690cdf0e10cSrcweir {
691cdf0e10cSrcweir 	using TabPage::ActivatePage;
692cdf0e10cSrcweir 	using TabPage::DeactivatePage;
693cdf0e10cSrcweir 
694cdf0e10cSrcweir private:
695cdf0e10cSrcweir     FixedLine           aFlProp;
696cdf0e10cSrcweir 	FixedText           aFtName;
697cdf0e10cSrcweir 	Edit                aEdtName;
698cdf0e10cSrcweir     FixedText           aFtColor;
699cdf0e10cSrcweir 	ColorLB             aLbColor;
700cdf0e10cSrcweir 
701cdf0e10cSrcweir     FixedText           aTableNameFT;
702*28bcfa49SArmin Le Grand     SvxColorValueSet    aValSetColorTable;
703cdf0e10cSrcweir 
704cdf0e10cSrcweir     SvxXRectPreview     aCtlPreviewOld;
705cdf0e10cSrcweir 	SvxXRectPreview     aCtlPreviewNew;
706cdf0e10cSrcweir 
707cdf0e10cSrcweir     ListBox             aLbColorModel;
708cdf0e10cSrcweir     FixedText           aFtColorModel1;
709cdf0e10cSrcweir 	MetricField         aMtrFldColorModel1;
710cdf0e10cSrcweir     FixedText           aFtColorModel2;
711cdf0e10cSrcweir 	MetricField         aMtrFldColorModel2;
712cdf0e10cSrcweir     FixedText           aFtColorModel3;
713cdf0e10cSrcweir 	MetricField         aMtrFldColorModel3;
714cdf0e10cSrcweir 
715cdf0e10cSrcweir     FixedText           aFtColorModel4;
716cdf0e10cSrcweir 	MetricField         aMtrFldColorModel4;
717cdf0e10cSrcweir 
718cdf0e10cSrcweir     PushButton          aBtnAdd;
719cdf0e10cSrcweir 	PushButton          aBtnModify;
720cdf0e10cSrcweir 	PushButton          aBtnWorkOn;
721cdf0e10cSrcweir 	PushButton          aBtnDelete;
722cdf0e10cSrcweir 	ImageButton         aBtnLoad;
723cdf0e10cSrcweir 	ImageButton         aBtnSave;
724cdf0e10cSrcweir 
725cdf0e10cSrcweir 	const SfxItemSet&   rOutAttrs;
726cdf0e10cSrcweir 
72797e8a929SArmin Le Grand 	XColorList*        pColorTab;
728cdf0e10cSrcweir 
729cdf0e10cSrcweir 	ChangeType*         pnColorTableState;
730cdf0e10cSrcweir 	sal_uInt16*             pPageType;
731cdf0e10cSrcweir 	sal_uInt16*             pDlgType;
732cdf0e10cSrcweir 	sal_uInt16*             pPos;
733cdf0e10cSrcweir 	sal_Bool*               pbAreaTP;
734cdf0e10cSrcweir 	sal_Bool                bDeleteColorTable;
735cdf0e10cSrcweir 
736cdf0e10cSrcweir 	XOutdevItemPool*    pXPool;
737cdf0e10cSrcweir 	XFillStyleItem      aXFStyleItem;
738cdf0e10cSrcweir 	XFillColorItem      aXFillColorItem;
739cdf0e10cSrcweir 	XFillAttrSetItem    aXFillAttr;
740cdf0e10cSrcweir 	SfxItemSet&         rXFSet;
741cdf0e10cSrcweir 
742cdf0e10cSrcweir 	ColorModel          eCM;
743cdf0e10cSrcweir 
744cdf0e10cSrcweir 	Color				aAktuellColor;
745cdf0e10cSrcweir 
746cdf0e10cSrcweir #ifdef _SVX_TPCOLOR_CXX
747cdf0e10cSrcweir 	void    ConvertColorValues (Color& rColor, ColorModel eModell);
748cdf0e10cSrcweir 	void    RgbToCmyk_Impl( Color& rColor, sal_uInt16& rK );
749cdf0e10cSrcweir 	void    CmykToRgb_Impl( Color& rColor, const sal_uInt16 nKey );
750cdf0e10cSrcweir 	sal_uInt16  ColorToPercent_Impl( sal_uInt16 nColor );
751cdf0e10cSrcweir 	sal_uInt16  PercentToColor_Impl( sal_uInt16 nPercent );
752cdf0e10cSrcweir 
753*28bcfa49SArmin Le Grand     void ImpColorCountChanged();
754*28bcfa49SArmin Le Grand 
755cdf0e10cSrcweir 	//-----------------------------------------------------------------------------------------------------
756cdf0e10cSrcweir 	DECL_LINK( ClickAddHdl_Impl, void * );		// Button 'Hinzufuegen'
757cdf0e10cSrcweir 	DECL_LINK( ClickModifyHdl_Impl, void * );	// Button 'Aendern'
758cdf0e10cSrcweir 	DECL_LINK( ClickDeleteHdl_Impl, void * );	// Button 'loeschen'
759cdf0e10cSrcweir 	DECL_LINK( ClickWorkOnHdl_Impl, void * );	// Button 'Bearbeiten'
760cdf0e10cSrcweir 
761cdf0e10cSrcweir 	DECL_LINK( SelectColorLBHdl_Impl, void * );	// Farbe aus Listbox ausw�hlen
762cdf0e10cSrcweir 	DECL_LINK( SelectValSetHdl_Impl, void * );	// Farbe aus Farbpalette (links) ausw�hlen
763cdf0e10cSrcweir 	DECL_LINK( SelectColorModelHdl_Impl, void * );	// Auswahl Listbox 'Farbmodell'
764cdf0e10cSrcweir 	long ChangeColorHdl_Impl( void* p );
765cdf0e10cSrcweir 	DECL_LINK( ModifiedHdl_Impl, void * );		// Inhalt der Farbwerte-Felder wurde ver�ndert
766cdf0e10cSrcweir 	DECL_LINK( ClickLoadHdl_Impl, void * );		// Button 'Farbtabelle laden'
767cdf0e10cSrcweir 	DECL_LINK( ClickSaveHdl_Impl, void * );		// Button 'Farbtabelle sichern'
768cdf0e10cSrcweir 
769cdf0e10cSrcweir 	long CheckChanges_Impl();
770cdf0e10cSrcweir #endif
771cdf0e10cSrcweir 
772cdf0e10cSrcweir public:
773cdf0e10cSrcweir 	SvxColorTabPage( Window* pParent, const SfxItemSet& rInAttrs  );
774cdf0e10cSrcweir 
775cdf0e10cSrcweir 	void    Construct();
776cdf0e10cSrcweir 
777cdf0e10cSrcweir 	static  SfxTabPage* Create( Window*, const SfxItemSet& );
778cdf0e10cSrcweir 	virtual sal_Bool FillItemSet( SfxItemSet& );
779cdf0e10cSrcweir 	virtual void Reset( const SfxItemSet & );
780cdf0e10cSrcweir 
781cdf0e10cSrcweir 	virtual void ActivatePage( const SfxItemSet& rSet );
782cdf0e10cSrcweir 	virtual int  DeactivatePage( SfxItemSet* pSet );
783cdf0e10cSrcweir 
78497e8a929SArmin Le Grand 	void    SetColorTable( XColorList* pColTab ) { pColorTab = pColTab; }
785cdf0e10cSrcweir 
786cdf0e10cSrcweir 	void    SetPageType( sal_uInt16* pInType ) { pPageType = pInType; }
787cdf0e10cSrcweir 	void    SetDlgType( sal_uInt16* pInType ) { pDlgType = pInType; }
788cdf0e10cSrcweir 	void    SetPos( sal_uInt16* pInPos ) { pPos = pInPos; }
789cdf0e10cSrcweir 	void    SetAreaTP( sal_Bool* pIn ) { pbAreaTP = pIn; }
790cdf0e10cSrcweir 
791cdf0e10cSrcweir 	void    SetColorChgd( ChangeType* pIn ) { pnColorTableState = pIn; }
792cdf0e10cSrcweir 
793cdf0e10cSrcweir 	void	SetDeleteColorTable( sal_Bool bIn ) { bDeleteColorTable = bIn; }
794cdf0e10cSrcweir 
795cdf0e10cSrcweir 	virtual void FillUserData();
796cdf0e10cSrcweir };
797cdf0e10cSrcweir 
798cdf0e10cSrcweir 
799cdf0e10cSrcweir #endif // _CUI_TAB_AREA_HXX
800cdf0e10cSrcweir 
801