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_awt_XAnimatedImages_idl__
25#define __com_sun_star_awt_XAnimatedImages_idl__
26
27#include <com/sun/star/container/XContainerListener.idl>
28#include <com/sun/star/lang/IndexOutOfBoundsException.idl>
29#include <com/sun/star/container/XContainer.idl>
30#include <com/sun/star/lang/IllegalArgumentException.idl>
31
32//======================================================================================================================
33
34module com { module sun { module star { module awt {
35
36//======================================================================================================================
37
38/** allows administrating a set of images, to be displayed as animated seres.
39
40    <p>Components implementing this interface maintain a variable number of image sets. Components displaying
41    those images will choose the best-fitting image set depending on the available space, and possibly other
42    restrictions.</p>
43
44    @since OpenOffice 3.4
45 */
46published interface XAnimatedImages
47{
48    /** specifies the time in milliseconds between two animation steps.
49
50        <p>This is the minimum time, the actual value might be longer due to
51        system load. The default value will be 100 ms.</p>
52    */
53    [attribute] long    StepTime;
54
55    /** specifies whether the animation should start over with the first image of the image series when the last image
56        has been played.
57
58        <p>The default value for this attribute is <TRUE/>.</p>
59    */
60    [attribute] boolean AutoRepeat;
61
62    /** controls the way the images are scaled up or down, when the available space is larger or smaller
63        than what is needed for them.
64
65        <p>Allowed values are those from the <type>ImageScaleMode</type> constants group.</p>
66    */
67    [attribute] short ScaleMode
68    {
69        set raises (::com::sun::star::lang::IllegalArgumentException);
70    };
71
72    /** returns the number of images sets maintained by the component.
73    */
74    long
75        getImageSetCount();
76
77    /** returns the URLs of the image set with the given index
78
79        @param i_index
80            the index of the set those image URLs are to be retrieved. Must be greater than or equal to <code>0</code>,
81            and smaller than the value returned by <member>getImageSetCount</member>.
82
83        @throws ::com::sun::star::lang::IndexOutOfBoundsException
84            if the <code>i_index</code> is not a valid index.
85    */
86    sequence< string >
87        getImageSet
88        (
89            [in] long i_index
90        )
91        raises
92        (
93            ::com::sun::star::lang::IndexOutOfBoundsException
94        );
95
96    /** sets the URLs of the image set with the given index
97
98        @param i_index
99            the index at which a new image set should be inserted. Must be greater than or equal to <code>0</code>,
100            and smaller than or equal to the value returned by <member>getImageSetCount</member>.
101        @param i_imageURLs
102            the URLs for the images for the given set. Will be resolved using a <type scope="com::sun::star::graphic">GraphicProvider</type>.
103
104        @throws ::com::sun::star::lang::IndexOutOfBoundsException
105            if the <code>i_index</code> is not a valid index.
106    */
107    void
108        insertImageSet
109        (
110            [in] long i_index,
111            [in] sequence< string > i_imageURLs
112        )
113        raises
114        (
115            ::com::sun::star::lang::IndexOutOfBoundsException
116        );
117
118    /** replaces the image set given by index with a new one
119
120        @param i_index
121            the index of the set those image URLs are to be replaced. Must be greater than or equal to <code>0</code>,
122            and smaller than the value returned by <member>getImageSetCount</member>.
123
124        @param i_imageURLs
125            the URLs for the images for the given set. Will be resolved using a <type scope="com::sun::star::graphic">GraphicProvider</type>.
126
127        @throws ::com::sun::star::lang::IndexOutOfBoundsException
128            if the <code>i_index</code> is not a valid index.
129    */
130    void
131        replaceImageSet
132        (
133            [in] long i_index,
134            [in] sequence< string > i_imageURLs
135        )
136        raises
137        (
138            ::com::sun::star::lang::IndexOutOfBoundsException
139        );
140
141
142    /** removes the image set with the given index
143
144        @param i_index
145            the index of the set to remove. Must be greater than or equal to <code>0</code>,
146            and smaller than the value returned by <member>getImageSetCount</member>.
147
148        @throws ::com::sun::star::lang::IndexOutOfBoundsException
149            if the <code>i_index</code> is not a valid index.
150    */
151    void
152        removeImageSet
153        (
154            [in] long i_index
155        )
156        raises
157        (
158            ::com::sun::star::lang::IndexOutOfBoundsException
159        );
160
161
162    /** allows other components to observer the insertion, removal, and replacement of image sets
163    */
164    interface ::com::sun::star::container::XContainer;
165};
166
167//======================================================================================================================
168
169}; }; }; };
170
171//======================================================================================================================
172
173#endif
174