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 #ifndef _SVX_FONTWORK_HXX 23 #define _SVX_FONTWORK_HXX 24 25 // include --------------------------------------------------------------- 26 27 #ifndef _TOOLBOX_HXX //autogen 28 #include <vcl/toolbox.hxx> 29 #endif 30 #ifndef _FIXED_HXX //autogen 31 #include <vcl/fixed.hxx> 32 #endif 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 XFormTextHideFormItem; 51 class XFormTextOutlineItem; 52 class XFormTextShadowItem; 53 class XFormTextShadowColorItem; 54 class XFormTextShadowXValItem; 55 class XFormTextShadowYValItem; 56 57 /************************************************************************* 58 |* ControllerItem for Fontwork 59 \************************************************************************/ 60 61 class SvxFontWorkDialog; 62 63 class SvxFontWorkControllerItem : public SfxControllerItem 64 { 65 SvxFontWorkDialog &rFontWorkDlg; 66 67 protected: 68 virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState, 69 const SfxPoolItem* pState); 70 71 public: 72 SvxFontWorkControllerItem(sal_uInt16 nId, SvxFontWorkDialog&, SfxBindings&); 73 }; 74 75 /************************************************************************* 76 |* Ableitung vom SfxChildWindow als "Behälter" für Fontwork-Dialog 77 \************************************************************************/ 78 79 class SVX_DLLPUBLIC SvxFontWorkChildWindow : public SfxChildWindow 80 { 81 public: 82 SvxFontWorkChildWindow(Window*, sal_uInt16, SfxBindings*, SfxChildWinInfo*); 83 SFX_DECL_CHILDWINDOW(SvxFontWorkChildWindow); 84 }; 85 86 /************************************************************************* 87 |* Floating Window zur Attributierung von Texteffekten 88 \************************************************************************/ 89 90 class SVX_DLLPUBLIC SvxFontWorkDialog : public SfxDockingWindow 91 { 92 #define CONTROLLER_COUNT 11 93 94 SvxFontWorkControllerItem* pCtrlItems[CONTROLLER_COUNT]; 95 96 ToolBox aTbxStyle; 97 ToolBox aTbxAdjust; 98 99 FixedImage aFbDistance; 100 MetricField aMtrFldDistance; 101 FixedImage aFbTextStart; 102 MetricField aMtrFldTextStart; 103 104 ToolBox aTbxShadow; 105 106 FixedImage aFbShadowX; 107 MetricField aMtrFldShadowX; 108 FixedImage aFbShadowY; 109 MetricField aMtrFldShadowY; 110 111 ColorLB aShadowColorLB; 112 113 SfxBindings& rBindings; 114 Timer aInputTimer; 115 sal_Bool bUserZoomedIn; 116 117 sal_uInt16 nLastStyleTbxId; 118 sal_uInt16 nLastAdjustTbxId; 119 sal_uInt16 nLastShadowTbxId; 120 long nSaveShadowX; 121 long nSaveShadowY; 122 long nSaveShadowAngle; 123 long nSaveShadowSize; 124 125 ImageList maImageList; 126 ImageList maImageListH; 127 128 XColorListSharedPtr maColorTable; 129 130 #ifdef _SVX_FONTWORK_CXX 131 friend class SvxFontWorkChildWindow; 132 friend class SvxFontWorkControllerItem; 133 134 DECL_LINK( SelectStyleHdl_Impl, void * ); 135 DECL_LINK( SelectAdjustHdl_Impl, void * ); 136 DECL_LINK( SelectShadowHdl_Impl, void * ); 137 138 DECL_LINK( ModifyInputHdl_Impl, void * ); 139 DECL_LINK( InputTimeoutHdl_Impl, void * ); 140 141 DECL_LINK( ColorSelectHdl_Impl, void * ); 142 143 void SetStyle_Impl(const XFormTextStyleItem*); 144 void SetAdjust_Impl(const XFormTextAdjustItem*); 145 void SetDistance_Impl(const XFormTextDistanceItem*); 146 void SetStart_Impl(const XFormTextStartItem*); 147 void SetMirror_Impl(const XFormTextMirrorItem*); 148 void SetShowForm_Impl(const XFormTextHideFormItem*); 149 void SetOutline_Impl(const XFormTextOutlineItem*); 150 void SetShadow_Impl(const XFormTextShadowItem*, sal_Bool bRestoreValues = sal_False); 151 void SetShadowColor_Impl(const XFormTextShadowColorItem*); 152 void SetShadowXVal_Impl(const XFormTextShadowXValItem*); 153 void SetShadowYVal_Impl(const XFormTextShadowYValItem*); 154 #endif 155 156 virtual void DataChanged( const DataChangedEvent& rDCEvt ); 157 void ApplyImageList(); 158 159 protected: 160 virtual void Zoom(); 161 virtual SfxChildAlignment CheckAlignment( SfxChildAlignment eActAlign, 162 SfxChildAlignment eAlign ); 163 164 public: 165 SvxFontWorkDialog( SfxBindings *pBindinx, 166 SfxChildWindow *pCW, 167 Window* pParent, 168 const ResId& rResId ); 169 ~SvxFontWorkDialog(); 170 171 void SetColorTable(XColorListSharedPtr aTable); 172 void SetActive(sal_Bool bActivate = sal_True); 173 }; 174 175 #endif // _SVX_FONTWORK_HXX 176 177 /* vim: set noet sw=4 ts=4: */ 178