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