1/*************************************************************************
2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3 *
4 * Copyright 2000, 2010 Oracle and/or its affiliates.
5 *
6 * OpenOffice.org - a multi-platform office productivity suite
7 *
8 * This file is part of OpenOffice.org.
9 *
10 * OpenOffice.org is free software: you can redistribute it and/or modify
11 * it under the terms of the GNU Lesser General Public License version 3
12 * only, as published by the Free Software Foundation.
13 *
14 * OpenOffice.org is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 * GNU Lesser General Public License version 3 for more details
18 * (a copy is included in the LICENSE file that accompanied this code).
19 *
20 * You should have received a copy of the GNU Lesser General Public License
21 * version 3 along with OpenOffice.org.  If not, see
22 * <http://www.openoffice.org/license.html>
23 * for a copy of the LGPLv3 License.
24 *
25 ************************************************************************/
26
27#ifndef __com_sun_star_awt_XAnimatedImages_idl__
28#define __com_sun_star_awt_XAnimatedImages_idl__
29
30#include <com/sun/star/container/XContainerListener.idl>
31#include <com/sun/star/lang/IndexOutOfBoundsException.idl>
32#include <com/sun/star/container/XContainer.idl>
33#include <com/sun/star/lang/IllegalArgumentException.idl>
34
35//======================================================================================================================
36
37module com { module sun { module star { module awt {
38
39//======================================================================================================================
40
41/** allows administrating a set of images, to be displayed as animated seres.
42
43    <p>Components implementing this interface maintain a variable number of image sets. Components displaying
44    those images will choose the best-fitting image set depending on the available space, and possibly other
45    restrictions.</p>
46
47    @since OOo 3.4
48 */
49published interface XAnimatedImages
50{
51    /** specifies the time in milliseconds between two animation steps.
52
53        <p>This is the minimum time, the actual value might be longer due to
54        system load. The default value will be 100 ms.</p>
55    */
56    [attribute] long    StepTime;
57
58    /** specifies whether the animation should start over with the first image of the image series when the last image
59        has been played.
60
61        <p>The default value for this attribute is <TRUE/>.</p>
62    */
63    [attribute] boolean AutoRepeat;
64
65    /** controls the way the images are scaled up or down, when the available space is larger or smaller
66        than what is needed for them.
67
68        <p>Allowed values are those from the <type>ImageScaleMode</type> constants group.</p>
69    */
70    [attribute] short ScaleMode
71    {
72        set raises (::com::sun::star::lang::IllegalArgumentException);
73    };
74
75    /** returns the number of images sets maintained by the component.
76    */
77    long
78        getImageSetCount();
79
80    /** returns the URLs of the image set with the given index
81
82        @param i_index
83            the index of the set those image URLs are to be retrieved. Must be greater than or equal to <code>0</code>,
84            and smaller than the value returned by <member>getImageSetCount</member>.
85
86        @throws ::com::sun::star::lang::IndexOutOfBoundsException
87            if the <code>i_index</code> is not a valid index.
88    */
89    sequence< string >
90        getImageSet
91        (
92            [in] long i_index
93        )
94        raises
95        (
96            ::com::sun::star::lang::IndexOutOfBoundsException
97        );
98
99    /** sets the URLs of the image set with the given index
100
101        @param i_index
102            the index at which a new image set should be inserted. Must be greater than or equal to <code>0</code>,
103            and smaller than or equal to the value returned by <member>getImageSetCount</member>.
104        @param i_imageURLs
105            the URLs for the images for the given set. Will be resolved using a <type scope="com::sun::star::graphic">GraphicProvider</type>.
106
107        @throws ::com::sun::star::lang::IndexOutOfBoundsException
108            if the <code>i_index</code> is not a valid index.
109    */
110    void
111        insertImageSet
112        (
113            [in] long i_index,
114            [in] sequence< string > i_imageURLs
115        )
116        raises
117        (
118            ::com::sun::star::lang::IndexOutOfBoundsException
119        );
120
121    /** replaces the image set given by index with a new one
122
123        @param i_index
124            the index of the set those image URLs are to be replaced. Must be greater than or equal to <code>0</code>,
125            and smaller than the value returned by <member>getImageSetCount</member>.
126
127        @param i_imageURLs
128            the URLs for the images for the given set. Will be resolved using a <type scope="com::sun::star::graphic">GraphicProvider</type>.
129
130        @throws ::com::sun::star::lang::IndexOutOfBoundsException
131            if the <code>i_index</code> is not a valid index.
132    */
133    void
134        replaceImageSet
135        (
136            [in] long i_index,
137            [in] sequence< string > i_imageURLs
138        )
139        raises
140        (
141            ::com::sun::star::lang::IndexOutOfBoundsException
142        );
143
144
145    /** removes the image set with the given index
146
147        @param i_index
148            the index of the set to remove. Must be greater than or equal to <code>0</code>,
149            and smaller than the value returned by <member>getImageSetCount</member>.
150
151        @throws ::com::sun::star::lang::IndexOutOfBoundsException
152            if the <code>i_index</code> is not a valid index.
153    */
154    void
155        removeImageSet
156        (
157            [in] long i_index
158        )
159        raises
160        (
161            ::com::sun::star::lang::IndexOutOfBoundsException
162        );
163
164
165    /** allows other components to observer the insertion, removal, and replacement of image sets
166    */
167    interface ::com::sun::star::container::XContainer;
168};
169
170//======================================================================================================================
171
172}; }; }; };
173
174//======================================================================================================================
175
176#endif
177