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