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