Update ooo320-m1
[ooovba.git] / slideshow / source / engine / slide / slideanimations.hxx
blob8fa4339133fae1cd0fc29b0ef4441e6fffc0ccfb
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: slideanimations.hxx,v $
10 * $Revision: 1.3 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef INCLUDED_SLIDESHOW_SLIDEANIMATIONS_HXX
32 #define INCLUDED_SLIDESHOW_SLIDEANIMATIONS_HXX
34 #include <com/sun/star/uno/Reference.hxx>
35 #include <com/sun/star/uno/XComponentContext.hpp>
36 #include <basegfx/vector/b2dvector.hxx>
38 #include "event.hxx"
39 #include "slideshowcontext.hxx"
40 #include "subsettableshapemanager.hxx"
41 #include "animationnode.hxx"
43 namespace com { namespace sun { namespace star { namespace animations
45 class XAnimationNode;
46 } } } }
49 /* Definition of SlideAnimations class */
51 namespace slideshow
53 namespace internal
55 /** This class generates and manages all animations of a slide.
57 Provided with the root animation node, this class imports
58 the effect information and builds the event tree for all
59 of the slide's animations.
61 class SlideAnimations
63 public:
64 /** Create an animation generator.
66 @param rContext
67 Slide show context, passing on common parameters
69 SlideAnimations( const SlideShowContext& rContext,
70 const ::basegfx::B2DVector& rSlideSize );
71 ~SlideAnimations();
73 /** Import animations from a SMIL root animation node.
75 This method might take some time, depending on the
76 complexity of the SMIL animation network to be
77 imported.
79 @param xRootAnimationNode
80 Root animation node for the effects to be
81 generated. This is typically obtained from the
82 XDrawPage's XAnimationNodeSupplier.
85 bool importAnimations( const ::com::sun::star::uno::Reference<
86 ::com::sun::star::animations::XAnimationNode >& xRootAnimationNode );
88 /** Check, whether imported animations actually contain
89 any effects.
91 @return true, if there are actual animations in the
92 imported node tree.
94 bool isAnimated() const;
96 /** Start the animations.
98 This method creates the network of events and
99 activities for all animations. The events and
100 activities are inserted into the constructor-provided
101 queues. These queues are not explicitely cleared, if
102 you rely on this object's effects to run without
103 interference, you should clear the queues by yourself.
105 @return true, if all events have been successfully
106 created.
108 bool start();
110 /** End all animations.
112 This method force-ends all animations. If a slide end
113 event has been registered, that is fired, too.
115 void end();
117 /// Release all references. Does not notify anything.
118 void dispose();
120 private:
121 SlideShowContext maContext;
122 const basegfx::B2DVector maSlideSize;
123 AnimationNodeSharedPtr mpRootNode;
128 #endif /* INCLUDED_SLIDESHOW_SLIDEANIMATIONS_HXX */