bump product version to 4.1.6.2
[LibreOffice.git] / include / svx / fontwork.hxx
blob4e24257aed9b5e149f4913ef6db3682b79ad9dc0
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef _SVX_FONTWORK_HXX
20 #define _SVX_FONTWORK_HXX
22 #include <vcl/toolbox.hxx>
23 #include <vcl/fixed.hxx>
24 #include <svtools/valueset.hxx>
25 #include <sfx2/dockwin.hxx>
26 #include <sfx2/ctrlitem.hxx>
27 #include <svx/xenum.hxx>
28 #include <svx/dlgctrl.hxx>
29 #include <svx/svxdllapi.h>
30 #include <svx/xtextit0.hxx>
32 // forward ---------------------------------------------------------------
34 class SdrView;
35 class SdrPageView;
36 class SdrObject;
38 class XFormTextAdjustItem;
39 class XFormTextDistanceItem;
40 class XFormTextStartItem;
41 class XFormTextMirrorItem;
42 class XFormTextStdFormItem;
43 class XFormTextHideFormItem;
44 class XFormTextOutlineItem;
45 class XFormTextShadowItem;
46 class XFormTextShadowColorItem;
47 class XFormTextShadowXValItem;
48 class XFormTextShadowYValItem;
50 /*************************************************************************
52 |* ControllerItem for Fontwork
54 \************************************************************************/
56 class SvxFontWorkDialog;
58 class SvxFontWorkControllerItem : public SfxControllerItem
60 SvxFontWorkDialog &rFontWorkDlg;
62 protected:
63 virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState,
64 const SfxPoolItem* pState);
66 public:
67 SvxFontWorkControllerItem(sal_uInt16 nId, SvxFontWorkDialog&, SfxBindings&);
70 /*************************************************************************
72 |* Derived from SfxChildWindow as "container" for fontwork dialog
74 \************************************************************************/
76 class SVX_DLLPUBLIC SvxFontWorkChildWindow : public SfxChildWindow
78 public:
79 SvxFontWorkChildWindow(Window*, sal_uInt16, SfxBindings*, SfxChildWinInfo*);
80 SFX_DECL_CHILDWINDOW_WITHID(SvxFontWorkChildWindow);
83 /*************************************************************************
85 |* Floating window for setting attributes of text effects
87 \************************************************************************/
89 class SVX_DLLPUBLIC SvxFontWorkDialog : public SfxDockingWindow
91 #define CONTROLLER_COUNT 12
93 SvxFontWorkControllerItem* pCtrlItems[CONTROLLER_COUNT];
95 ValueSet aFormSet;
97 ToolBox aTbxStyle;
98 ToolBox aTbxAdjust;
100 FixedImage aFbDistance;
101 MetricField aMtrFldDistance;
102 FixedImage aFbTextStart;
103 MetricField aMtrFldTextStart;
105 ToolBox aTbxShadow;
107 FixedImage aFbShadowX;
108 MetricField aMtrFldShadowX;
109 FixedImage aFbShadowY;
110 MetricField aMtrFldShadowY;
112 ColorLB aShadowColorLB;
114 SfxBindings& rBindings;
115 Timer aInputTimer;
117 sal_uInt16 nLastStyleTbxId;
118 sal_uInt16 nLastAdjustTbxId;
119 sal_uInt16 nLastShadowTbxId;
120 long nSaveShadowX;
121 long nSaveShadowY;
122 long nSaveShadowAngle;
123 long nSaveShadowSize;
125 ImageList maImageList;
127 XColorListRef pColorList;
129 friend class SvxFontWorkChildWindow;
130 friend class SvxFontWorkControllerItem;
132 DECL_LINK( SelectStyleHdl_Impl, void * );
133 DECL_LINK( SelectAdjustHdl_Impl, void * );
134 DECL_LINK( SelectShadowHdl_Impl, void * );
136 DECL_LINK( ModifyInputHdl_Impl, void * );
137 DECL_LINK( InputTimoutHdl_Impl, void * );
139 DECL_LINK( FormSelectHdl_Impl, void * );
140 DECL_LINK( ColorSelectHdl_Impl, void * );
142 void SetStyle_Impl(const XFormTextStyleItem*);
143 void SetAdjust_Impl(const XFormTextAdjustItem*);
144 void SetDistance_Impl(const XFormTextDistanceItem*);
145 void SetStart_Impl(const XFormTextStartItem*);
146 void SetMirror_Impl(const XFormTextMirrorItem*);
147 void SetStdForm_Impl(const XFormTextStdFormItem*);
148 void SetShowForm_Impl(const XFormTextHideFormItem*);
149 void SetOutline_Impl(const XFormTextOutlineItem*);
150 void SetShadow_Impl(const XFormTextShadowItem*,
151 bool bRestoreValues = false);
152 void SetShadowColor_Impl(const XFormTextShadowColorItem*);
153 void SetShadowXVal_Impl(const XFormTextShadowXValItem*);
154 void SetShadowYVal_Impl(const XFormTextShadowYValItem*);
156 virtual void DataChanged( const DataChangedEvent& rDCEvt );
157 void ApplyImageList();
159 protected:
160 virtual void Zoom();
161 virtual SfxChildAlignment CheckAlignment( SfxChildAlignment eActAlign,
162 SfxChildAlignment eAlign );
164 public:
165 SvxFontWorkDialog( SfxBindings *pBindinx,
166 SfxChildWindow *pCW,
167 Window* pParent,
168 const ResId& rResId );
169 ~SvxFontWorkDialog();
171 void SetColorList(const XColorListRef &pTable);
172 void SetActive(bool bActivate = true);
174 void CreateStdFormObj(SdrView& rView, SdrPageView& rPV,
175 const SfxItemSet& rAttr, SdrObject& rOldObj,
176 XFormTextStdForm eForm);
179 #endif // _SVX_FONTWORK_HXX
181 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */