xref: /aoo42x/main/svx/inc/svx/fillctrl.hxx (revision 4b49cd3e)
13334a7e6SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
33334a7e6SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
43334a7e6SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
53334a7e6SAndrew Rist  * distributed with this work for additional information
63334a7e6SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
73334a7e6SAndrew Rist  * to you under the Apache License, Version 2.0 (the
83334a7e6SAndrew Rist  * "License"); you may not use this file except in compliance
93334a7e6SAndrew Rist  * with the License.  You may obtain a copy of the License at
103334a7e6SAndrew Rist  *
113334a7e6SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
123334a7e6SAndrew Rist  *
133334a7e6SAndrew Rist  * Unless required by applicable law or agreed to in writing,
143334a7e6SAndrew Rist  * software distributed under the License is distributed on an
153334a7e6SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
163334a7e6SAndrew Rist  * KIND, either express or implied.  See the License for the
173334a7e6SAndrew Rist  * specific language governing permissions and limitations
183334a7e6SAndrew Rist  * under the License.
193334a7e6SAndrew Rist  *
203334a7e6SAndrew Rist  *************************************************************/
213334a7e6SAndrew Rist 
22cdf0e10cSrcweir #ifndef _FILLCTRL_HXX
23cdf0e10cSrcweir #define _FILLCTRL_HXX
24cdf0e10cSrcweir 
25cdf0e10cSrcweir #include <svl/lstner.hxx>
26cdf0e10cSrcweir #include <sfx2/tbxctrl.hxx>
27cdf0e10cSrcweir #include "svx/svxdllapi.h"
28*4b49cd3eSArmin Le Grand #include <svx/xenum.hxx>
29cdf0e10cSrcweir 
30cdf0e10cSrcweir class XFillStyleItem;
31cdf0e10cSrcweir class XFillColorItem;
32cdf0e10cSrcweir class XFillGradientItem;
33cdf0e10cSrcweir class XFillHatchItem;
34cdf0e10cSrcweir class XFillBitmapItem;
35cdf0e10cSrcweir class FillControl;
36cdf0e10cSrcweir class SvxFillTypeBox;
37cdf0e10cSrcweir class SvxFillAttrBox;
38cdf0e10cSrcweir class ListBox;
39cdf0e10cSrcweir 
40cdf0e10cSrcweir /*************************************************************************
41cdf0e10cSrcweir |*
42cdf0e10cSrcweir |* Klassen fuer Flaechenattribute (Controls und Controller)
43cdf0e10cSrcweir |*
44cdf0e10cSrcweir \************************************************************************/
45cdf0e10cSrcweir 
4600467759SArmin Le Grand class SVX_DLLPUBLIC SvxFillToolBoxControl : public SfxToolBoxControl
47cdf0e10cSrcweir {
48cdf0e10cSrcweir private:
4900467759SArmin Le Grand     XFillStyleItem*     mpStyleItem;
5000467759SArmin Le Grand     XFillColorItem*     mpColorItem;
5100467759SArmin Le Grand     XFillGradientItem*  mpGradientItem;
5200467759SArmin Le Grand     XFillHatchItem*     mpHatchItem;
5300467759SArmin Le Grand     XFillBitmapItem*    mpBitmapItem;
5400467759SArmin Le Grand 
5500467759SArmin Le Grand     FillControl*        mpFillControl;
5600467759SArmin Le Grand     SvxFillTypeBox*     mpFillTypeLB;
5700467759SArmin Le Grand     SvxFillAttrBox*     mpFillAttrLB;
58cdf0e10cSrcweir 
5900467759SArmin Le Grand     XFillStyle          meLastXFS;
60cdf0e10cSrcweir 
6100467759SArmin Le Grand     /// bitfield
6200467759SArmin Le Grand     bool                mbUpdate : 1;
63cdf0e10cSrcweir 
64cdf0e10cSrcweir public:
6500467759SArmin Le Grand     SFX_DECL_TOOLBOX_CONTROL();
66cdf0e10cSrcweir 
6700467759SArmin Le Grand     SvxFillToolBoxControl(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx);
6800467759SArmin Le Grand     ~SvxFillToolBoxControl();
69cdf0e10cSrcweir 
7000467759SArmin Le Grand     virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState);
7100467759SArmin Le Grand     void Update(const SfxPoolItem* pState);
7200467759SArmin Le Grand     virtual Window* CreateItemWindow(Window* pParent);
73cdf0e10cSrcweir };
74cdf0e10cSrcweir 
75cdf0e10cSrcweir //========================================================================
76cdf0e10cSrcweir 
77cdf0e10cSrcweir class FillControl : public Window
78cdf0e10cSrcweir {
79cdf0e10cSrcweir private:
8000467759SArmin Le Grand     friend class SvxFillToolBoxControl;
8100467759SArmin Le Grand 
8200467759SArmin Le Grand     SvxFillTypeBox*     mpLbFillType;
8300467759SArmin Le Grand     SvxFillAttrBox*     mpLbFillAttr;
8400467759SArmin Le Grand     Size                maLogicalFillSize;
8500467759SArmin Le Grand     Size                maLogicalAttrSize;
8600467759SArmin Le Grand 
8700467759SArmin Le Grand     //
8800467759SArmin Le Grand     sal_uInt16          mnLastFillTypeControlSelectEntryPos;
8900467759SArmin Le Grand     sal_uInt16          mnLastFillAttrControlSelectEntryPos;
9000467759SArmin Le Grand 
9100467759SArmin Le Grand     /// bitfield
9200467759SArmin Le Grand     bool                mbFillTypeChanged : 1;
9300467759SArmin Le Grand 
9400467759SArmin Le Grand     DECL_LINK(SelectFillTypeHdl,ListBox *);
9500467759SArmin Le Grand     DECL_LINK(SelectFillAttrHdl,ListBox *);
9600467759SArmin Le Grand 
9700467759SArmin Le Grand     virtual void DataChanged(const DataChangedEvent& rDCEvt);
9800467759SArmin Le Grand 
9900467759SArmin Le Grand     void InitializeFillStyleAccordingToGivenFillType(XFillStyle aFillStyle);
10000467759SArmin Le Grand     void updateLastFillTypeControlSelectEntryPos();
10100467759SArmin Le Grand     void updateLastFillAttrControlSelectEntryPos();
10200467759SArmin Le Grand 
103cdf0e10cSrcweir public:
10400467759SArmin Le Grand     FillControl(Window* pParent, WinBits nStyle = 0);
10500467759SArmin Le Grand     ~FillControl();
106cdf0e10cSrcweir 
10700467759SArmin Le Grand     virtual void Resize();
108cdf0e10cSrcweir };
109cdf0e10cSrcweir 
11000467759SArmin Le Grand #endif // _FILLCTRL_HXX
111cdf0e10cSrcweir 
11200467759SArmin Le Grand // eof
113