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