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_LABDLG_HXX 24 #define _SVX_LABDLG_HXX 25 26 // include --------------------------------------------------------------- 27 28 29 #ifndef _FIELD_HXX //autogen 30 #include <vcl/field.hxx> 31 #endif 32 #ifndef _LSTBOX_HXX //autogen 33 #include <vcl/lstbox.hxx> 34 #endif 35 #ifndef _FIXED_HXX //autogen 36 #include <vcl/fixed.hxx> 37 #endif 38 #include <svtools/valueset.hxx> 39 #include <sfx2/tabdlg.hxx> 40 class SdrView; 41 42 // class SvxCaptionTabPage ----------------------------------------------- 43 44 const sal_uInt16 CAPTYPE_BITMAPS_COUNT = 3; 45 46 class SvxCaptionTabPage : public SfxTabPage 47 { 48 private: 49 ValueSet aCT_CAPTTYPE; 50 FixedText aFT_ABSTAND; 51 MetricField aMF_ABSTAND; 52 FixedText aFT_WINKEL; 53 ListBox aLB_WINKEL; 54 FixedText aFT_ANSATZ; 55 ListBox aLB_ANSATZ; 56 FixedText aFT_UM; 57 MetricField aMF_ANSATZ; 58 FixedText aFT_ANSATZ_REL; 59 ListBox aLB_ANSATZ_REL; 60 FixedText aFT_LAENGE; 61 MetricField aMF_LAENGE; 62 CheckBox aCB_LAENGE; 63 64 Image* mpBmpCapTypes[CAPTYPE_BITMAPS_COUNT]; 65 Image* mpBmpCapTypesH[CAPTYPE_BITMAPS_COUNT]; 66 67 String aStrHorzList; 68 String aStrVertList; 69 70 short nCaptionType; 71 sal_Bool bFixedAngle; 72 sal_Int32 nFixedAngle; 73 sal_Int32 nGap; 74 short nEscDir; 75 sal_Bool bEscRel; 76 sal_Int32 nEscAbs; 77 sal_Int32 nEscRel; 78 sal_Int32 nLineLen; 79 sal_Bool bFitLineLen; 80 81 sal_uInt16 nAnsatzRelPos; 82 sal_uInt16 nAnsatzTypePos; 83 sal_uInt16 nWinkelTypePos; 84 85 #ifdef _SVX_LABDLG_CXX 86 void SetupAnsatz_Impl( sal_uInt16 nType ); 87 void SetupType_Impl( sal_uInt16 nType ); 88 DECL_LINK( AnsatzSelectHdl_Impl, ListBox * ); 89 DECL_LINK( AnsatzRelSelectHdl_Impl, ListBox * ); 90 DECL_LINK( LineOptHdl_Impl, Button * ); 91 DECL_LINK( SelectCaptTypeHdl_Impl, void * ); 92 #endif 93 94 const SfxItemSet& rOutAttrs; 95 const SdrView* pView; 96 97 public: 98 SvxCaptionTabPage( Window* pParent, const SfxItemSet& rInAttrs ); 99 virtual ~SvxCaptionTabPage(); 100 101 static SfxTabPage* Create( Window*, const SfxItemSet& ); 102 static sal_uInt16* GetRanges(); 103 104 virtual sal_Bool FillItemSet( SfxItemSet& ); 105 virtual void Reset( const SfxItemSet & ); 106 void Construct(); SetView(const SdrView * pSdrView)107 void SetView( const SdrView* pSdrView ) 108 { pView = pSdrView; } 109 110 virtual void DataChanged( const DataChangedEvent& rDCEvt ); 111 void FillValueSet(); 112 }; 113 114 // class SvxCaptionTabDialog --------------------------------------------- 115 116 class SvxCaptionTabDialog : public SfxTabDialog 117 { 118 private: 119 // const SfxItemSet& rOutAttrs; 120 const SdrView* pView; 121 sal_uInt16 nAnchorCtrls; 122 123 Link aValidateLink; 124 125 virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ); 126 127 public: 128 129 SvxCaptionTabDialog(Window* pParent, const SdrView* pView, 130 sal_uInt16 nAnchorTypes = 0 ); 131 132 ~SvxCaptionTabDialog(); 133 134 //link for the Writer to validate positions 135 void SetValidateFramePosLink( const Link& rLink ); 136 }; 137 138 139 #endif //_SVX_LABDLG_HXX 140 141