xref: /aoo42x/main/cui/source/inc/labdlg.hxx (revision c4eee24d)
1*c4eee24dSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*c4eee24dSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*c4eee24dSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*c4eee24dSAndrew Rist  * distributed with this work for additional information
6*c4eee24dSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*c4eee24dSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*c4eee24dSAndrew Rist  * "License"); you may not use this file except in compliance
9*c4eee24dSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*c4eee24dSAndrew Rist  *
11*c4eee24dSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*c4eee24dSAndrew Rist  *
13*c4eee24dSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*c4eee24dSAndrew Rist  * software distributed under the License is distributed on an
15*c4eee24dSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*c4eee24dSAndrew Rist  * KIND, either express or implied.  See the License for the
17*c4eee24dSAndrew Rist  * specific language governing permissions and limitations
18*c4eee24dSAndrew Rist  * under the License.
19*c4eee24dSAndrew Rist  *
20*c4eee24dSAndrew Rist  *************************************************************/
21*c4eee24dSAndrew Rist 
22*c4eee24dSAndrew Rist 
23cdf0e10cSrcweir #ifndef _SVX_LABDLG_HXX
24cdf0e10cSrcweir #define _SVX_LABDLG_HXX
25cdf0e10cSrcweir 
26cdf0e10cSrcweir // include ---------------------------------------------------------------
27cdf0e10cSrcweir 
28cdf0e10cSrcweir 
29cdf0e10cSrcweir #ifndef _FIELD_HXX //autogen
30cdf0e10cSrcweir #include <vcl/field.hxx>
31cdf0e10cSrcweir #endif
32cdf0e10cSrcweir #ifndef _LSTBOX_HXX //autogen
33cdf0e10cSrcweir #include <vcl/lstbox.hxx>
34cdf0e10cSrcweir #endif
35cdf0e10cSrcweir #ifndef _FIXED_HXX //autogen
36cdf0e10cSrcweir #include <vcl/fixed.hxx>
37cdf0e10cSrcweir #endif
38cdf0e10cSrcweir #include <svtools/valueset.hxx>
39cdf0e10cSrcweir #include <sfx2/tabdlg.hxx>
40cdf0e10cSrcweir class SdrView;
41cdf0e10cSrcweir 
42cdf0e10cSrcweir // class SvxCaptionTabPage -----------------------------------------------
43cdf0e10cSrcweir 
44cdf0e10cSrcweir const sal_uInt16 CAPTYPE_BITMAPS_COUNT = 3;
45cdf0e10cSrcweir 
46cdf0e10cSrcweir class SvxCaptionTabPage : public SfxTabPage
47cdf0e10cSrcweir {
48cdf0e10cSrcweir private:
49cdf0e10cSrcweir 	ValueSet		aCT_CAPTTYPE;
50cdf0e10cSrcweir 	FixedText		aFT_ABSTAND;
51cdf0e10cSrcweir 	MetricField		aMF_ABSTAND;
52cdf0e10cSrcweir 	FixedText		aFT_WINKEL;
53cdf0e10cSrcweir 	ListBox			aLB_WINKEL;
54cdf0e10cSrcweir 	FixedText		aFT_ANSATZ;
55cdf0e10cSrcweir 	ListBox			aLB_ANSATZ;
56cdf0e10cSrcweir 	FixedText		aFT_UM;
57cdf0e10cSrcweir 	MetricField		aMF_ANSATZ;
58cdf0e10cSrcweir 	FixedText		aFT_ANSATZ_REL;
59cdf0e10cSrcweir 	ListBox			aLB_ANSATZ_REL;
60cdf0e10cSrcweir 	FixedText		aFT_LAENGE;
61cdf0e10cSrcweir 	MetricField		aMF_LAENGE;
62cdf0e10cSrcweir 	CheckBox		aCB_LAENGE;
63cdf0e10cSrcweir 
64cdf0e10cSrcweir 	Image*			mpBmpCapTypes[CAPTYPE_BITMAPS_COUNT];
65cdf0e10cSrcweir 	Image*			mpBmpCapTypesH[CAPTYPE_BITMAPS_COUNT];
66cdf0e10cSrcweir 
67cdf0e10cSrcweir 	String			aStrHorzList;
68cdf0e10cSrcweir 	String			aStrVertList;
69cdf0e10cSrcweir 
70cdf0e10cSrcweir 	short			nCaptionType;
71cdf0e10cSrcweir 	sal_Bool			bFixedAngle;
72cdf0e10cSrcweir 	sal_Int32			nFixedAngle;
73cdf0e10cSrcweir 	sal_Int32			nGap;
74cdf0e10cSrcweir 	short			nEscDir;
75cdf0e10cSrcweir 	sal_Bool			bEscRel;
76cdf0e10cSrcweir 	sal_Int32			nEscAbs;
77cdf0e10cSrcweir 	sal_Int32			nEscRel;
78cdf0e10cSrcweir 	sal_Int32			nLineLen;
79cdf0e10cSrcweir 	sal_Bool			bFitLineLen;
80cdf0e10cSrcweir 
81cdf0e10cSrcweir 	sal_uInt16			nAnsatzRelPos;
82cdf0e10cSrcweir 	sal_uInt16			nAnsatzTypePos;
83cdf0e10cSrcweir 	sal_uInt16			nWinkelTypePos;
84cdf0e10cSrcweir 
85cdf0e10cSrcweir #ifdef _SVX_LABDLG_CXX
86cdf0e10cSrcweir 	void			SetupAnsatz_Impl( sal_uInt16 nType );
87cdf0e10cSrcweir 	void			SetupType_Impl( sal_uInt16 nType );
88cdf0e10cSrcweir 	DECL_LINK( AnsatzSelectHdl_Impl, ListBox * );
89cdf0e10cSrcweir 	DECL_LINK( AnsatzRelSelectHdl_Impl, ListBox * );
90cdf0e10cSrcweir 	DECL_LINK( LineOptHdl_Impl, Button * );
91cdf0e10cSrcweir 	DECL_LINK( SelectCaptTypeHdl_Impl, void * );
92cdf0e10cSrcweir #endif
93cdf0e10cSrcweir 
94cdf0e10cSrcweir 	const SfxItemSet&	rOutAttrs;
95cdf0e10cSrcweir 	const SdrView*		pView;
96cdf0e10cSrcweir 
97cdf0e10cSrcweir public:
98cdf0e10cSrcweir 	SvxCaptionTabPage( Window* pParent, const SfxItemSet& rInAttrs  );
99cdf0e10cSrcweir 	virtual ~SvxCaptionTabPage();
100cdf0e10cSrcweir 
101cdf0e10cSrcweir 	static SfxTabPage*	Create( Window*, const SfxItemSet& );
102cdf0e10cSrcweir 	static sal_uInt16*		GetRanges();
103cdf0e10cSrcweir 
104cdf0e10cSrcweir 	virtual sal_Bool 		FillItemSet( SfxItemSet& );
105cdf0e10cSrcweir 	virtual void 		Reset( const SfxItemSet & );
106cdf0e10cSrcweir 	void				Construct();
SetView(const SdrView * pSdrView)107cdf0e10cSrcweir 	void				SetView( const SdrView* pSdrView )
108cdf0e10cSrcweir 							{ pView = pSdrView; }
109cdf0e10cSrcweir 
110cdf0e10cSrcweir 	virtual void DataChanged( const DataChangedEvent& rDCEvt );
111cdf0e10cSrcweir 	void FillValueSet();
112cdf0e10cSrcweir };
113cdf0e10cSrcweir 
114cdf0e10cSrcweir // class SvxCaptionTabDialog ---------------------------------------------
115cdf0e10cSrcweir 
116cdf0e10cSrcweir class SvxCaptionTabDialog : public SfxTabDialog
117cdf0e10cSrcweir {
118cdf0e10cSrcweir private:
119cdf0e10cSrcweir //	const SfxItemSet&	rOutAttrs;
120cdf0e10cSrcweir 	const SdrView*		pView;
121cdf0e10cSrcweir 	sal_uInt16				nAnchorCtrls;
122cdf0e10cSrcweir 
123cdf0e10cSrcweir     Link                aValidateLink;
124cdf0e10cSrcweir 
125cdf0e10cSrcweir     virtual void        PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
126cdf0e10cSrcweir 
127cdf0e10cSrcweir public:
128cdf0e10cSrcweir 
129cdf0e10cSrcweir 			SvxCaptionTabDialog(Window* pParent, const SdrView* pView,
130cdf0e10cSrcweir 									sal_uInt16 nAnchorTypes = 0 );
131cdf0e10cSrcweir 
132cdf0e10cSrcweir 			~SvxCaptionTabDialog();
133cdf0e10cSrcweir 
134cdf0e10cSrcweir             //link for the Writer to validate positions
135cdf0e10cSrcweir             void SetValidateFramePosLink( const Link& rLink );
136cdf0e10cSrcweir };
137cdf0e10cSrcweir 
138cdf0e10cSrcweir 
139cdf0e10cSrcweir #endif //_SVX_LABDLG_HXX
140cdf0e10cSrcweir 
141