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: animationbasenode.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 ************************************************************************/
30 #ifndef INCLUDED_SLIDESHOW_ANIMATIONBASENODE_HXX
31 #define INCLUDED_SLIDESHOW_ANIMATIONBASENODE_HXX
33 #include <com/sun/star/animations/XAnimate.hpp>
35 #include "basecontainernode.hxx"
36 #include "activitiesfactory.hxx"
37 #include "shapeattributelayer.hxx"
38 #include "shapeattributelayerholder.hxx"
39 #include "attributableshape.hxx"
40 #include "shapesubset.hxx"
45 /** Common base class for all leaf animation nodes.
47 This class basically holds the target shape
49 class AnimationBaseNode
: public BaseNode
53 ::com::sun::star::uno::Reference
<
54 ::com::sun::star::animations::XAnimationNode
> const& xNode
,
55 ::boost::shared_ptr
<BaseContainerNode
> const& pParent
,
56 NodeContext
const& rContext
);
58 #if defined(VERBOSE) && defined(DBG_UTIL)
59 virtual void showState() const;
63 virtual void dispose();
65 ::com::sun::star::uno::Reference
<
66 ::com::sun::star::animations::XAnimate
> const& getXAnimateNode() const
67 { return mxAnimateNode
; }
69 /// Create parameter struct for ActivitiesFactory
70 ActivitiesFactory::CommonParameters
fillCommonParameters() const;
71 ::basegfx::B2DVector
const& getSlideSize() const { return maSlideSize
; }
72 AttributableShapeSharedPtr
getShape() const;
75 virtual bool hasPendingAnimation() const;
77 private: // state transition callbacks
78 virtual bool init_st();
79 virtual bool resolve_st();
80 virtual void activate_st();
81 virtual void deactivate_st( NodeState eDestState
);
82 virtual AnimationActivitySharedPtr
createActivity() const = 0;
85 /** Returns true, if this is a subset animation, and
86 the subset is autogenerated (e.g. from an
89 bool isDependentSubsettedShape() const
90 { return mpShapeSubset
&& !mbIsIndependentSubset
; }
92 ShapeAttributeLayerHolder
const & getAttributeLayerHolder() const
93 { return maAttributeLayerHolder
; }
96 ::com::sun::star::uno::Reference
<
97 ::com::sun::star::animations::XAnimate
> mxAnimateNode
;
98 ShapeAttributeLayerHolder maAttributeLayerHolder
;
99 ::basegfx::B2DVector maSlideSize
;
100 AnimationActivitySharedPtr mpActivity
;
102 /// When valid, this node has a plain target shape
103 AttributableShapeSharedPtr mpShape
;
104 /// When valid, this is a subsetted target shape
105 ShapeSubsetSharedPtr mpShapeSubset
;
106 SubsettableShapeManagerSharedPtr mpSubsetManager
;
107 bool mbIsIndependentSubset
;
110 } // namespace internal
111 } // namespace presentation
113 #endif /* INCLUDED_SLIDESHOW_ANIMATIONBASENODE_HXX */