xref: /trunk/main/offapi/com/sun/star/awt/XMetricField.idl (revision cdf0e10c)
1/*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *
9 * This file is part of OpenOffice.org.
10 *
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
14 *
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
20 *
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org.  If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
25 *
26 ************************************************************************/
27#ifndef __com_sun_star_awt_XMetricField_idl__
28#define __com_sun_star_awt_XMetricField_idl__
29
30#ifndef __com_sun_star_uno_XInterface_idl__
31#include <com/sun/star/uno/XInterface.idl>
32#endif
33#ifndef __com_sun_star_util_MeasureUnit_idl__
34#include <com/sun/star/util/MeasureUnit.idl>
35#endif
36
37//=============================================================================
38
39 module com {  module sun {  module star {  module awt {
40
41//=============================================================================
42
43/** gives access to the value and formatting of a metric field.
44 */
45interface XMetricField: com::sun::star::uno::XInterface
46{
47	//-------------------------------------------------------------------------
48
49	/** sets the value which is displayed in the metric field.
50	 */
51	void setValue( [in] hyper Value, [in] short FieldUnit );
52
53	//-------------------------------------------------------------------------
54
55	/** sets the user value which is displayed in the metric field.
56	 */
57	void setUserValue( [in] hyper Value, [in] short FieldUnit );
58
59	//-------------------------------------------------------------------------
60
61	/** returns the value which is currently displayed in the metric field.
62	 */
63	hyper getValue( [in] short FieldUnit );
64
65	//-------------------------------------------------------------------------
66
67	/** returns the corrected value which is displayed in the metric field.
68	 */
69	hyper getCorrectedValue( [in] short FieldUnit );
70
71	//-------------------------------------------------------------------------
72
73	/** sets the minimum value that can be entered by the user.
74	 */
75	void setMin( [in] hyper Value, [in] short FieldUnit );
76
77	//-------------------------------------------------------------------------
78
79	/** returns the currently set minimum value that can be entered by the
80        user.
81	 */
82	hyper getMin( [in] short FieldUnit );
83
84	//-------------------------------------------------------------------------
85
86	/** sets the maximum value that can be entered by the user.
87	 */
88	void setMax( [in] hyper Value, [in] short FieldUnit );
89
90	//-------------------------------------------------------------------------
91
92	/** returns the currently set maximum value that can be entered by the
93        user.
94	 */
95	hyper getMax( [in] short FieldUnit );
96
97	//-------------------------------------------------------------------------
98
99	/** sets the first value to be set on POS1 key.
100	 */
101	void setFirst( [in] hyper Value, [in] short FieldUnit );
102
103	//-------------------------------------------------------------------------
104
105	/** returns the currently set first value which is set on POS1 key.
106	 */
107	hyper getFirst( [in] short FieldUnit );
108
109	//-------------------------------------------------------------------------
110
111	/** sets the last value to be set on END key.
112	 */
113	void setLast( [in] hyper Value, [in] short FieldUnit );
114
115	//-------------------------------------------------------------------------
116
117	/** returns the currently set last value which is set on END key.
118	 */
119	hyper getLast( [in] short FieldUnit );
120
121	//-------------------------------------------------------------------------
122
123	/** sets the increment value for the spin button.
124	 */
125	void setSpinSize( [in] hyper Value );
126
127	//-------------------------------------------------------------------------
128
129	/** returns the currently set increment value for the spin button.
130	 */
131	hyper getSpinSize();
132
133	//-------------------------------------------------------------------------
134
135	/** sets the number of decimals.
136	 */
137	void setDecimalDigits( [in] short nDigits );
138
139	//-------------------------------------------------------------------------
140
141	/** returns the currently set number of decimals.
142	 */
143	short getDecimalDigits();
144
145	//-------------------------------------------------------------------------
146
147	/** determines if the format is checked during user input.
148	 */
149	void setStrictFormat( [in] boolean bStrict );
150
151	//-------------------------------------------------------------------------
152
153	/** returns whether the format is currently checked during user input.
154	 */
155	boolean isStrictFormat();
156
157};
158
159//=============================================================================
160
161}; }; }; };
162
163#endif
164