xref: /aoo42x/main/cui/source/inc/measure.hxx (revision c4eee24d)
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_MEASURE_HXX
24 #define _SVX_MEASURE_HXX
25 
26 // include ---------------------------------------------------------------
27 
28 #include <vcl/fixed.hxx>
29 #include <vcl/group.hxx>
30 #include <sfx2/basedlgs.hxx>
31 #include <svx/dlgctrl.hxx>
32 #include <svx/measctrl.hxx>
33 
34 class SdrView;
35 
36 /*************************************************************************
37 |*
38 |* Dialog zum "Andern von TextAttributen
39 |*
40 \************************************************************************/
41 
42 class SvxMeasurePage : public SvxTabPage
43 {
44 private:
45 
46 	FixedLine			aFlLine;
47 	FixedText			aFtLineDist;
48 	MetricField			aMtrFldLineDist;
49 	FixedText			aFtHelplineOverhang;
50 	MetricField			aMtrFldHelplineOverhang;
51 	FixedText			aFtHelplineDist;
52 	MetricField			aMtrFldHelplineDist;
53 	FixedText			aFtHelpline1Len;
54 	MetricField			aMtrFldHelpline1Len;
55 	FixedText			aFtHelpline2Len;
56 	MetricField			aMtrFldHelpline2Len;
57 	TriStateBox 		aTsbBelowRefEdge;
58 	FixedText			aFtDecimalPlaces;
59 	MetricField			aMtrFldDecimalPlaces;
60 
61 	FixedLine			aFlLabel;
62     FixedText           aFtPosition;
63 	SvxRectCtl			aCtlPosition;
64 	TriStateBox 		aTsbAutoPosV;
65 	TriStateBox 		aTsbAutoPosH;
66 	TriStateBox 		aTsbShowUnit;
67 	ListBox				aLbUnit;
68 	TriStateBox 		aTsbParallel;
69 
70 	SvxXMeasurePreview	aCtlPreview;
71 
72     FixedLine           aFlVert;
73 
74 	const SfxItemSet&	rOutAttrs;
75 	SfxItemSet			aAttrSet;
76 	const SdrView*		pView;
77 	SfxMapUnit			eUnit;
78 
79 	sal_Bool				bPositionModified;
80 
81 #ifdef _SVX_MEASURE_CXX
82 	void 				FillUnitLB();
83 
84 	DECL_LINK( ClickAutoPosHdl_Impl, void * );
85 	DECL_LINK( ChangeAttrHdl_Impl, void * );
86 #endif
87 
88 public:
89 
90 	SvxMeasurePage( Window* pWindow, const SfxItemSet& rInAttrs );
91 	~SvxMeasurePage();
92 
93 	static SfxTabPage* 	Create( Window*, const SfxItemSet& );
94 	static  sal_uInt16*	    GetRanges();
95 
96 	virtual sal_Bool 		FillItemSet( SfxItemSet& );
97 	virtual void 		Reset( const SfxItemSet & );
98 
99 	virtual void 		PointChanged( Window* pWindow, RECT_POINT eRP );
100 
101 	void 		 Construct();
SetView(const SdrView * pSdrView)102 	void		 SetView( const SdrView* pSdrView ) { pView = pSdrView; }
103 	virtual void PageCreated (SfxAllItemSet aSet); //add CHINA001
104 };
105 
106 /*************************************************************************
107 |*
108 |* Von SfxSingleTabDialog abgeleitet, um vom Control "uber virtuelle Methode
109 |* benachrichtigt werden zu k"onnen.
110 |*
111 \************************************************************************/
112 
113 class SvxMeasureDialog : public SfxSingleTabDialog
114 {
115 public:
116 	SvxMeasureDialog( Window* pParent, const SfxItemSet& rAttr,
117 					   const SdrView* pView );
118 	~SvxMeasureDialog();
119 };
120 
121 
122 #endif // _SVX_MEASURE_HXX
123 
124