Documentation/DevGuide/Working with Presentations
< Documentation | DevGuide
This section is about working with the Presentation component. It builds upon the material covered in Extensions_development_basic and the generic guides in the CookBook.
Starting a slide show
>
Dim oPresentation As Object
oPresentation = ThisComponent
oPresentation.Start()
Controlling a running slide show
Please note, this documentation uses some UNO API Enhancements that are currently under development and is planned to be introduced in the OOo 2.4 code line. Until this new API is published it may be changed to improve the API, fix errors or to include your [suggestions].
First you have to get the controller. This is only available while the slide show is running.
Dim oController As Object
oController = oPresentation.Controller
The slide show controller currently has the following interface
interface XSlideShowController
{
//-------------------------------------------------------------------------
/**
*/
interface ::com::sun::star::lang::XComponent;
//-------------------------------------------------------------------------
/**
*/
interface com::sun::star::beans::XPropertySet;
//-------------------------------------------------------------------------
/** gives access to the slides that will be shown in this slideshow.
Slides are returned in the order they will be displayed in the
presentation which can be different than the orders of slides in
the document. Not all slides must be present and each slide can
be used more than once.
*/
interface ::com::sun::star::container::XIndexAccess;
//-------------------------------------------------------------------------
/** start the slideshow */
void start( [in] sequence< ::com::sun::star::beans::PropertyValue > Arguments );
//-------------------------------------------------------------------------
/** stop the slideshow
a stopped show can only be restarted from the beginning with a call to start
*/
void stop();
//-------------------------------------------------------------------------
/** returns true if the slideshow is currently stopped */
boolean isStopped();
//-------------------------------------------------------------------------
/** start next effects that wait on a generic trigger.
If no generic triggers are waiting the next slide will be displayed.
*/
void gotoNextEffect();
//-------------------------------------------------------------------------
/** goto and display first slide */
void gotoFirstSlide();
//-------------------------------------------------------------------------
/** goto and display next slide */
void gotoNextSlide();
//-------------------------------------------------------------------------
/** goto and display previous slide */
void gotoPreviousSlide();
//-------------------------------------------------------------------------
/** goto and display last slide */
void gotoLastSlide();
//-------------------------------------------------------------------------
/** goto the given textual bookmark */
void gotoBookmark( [in] string Bookmark );
//-------------------------------------------------------------------------
/** jumps to the given slide.
The slide can be a slide that would normaly not be shown during
the current slideshow.
*/
void gotoSlide( [in] com::sun::star::drawing::XDrawPage Page );
//-------------------------------------------------------------------------
/** jumps to the slide at the given index.
*/
void gotoSlideIndex( [in] long Index );
//-------------------------------------------------------------------------
/** stop all currently played sounds */
void stopSound();
//-------------------------------------------------------------------------
/** pauses the slideshow. All effects are paused.
The slideshow continues on next user input or if resume is called.
*/
void pause();
//-------------------------------------------------------------------------
/** resumes a paused slideshow.
*/
void resume();
//-------------------------------------------------------------------------
/** returns <TRUE/> if the slideshow is currently paused.
@see <member>pause</member>
@see <member>resume</member>
*/
boolean isPaused();
//-------------------------------------------------------------------------
/** pauses the slideshow and blanks the screen in the given color.
Change attribute <member>Pause</member> to false to unpause the slideshow.
*/
void blankScreen( [in] long Color );
//-------------------------------------------------------------------------
/** activates the user interface of this slideshow.
@see deactivate()
@see isActive()
*/
void activate();
//-------------------------------------------------------------------------
/** can be called to deactivate the user interface of this slideshow.
A deactivated
@see <member>activate()</member>
@see <member>isActive()</member>
*/
void deactivate();
//-------------------------------------------------------------------------
/** determines if the slideshow is active.
@return
TRUE for UI active slideshow
FALSE otherwise
*/
boolean isActive();
//-------------------------------------------------------------------------
/** returns slide that is currently displayed */
com::sun::star::drawing::XDrawPage getCurrentSlide();
//-------------------------------------------------------------------------
/** returns the index of the current slide */
long getCurrentSlideIndex();
//-------------------------------------------------------------------------
/** the slide that is displayed next. */
long getNextSlideIndex();
//-------------------------------------------------------------------------
/** returns <TRUE/> if the slideshow was started to run endlessly.
*/
boolean isEndless();
//-------------------------------------------------------------------------
/** Returns <TRUE/> if the slideshow was started in full-screen mode.
*/
boolean isFullScreen();
//-------------------------------------------------------------------------
/** If this attribute is set to <TRUE/>, the window of the slideshow is
always on top of all other windows.
*/
[attribute] boolean AlwaysOnTop;
//-------------------------------------------------------------------------
/** If this attribute is <TRUE/>, the mouse is visible during the
slideshow.
*/
[attribute] boolean MouseVisible;
//-------------------------------------------------------------------------
/** If this is <TRUE/>, a pen is shown during presentation.
<p>You can draw on the presentation with this pen.</p>
*/
[attribute] boolean UsePen;
//-------------------------------------------------------------------------
/** This attribute changes the color of the pen. */
[attribute] long PenColor;
//-------------------------------------------------------------------------
};