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: transitionfactory.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_TRANSITIONFACTORY_HXX
32 #define INCLUDED_SLIDESHOW_TRANSITIONFACTORY_HXX
34 #include <com/sun/star/animations/XTransitionFilter.hpp>
35 #include <com/sun/star/presentation/XTransitionFactory.hpp>
37 #include "animatableshape.hxx"
38 #include "rgbcolor.hxx"
40 #include "screenupdater.hxx"
41 #include "animationactivity.hxx"
42 #include "activitiesfactory.hxx"
43 #include "numberanimation.hxx"
44 #include "transitioninfo.hxx"
45 #include "soundplayer.hxx"
47 #include <boost/utility.hpp>
53 /* Definition of Transitionfactory class */
54 class TransitionFactory
: private boost::noncopyable
57 /** Create a transition effect for shapes.
59 This method creates an AnimationActivity, which, when
60 run, performs the requested transition effect on the
64 Collection of activity parameters, see ActivitiesFactory
70 ShapeManager, to manage shape animation
75 @return the created activity, or NULL for no
78 static AnimationActivitySharedPtr
createShapeTransition(
79 const ActivitiesFactory::CommonParameters
& rParms
,
80 const AnimatableShapeSharedPtr
& rShape
,
81 const ShapeManagerSharedPtr
& rShapeManager
,
82 const ::basegfx::B2DVector
& rSlideSize
,
83 ::com::sun::star::uno::Reference
<
84 ::com::sun::star::animations::XTransitionFilter
> const& xTransition
);
87 /** Create a transition effect for slides.
89 This method creates a NumberAnimation, which,
90 when run, performs the requested transition effect
91 with the slide bitmaps.
93 @param rEnteringBitmap
94 Bitmap of the slide which 'enters' the screen.
97 Bitmap of the slide which 'leaves' the screen.
99 @param nTransitionType
100 Type of the transition (see XTransitionFilter)
102 @param nTransitionSubType
103 Subtype of the transition (see XTransitionFilter)
105 @param bTransitionDirection
106 Direction of the transition (see XTransitionFilter)
108 @param rTransitionFadeColor
109 Optional fade color for the transition
111 @return the created animation, or NULL for no
114 static NumberAnimationSharedPtr
createSlideTransition(
115 const SlideSharedPtr
& rLeavingSlide
,
116 const SlideSharedPtr
& rEnteringSlide
,
117 const UnoViewContainer
& rViewContainer
,
118 ScreenUpdater
& rScreenUpdater
,
119 EventMultiplexer
& rEventMultiplexer
,
120 const com::sun::star::uno::Reference
<
121 com::sun::star::presentation::XTransitionFactory
>&
123 sal_Int16 nTransitionType
,
124 sal_Int16 nTransitionSubType
,
125 bool bTransitionDirection
,
126 const RGBColor
& rTransitionFadeColor
,
127 const SoundPlayerSharedPtr
& rSoundPlayer
);
130 static const TransitionInfo
* getTransitionInfo(
131 sal_Int16 nTransitionType
, sal_Int16 nTransitionSubType
);
132 static const TransitionInfo
* getRandomTransitionInfo();
134 static AnimationActivitySharedPtr
createShapeTransition(
135 const ActivitiesFactory::CommonParameters
& rParms
,
136 const AnimatableShapeSharedPtr
& rShape
,
137 const ShapeManagerSharedPtr
& rShapeManager
,
138 const ::basegfx::B2DVector
& rSlideSize
,
139 ::com::sun::star::uno::Reference
<
140 ::com::sun::star::animations::XTransitionFilter
> const& xTransition
,
141 sal_Int16 nTransitionType
,
142 sal_Int16 nTransitionSubType
);
146 ~TransitionFactory();
151 #endif /* INCLUDED_SLIDESHOW_TRANSITIONFACTORY_HXX */