xref: /AOO41X/main/svx/inc/svx/fillctrl.hxx (revision fe22d2cfc602815794415026f1317bd625db6f83)
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_uInt16              eLastXFS;
62 
63 public:
64     SFX_DECL_TOOLBOX_CONTROL();
65 
66     SvxFillToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
67     ~SvxFillToolBoxControl();
68 
69     virtual void        StateChanged( sal_uInt16 nSID, SfxItemState eState,
70                                       const SfxPoolItem* pState );
71     void                Update( const SfxPoolItem* pState );
72     virtual Window*     CreateItemWindow( Window *pParent );
73 };
74 
75 //========================================================================
76 
77 class FillControl : public Window
78 {
79 private:
80     friend class SvxFillToolBoxControl;
81 
82     SvxFillTypeBox* pLbFillType;
83     SvxFillAttrBox* pLbFillAttr;
84     Size            aLogicalFillSize;
85     Size            aLogicalAttrSize;
86     Timer           aDelayTimer;
87 
88 //#if 0 // _SOLAR__PRIVATE
89     DECL_LINK( DelayHdl, Timer * );
90     DECL_LINK( SelectFillTypeHdl, ListBox * );
91     DECL_LINK( SelectFillAttrHdl, ListBox * );
92 //#endif
93     virtual void    DataChanged( const DataChangedEvent& rDCEvt );
94 public:
95     FillControl( Window* pParent, WinBits nStyle = 0 );
96     ~FillControl();
97 
98     virtual void Resize();
99 };
100 
101 #endif      // _FILLCTRL_HXX
102 
103