1d1766043SAndrew Rist/**************************************************************
2d1766043SAndrew Rist *
3d1766043SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4d1766043SAndrew Rist * or more contributor license agreements.  See the NOTICE file
5d1766043SAndrew Rist * distributed with this work for additional information
6d1766043SAndrew Rist * regarding copyright ownership.  The ASF licenses this file
7d1766043SAndrew Rist * to you under the Apache License, Version 2.0 (the
8d1766043SAndrew Rist * "License"); you may not use this file except in compliance
9d1766043SAndrew Rist * with the License.  You may obtain a copy of the License at
10d1766043SAndrew Rist *
11d1766043SAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
12d1766043SAndrew Rist *
13d1766043SAndrew Rist * Unless required by applicable law or agreed to in writing,
14d1766043SAndrew Rist * software distributed under the License is distributed on an
15d1766043SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16d1766043SAndrew Rist * KIND, either express or implied.  See the License for the
17d1766043SAndrew Rist * specific language governing permissions and limitations
18d1766043SAndrew Rist * under the License.
19d1766043SAndrew Rist *
20d1766043SAndrew Rist *************************************************************/
21d1766043SAndrew Rist
22d1766043SAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweir#ifndef __com_sun_star_awt_XAnimatedImages_idl__
25cdf0e10cSrcweir#define __com_sun_star_awt_XAnimatedImages_idl__
26cdf0e10cSrcweir
27cdf0e10cSrcweir#include <com/sun/star/container/XContainerListener.idl>
28cdf0e10cSrcweir#include <com/sun/star/lang/IndexOutOfBoundsException.idl>
29cdf0e10cSrcweir#include <com/sun/star/container/XContainer.idl>
30cdf0e10cSrcweir#include <com/sun/star/lang/IllegalArgumentException.idl>
31cdf0e10cSrcweir
32cdf0e10cSrcweir//======================================================================================================================
33cdf0e10cSrcweir
34cdf0e10cSrcweirmodule com { module sun { module star { module awt {
35cdf0e10cSrcweir
36cdf0e10cSrcweir//======================================================================================================================
37cdf0e10cSrcweir
38cdf0e10cSrcweir/** allows administrating a set of images, to be displayed as animated seres.
39cdf0e10cSrcweir
40cdf0e10cSrcweir    <p>Components implementing this interface maintain a variable number of image sets. Components displaying
41cdf0e10cSrcweir    those images will choose the best-fitting image set depending on the available space, and possibly other
42cdf0e10cSrcweir    restrictions.</p>
43cdf0e10cSrcweir
44*d1e7efc3SJürgen Schmidt    @since OpenOffice 3.4
45cdf0e10cSrcweir */
46cdf0e10cSrcweirpublished interface XAnimatedImages
47cdf0e10cSrcweir{
48cdf0e10cSrcweir    /** specifies the time in milliseconds between two animation steps.
49cdf0e10cSrcweir
50cdf0e10cSrcweir        <p>This is the minimum time, the actual value might be longer due to
51cdf0e10cSrcweir        system load. The default value will be 100 ms.</p>
52cdf0e10cSrcweir    */
53cdf0e10cSrcweir    [attribute] long    StepTime;
54cdf0e10cSrcweir
55cdf0e10cSrcweir    /** specifies whether the animation should start over with the first image of the image series when the last image
56cdf0e10cSrcweir        has been played.
57cdf0e10cSrcweir
58cdf0e10cSrcweir        <p>The default value for this attribute is <TRUE/>.</p>
59cdf0e10cSrcweir    */
60cdf0e10cSrcweir    [attribute] boolean AutoRepeat;
61cdf0e10cSrcweir
62cdf0e10cSrcweir    /** controls the way the images are scaled up or down, when the available space is larger or smaller
63cdf0e10cSrcweir        than what is needed for them.
64cdf0e10cSrcweir
65cdf0e10cSrcweir        <p>Allowed values are those from the <type>ImageScaleMode</type> constants group.</p>
66cdf0e10cSrcweir    */
67cdf0e10cSrcweir    [attribute] short ScaleMode
68cdf0e10cSrcweir    {
69cdf0e10cSrcweir        set raises (::com::sun::star::lang::IllegalArgumentException);
70cdf0e10cSrcweir    };
71cdf0e10cSrcweir
72cdf0e10cSrcweir    /** returns the number of images sets maintained by the component.
73cdf0e10cSrcweir    */
74cdf0e10cSrcweir    long
75cdf0e10cSrcweir        getImageSetCount();
76cdf0e10cSrcweir
77cdf0e10cSrcweir    /** returns the URLs of the image set with the given index
78cdf0e10cSrcweir
79cdf0e10cSrcweir        @param i_index
80cdf0e10cSrcweir            the index of the set those image URLs are to be retrieved. Must be greater than or equal to <code>0</code>,
81cdf0e10cSrcweir            and smaller than the value returned by <member>getImageSetCount</member>.
82cdf0e10cSrcweir
83cdf0e10cSrcweir        @throws ::com::sun::star::lang::IndexOutOfBoundsException
84cdf0e10cSrcweir            if the <code>i_index</code> is not a valid index.
85cdf0e10cSrcweir    */
86cdf0e10cSrcweir    sequence< string >
87cdf0e10cSrcweir        getImageSet
88cdf0e10cSrcweir        (
89cdf0e10cSrcweir            [in] long i_index
90cdf0e10cSrcweir        )
91cdf0e10cSrcweir        raises
92cdf0e10cSrcweir        (
93cdf0e10cSrcweir            ::com::sun::star::lang::IndexOutOfBoundsException
94cdf0e10cSrcweir        );
95cdf0e10cSrcweir
96cdf0e10cSrcweir    /** sets the URLs of the image set with the given index
97cdf0e10cSrcweir
98cdf0e10cSrcweir        @param i_index
99cdf0e10cSrcweir            the index at which a new image set should be inserted. Must be greater than or equal to <code>0</code>,
100cdf0e10cSrcweir            and smaller than or equal to the value returned by <member>getImageSetCount</member>.
101cdf0e10cSrcweir        @param i_imageURLs
102cdf0e10cSrcweir            the URLs for the images for the given set. Will be resolved using a <type scope="com::sun::star::graphic">GraphicProvider</type>.
103cdf0e10cSrcweir
104cdf0e10cSrcweir        @throws ::com::sun::star::lang::IndexOutOfBoundsException
105cdf0e10cSrcweir            if the <code>i_index</code> is not a valid index.
106cdf0e10cSrcweir    */
107cdf0e10cSrcweir    void
108cdf0e10cSrcweir        insertImageSet
109cdf0e10cSrcweir        (
110cdf0e10cSrcweir            [in] long i_index,
111cdf0e10cSrcweir            [in] sequence< string > i_imageURLs
112cdf0e10cSrcweir        )
113cdf0e10cSrcweir        raises
114cdf0e10cSrcweir        (
115cdf0e10cSrcweir            ::com::sun::star::lang::IndexOutOfBoundsException
116cdf0e10cSrcweir        );
117cdf0e10cSrcweir
118cdf0e10cSrcweir    /** replaces the image set given by index with a new one
119cdf0e10cSrcweir
120cdf0e10cSrcweir        @param i_index
121cdf0e10cSrcweir            the index of the set those image URLs are to be replaced. Must be greater than or equal to <code>0</code>,
122cdf0e10cSrcweir            and smaller than the value returned by <member>getImageSetCount</member>.
123cdf0e10cSrcweir
124cdf0e10cSrcweir        @param i_imageURLs
125cdf0e10cSrcweir            the URLs for the images for the given set. Will be resolved using a <type scope="com::sun::star::graphic">GraphicProvider</type>.
126cdf0e10cSrcweir
127cdf0e10cSrcweir        @throws ::com::sun::star::lang::IndexOutOfBoundsException
128cdf0e10cSrcweir            if the <code>i_index</code> is not a valid index.
129cdf0e10cSrcweir    */
130cdf0e10cSrcweir    void
131cdf0e10cSrcweir        replaceImageSet
132cdf0e10cSrcweir        (
133cdf0e10cSrcweir            [in] long i_index,
134cdf0e10cSrcweir            [in] sequence< string > i_imageURLs
135cdf0e10cSrcweir        )
136cdf0e10cSrcweir        raises
137cdf0e10cSrcweir        (
138cdf0e10cSrcweir            ::com::sun::star::lang::IndexOutOfBoundsException
139cdf0e10cSrcweir        );
140cdf0e10cSrcweir
141cdf0e10cSrcweir
142cdf0e10cSrcweir    /** removes the image set with the given index
143cdf0e10cSrcweir
144cdf0e10cSrcweir        @param i_index
145cdf0e10cSrcweir            the index of the set to remove. Must be greater than or equal to <code>0</code>,
146cdf0e10cSrcweir            and smaller than the value returned by <member>getImageSetCount</member>.
147cdf0e10cSrcweir
148cdf0e10cSrcweir        @throws ::com::sun::star::lang::IndexOutOfBoundsException
149cdf0e10cSrcweir            if the <code>i_index</code> is not a valid index.
150cdf0e10cSrcweir    */
151cdf0e10cSrcweir    void
152cdf0e10cSrcweir        removeImageSet
153cdf0e10cSrcweir        (
154cdf0e10cSrcweir            [in] long i_index
155cdf0e10cSrcweir        )
156cdf0e10cSrcweir        raises
157cdf0e10cSrcweir        (
158cdf0e10cSrcweir            ::com::sun::star::lang::IndexOutOfBoundsException
159cdf0e10cSrcweir        );
160cdf0e10cSrcweir
161cdf0e10cSrcweir
162cdf0e10cSrcweir    /** allows other components to observer the insertion, removal, and replacement of image sets
163cdf0e10cSrcweir    */
164cdf0e10cSrcweir    interface ::com::sun::star::container::XContainer;
165cdf0e10cSrcweir};
166cdf0e10cSrcweir
167cdf0e10cSrcweir//======================================================================================================================
168cdf0e10cSrcweir
169cdf0e10cSrcweir}; }; }; };
170cdf0e10cSrcweir
171cdf0e10cSrcweir//======================================================================================================================
172cdf0e10cSrcweir
173cdf0e10cSrcweir#endif
174