xref: /trunk/main/sd/source/ui/slideshow/slideshowimpl.hxx (revision 9d97e9635cf537de28a9272394b68cfd2c8f8314)
1c45d927aSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3c45d927aSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4c45d927aSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5c45d927aSAndrew Rist  * distributed with this work for additional information
6c45d927aSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7c45d927aSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8c45d927aSAndrew Rist  * "License"); you may not use this file except in compliance
9c45d927aSAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
11c45d927aSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
13c45d927aSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14c45d927aSAndrew Rist  * software distributed under the License is distributed on an
15c45d927aSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16c45d927aSAndrew Rist  * KIND, either express or implied.  See the License for the
17c45d927aSAndrew Rist  * specific language governing permissions and limitations
18c45d927aSAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
20c45d927aSAndrew Rist  *************************************************************/
21c45d927aSAndrew Rist 
22cdf0e10cSrcweir #ifndef _SD_SlideShowImpl_HXX_
23cdf0e10cSrcweir #define _SD_SlideShowImpl_HXX_
24cdf0e10cSrcweir 
25cdf0e10cSrcweir #include "sal/config.h"
26cdf0e10cSrcweir #include "com/sun/star/uno/XComponentContext.hpp"
27cdf0e10cSrcweir #include "cppuhelper/compbase1.hxx"
28cdf0e10cSrcweir #include "cppuhelper/compbase2.hxx"
29cdf0e10cSrcweir #include "cppuhelper/basemutex.hxx"
30cdf0e10cSrcweir #include "cppuhelper/propertysetmixin.hxx"
31cdf0e10cSrcweir #include <com/sun/star/awt/XActivateListener.hpp>
32cdf0e10cSrcweir #include <com/sun/star/presentation/XSlideShow.hpp>
33cdf0e10cSrcweir #include <com/sun/star/presentation/XSlideShowView.hpp>
34cdf0e10cSrcweir #include <com/sun/star/presentation/XSlideShowListener.hpp>
35cdf0e10cSrcweir #include <com/sun/star/presentation/XSlideShowController.hpp>
36cdf0e10cSrcweir #include "com/sun/star/presentation/XShapeEventListener.hpp"
37cdf0e10cSrcweir #include <com/sun/star/awt/WindowEvent.hpp>
38cdf0e10cSrcweir #include <com/sun/star/awt/XWindowListener.hpp>
39cdf0e10cSrcweir #include <com/sun/star/awt/XWindow.hpp>
40cdf0e10cSrcweir #include <com/sun/star/awt/XWindowPeer.hpp>
41cdf0e10cSrcweir #include <com/sun/star/util/XModifyListener.hpp>
42cdf0e10cSrcweir #include <com/sun/star/awt/XPaintListener.hpp>
43cdf0e10cSrcweir #include <com/sun/star/awt/XPointer.hpp>
44cdf0e10cSrcweir #include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
45cdf0e10cSrcweir #include <com/sun/star/animations/XAnimationNodeSupplier.hpp>
46cdf0e10cSrcweir #include <com/sun/star/presentation/ClickAction.hpp>
47cdf0e10cSrcweir #include <com/sun/star/media/XManager.hpp>
48cdf0e10cSrcweir #include <com/sun/star/media/XPlayer.hpp>
49cdf0e10cSrcweir 
50cdf0e10cSrcweir #include <toolkit/helper/vclunohelper.hxx>
51cdf0e10cSrcweir 
52cdf0e10cSrcweir #include <basegfx/matrix/b2dhommatrix.hxx>
53cdf0e10cSrcweir #include <basegfx/tools/canvastools.hxx>
54cdf0e10cSrcweir #include <vcl/help.hxx>
55cdf0e10cSrcweir #include <tools/urlobj.hxx>
56cdf0e10cSrcweir #include <unotools/pathoptions.hxx>
57cdf0e10cSrcweir #include <unotools/saveopt.hxx>
58cdf0e10cSrcweir #include <sfx2/bindings.hxx>
59cdf0e10cSrcweir #include <sfx2/dispatch.hxx>
60cdf0e10cSrcweir #include <sfx2/viewfrm.hxx>
61cdf0e10cSrcweir #include <basic/sbstar.hxx>
62cdf0e10cSrcweir #include <svx/svdpagv.hxx>
63cdf0e10cSrcweir #include <svx/fmshell.hxx>
64cdf0e10cSrcweir 
65cdf0e10cSrcweir #ifndef _SVX_SVXIDS_HRC
66cdf0e10cSrcweir #include <svx/svxids.hrc>
67cdf0e10cSrcweir #endif
68cdf0e10cSrcweir #include "sdmod.hxx"
69cdf0e10cSrcweir #include "cusshow.hxx"
70cdf0e10cSrcweir #include "ViewShellBase.hxx"
71cdf0e10cSrcweir #include "PresentationViewShell.hxx"
72cdf0e10cSrcweir #include "ViewShell.hxx"
73cdf0e10cSrcweir #include "drawview.hxx"
74cdf0e10cSrcweir #include "drawdoc.hxx"
75cdf0e10cSrcweir 
76cdf0e10cSrcweir #include "showwindow.hxx"
77cdf0e10cSrcweir 
78cdf0e10cSrcweir #include "optsitem.hxx"
79cdf0e10cSrcweir #include "FrameView.hxx"
80cdf0e10cSrcweir #include "DrawDocShell.hxx"
81cdf0e10cSrcweir 
82cdf0e10cSrcweir #ifndef _SD_APP_HRC_
83cdf0e10cSrcweir #include "app.hrc"
84cdf0e10cSrcweir #endif
85cdf0e10cSrcweir 
86cdf0e10cSrcweir #include "slideshow.hxx"
87cdf0e10cSrcweir 
88cdf0e10cSrcweir class SfxViewFrame;
89cdf0e10cSrcweir class SfxRequest;
90cdf0e10cSrcweir 
91cdf0e10cSrcweir namespace css = ::com::sun::star;
92cdf0e10cSrcweir 
93cdf0e10cSrcweir namespace sd
94cdf0e10cSrcweir {
95cdf0e10cSrcweir class SlideShowView;
96cdf0e10cSrcweir class AnimationSlideController;
97cdf0e10cSrcweir class PaneHider;
98cdf0e10cSrcweir 
99cdf0e10cSrcweir // --------------------------------------------------------------------
100cdf0e10cSrcweir 
101cdf0e10cSrcweir struct PresentationSettingsEx : public PresentationSettings
102cdf0e10cSrcweir {
103cdf0e10cSrcweir     sal_Bool mbRehearseTimings;
104cdf0e10cSrcweir     sal_Bool mbPreview;
105cdf0e10cSrcweir     ::Window* mpParentWindow;
106cdf0e10cSrcweir     css::uno::Reference< css::drawing::XDrawPage > mxStartPage;
107cdf0e10cSrcweir     css::uno::Reference< css::animations::XAnimationNode > mxAnimationNode;
108cdf0e10cSrcweir 
109cdf0e10cSrcweir     PresentationSettingsEx( const PresentationSettingsEx& );
110cdf0e10cSrcweir     PresentationSettingsEx( PresentationSettings& );
111cdf0e10cSrcweir 
112cdf0e10cSrcweir     void SetArguments( const css::uno::Sequence< css::beans::PropertyValue >& rArguments ) throw (css::lang::IllegalArgumentException);
113cdf0e10cSrcweir 
114cdf0e10cSrcweir     void SetPropertyValue( const ::rtl::OUString& rProperty, const css::uno::Any& rValue ) throw (css::lang::IllegalArgumentException);
115cdf0e10cSrcweir };
116cdf0e10cSrcweir 
117cdf0e10cSrcweir // --------------------------------------------------------------------
118cdf0e10cSrcweir 
119cdf0e10cSrcweir struct WrappedShapeEventImpl
120cdf0e10cSrcweir {
121cdf0e10cSrcweir     css::presentation::ClickAction meClickAction;
122cdf0e10cSrcweir     sal_Int32 mnVerb;
123cdf0e10cSrcweir     ::rtl::OUString maStrBookmark;
WrappedShapeEventImplsd::WrappedShapeEventImpl124cdf0e10cSrcweir     WrappedShapeEventImpl() : meClickAction( css::presentation::ClickAction_NONE ), mnVerb( 0 ) {};
125cdf0e10cSrcweir };
126cdf0e10cSrcweir 
127cdf0e10cSrcweir typedef boost::shared_ptr< WrappedShapeEventImpl > WrappedShapeEventImplPtr;
128cdf0e10cSrcweir typedef std::map< css::uno::Reference< css::drawing::XShape >, WrappedShapeEventImplPtr > WrappedShapeEventImplMap;
129cdf0e10cSrcweir 
130cdf0e10cSrcweir // --------------------------------------------------------------------
131cdf0e10cSrcweir 
132cdf0e10cSrcweir class SlideShowListenerProxy : private ::cppu::BaseMutex,
133cdf0e10cSrcweir         public ::cppu::WeakImplHelper2< css::presentation::XSlideShowListener, css::presentation::XShapeEventListener >
134cdf0e10cSrcweir {
135cdf0e10cSrcweir public:
136cdf0e10cSrcweir     SlideShowListenerProxy( const rtl::Reference< SlideshowImpl >& xController, const css::uno::Reference< css::presentation::XSlideShow >& xSlideShow );
137cdf0e10cSrcweir     virtual ~SlideShowListenerProxy();
138cdf0e10cSrcweir 
139cdf0e10cSrcweir     void addAsSlideShowListener();
140cdf0e10cSrcweir     void removeAsSlideShowListener();
141cdf0e10cSrcweir 
142cdf0e10cSrcweir     void addSlideShowListener( const css::uno::Reference< css::presentation::XSlideShowListener >& Listener );
143cdf0e10cSrcweir     void removeSlideShowListener( const css::uno::Reference< css::presentation::XSlideShowListener >& Listener );
144cdf0e10cSrcweir 
145cdf0e10cSrcweir     void addShapeEventListener( const css::uno::Reference< css::drawing::XShape >& xShape );
146cdf0e10cSrcweir     void removeShapeEventListener( const css::uno::Reference< css::drawing::XShape >& xShape );
147cdf0e10cSrcweir 
148cdf0e10cSrcweir     // css::animations::XAnimationListener
149cdf0e10cSrcweir     virtual void SAL_CALL beginEvent( const css::uno::Reference< css::animations::XAnimationNode >& Node ) throw (css::uno::RuntimeException);
150cdf0e10cSrcweir     virtual void SAL_CALL endEvent( const css::uno::Reference< css::animations::XAnimationNode >& Node ) throw (css::uno::RuntimeException);
151cdf0e10cSrcweir     virtual void SAL_CALL repeat( const css::uno::Reference< css::animations::XAnimationNode >& Node, ::sal_Int32 Repeat ) throw (css::uno::RuntimeException);
152cdf0e10cSrcweir 
153cdf0e10cSrcweir     // css::presentation::XSlideShowListener:
154cdf0e10cSrcweir     virtual void SAL_CALL paused() throw (css::uno::RuntimeException);
155cdf0e10cSrcweir     virtual void SAL_CALL resumed() throw (css::uno::RuntimeException);
156cdf0e10cSrcweir     virtual void SAL_CALL slideTransitionStarted() throw (css::uno::RuntimeException);
157cdf0e10cSrcweir     virtual void SAL_CALL slideTransitionEnded() throw (css::uno::RuntimeException);
158cdf0e10cSrcweir     virtual void SAL_CALL slideAnimationsEnded() throw (css::uno::RuntimeException);
159cdf0e10cSrcweir     virtual void SAL_CALL slideEnded(sal_Bool bReverse) throw (css::uno::RuntimeException);
160cdf0e10cSrcweir     virtual void SAL_CALL hyperLinkClicked(const ::rtl::OUString & hyperLink) throw (css::uno::RuntimeException);
161cdf0e10cSrcweir 
162cdf0e10cSrcweir     // css::lang::XEventListener:
163cdf0e10cSrcweir     virtual void SAL_CALL disposing(const css::lang::EventObject & Source) throw (css::uno::RuntimeException);
164cdf0e10cSrcweir 
165cdf0e10cSrcweir     // css::presentation::XShapeEventListener:
166cdf0e10cSrcweir     virtual void SAL_CALL click(const css::uno::Reference< css::drawing::XShape > & xShape, const css::awt::MouseEvent & aOriginalEvent) throw (css::uno::RuntimeException);
167cdf0e10cSrcweir 
168cdf0e10cSrcweir     ::cppu::OInterfaceContainerHelper maListeners;
169cdf0e10cSrcweir 
170cdf0e10cSrcweir     rtl::Reference< SlideshowImpl > mxController;
171cdf0e10cSrcweir     css::uno::Reference< css::presentation::XSlideShow > mxSlideShow;
172cdf0e10cSrcweir };
173cdf0e10cSrcweir 
174cdf0e10cSrcweir // --------------------------------------------------------------------
175cdf0e10cSrcweir 
176cdf0e10cSrcweir typedef ::cppu::WeakComponentImplHelper2< css::presentation::XSlideShowController, css::container::XIndexAccess > SlideshowImplBase;
177cdf0e10cSrcweir 
178cdf0e10cSrcweir class SlideshowImpl : private ::cppu::BaseMutex, public SlideshowImplBase
179cdf0e10cSrcweir {
180cdf0e10cSrcweir friend class SlideShow;
181cdf0e10cSrcweir friend class SlideShowView;
182cdf0e10cSrcweir 
183cdf0e10cSrcweir public:
184cdf0e10cSrcweir     explicit SlideshowImpl( const css::uno::Reference< css::presentation::XPresentation2 >& xPresentation, ViewShell* pViewSh, ::sd::View* pView, SdDrawDocument* pDoc, ::Window* pParentWindow);
185cdf0e10cSrcweir 
186cdf0e10cSrcweir     // css::presentation::XSlideShowController:
187cdf0e10cSrcweir     virtual ::sal_Bool SAL_CALL getAlwaysOnTop() throw (css::uno::RuntimeException);
188cdf0e10cSrcweir     virtual void SAL_CALL setAlwaysOnTop( ::sal_Bool _alwaysontop ) throw (css::uno::RuntimeException);
189cdf0e10cSrcweir     virtual ::sal_Bool SAL_CALL getMouseVisible() throw (css::uno::RuntimeException);
190cdf0e10cSrcweir     virtual void SAL_CALL setMouseVisible( ::sal_Bool _mousevisible ) throw (css::uno::RuntimeException);
191cdf0e10cSrcweir     virtual ::sal_Bool SAL_CALL getUsePen() throw (css::uno::RuntimeException);
192cdf0e10cSrcweir     virtual void SAL_CALL setUsePen( ::sal_Bool _usepen ) throw (css::uno::RuntimeException);
193cdf0e10cSrcweir     virtual ::sal_Int32 SAL_CALL getPenColor() throw (css::uno::RuntimeException);
194cdf0e10cSrcweir     virtual void SAL_CALL setPenColor( ::sal_Int32 _pencolor ) throw (css::uno::RuntimeException);
195cdf0e10cSrcweir     virtual void SAL_CALL setUseEraser( ::sal_Bool _usepen ) throw (css::uno::RuntimeException);
196cdf0e10cSrcweir     virtual double SAL_CALL getPenWidth() throw (css::uno::RuntimeException);
197cdf0e10cSrcweir     virtual void SAL_CALL setPenWidth( double dStrokeWidth ) throw (css::uno::RuntimeException);
198cdf0e10cSrcweir     virtual void SAL_CALL setEraseAllInk( bool bEraseAllInk ) throw (css::uno::RuntimeException);
199cdf0e10cSrcweir     virtual void SAL_CALL setEraseInk( sal_Int32 nEraseInkSize ) throw (css::uno::RuntimeException);
200cdf0e10cSrcweir     virtual void SAL_CALL setPenMode( bool bSwitchPenMode) throw (css::uno::RuntimeException);
201cdf0e10cSrcweir     virtual void SAL_CALL setEraserMode( bool bSwitchEraserMode ) throw (css::uno::RuntimeException);
202cdf0e10cSrcweir     virtual ::sal_Bool SAL_CALL isRunning(  ) throw (css::uno::RuntimeException);
203cdf0e10cSrcweir     virtual ::sal_Int32 SAL_CALL getSlideCount(  ) throw (css::uno::RuntimeException);
204cdf0e10cSrcweir     virtual css::uno::Reference< css::drawing::XDrawPage > SAL_CALL getSlideByIndex( ::sal_Int32 Index ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException);
205cdf0e10cSrcweir     virtual void SAL_CALL addSlideShowListener( const css::uno::Reference< css::presentation::XSlideShowListener >& Listener ) throw (css::uno::RuntimeException);
206cdf0e10cSrcweir     virtual void SAL_CALL removeSlideShowListener( const css::uno::Reference< css::presentation::XSlideShowListener >& Listener ) throw (css::uno::RuntimeException);
207cdf0e10cSrcweir     virtual void SAL_CALL gotoNextEffect(  ) throw (css::uno::RuntimeException);
208cdf0e10cSrcweir     virtual void SAL_CALL gotoPreviousEffect(  ) throw (css::uno::RuntimeException);
209cdf0e10cSrcweir     virtual void SAL_CALL gotoFirstSlide(  ) throw (css::uno::RuntimeException);
210cdf0e10cSrcweir     virtual void SAL_CALL gotoNextSlide(  ) throw (css::uno::RuntimeException);
211cdf0e10cSrcweir     virtual void SAL_CALL gotoPreviousSlide(  ) throw (css::uno::RuntimeException);
212cdf0e10cSrcweir     virtual void SAL_CALL gotoLastSlide(  ) throw (css::uno::RuntimeException);
213cdf0e10cSrcweir     virtual void SAL_CALL gotoBookmark( const ::rtl::OUString& Bookmark ) throw (css::uno::RuntimeException);
214cdf0e10cSrcweir     virtual void SAL_CALL gotoSlide( const css::uno::Reference< css::drawing::XDrawPage >& Page ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException);
215cdf0e10cSrcweir     virtual void SAL_CALL gotoSlideIndex( ::sal_Int32 Index ) throw (css::uno::RuntimeException);
216cdf0e10cSrcweir     virtual void SAL_CALL stopSound(  ) throw (css::uno::RuntimeException);
217cdf0e10cSrcweir     virtual void SAL_CALL pause(  ) throw (css::uno::RuntimeException);
218cdf0e10cSrcweir     virtual void SAL_CALL resume(  ) throw (css::uno::RuntimeException);
219cdf0e10cSrcweir     virtual ::sal_Bool SAL_CALL isPaused(  ) throw (css::uno::RuntimeException);
220cdf0e10cSrcweir     virtual void SAL_CALL blankScreen( ::sal_Int32 Color ) throw (css::uno::RuntimeException);
221cdf0e10cSrcweir     virtual void SAL_CALL activate(  ) throw (css::uno::RuntimeException);
222cdf0e10cSrcweir     virtual void SAL_CALL deactivate(  ) throw (css::uno::RuntimeException);
223cdf0e10cSrcweir     virtual ::sal_Bool SAL_CALL isActive(  ) throw (css::uno::RuntimeException);
224cdf0e10cSrcweir     virtual css::uno::Reference< css::drawing::XDrawPage > SAL_CALL getCurrentSlide(  ) throw (css::uno::RuntimeException);
225cdf0e10cSrcweir     virtual ::sal_Int32 SAL_CALL getCurrentSlideIndex(  ) throw (css::uno::RuntimeException);
226cdf0e10cSrcweir     virtual ::sal_Int32 SAL_CALL getNextSlideIndex(  ) throw (css::uno::RuntimeException);
227cdf0e10cSrcweir     virtual ::sal_Bool SAL_CALL isEndless(  ) throw (css::uno::RuntimeException);
228cdf0e10cSrcweir     virtual ::sal_Bool SAL_CALL isFullScreen(  ) throw (css::uno::RuntimeException);
229cdf0e10cSrcweir     virtual css::uno::Reference< css::presentation::XSlideShow > SAL_CALL getSlideShow(  ) throw (css::uno::RuntimeException);
230cdf0e10cSrcweir 
231cdf0e10cSrcweir     // XIndexAccess
232cdf0e10cSrcweir     virtual ::sal_Int32 SAL_CALL getCount(  ) throw (::com::sun::star::uno::RuntimeException);
233cdf0e10cSrcweir     virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
234cdf0e10cSrcweir     virtual ::com::sun::star::uno::Type SAL_CALL getElementType(  ) throw (::com::sun::star::uno::RuntimeException);
235cdf0e10cSrcweir     virtual ::sal_Bool SAL_CALL hasElements(  ) throw (::com::sun::star::uno::RuntimeException);
236cdf0e10cSrcweir 
237cdf0e10cSrcweir     // will be called from the SlideShowListenerProxy when this event is fired from the XSlideShow
238cdf0e10cSrcweir     void slideEnded(const bool bReverse);
239cdf0e10cSrcweir     void hyperLinkClicked(const ::rtl::OUString & hyperLink) throw (css::uno::RuntimeException);
240cdf0e10cSrcweir     void click(const css::uno::Reference< css::drawing::XShape > & xShape, const css::awt::MouseEvent & aOriginalEvent);
241cdf0e10cSrcweir 
242*9d97e963Smseidel     // ends the presentation async
243cdf0e10cSrcweir     void endPresentation();
244cdf0e10cSrcweir 
getViewShell() const245cdf0e10cSrcweir     ViewShell* getViewShell() const { return mpViewShell; }
246cdf0e10cSrcweir 
247cdf0e10cSrcweir     void paint( const Rectangle& rRect );
248cdf0e10cSrcweir     bool keyInput(const KeyEvent& rKEvt);
249cdf0e10cSrcweir     void mouseButtonUp(const MouseEvent& rMEvt);
250cdf0e10cSrcweir 
251cdf0e10cSrcweir private:
252cdf0e10cSrcweir     SlideshowImpl(SlideshowImpl &); // not defined
253cdf0e10cSrcweir     void operator =(SlideshowImpl &); // not defined
254cdf0e10cSrcweir 
255cdf0e10cSrcweir     virtual ~SlideshowImpl();
256cdf0e10cSrcweir 
257cdf0e10cSrcweir     // overload WeakComponentImplHelperBase::disposing()
258cdf0e10cSrcweir     // This function is called upon disposing the component,
259cdf0e10cSrcweir     // if your component needs special work when it becomes
260cdf0e10cSrcweir     // disposed, do it here.
261cdf0e10cSrcweir     virtual void SAL_CALL disposing();
262cdf0e10cSrcweir 
263cdf0e10cSrcweir     // internal
264cdf0e10cSrcweir     bool startShow( PresentationSettingsEx* pPresSettings );
265cdf0e10cSrcweir     bool startPreview(
266cdf0e10cSrcweir         const css::uno::Reference< css::drawing::XDrawPage >& xDrawPage,
267cdf0e10cSrcweir         const css::uno::Reference< css::animations::XAnimationNode >& xAnimationNode,
268cdf0e10cSrcweir         ::Window* pParent );
269cdf0e10cSrcweir 
getShowWindow() const270cdf0e10cSrcweir     ShowWindow* getShowWindow() const { return mpShowWindow; }
271cdf0e10cSrcweir 
272cdf0e10cSrcweir         /** forces an async call to update in the main thread */
273cdf0e10cSrcweir     void startUpdateTimer();
274cdf0e10cSrcweir 
275cdf0e10cSrcweir     double update();
276cdf0e10cSrcweir 
277cdf0e10cSrcweir     void createSlideList( bool bAll, bool bStartWithActualSlide, const String& rPresSlide );
278cdf0e10cSrcweir 
279cdf0e10cSrcweir     void displayCurrentSlide (const bool bSkipAllMainSequenceEffects = false);
280cdf0e10cSrcweir 
281cdf0e10cSrcweir     void displaySlideNumber( sal_Int32 nSlide );
282cdf0e10cSrcweir     void displaySlideIndex( sal_Int32 nIndex );
283cdf0e10cSrcweir     sal_Int32 getCurrentSlideNumber();
284cdf0e10cSrcweir     sal_Int32 getFirstSlideNumber();
285cdf0e10cSrcweir     sal_Int32 getLastSlideNumber();
isInputFreezed() const286cdf0e10cSrcweir     inline bool isInputFreezed() const { return mbInputFreeze; }
287cdf0e10cSrcweir 
288cdf0e10cSrcweir     void jumpToBookmark( const String& sBookmark );
289cdf0e10cSrcweir 
290cdf0e10cSrcweir     void hideChildWindows();
291cdf0e10cSrcweir     void showChildWindows();
292cdf0e10cSrcweir 
293cdf0e10cSrcweir     void resize( const Size& rSize );
294cdf0e10cSrcweir 
295cdf0e10cSrcweir     void setActiveXToolbarsVisible( sal_Bool bVisible );
296cdf0e10cSrcweir 
297cdf0e10cSrcweir     DECL_LINK( updateHdl, Timer* );
298cdf0e10cSrcweir     DECL_LINK( PostYieldListener, void* );
299cdf0e10cSrcweir     DECL_LINK( ReadyForNextInputHdl, Timer* );
300cdf0e10cSrcweir     DECL_LINK( endPresentationHdl, void* );
301cdf0e10cSrcweir     DECL_LINK( ContextMenuSelectHdl, Menu * );
302cdf0e10cSrcweir     DECL_LINK( ContextMenuHdl, void* );
303cdf0e10cSrcweir     DECL_LINK( deactivateHdl, Timer* );
304cdf0e10cSrcweir     DECL_LINK( EventListenerHdl, VclSimpleEvent* );
305cdf0e10cSrcweir 
306cdf0e10cSrcweir     // helper
307cdf0e10cSrcweir     void receiveRequest(SfxRequest& rReq);
308cdf0e10cSrcweir 
309cdf0e10cSrcweir     /** called only by the slideshow view when the first paint event occurs.
310cdf0e10cSrcweir         This actually starts the slideshow. */
311cdf0e10cSrcweir     void onFirstPaint();
312cdf0e10cSrcweir 
getRestoreSlide() const313cdf0e10cSrcweir     long getRestoreSlide() const { return mnRestoreSlide; }
314cdf0e10cSrcweir 
315cdf0e10cSrcweir private:
316cdf0e10cSrcweir     bool startShowImpl(
317cdf0e10cSrcweir         const css::uno::Sequence< css::beans::PropertyValue >& aProperties );
318cdf0e10cSrcweir 
319cdf0e10cSrcweir     SfxViewFrame* getViewFrame() const;
320cdf0e10cSrcweir     SfxDispatcher* getDispatcher() const;
321cdf0e10cSrcweir     SfxBindings* getBindings() const;
322cdf0e10cSrcweir 
323cdf0e10cSrcweir     sal_Int32 getSlideNumberForBookmark( const rtl::OUString& rStrBookmark );
324cdf0e10cSrcweir 
325cdf0e10cSrcweir     void removeShapeEvents();
326cdf0e10cSrcweir     void registerShapeEvents( sal_Int32 nSlideNumber );
327cdf0e10cSrcweir     void registerShapeEvents( css::uno::Reference< css::drawing::XShapes >& xShapes ) throw (css::uno::Exception);
328cdf0e10cSrcweir 
329cdf0e10cSrcweir     css::uno::Reference< css::presentation::XSlideShow > createSlideShow() const;
330cdf0e10cSrcweir 
331cdf0e10cSrcweir     void setAutoSaveState( bool bOn );
332cdf0e10cSrcweir     void gotoPreviousSlide (const bool bSkipAllMainSequenceEffects);
333cdf0e10cSrcweir 
334cdf0e10cSrcweir     /** Called by PostYieldListener and updateHdl handlers this method is
335cdf0e10cSrcweir         responsible to call the slideshow update() method and, depending on
336cdf0e10cSrcweir         its return value, wait for a certain amount of time before another
337cdf0e10cSrcweir         call to update() is scheduled.
338cdf0e10cSrcweir     */
339cdf0e10cSrcweir     sal_Int32 updateSlideShow (void);
340cdf0e10cSrcweir 
341cdf0e10cSrcweir     css::uno::Reference< css::presentation::XSlideShow > mxShow;
342cdf0e10cSrcweir     comphelper::ImplementationReference< ::sd::SlideShowView, css::presentation::XSlideShowView > mxView;
343cdf0e10cSrcweir     css::uno::Reference< css::frame::XModel > mxModel;
344cdf0e10cSrcweir 
345cdf0e10cSrcweir     Timer maUpdateTimer;
346cdf0e10cSrcweir     Timer maInputFreezeTimer;
347cdf0e10cSrcweir     Timer maDeactivateTimer;
348cdf0e10cSrcweir 
349cdf0e10cSrcweir     ::sd::View* mpView;
350cdf0e10cSrcweir     ViewShell* mpViewShell;
351cdf0e10cSrcweir     DrawDocShell* mpDocSh;
352cdf0e10cSrcweir     SdDrawDocument* mpDoc;
353cdf0e10cSrcweir 
354cdf0e10cSrcweir     SfxItemSet*     mpNewAttr;
355cdf0e10cSrcweir     ::Window*       mpParentWindow;
356cdf0e10cSrcweir     ShowWindow*     mpShowWindow;
357cdf0e10cSrcweir     PushButton*     mpTimeButton;
358cdf0e10cSrcweir 
359cdf0e10cSrcweir     boost::shared_ptr< AnimationSlideController > mpSlideController;
360cdf0e10cSrcweir 
361cdf0e10cSrcweir     long            mnRestoreSlide;
362cdf0e10cSrcweir     Point           maSlideOrigin;
363cdf0e10cSrcweir     Point           maPopupMousePos;
364cdf0e10cSrcweir     Size            maSlideSize;
365cdf0e10cSrcweir     Size            maPresSize;
366cdf0e10cSrcweir     AnimationMode   meAnimationMode;
367cdf0e10cSrcweir     String          maCharBuffer;
368cdf0e10cSrcweir     Pointer         maOldPointer;
369cdf0e10cSrcweir     Pointer         maPencil;
370cdf0e10cSrcweir     std::vector< ::sd::Window* > maDrawModeWindows;
371cdf0e10cSrcweir     ::sd::Window*   mpOldActiveWindow;
372cdf0e10cSrcweir     Link            maStarBASICGlobalErrorHdl;
373cdf0e10cSrcweir     unsigned long   mnChildMask;
374cdf0e10cSrcweir     bool            mbGridVisible;
375cdf0e10cSrcweir     bool            mbBordVisible;
376cdf0e10cSrcweir     bool            mbSlideBorderVisible;
377cdf0e10cSrcweir     bool            mbSetOnlineSpelling;
378cdf0e10cSrcweir     bool            mbDisposed;
379cdf0e10cSrcweir     bool            mbMouseIsDrawing;
380cdf0e10cSrcweir     bool            mbAutoSaveWasOn;
381cdf0e10cSrcweir     bool            mbRehearseTimings;
382cdf0e10cSrcweir     bool            mbDesignMode;
383cdf0e10cSrcweir     bool            mbIsPaused;
384cdf0e10cSrcweir     bool            mbWasPaused; // used to cache pause state during context menu
385cdf0e10cSrcweir     bool            mbInputFreeze;
386cdf0e10cSrcweir     sal_Bool        mbActive;
387cdf0e10cSrcweir 
388cdf0e10cSrcweir     PresentationSettings maPresSettings;
389cdf0e10cSrcweir     sal_Int32       mnUserPaintColor;
390cdf0e10cSrcweir 
391cdf0e10cSrcweir     bool            mbUsePen;
392cdf0e10cSrcweir     double          mdUserPaintStrokeWidth;
393cdf0e10cSrcweir 
394*9d97e963Smseidel     // used in updateHdl to prevent recursive calls
395cdf0e10cSrcweir     sal_Int32       mnEntryCounter;
396cdf0e10cSrcweir 
397cdf0e10cSrcweir     sal_Int32       mnLastSlideNumber;
398cdf0e10cSrcweir     WrappedShapeEventImplMap    maShapeEventMap;
399cdf0e10cSrcweir 
400cdf0e10cSrcweir     ::rtl::OUString msOnClick;
401cdf0e10cSrcweir     ::rtl::OUString msBookmark;
402cdf0e10cSrcweir     ::rtl::OUString msVerb;
403cdf0e10cSrcweir 
404cdf0e10cSrcweir     css::uno::Reference< css::drawing::XDrawPage > mxPreviewDrawPage;
405cdf0e10cSrcweir     css::uno::Reference< css::animations::XAnimationNode > mxPreviewAnimationNode;
406cdf0e10cSrcweir 
407cdf0e10cSrcweir     css::uno::Reference< css::media::XPlayer > mxPlayer;
408cdf0e10cSrcweir 
409cdf0e10cSrcweir     ::std::auto_ptr<PaneHider> mpPaneHider;
410cdf0e10cSrcweir 
411cdf0e10cSrcweir     sal_uLong   mnEndShowEvent;
412cdf0e10cSrcweir     sal_uLong   mnContextMenuEvent;
413cdf0e10cSrcweir     sal_Int32 mnUpdateEvent;
414cdf0e10cSrcweir 
415cdf0e10cSrcweir     css::uno::Reference< css::presentation::XPresentation2 > mxPresentation;
416cdf0e10cSrcweir     ::rtl::Reference< SlideShowListenerProxy > mxListenerProxy;
417cdf0e10cSrcweir };
418cdf0e10cSrcweir 
419cdf0e10cSrcweir } // namespace ::sd
420cdf0e10cSrcweir 
421cdf0e10cSrcweir #endif
422*9d97e963Smseidel 
423*9d97e963Smseidel /* vim: set noet sw=4 ts=4: */
424