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