xref: /aoo42x/main/svx/inc/svx/fillctrl.hxx (revision 3334a7e6)
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 
24 #ifndef _FILLCTRL_HXX
25 #define _FILLCTRL_HXX
26 
27 #include <svl/lstner.hxx>
28 #include <sfx2/tbxctrl.hxx>
29 #include "svx/svxdllapi.h"
30 
31 class XFillStyleItem;
32 class XFillColorItem;
33 class XFillGradientItem;
34 class XFillHatchItem;
35 class XFillBitmapItem;
36 class FillControl;
37 class SvxFillTypeBox;
38 class SvxFillAttrBox;
39 class ListBox;
40 
41 /*************************************************************************
42 |*
43 |* Klassen fuer Flaechenattribute (Controls und Controller)
44 |*
45 \************************************************************************/
46 
47 class SVX_DLLPUBLIC SvxFillToolBoxControl: public SfxToolBoxControl
48 {
49 private:
50 	XFillStyleItem*		pStyleItem;
51 	XFillColorItem*		pColorItem;
52 	XFillGradientItem*	pGradientItem;
53 	XFillHatchItem*		pHatchItem;
54 	XFillBitmapItem*	pBitmapItem;
55 
56 	FillControl*		pFillControl;
57 	SvxFillTypeBox*		pFillTypeLB;
58 	SvxFillAttrBox*		pFillAttrLB;
59 
60 	sal_Bool				bUpdate;
61     sal_Bool                bIgnoreStatusUpdate;
62 	sal_uInt16				eLastXFS;
63 
64 public:
65 	SFX_DECL_TOOLBOX_CONTROL();
66 
67 	SvxFillToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
68 	~SvxFillToolBoxControl();
69 
70 	virtual void		StateChanged( sal_uInt16 nSID, SfxItemState eState,
71 									  const SfxPoolItem* pState );
72 	void 		        Update( const SfxPoolItem* pState );
73 	virtual Window*		CreateItemWindow( Window *pParent );
74     void                IgnoreStatusUpdate( sal_Bool bSet );
75 };
76 
77 //========================================================================
78 
79 class FillControl : public Window
80 {
81 private:
82 	friend class SvxFillToolBoxControl;
83 
84 	SvxFillTypeBox*	pLbFillType;
85 	SvxFillAttrBox*	pLbFillAttr;
86     Size            aLogicalFillSize;
87     Size            aLogicalAttrSize;
88     Timer           aDelayTimer;
89 
90 //#if 0 // _SOLAR__PRIVATE
91 	DECL_LINK( DelayHdl, Timer * );
92 	DECL_LINK( SelectFillTypeHdl, ListBox * );
93 	DECL_LINK( SelectFillAttrHdl, ListBox * );
94 //#endif
95     virtual void    DataChanged( const DataChangedEvent& rDCEvt );
96 public:
97 	FillControl( Window* pParent, WinBits nStyle = 0 );
98 	~FillControl();
99 
100 	virtual void Resize();
101 };
102 
103 #endif		// _FILLCTRL_HXX
104 
105