xref: /trunk/main/cui/source/inc/cuitabarea.hxx (revision 8f71f2da3780fff02b58fe2fe2c8a220939be93f)
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     sal_uInt16             nPageType;
109     sal_uInt16             nDlgType;
110 
111     // main selection
112     FixedLine           aFlProp;
113     RadioButton         aRbtTransOff;
114     RadioButton         aRbtTransLinear;
115     RadioButton         aRbtTransGradient;
116 
117     // linear transparency
118     MetricField         aMtrTransparent;
119 
120     // gradient transparency
121     FixedText           aFtTrgrType;
122     ListBox             aLbTrgrGradientType;
123     FixedText           aFtTrgrCenterX;
124     MetricField         aMtrTrgrCenterX;
125     FixedText           aFtTrgrCenterY;
126     MetricField         aMtrTrgrCenterY;
127     FixedText           aFtTrgrAngle;
128     MetricField         aMtrTrgrAngle;
129     FixedText           aFtTrgrBorder;
130     MetricField         aMtrTrgrBorder;
131     FixedText           aFtTrgrStartValue;
132     MetricField         aMtrTrgrStartValue;
133     FixedText           aFtTrgrEndValue;
134     MetricField         aMtrTrgrEndValue;
135 
136     // preview
137     SvxXRectPreview     aCtlBitmapPreview;
138     SvxXRectPreview     aCtlXRectPreview;
139     sal_Bool                bBitmap;
140 
141     XOutdevItemPool*    pXPool;
142     XFillAttrSetItem    aXFillAttr;
143     SfxItemSet&         rXFSet;
144 
145 #ifdef _SVX_TPAREA_CXX
146     DECL_LINK(ClickTransOffHdl_Impl, void * );
147     DECL_LINK(ClickTransLinearHdl_Impl, void * );
148     DECL_LINK(ClickTransGradientHdl_Impl, void * );
149     DECL_LINK(ModifyTransparentHdl_Impl, void*);
150     DECL_LINK(ChangeTrgrTypeHdl_Impl, void*);
151     DECL_LINK(ModifiedTrgrHdl_Impl, void*);
152 #endif
153 
154     void ActivateLinear(sal_Bool bActivate);
155     void ActivateGradient(sal_Bool bActivate);
156     void SetControlState_Impl(XGradientStyle eXGS);
157 
158     sal_Bool InitPreview ( const SfxItemSet& rSet );
159     void InvalidatePreview (sal_Bool bEnable = sal_True );
160 
161 public:
162     SvxTransparenceTabPage(Window* pParent, const SfxItemSet& rInAttrs);
163     void Construct();
164 
165     static SfxTabPage* Create(Window*, const SfxItemSet&);
166     static sal_uInt16* GetRanges();
167 
168     virtual sal_Bool FillItemSet(SfxItemSet&);
169     virtual void Reset(const SfxItemSet&);
170     virtual void ActivatePage(const SfxItemSet& rSet);
171     virtual int  DeactivatePage(SfxItemSet* pSet);
172     virtual void PointChanged(Window* pWindow, RECT_POINT eRP);
173 
174     //CHINA001 void SetPageType(sal_uInt16 *pInType) { pPageType = pInType; }
175     //CHINA001 void SetDlgType(sal_uInt16* pInType) { pDlgType = pInType; }
176     void SetPageType(sal_uInt16 nInType) { nPageType = nInType; } //add CHINA001
177     void SetDlgType(sal_uInt16 nInType) { nDlgType = nInType; }//add CHINA001
178     virtual void PageCreated (SfxAllItemSet aSet); //add CHINA001
179 };
180 
181 /*************************************************************************
182 |*
183 |* Fl"achen-Tab-Page
184 |*
185 \************************************************************************/
186 
187 class SvxAreaTabPage : public SvxTabPage
188 {
189     using TabPage::ActivatePage;
190     using TabPage::DeactivatePage;
191 
192 private:
193     FixedLine           aFlProp;
194     ListBox             aTypeLB;
195 
196     ColorLB             aLbColor;
197     GradientLB          aLbGradient;
198     HatchingLB          aLbHatching;
199     BitmapLB            aLbBitmap;
200     SvxXRectPreview     aCtlBitmapPreview;
201 
202     TriStateBox         aTsbStepCount;
203     FixedLine           aFlStepCount;
204     NumericField        aNumFldStepCount;
205 
206     CheckBox            aCbxHatchBckgrd;
207     ColorLB             aLbHatchBckgrdColor;
208 
209     FixedLine           aFlSize;
210     TriStateBox         aTsbOriginal;
211     TriStateBox         aTsbScale;
212     FixedText           aFtXSize;
213     MetricField         aMtrFldXSize;
214     FixedText           aFtYSize;
215     MetricField         aMtrFldYSize;
216     FixedLine           aFlPosition;
217     SvxRectCtl          aCtlPosition;
218     FixedText           aFtXOffset;
219     MetricField         aMtrFldXOffset;
220     FixedText           aFtYOffset;
221     MetricField         aMtrFldYOffset;
222     TriStateBox         aTsbTile;
223     TriStateBox         aTsbStretch;
224     FixedLine           aFlOffset;
225     RadioButton         aRbtRow;
226     RadioButton         aRbtColumn;
227     MetricField         aMtrFldOffset;
228 
229     SvxXRectPreview     aCtlXRectPreview;
230 
231     const SfxItemSet&   rOutAttrs;
232     RECT_POINT          eRP;
233 
234     XColorListSharedPtr     maColorTab;
235     XGradientListSharedPtr  maGradientList;
236     XHatchListSharedPtr     maHatchingList;
237     XBitmapListSharedPtr    maBitmapList;
238 
239     // Placeholders for pointer-based entries; these will be inited
240     // to point to these so that the page is usable without that
241     // SvxAreaTabDialog has to call the setter methods (e.g. SetColorChgd).
242     // Without that the pages used in SvxAreaTabDialog are not usable
243     ChangeType          maFixed_ChangeType;
244     sal_Bool            maFixed_sal_Bool;
245 
246     ChangeType*         pnColorTableState;
247     ChangeType*         pnBitmapListState;
248     ChangeType*         pnGradientListState;
249     ChangeType*         pnHatchingListState;
250 
251     sal_uInt16          nPageType;
252     sal_uInt16          nDlgType;
253     sal_uInt16          nPos;
254 
255     sal_Bool*           pbAreaTP;
256 
257     XOutdevItemPool*    pXPool;
258     XFillAttrSetItem    aXFillAttr;
259     SfxItemSet&         rXFSet;
260 
261     SfxMapUnit          ePoolUnit;
262     FieldUnit           eFUnit;
263 
264     //UUUU
265     bool                mbOfferImportButton;
266     bool                mbPositionsAdapted;
267     bool                mbDirectGraphicSet;
268     Graphic             maDirectGraphic;
269     String              maDirectName;
270     PushButton          maBtnImport;
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 
288     //UUUU
289     DECL_LINK( ClickImportHdl_Impl, void * );
290 
291     DECL_LINK( ModifyTileHdl_Impl, void * );
292     DECL_LINK( ClickScaleHdl_Impl, void * );
293 #endif
294 
295 public:
296     SvxAreaTabPage( Window* pParent, const SfxItemSet& rInAttrs );
297 
298     void    Construct();
299 
300     static  SfxTabPage* Create( Window*, const SfxItemSet& );
301     static  sal_uInt16*     GetRanges();
302 
303     virtual sal_Bool FillItemSet( SfxItemSet& );
304     virtual void Reset( const SfxItemSet & );
305     virtual void ActivatePage( const SfxItemSet& rSet );
306     virtual int  DeactivatePage( SfxItemSet* pSet );
307     virtual void PointChanged( Window* pWindow, RECT_POINT eRP );
308 
309     void    SetColorTable( XColorListSharedPtr aColTab ) { maColorTab = aColTab; }
310     void    SetGradientList( XGradientListSharedPtr aGrdLst) { maGradientList = aGrdLst; }
311     void    SetHatchingList( XHatchListSharedPtr aHtchLst) { maHatchingList = aHtchLst; }
312     void    SetBitmapList( XBitmapListSharedPtr aBmpLst) { maBitmapList = aBmpLst; }
313 
314     //CHINA001 void    SetPageType( sal_uInt16* pInType ) { pPageType = pInType; }
315     void    SetPageType( sal_uInt16 nInType ) { nPageType = nInType; } //add CHINA001
316     //CHINA001 void    SetDlgType( sal_uInt16* pInType ) { pDlgType = pInType; }
317     void    SetDlgType( sal_uInt16 nInType ) { nDlgType = nInType; }//add CHINA001
318     //CHINA001 void    SetPos( sal_uInt16* pInPos ) { pPos = pInPos; }
319     void    SetPos( sal_uInt16 nInPos ) { nPos = nInPos; }//add CHINA001
320     void    SetAreaTP( sal_Bool* pIn ) { pbAreaTP = pIn; }
321     virtual void PageCreated (SfxAllItemSet aSet); //add CHINA001
322     void    SetColorChgd( ChangeType* pIn ) { pnColorTableState = pIn; }
323     void    SetGrdChgd( ChangeType* pIn ) { pnGradientListState = pIn; }
324     void    SetHtchChgd( ChangeType* pIn ) { pnHatchingListState = pIn; }
325     void    SetBmpChgd( ChangeType* pIn ) { pnBitmapListState = pIn; }
326 };
327 
328 /*************************************************************************
329 |*
330 |* Schatten-Tab-Page
331 |*
332 \************************************************************************/
333 
334 class SvxShadowTabPage : public SvxTabPage
335 {
336     using TabPage::ActivatePage;
337     using TabPage::DeactivatePage;
338 
339 private:
340     FixedLine           aFlProp;
341     TriStateBox         aTsbShowShadow;
342     FixedText           aFtPosition;
343     SvxRectCtl          aCtlPosition;
344     FixedText           aFtDistance;
345     MetricField         aMtrDistance;
346     FixedText           aFtShadowColor;
347     ColorLB             aLbShadowColor;
348     FixedText           aFtTransparent;
349     MetricField         aMtrTransparent;
350     SvxXShadowPreview   aCtlXRectPreview;
351 
352     const SfxItemSet&   rOutAttrs;
353     RECT_POINT          eRP;
354 
355     XColorListSharedPtr maColorTab;
356     ChangeType*         pnColorTableState;
357     sal_uInt16              nPageType;  //add CHINA001
358     sal_uInt16              nDlgType;   //add CHINA001
359     sal_uInt16*             pPos;
360     sal_Bool*               pbAreaTP;
361 
362     sal_Bool                bDisable;
363 
364     XOutdevItemPool*    pXPool;
365     XFillAttrSetItem    aXFillAttr;
366     SfxItemSet&         rXFSet;
367     SfxMapUnit          ePoolUnit;
368 
369 #ifdef _SVX_TPSHADOW_CXX
370     DECL_LINK( ClickShadowHdl_Impl, void * );
371     DECL_LINK( ModifyShadowHdl_Impl, void * );
372 #endif
373 
374 public:
375     SvxShadowTabPage( Window* pParent, const SfxItemSet& rInAttrs  );
376 
377     void    Construct();
378     static  SfxTabPage* Create( Window*, const SfxItemSet& );
379     static  sal_uInt16*     GetRanges();
380 
381     virtual sal_Bool FillItemSet( SfxItemSet& );
382     virtual void Reset( const SfxItemSet & );
383     virtual void ActivatePage( const SfxItemSet& rSet );
384     virtual int  DeactivatePage( SfxItemSet* pSet );
385     virtual void PointChanged( Window* pWindow, RECT_POINT eRP );
386 
387     void    SetColorTable( XColorListSharedPtr aColTab ) { maColorTab = aColTab; }
388 //CHINA001  void    SetPageType( sal_uInt16* pInType ) { pPageType = pInType; }
389 //CHINA001  void    SetDlgType( sal_uInt16* pInType ) { pDlgType = pInType; }
390     void    SetPageType( sal_uInt16 nInType ) { nPageType = nInType; } //add CHINA001
391     void    SetDlgType( sal_uInt16 nInType ) { nDlgType = nInType; }    //add CHINA001
392     void    SetAreaTP( sal_Bool* pIn ) { pbAreaTP = pIn; }
393     void    SetColorChgd( ChangeType* pIn ) { pnColorTableState = pIn; }
394     virtual void PageCreated (SfxAllItemSet aSet); //add CHINA001
395     void    DisablePage( sal_Bool bIn ) { bDisable = bIn; }
396 };
397 
398 /*************************************************************************
399 |*
400 |* Farbverlauf-Tab-Page
401 |*
402 \************************************************************************/
403 
404 class SvxGradientTabPage : public SfxTabPage
405 {
406     using TabPage::ActivatePage;
407     using TabPage::DeactivatePage;
408 
409 private:
410     FixedLine           aFlProp;
411     FixedText           aFtType;
412     ListBox             aLbGradientType;
413     FixedText           aFtCenterX;
414     MetricField         aMtrCenterX;
415     FixedText           aFtCenterY;
416     MetricField         aMtrCenterY;
417     FixedText           aFtAngle;
418     MetricField         aMtrAngle;
419     FixedText           aFtBorder;
420     MetricField         aMtrBorder;
421     FixedText           aFtColorFrom;
422     ColorLB             aLbColorFrom;
423     MetricField         aMtrColorFrom;
424     FixedText           aFtColorTo;
425     ColorLB             aLbColorTo;
426     MetricField         aMtrColorTo;
427     GradientLB          aLbGradients;
428     SvxXRectPreview     aCtlPreview;
429     PushButton          aBtnAdd;
430     PushButton          aBtnModify;
431     PushButton          aBtnDelete;
432     ImageButton         aBtnLoad;
433     ImageButton         aBtnSave;
434 
435     const SfxItemSet&   rOutAttrs;
436 
437     XColorListSharedPtr     maColorTab;
438     XGradientListSharedPtr  maGradientList;
439 
440     ChangeType*         pnGradientListState;
441     ChangeType*         pnColorTableState;
442     sal_uInt16*             pPageType;
443     sal_uInt16*             pDlgType;
444     sal_uInt16*             pPos;
445     sal_Bool*               pbAreaTP;
446 
447     XOutdevItemPool*    pXPool;
448     XFillStyleItem      aXFStyleItem;
449     XFillGradientItem   aXGradientItem;
450     XFillAttrSetItem    aXFillAttr;
451     SfxItemSet&         rXFSet;
452 
453 #ifdef _SVX_TPGRADNT_CXX
454     DECL_LINK( ClickAddHdl_Impl, void * );
455     DECL_LINK( ClickModifyHdl_Impl, void * );
456     DECL_LINK( ClickDeleteHdl_Impl, void * );
457     DECL_LINK( ChangeGradientHdl_Impl, void * );
458     DECL_LINK( ModifiedHdl_Impl, void * );
459     DECL_LINK( ClickLoadHdl_Impl, void * );
460     DECL_LINK( ClickSaveHdl_Impl, void * );
461 
462     long CheckChanges_Impl();
463     void SetControlState_Impl( XGradientStyle eXGS );
464 #endif
465 
466 public:
467     SvxGradientTabPage( Window* pParent, const SfxItemSet& rInAttrs  );
468 
469     void    Construct();
470 
471     static  SfxTabPage* Create( Window*, const SfxItemSet& );
472     virtual sal_Bool FillItemSet( SfxItemSet& );
473     virtual void Reset( const SfxItemSet & );
474 
475     virtual void ActivatePage( const SfxItemSet& rSet );
476     virtual int  DeactivatePage( SfxItemSet* pSet );
477 
478     void    SetColorTable( XColorListSharedPtr aColTab ) { maColorTab = aColTab; }
479     void    SetGradientList( XGradientListSharedPtr aGrdLst) { maGradientList = aGrdLst; }
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     XColorListSharedPtr maColorTab;
524     XHatchListSharedPtr maHatchingList;
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( XColorListSharedPtr aColTab ) { maColorTab = aColTab; }
568     void    SetHatchingList( XHatchListSharedPtr aHtchLst) { maHatchingList = aHtchLst; }
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     XColorListSharedPtr     maColorTab;
615     XBitmapListSharedPtr    maBitmapList;
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( XColorListSharedPtr aColTab ) { maColorTab = aColTab; }
661     void    SetBitmapList( XBitmapListSharedPtr aBmpLst) { maBitmapList = aBmpLst; }
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     SvxColorValueSet    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     XColorListSharedPtr maColorTab;
727 
728     ChangeType*         pnColorTableState;
729     sal_uInt16*             pPageType;
730     sal_uInt16*             pDlgType;
731     sal_uInt16*             pPos;
732     sal_Bool*               pbAreaTP;
733 
734     XOutdevItemPool*    pXPool;
735     XFillStyleItem      aXFStyleItem;
736     XFillColorItem      aXFillColorItem;
737     XFillAttrSetItem    aXFillAttr;
738     SfxItemSet&         rXFSet;
739 
740     ColorModel          eCM;
741 
742     Color               aAktuellColor;
743 
744 #ifdef _SVX_TPCOLOR_CXX
745     void    ConvertColorValues (Color& rColor, ColorModel eModell);
746     void    RgbToCmyk_Impl( Color& rColor, sal_uInt16& rK );
747     void    CmykToRgb_Impl( Color& rColor, const sal_uInt16 nKey );
748     sal_uInt16  ColorToPercent_Impl( sal_uInt16 nColor );
749     sal_uInt16  PercentToColor_Impl( sal_uInt16 nPercent );
750 
751     void ImpColorCountChanged();
752 
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( XColorListSharedPtr aColTab ) { maColorTab = aColTab; }
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     virtual void FillUserData();
792 };
793 
794 
795 #endif // _CUI_TAB_AREA_HXX
796 
797