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_XAccessibleStateSet_idl__
25#define __com_sun_star_accessibility_XAccessibleStateSet_idl__
26
27#ifndef __com_sun_star_accessibility_AccessibleStateType_idl__
28#include <com/sun/star/accessibility/AccessibleStateType.idl>
29#endif
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 published interface XAccessible;
38
39/** Implement this interface to represent a set of states.
40
41    <p>The interface <type>XAccessibleStateSet</type> represents a set of
42    states of an accessible object.  It can hold any combination of states
43    defined by the constants collection
44    <type>AccessibleStateType</type>.</p>
45
46    @since OpenOffice 1.1.2
47*/
48published interface XAccessibleStateSet : ::com::sun::star::uno::XInterface
49{
50    /** Checks whether the current state set is empty.
51
52        @return
53            Returns <TRUE/> if there is no state in this state set and
54            <FALSE/> if there is at least one set state in it.
55    */
56    boolean isEmpty ();
57
58    /** Checks if the given state is a member of the state set of the called
59        object.
60
61        @param aState
62            The state for which to check membership.  This has to be one of
63            the constants of <type>AccessibleStateType</type>.
64
65        @return
66            Returns <TRUE/> if the given state is a member of this object's
67            state set and <FALSE/> otherwise.
68    */
69    boolean contains ([in] short aState);
70
71    /** Checks if all of the given states are in the state set of the called
72        object.
73
74        @param aStateSet
75            This sequence of states is interpreted as set and every of its
76            members, duplicates are ignored, is checked for membership in
77            this object's state set.  Each state has to be one of the
78            constants of <type>AccessibleStateType</type>.
79
80        @return
81            Returns <TRUE/> if all states of the given state set are members
82            of this object's state set.  <FALSE/> is returned if at least
83            one of the states in the given state is not a member of this
84            object's state set.
85    */
86    boolean containsAll ([in] sequence<short> aStateSet);
87
88    /** Get all currently set states as a sequence of state ids.
89
90        <p>The purpose of this function is to reduce the communication
91        between accessibility objects and AT.  Without this function an
92        AT-Tool had to call <member>contains()</member> for every state
93        type.  Now a single call is sufficient.</p>
94
95        @return
96            The returned sequence contains one entry for every currently set
97            state.  This entry is the id of that state.  The order of the
98            states in the sequence is undefined.
99    */
100    sequence<short> getStates ();
101};
102
103}; }; }; };
104
105#endif
106