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