1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: animation.hxx,v $
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_ANIMATION_HXX
32 #define INCLUDED_SLIDESHOW_ANIMATION_HXX
34 #include <animatableshape.hxx>
35 #include <shapeattributelayer.hxx>
38 /* Definition of Animation interface */
44 /** Interface defining a generic animation.
46 This interface is used by objects implementing the
47 Activity interface to drive the animation effect. Objects
48 implementing this interface will receive time-varying
49 animation values, which they can forward to the
50 appropriate attributes. The type of these animation values
51 is given in derived interfaces.
60 virtual ~Animation() {}
62 /** Notify that the animation going active soon.
64 Implementers should preload any buffers, and create
65 any expensive objects at this time.
68 Shape to apply this animation to.
71 Attribute layer to play the animation on.
73 virtual void prefetch( const AnimatableShapeSharedPtr
& rShape
,
74 const ShapeAttributeLayerSharedPtr
& rAttrLayer
) = 0;
76 /** Notify that the animation is about to begin.
78 Implementers are free to start accompanying effects,
79 such as sounds, and the animation timer now.
82 Shape to apply this animation to.
85 Attribute layer to play the animation on.
87 virtual void start( const AnimatableShapeSharedPtr
& rShape
,
88 const ShapeAttributeLayerSharedPtr
& rAttrLayer
) = 0;
90 /** Notify that the animation is about to end.
92 virtual void end() = 0;
95 typedef ::boost::shared_ptr
< Animation
> AnimationSharedPtr
;
100 #endif /* INCLUDED_SLIDESHOW_ANIMATION_HXX */