1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XMetricField.idl,v $
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 __com_sun_star_awt_XMetricField_idl__
31 #define __com_sun_star_awt_XMetricField_idl__
33 #ifndef __com_sun_star_uno_XInterface_idl__
34 #include
<com
/sun
/star
/uno
/XInterface.idl
>
36 #ifndef __com_sun_star_util_MeasureUnit_idl__
37 #include
<com
/sun
/star
/util
/MeasureUnit.idl
>
40 //=============================================================================
42 module com
{ module sun
{ module star
{ module awt
{
44 //=============================================================================
46 /** gives access to the value and formatting of a metric field.
48 interface XMetricField
: com
::sun
::star
::uno
::XInterface
50 //-------------------------------------------------------------------------
52 /** sets the value which is displayed in the metric field.
54 void setValue
( [in] hyper Value
, [in] short FieldUnit
);
56 //-------------------------------------------------------------------------
58 /** sets the user value which is displayed in the metric field.
60 void setUserValue
( [in] hyper Value
, [in] short FieldUnit
);
62 //-------------------------------------------------------------------------
64 /** returns the value which is currently displayed in the metric field.
66 hyper getValue
( [in] short FieldUnit
);
68 //-------------------------------------------------------------------------
70 /** returns the corrected value which is displayed in the metric field.
72 hyper getCorrectedValue
( [in] short FieldUnit
);
74 //-------------------------------------------------------------------------
76 /** sets the minimum value that can be entered by the user.
78 void setMin
( [in] hyper Value
, [in] short FieldUnit
);
80 //-------------------------------------------------------------------------
82 /** returns the currently set minimum value that can be entered by the
85 hyper getMin
( [in] short FieldUnit
);
87 //-------------------------------------------------------------------------
89 /** sets the maximum value that can be entered by the user.
91 void setMax
( [in] hyper Value
, [in] short FieldUnit
);
93 //-------------------------------------------------------------------------
95 /** returns the currently set maximum value that can be entered by the
98 hyper getMax
( [in] short FieldUnit
);
100 //-------------------------------------------------------------------------
102 /** sets the first value to be set on POS1 key.
104 void setFirst
( [in] hyper Value
, [in] short FieldUnit
);
106 //-------------------------------------------------------------------------
108 /** returns the currently set first value which is set on POS1 key.
110 hyper getFirst
( [in] short FieldUnit
);
112 //-------------------------------------------------------------------------
114 /** sets the last value to be set on END key.
116 void setLast
( [in] hyper Value
, [in] short FieldUnit
);
118 //-------------------------------------------------------------------------
120 /** returns the currently set last value which is set on END key.
122 hyper getLast
( [in] short FieldUnit
);
124 //-------------------------------------------------------------------------
126 /** sets the increment value for the spin button.
128 void setSpinSize
( [in] hyper Value
);
130 //-------------------------------------------------------------------------
132 /** returns the currently set increment value for the spin button.
136 //-------------------------------------------------------------------------
138 /** sets the number of decimals.
140 void setDecimalDigits
( [in] short nDigits
);
142 //-------------------------------------------------------------------------
144 /** returns the currently set number of decimals.
146 short getDecimalDigits
();
148 //-------------------------------------------------------------------------
150 /** determines if the format is checked during user input.
152 void setStrictFormat
( [in] boolean bStrict
);
154 //-------------------------------------------------------------------------
156 /** returns whether the format is currently checked during user input.
158 boolean isStrictFormat
();
162 //=============================================================================