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