1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef _FILLCTRL_HXX 29 #define _FILLCTRL_HXX 30 31 #include <svl/lstner.hxx> 32 #include <sfx2/tbxctrl.hxx> 33 #include "svx/svxdllapi.h" 34 35 class XFillStyleItem; 36 class XFillColorItem; 37 class XFillGradientItem; 38 class XFillHatchItem; 39 class XFillBitmapItem; 40 class FillControl; 41 class SvxFillTypeBox; 42 class SvxFillAttrBox; 43 class ListBox; 44 45 /************************************************************************* 46 |* 47 |* Klassen fuer Flaechenattribute (Controls und Controller) 48 |* 49 \************************************************************************/ 50 51 class SVX_DLLPUBLIC SvxFillToolBoxControl: public SfxToolBoxControl 52 { 53 private: 54 XFillStyleItem* pStyleItem; 55 XFillColorItem* pColorItem; 56 XFillGradientItem* pGradientItem; 57 XFillHatchItem* pHatchItem; 58 XFillBitmapItem* pBitmapItem; 59 60 FillControl* pFillControl; 61 SvxFillTypeBox* pFillTypeLB; 62 SvxFillAttrBox* pFillAttrLB; 63 64 sal_Bool bUpdate; 65 sal_Bool bIgnoreStatusUpdate; 66 sal_uInt16 eLastXFS; 67 68 public: 69 SFX_DECL_TOOLBOX_CONTROL(); 70 71 SvxFillToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ); 72 ~SvxFillToolBoxControl(); 73 74 virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, 75 const SfxPoolItem* pState ); 76 void Update( const SfxPoolItem* pState ); 77 virtual Window* CreateItemWindow( Window *pParent ); 78 void IgnoreStatusUpdate( sal_Bool bSet ); 79 }; 80 81 //======================================================================== 82 83 class FillControl : public Window 84 { 85 private: 86 friend class SvxFillToolBoxControl; 87 88 SvxFillTypeBox* pLbFillType; 89 SvxFillAttrBox* pLbFillAttr; 90 Size aLogicalFillSize; 91 Size aLogicalAttrSize; 92 Timer aDelayTimer; 93 94 //#if 0 // _SOLAR__PRIVATE 95 DECL_LINK( DelayHdl, Timer * ); 96 DECL_LINK( SelectFillTypeHdl, ListBox * ); 97 DECL_LINK( SelectFillAttrHdl, ListBox * ); 98 //#endif 99 virtual void DataChanged( const DataChangedEvent& rDCEvt ); 100 public: 101 FillControl( Window* pParent, WinBits nStyle = 0 ); 102 ~FillControl(); 103 104 virtual void Resize(); 105 }; 106 107 #endif // _FILLCTRL_HXX 108 109