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 #ifndef _SVX_FONTWORK_HXX 24 #define _SVX_FONTWORK_HXX 25 26 // include --------------------------------------------------------------- 27 28 #ifndef _TOOLBOX_HXX //autogen 29 #include <vcl/toolbox.hxx> 30 #endif 31 #ifndef _FIXED_HXX //autogen 32 #include <vcl/fixed.hxx> 33 #endif 34 #include <svtools/valueset.hxx> 35 #include <sfx2/dockwin.hxx> 36 #include <sfx2/ctrlitem.hxx> 37 #include <svx/xenum.hxx> 38 #include <svx/dlgctrl.hxx> 39 #include "svx/svxdllapi.h" 40 41 // forward --------------------------------------------------------------- 42 43 class SdrView; 44 class SdrPageView; 45 class SdrObject; 46 47 class XFormTextAdjustItem; 48 class XFormTextDistanceItem; 49 class XFormTextStartItem; 50 class XFormTextMirrorItem; 51 class XFormTextHideFormItem; 52 class XFormTextOutlineItem; 53 class XFormTextShadowItem; 54 class XFormTextShadowColorItem; 55 class XFormTextShadowXValItem; 56 class XFormTextShadowYValItem; 57 58 /************************************************************************* 59 |* 60 |* ControllerItem fuer Fontwork 61 |* 62 \************************************************************************/ 63 64 class SvxFontWorkDialog; 65 66 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 |* Ableitung vom SfxChildWindow als "Behaelter" fuer Fontwork-Dialog 81 |* 82 \************************************************************************/ 83 84 class SVX_DLLPUBLIC SvxFontWorkChildWindow : public SfxChildWindow 85 { 86 public: 87 SvxFontWorkChildWindow(Window*, sal_uInt16, SfxBindings*, SfxChildWinInfo*); 88 SFX_DECL_CHILDWINDOW(SvxFontWorkChildWindow); 89 }; 90 91 /************************************************************************* 92 |* 93 |* Floating Window zur Attributierung von Texteffekten 94 |* 95 \************************************************************************/ 96 97 class SVX_DLLPUBLIC SvxFontWorkDialog : public SfxDockingWindow 98 { 99 #define CONTROLLER_COUNT 11 100 101 SvxFontWorkControllerItem* pCtrlItems[CONTROLLER_COUNT]; 102 103 ToolBox aTbxStyle; 104 ToolBox aTbxAdjust; 105 106 FixedImage aFbDistance; 107 MetricField aMtrFldDistance; 108 FixedImage aFbTextStart; 109 MetricField aMtrFldTextStart; 110 111 ToolBox aTbxShadow; 112 113 FixedImage aFbShadowX; 114 MetricField aMtrFldShadowX; 115 FixedImage aFbShadowY; 116 MetricField aMtrFldShadowY; 117 118 ColorLB aShadowColorLB; 119 120 SfxBindings& rBindings; 121 Timer aInputTimer; 122 sal_Bool bUserZoomedIn; 123 124 sal_uInt16 nLastStyleTbxId; 125 sal_uInt16 nLastAdjustTbxId; 126 sal_uInt16 nLastShadowTbxId; 127 long nSaveShadowX; 128 long nSaveShadowY; 129 long nSaveShadowAngle; 130 long nSaveShadowSize; 131 132 ImageList maImageList; 133 ImageList maImageListH; 134 135 XColorListSharedPtr maColorTable; 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( ColorSelectHdl_Impl, void * ); 149 150 void SetStyle_Impl(const XFormTextStyleItem*); 151 void SetAdjust_Impl(const XFormTextAdjustItem*); 152 void SetDistance_Impl(const XFormTextDistanceItem*); 153 void SetStart_Impl(const XFormTextStartItem*); 154 void SetMirror_Impl(const XFormTextMirrorItem*); 155 void SetShowForm_Impl(const XFormTextHideFormItem*); 156 void SetOutline_Impl(const XFormTextOutlineItem*); 157 void SetShadow_Impl(const XFormTextShadowItem*, sal_Bool bRestoreValues = sal_False); 158 void SetShadowColor_Impl(const XFormTextShadowColorItem*); 159 void SetShadowXVal_Impl(const XFormTextShadowXValItem*); 160 void SetShadowYVal_Impl(const XFormTextShadowYValItem*); 161 #endif 162 163 virtual void DataChanged( const DataChangedEvent& rDCEvt ); 164 void ApplyImageList(); 165 166 protected: 167 virtual void Zoom(); 168 virtual SfxChildAlignment CheckAlignment( SfxChildAlignment eActAlign, 169 SfxChildAlignment eAlign ); 170 171 public: 172 SvxFontWorkDialog( SfxBindings *pBindinx, 173 SfxChildWindow *pCW, 174 Window* pParent, 175 const ResId& rResId ); 176 ~SvxFontWorkDialog(); 177 178 void SetColorTable(XColorListSharedPtr aTable); 179 void SetActive(sal_Bool bActivate = sal_True); 180 }; 181 182 #endif // _SVX_FONTWORK_HXX 183 184