1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef __com_sun_star_inspection_XNumericControl_idl__
21 #define __com_sun_star_inspection_XNumericControl_idl__
23 #include
<com
/sun
/star
/inspection
/XPropertyControl.idl
>
24 #include
<com
/sun
/star
/beans
/Optional.idl
>
25 #include
<com
/sun
/star
/lang
/IllegalArgumentException.idl
>
27 module com
{ module sun
{ module star
{ module inspection
{
29 /** defines the interface for an XPropertyControl which supports
30 displaying and entering numerical values.
34 interface XNumericControl
: XPropertyControl
36 /** describes the number of decimal digits to use for the value
38 [attribute
] short DecimalDigits
;
40 /** describes the minimum value which is allowed to be entered in the control
42 [attribute
] com
::sun
::star
::beans
::Optional<double> MinValue
;
44 /** describes the maximum value which is allowed to be entered in the control
46 [attribute
] com
::sun
::star
::beans
::Optional<double> MaxValue
;
48 /** describes a com::sun::star::util::MeasureUnit to be applied
49 for displaying values.
51 <p>Only a certain set of com::sun::star::util::MeasureUnit values is
52 supported. In particular, every value which denotes a fraction of another
53 unit (like 100th millimeters) cannot be used as DisplayUnit.</p>
55 @throws com::sun::star::lang::IllegalArgumentException
56 if the caller attempts to set an unsupported com::sun::star::util::MeasureUnit
58 [attribute
] short DisplayUnit
60 set raises
(com
::sun
::star
::lang
::IllegalArgumentException
);
63 /** describes a com::sun::star::util::MeasureUnit to be
64 applied for transferring values.
66 <p>The core measurement unit for a property value might differ from the unit which
67 is used by the control to display it. For instance, your property value might require
68 that your values denote 100th millimeters, but to the user, you want to present the
69 value as, say, inches. In this case, a numeric control can automatically handle the
70 value conversion for you, if you give it a ValueUnit different from the DisplayUnit.</p>
72 @see XPropertyControl::Value
74 [attribute
] short ValueUnit
;
82 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */