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
28#ifndef __com_sun_star_accessibility_XAccessibleValue_idl__
29#define __com_sun_star_accessibility_XAccessibleValue_idl__
30
31#ifndef __com_sun_star_uno_XInterface_idl__
32#include <com/sun/star/uno/XInterface.idl>
33#endif
34
35module com { module sun { module star { module accessibility {
36
37/** Implement this interface to give access to a single numerical value.
38
39    <p>The <type>XAccessibleValue</type> interface represents a single
40    numerical value and should be implemented by any class that supports
41    numerical value like scroll bars and spin boxes.  This interface lets
42    you access the value and its upper and lower bounds.</p>
43
44    @since OOo 1.1.2
45*/
46published interface XAccessibleValue : ::com::sun::star::uno::XInterface
47{
48    /** Returns the value of this object as a number.
49
50        <p>The exact return type is implementation dependent.  Typical types
51        are long and double.</p>
52
53        @return
54            Returns the current value represented by this object.
55    */
56    any getCurrentValue ();
57
58    /** Sets the value of this object to the given number.
59
60        <p>The argument is clipped to the valid interval whose upper and
61        lower bounds are returned by the methods
62        <member>getMaximumAccessibleValue</member> and
63        <member>getMinimumAccessibleValue</member>, i.e. if it is lower than
64        the minimum value the new value will be the minimum and if it is
65        greater than the maximum then the new value will be the maximum.</p>
66
67        @param aNumber
68            The new value represented by this object.  The set of admissible
69            types for this argument is implementation dependent.
70
71        @return
72            Returns <TRUE/> if the new value could successfully be set and
73            <FALSE/> otherwise.
74    */
75    boolean setCurrentValue ([in] any aNumber);
76
77    /** Returns the maximal value that can be represented by this object.
78
79        <p>The type of the returned value is implementation dependent.  It
80        does not have to be the same type as that returned by
81        <member>getCurrentAccessibleValue</member>.</p>
82
83        @return
84            Returns the maximal value in an implementation dependent type.
85            If this object has no upper bound then an empty object is
86            returned.
87    */
88    any getMaximumValue ();
89
90    /** Returns the minimal value that can be represented by this object.
91
92        <p>The type of the returned value is implementation dependent.  It
93        does not have to be the same type as that returned by
94        <member>getCurrentAccessibleValue</member>.</p>
95
96        @return
97            Returns the minimal value in an implementation dependent type.
98            If this object has no upper bound then an empty object is
99            returned.
100    */
101    any getMinimumValue ();
102};
103
104}; }; }; };
105
106#endif
107