Update ooo320-m1
[ooovba.git] / svx / source / cui / labdlg.hxx
blobc1ec3e261c149a1560dc7fff3383d78cf5b9103c
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: labdlg.hxx,v $
10 * $Revision: 1.5 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _SVX_LABDLG_HXX
31 #define _SVX_LABDLG_HXX
33 // include ---------------------------------------------------------------
36 #ifndef _FIELD_HXX //autogen
37 #include <vcl/field.hxx>
38 #endif
39 #ifndef _LSTBOX_HXX //autogen
40 #include <vcl/lstbox.hxx>
41 #endif
42 #ifndef _FIXED_HXX //autogen
43 #include <vcl/fixed.hxx>
44 #endif
45 #include <svtools/valueset.hxx>
46 #include <sfx2/tabdlg.hxx>
47 class SdrView;
49 // class SvxCaptionTabPage -----------------------------------------------
51 const sal_uInt16 CAPTYPE_BITMAPS_COUNT = 3;
53 class SvxCaptionTabPage : public SfxTabPage
55 private:
56 ValueSet aCT_CAPTTYPE;
57 FixedText aFT_ABSTAND;
58 MetricField aMF_ABSTAND;
59 FixedText aFT_WINKEL;
60 ListBox aLB_WINKEL;
61 FixedText aFT_ANSATZ;
62 ListBox aLB_ANSATZ;
63 FixedText aFT_UM;
64 MetricField aMF_ANSATZ;
65 FixedText aFT_ANSATZ_REL;
66 ListBox aLB_ANSATZ_REL;
67 FixedText aFT_LAENGE;
68 MetricField aMF_LAENGE;
69 CheckBox aCB_LAENGE;
71 Image* mpBmpCapTypes[CAPTYPE_BITMAPS_COUNT];
72 Image* mpBmpCapTypesH[CAPTYPE_BITMAPS_COUNT];
74 String aStrHorzList;
75 String aStrVertList;
77 short nCaptionType;
78 BOOL bFixedAngle;
79 INT32 nFixedAngle;
80 INT32 nGap;
81 short nEscDir;
82 BOOL bEscRel;
83 INT32 nEscAbs;
84 INT32 nEscRel;
85 INT32 nLineLen;
86 BOOL bFitLineLen;
88 USHORT nAnsatzRelPos;
89 USHORT nAnsatzTypePos;
90 USHORT nWinkelTypePos;
92 #ifdef _SVX_LABDLG_CXX
93 void SetupAnsatz_Impl( USHORT nType );
94 void SetupType_Impl( USHORT nType );
95 DECL_LINK( AnsatzSelectHdl_Impl, ListBox * );
96 DECL_LINK( AnsatzRelSelectHdl_Impl, ListBox * );
97 DECL_LINK( LineOptHdl_Impl, Button * );
98 DECL_LINK( SelectCaptTypeHdl_Impl, void * );
99 #endif
101 const SfxItemSet& rOutAttrs;
102 const SdrView* pView;
104 public:
105 SvxCaptionTabPage( Window* pParent, const SfxItemSet& rInAttrs );
106 virtual ~SvxCaptionTabPage();
108 static SfxTabPage* Create( Window*, const SfxItemSet& );
109 static USHORT* GetRanges();
111 virtual BOOL FillItemSet( SfxItemSet& );
112 virtual void Reset( const SfxItemSet & );
113 void Construct();
114 void SetView( const SdrView* pSdrView )
115 { pView = pSdrView; }
117 virtual void DataChanged( const DataChangedEvent& rDCEvt );
118 void FillValueSet();
121 // class SvxCaptionTabDialog ---------------------------------------------
123 class SvxCaptionTabDialog : public SfxTabDialog
125 private:
126 // const SfxItemSet& rOutAttrs;
127 const SdrView* pView;
128 USHORT nAnchorCtrls;
130 Link aValidateLink;
132 virtual void PageCreated( USHORT nId, SfxTabPage &rPage );
134 public:
136 SvxCaptionTabDialog(Window* pParent, const SdrView* pView,
137 USHORT nAnchorTypes = 0 );
139 ~SvxCaptionTabDialog();
141 //link for the Writer to validate positions
142 void SetValidateFramePosLink( const Link& rLink );
146 #endif //_SVX_LABDLG_HXX