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#ifndef __com_sun_star_presentation_XSlideShowController_idl__
24#define __com_sun_star_presentation_XSlideShowController_idl__
25
26#ifndef __com_sun_star_drawing_XDrawPage_idl__
27#include <com/sun/star/drawing/XDrawPage.idl>
28#endif
29
30#ifndef __com_sun_star_container_XIndexAccess_idl__
31#include <com/sun/star/container/XIndexAccess.idl>
32#endif
33
34#ifndef __com_sun_star_lang_XComponent_idl__
35#include <com/sun/star/lang/XComponent.idl>
36#endif
37
38#ifndef __com_sun_star_presentation_XSlideShow_idl__
39#include <com/sun/star/presentation/XSlideShow.idl>
40#endif
41
42//=============================================================================
43
44 module com {  module sun {  module star {  module presentation {
45
46//=============================================================================
47
48/** interface to control a running slideshow.
49
50    @see XPresentation2
51	@since OpenOffice 3.0
52*/
53interface XSlideShowController
54{
55	//-------------------------------------------------------------------------
56
57	/** returns true if the slideshow is still running.
58		If this returns false, this component is already disposed.
59		You can start a new slideshow and get a new instance
60		of <type>XSlideShowController</type> from <type>XPresentation2</type>
61	*/
62	boolean isRunning();
63
64	//-------------------------------------------------------------------------
65
66	/** @returns
67				the number of slides in this slideshow.
68
69		@see getSlideByIndex
70	 */
71	long getSlideCount();
72
73	//-------------------------------------------------------------------------
74
75	/**	gives access to the slides that will be shown in this slideshow.
76
77		<p>Slides are returned in the order they will be displayed in the
78		presentation which can be different than the orders of slides in
79		the document. Not all slides must be present and each slide can
80		be used more than once.
81
82		@returns
83			the slide at the specified index.
84
85		@param Index
86			specifies the position in the list of slides that are displayed
87			in this slideshow. The first index is 0.
88
89		@throws com::sun::star::lang::IndexOutOfBoundException
90			if the index is not valid.
91
92	 */
93	::com::sun::star::drawing::XDrawPage getSlideByIndex( [in] long Index )
94			raises( com::sun::star::lang::IndexOutOfBoundsException );
95
96	//-------------------------------------------------------------------------
97
98	/** addes a listener that recieves events while the slideshow is running. */
99	void addSlideShowListener( [in] XSlideShowListener Listener );
100
101	//-------------------------------------------------------------------------
102
103	/** removes a listener. */
104	void removeSlideShowListener( [in] XSlideShowListener Listener );
105
106	//-------------------------------------------------------------------------
107
108	/** start next effects that wait on a generic trigger.
109		<p>If no generic triggers are waiting the next
110		slide will be displayed.
111	*/
112	void gotoNextEffect();
113
114	//-------------------------------------------------------------------------
115
116	/** undo the last effects that where triggered by a generic trigger.
117		<p>If there is no previous effect that can be undone then the
118		previous slide will be displayed.
119	*/
120	void gotoPreviousEffect();
121
122	//-------------------------------------------------------------------------
123
124	/** goto and display first slide */
125	void gotoFirstSlide();
126
127	//-------------------------------------------------------------------------
128
129	/** goto and display next slide.
130		<p>Remaining effects on the current slide will be skiped.*/
131	void gotoNextSlide();
132
133	//-------------------------------------------------------------------------
134
135	/** goto and display previous slide.
136		<p>Remaining effects on the current slide will be skiped.*/
137	void gotoPreviousSlide();
138
139	//-------------------------------------------------------------------------
140
141	/** goto and display last slide.
142		<p>Remaining effects on the current slide will be skiped.*/
143	void gotoLastSlide();
144
145	//-------------------------------------------------------------------------
146
147	/** goto the given textual bookmark */
148	void gotoBookmark( [in] string Bookmark );
149
150	//-------------------------------------------------------------------------
151
152	/** jumps to the given slide.
153		<p>The slide can also be a slide that would normaly not be shown during
154		the current slideshow.
155
156		@throws com::sun::star::lang::IllegalArgumentException
157			if the given page is not a valid slide of the document for
158			which this slideshow is started. Also not allowed are master,
159			notes and handout pages.
160	*/
161	void gotoSlide( [in] com::sun::star::drawing::XDrawPage Page )
162		raises( com::sun::star::lang::IllegalArgumentException );
163
164	//-------------------------------------------------------------------------
165
166	/** jumps to the slide at the given index.
167	*/
168	void gotoSlideIndex( [in] long Index );
169
170	//-------------------------------------------------------------------------
171
172	/** stop all currently played sounds */
173	void stopSound();
174
175	//-------------------------------------------------------------------------
176
177	/** pauses the slideshow. All effects are paused.
178		<p>The slideshow continues on next user input or if
179		<member>resume</member> is called.
180	*/
181	void pause();
182
183	//-------------------------------------------------------------------------
184
185	/** resumes a paused slideshow.
186	*/
187	void resume();
188
189	//-------------------------------------------------------------------------
190
191	/** returns <TRUE/> if the slideshow is currently paused.
192
193		@see <member>pause</member>
194		@see <member>resume</member>
195	*/
196	boolean isPaused();
197
198	//-------------------------------------------------------------------------
199
200	/** pauses the slideshow and blanks the screen in the given color.
201		<p>Change attribute <member>Pause</member> to false to unpause
202		the slideshow.
203	*/
204	void blankScreen( [in] long Color );
205
206	//-------------------------------------------------------------------------
207
208	/** activates the user interface of this slideshow.
209
210        @see <member>deactivate()</member>
211        @see <member>isActive()</member>
212    */
213	void activate();
214
215	//-------------------------------------------------------------------------
216	/** can be called to deactivate the user interface of this slideshow.
217
218		<p>A deactivated
219        @see <member>activate()</member>
220        @see <member>isActive()</member>
221	 */
222	void deactivate();
223
224	//-------------------------------------------------------------------------
225
226	/** determines if the slideshow is active.
227
228        @return
229            <TRUE/> for UI active slideshow
230            <br>
231            <FALSE/> otherwise
232	 */
233	boolean isActive();
234
235	//-------------------------------------------------------------------------
236
237	/** returns slide that is currently displayed */
238	com::sun::star::drawing::XDrawPage getCurrentSlide();
239
240	//-------------------------------------------------------------------------
241
242	/** returns the index of the current slide. */
243	long getCurrentSlideIndex();
244
245	//-------------------------------------------------------------------------
246
247	/** the index for the slide that is displayed next. */
248	long getNextSlideIndex();
249
250	//-------------------------------------------------------------------------
251
252	/** returns <TRUE/> if the slideshow was started to run endlessly.
253	 */
254	boolean isEndless();
255
256	//-------------------------------------------------------------------------
257
258	/** Returns <TRUE/> if the slideshow was started in full-screen mode.
259	 */
260	boolean isFullScreen();
261
262	//-------------------------------------------------------------------------
263
264	/** If this attribute is set to <TRUE/>, the window of the slideshow is
265		always on top of all other windows.
266	 */
267	[attribute] boolean AlwaysOnTop;
268
269	//-------------------------------------------------------------------------
270
271	/** If this attribute is <TRUE/>, the mouse is visible during the
272		slideshow.
273	 */
274	[attribute] boolean MouseVisible;
275
276	//-------------------------------------------------------------------------
277
278	/** If this is <TRUE/>, a pen is shown during presentation.
279
280		<p>You can draw on the presentation with this pen.</p>
281	 */
282	[attribute] boolean UsePen;
283
284	//-------------------------------------------------------------------------
285
286	/** This attribute changes the color of the pen. */
287	[attribute] long PenColor;
288
289	//-------------------------------------------------------------------------
290
291	/** This attribute changes the width of the pen.
292
293		@since OpenOffice 4.1
294	*/
295	[attribute] double PenWidth;
296
297	//-------------------------------------------------------------------------
298
299	/** returns the actuall <type>XSlideShow</type> instance that runs the
300		slideshow.
301		<br>Normaly all navigation should be done using this controller and
302		not the <type>XSlideShow</type> itself. */
303	XSlideShow getSlideShow();
304
305	//-------------------------------------------------------------------------
306};
307
308//=============================================================================
309
310}; }; }; };
311
312#endif
313