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