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