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