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