Difference between revisions of "Documentation/DevGuide/Working with Presentations"
From Apache OpenOffice Wiki
< Documentation | DevGuide
(→Starting a slide show) |
m (→Starting a slide show) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
== Starting a slide show == | == Starting a slide show == | ||
− | < | + | <syntaxhighlight lang="oobas"> |
Dim oPresentation As Object | Dim oPresentation As Object | ||
oPresentation = ThisComponent | oPresentation = ThisComponent | ||
oPresentation.Start() | oPresentation.Start() | ||
− | </ | + | </syntaxhighlight> |
== Controlling a running slide show == | == Controlling a running slide show == | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
First you have to get the controller. This is only available while the slide show is running. | First you have to get the controller. This is only available while the slide show is running. | ||
− | < | + | <syntaxhighlight lang="oobas"> |
Dim oController As Object | Dim oController As Object | ||
oController = oPresentation.Controller | oController = oPresentation.Controller | ||
− | </ | + | </syntaxhighlight> |
The slide show controller currently has the following interface | The slide show controller currently has the following interface | ||
− | < | + | <syntaxhighlight lang="java"> |
interface XSlideShowController | interface XSlideShowController | ||
{ | { | ||
Line 228: | Line 222: | ||
//------------------------------------------------------------------------- | //------------------------------------------------------------------------- | ||
}; | }; | ||
− | </ | + | </syntaxhighlight> |
== Listening to slide show events == | == Listening to slide show events == |
Latest revision as of 15:01, 24 August 2022
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
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; //------------------------------------------------------------------------- };