Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : : #ifndef _SVX_FONTWORK_HXX
29 : : #define _SVX_FONTWORK_HXX
30 : :
31 : : #include <vcl/toolbox.hxx>
32 : : #include <vcl/fixed.hxx>
33 : : #include <svtools/valueset.hxx>
34 : : #include <sfx2/dockwin.hxx>
35 : : #include <sfx2/ctrlitem.hxx>
36 : : #include <svx/xenum.hxx>
37 : : #include <svx/dlgctrl.hxx>
38 : : #include "svx/svxdllapi.h"
39 : :
40 : : // forward ---------------------------------------------------------------
41 : :
42 : : class SdrView;
43 : : class SdrPageView;
44 : : class SdrObject;
45 : :
46 : : class XFormTextAdjustItem;
47 : : class XFormTextDistanceItem;
48 : : class XFormTextStartItem;
49 : : class XFormTextMirrorItem;
50 : : class XFormTextStdFormItem;
51 : : class XFormTextHideFormItem;
52 : : class XFormTextOutlineItem;
53 : : class XFormTextShadowItem;
54 : : class XFormTextShadowColorItem;
55 : : class XFormTextShadowXValItem;
56 : : class XFormTextShadowYValItem;
57 : :
58 : : /*************************************************************************
59 : : |*
60 : : |* ControllerItem for Fontwork
61 : : |*
62 : : \************************************************************************/
63 : :
64 : : class SvxFontWorkDialog;
65 : :
66 [ # # ]: 0 : class SvxFontWorkControllerItem : public SfxControllerItem
67 : : {
68 : : SvxFontWorkDialog &rFontWorkDlg;
69 : :
70 : : protected:
71 : : virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState,
72 : : const SfxPoolItem* pState);
73 : :
74 : : public:
75 : : SvxFontWorkControllerItem(sal_uInt16 nId, SvxFontWorkDialog&, SfxBindings&);
76 : : };
77 : :
78 : : /*************************************************************************
79 : : |*
80 : : |* Derived from SfxChildWindow as "container" for fontwork dialog
81 : : |*
82 : : \************************************************************************/
83 : :
84 [ # # ]: 0 : class SVX_DLLPUBLIC SvxFontWorkChildWindow : public SfxChildWindow
85 : : {
86 : : public:
87 : : SvxFontWorkChildWindow(Window*, sal_uInt16, SfxBindings*, SfxChildWinInfo*);
88 : : SFX_DECL_CHILDWINDOW_WITHID(SvxFontWorkChildWindow);
89 : : };
90 : :
91 : : /*************************************************************************
92 : : |*
93 : : |* Floating window for setting attributes of text effects
94 : : |*
95 : : \************************************************************************/
96 : :
97 : : class SVX_DLLPUBLIC SvxFontWorkDialog : public SfxDockingWindow
98 : : {
99 : : #define CONTROLLER_COUNT 12
100 : :
101 : : SvxFontWorkControllerItem* pCtrlItems[CONTROLLER_COUNT];
102 : :
103 : : ValueSet aFormSet;
104 : :
105 : : ToolBox aTbxStyle;
106 : : ToolBox aTbxAdjust;
107 : :
108 : : FixedImage aFbDistance;
109 : : MetricField aMtrFldDistance;
110 : : FixedImage aFbTextStart;
111 : : MetricField aMtrFldTextStart;
112 : :
113 : : ToolBox aTbxShadow;
114 : :
115 : : FixedImage aFbShadowX;
116 : : MetricField aMtrFldShadowX;
117 : : FixedImage aFbShadowY;
118 : : MetricField aMtrFldShadowY;
119 : :
120 : : ColorLB aShadowColorLB;
121 : :
122 : : SfxBindings& rBindings;
123 : : Timer aInputTimer;
124 : :
125 : : sal_uInt16 nLastStyleTbxId;
126 : : sal_uInt16 nLastAdjustTbxId;
127 : : sal_uInt16 nLastShadowTbxId;
128 : : long nSaveShadowX;
129 : : long nSaveShadowY;
130 : : long nSaveShadowAngle;
131 : : long nSaveShadowSize;
132 : :
133 : : ImageList maImageList;
134 : :
135 : : XColorListRef pColorList;
136 : :
137 : : #ifdef _SVX_FONTWORK_CXX
138 : : friend class SvxFontWorkChildWindow;
139 : : friend class SvxFontWorkControllerItem;
140 : :
141 : : DECL_LINK( SelectStyleHdl_Impl, void * );
142 : : DECL_LINK( SelectAdjustHdl_Impl, void * );
143 : : DECL_LINK( SelectShadowHdl_Impl, void * );
144 : :
145 : : DECL_LINK( ModifyInputHdl_Impl, void * );
146 : : DECL_LINK( InputTimoutHdl_Impl, void * );
147 : :
148 : : DECL_LINK( FormSelectHdl_Impl, void * );
149 : : DECL_LINK( ColorSelectHdl_Impl, void * );
150 : :
151 : : void SetStyle_Impl(const XFormTextStyleItem*);
152 : : void SetAdjust_Impl(const XFormTextAdjustItem*);
153 : : void SetDistance_Impl(const XFormTextDistanceItem*);
154 : : void SetStart_Impl(const XFormTextStartItem*);
155 : : void SetMirror_Impl(const XFormTextMirrorItem*);
156 : : void SetStdForm_Impl(const XFormTextStdFormItem*);
157 : : void SetShowForm_Impl(const XFormTextHideFormItem*);
158 : : void SetOutline_Impl(const XFormTextOutlineItem*);
159 : : void SetShadow_Impl(const XFormTextShadowItem*,
160 : : sal_Bool bRestoreValues = sal_False);
161 : : void SetShadowColor_Impl(const XFormTextShadowColorItem*);
162 : : void SetShadowXVal_Impl(const XFormTextShadowXValItem*);
163 : : void SetShadowYVal_Impl(const XFormTextShadowYValItem*);
164 : : #endif
165 : :
166 : : virtual void DataChanged( const DataChangedEvent& rDCEvt );
167 : : void ApplyImageList();
168 : :
169 : : protected:
170 : : virtual void Zoom();
171 : : virtual SfxChildAlignment CheckAlignment( SfxChildAlignment eActAlign,
172 : : SfxChildAlignment eAlign );
173 : :
174 : : public:
175 : : SvxFontWorkDialog( SfxBindings *pBindinx,
176 : : SfxChildWindow *pCW,
177 : : Window* pParent,
178 : : const ResId& rResId );
179 : : ~SvxFontWorkDialog();
180 : :
181 : : void SetColorList(const XColorListRef &pTable);
182 : : void SetActive(sal_Bool bActivate = sal_True);
183 : :
184 : : void CreateStdFormObj(SdrView& rView, SdrPageView& rPV,
185 : : const SfxItemSet& rAttr, SdrObject& rOldObj,
186 : : XFormTextStdForm eForm);
187 : : };
188 : :
189 : : #endif // _SVX_FONTWORK_HXX
190 : :
191 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|