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 __com_sun_star_awt_XMetricField_idl__
24#define __com_sun_star_awt_XMetricField_idl__
25
26#ifndef __com_sun_star_uno_XInterface_idl__
27#include <com/sun/star/uno/XInterface.idl>
28#endif
29#ifndef __com_sun_star_util_MeasureUnit_idl__
30#include <com/sun/star/util/MeasureUnit.idl>
31#endif
32
33//=============================================================================
34
35 module com {  module sun {  module star {  module awt {
36
37//=============================================================================
38
39/** gives access to the value and formatting of a metric field.
40 */
41interface XMetricField: com::sun::star::uno::XInterface
42{
43	//-------------------------------------------------------------------------
44
45	/** sets the value which is displayed in the metric field.
46	 */
47	void setValue( [in] hyper Value, [in] short FieldUnit );
48
49	//-------------------------------------------------------------------------
50
51	/** sets the user value which is displayed in the metric field.
52	 */
53	void setUserValue( [in] hyper Value, [in] short FieldUnit );
54
55	//-------------------------------------------------------------------------
56
57	/** returns the value which is currently displayed in the metric field.
58	 */
59	hyper getValue( [in] short FieldUnit );
60
61	//-------------------------------------------------------------------------
62
63	/** returns the corrected value which is displayed in the metric field.
64	 */
65	hyper getCorrectedValue( [in] short FieldUnit );
66
67	//-------------------------------------------------------------------------
68
69	/** sets the minimum value that can be entered by the user.
70	 */
71	void setMin( [in] hyper Value, [in] short FieldUnit );
72
73	//-------------------------------------------------------------------------
74
75	/** returns the currently set minimum value that can be entered by the
76        user.
77	 */
78	hyper getMin( [in] short FieldUnit );
79
80	//-------------------------------------------------------------------------
81
82	/** sets the maximum value that can be entered by the user.
83	 */
84	void setMax( [in] hyper Value, [in] short FieldUnit );
85
86	//-------------------------------------------------------------------------
87
88	/** returns the currently set maximum value that can be entered by the
89        user.
90	 */
91	hyper getMax( [in] short FieldUnit );
92
93	//-------------------------------------------------------------------------
94
95	/** sets the first value to be set on POS1 key.
96	 */
97	void setFirst( [in] hyper Value, [in] short FieldUnit );
98
99	//-------------------------------------------------------------------------
100
101	/** returns the currently set first value which is set on POS1 key.
102	 */
103	hyper getFirst( [in] short FieldUnit );
104
105	//-------------------------------------------------------------------------
106
107	/** sets the last value to be set on END key.
108	 */
109	void setLast( [in] hyper Value, [in] short FieldUnit );
110
111	//-------------------------------------------------------------------------
112
113	/** returns the currently set last value which is set on END key.
114	 */
115	hyper getLast( [in] short FieldUnit );
116
117	//-------------------------------------------------------------------------
118
119	/** sets the increment value for the spin button.
120	 */
121	void setSpinSize( [in] hyper Value );
122
123	//-------------------------------------------------------------------------
124
125	/** returns the currently set increment value for the spin button.
126	 */
127	hyper getSpinSize();
128
129	//-------------------------------------------------------------------------
130
131	/** sets the number of decimals.
132	 */
133	void setDecimalDigits( [in] short nDigits );
134
135	//-------------------------------------------------------------------------
136
137	/** returns the currently set number of decimals.
138	 */
139	short getDecimalDigits();
140
141	//-------------------------------------------------------------------------
142
143	/** determines if the format is checked during user input.
144	 */
145	void setStrictFormat( [in] boolean bStrict );
146
147	//-------------------------------------------------------------------------
148
149	/** returns whether the format is currently checked during user input.
150	 */
151	boolean isStrictFormat();
152
153};
154
155//=============================================================================
156
157}; }; }; };
158
159#endif
160