1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_SLIDESHOW_TRANSITIONFACTORY_HXX
21 #define INCLUDED_SLIDESHOW_TRANSITIONFACTORY_HXX
23 #include <com/sun/star/animations/XTransitionFilter.hpp>
24 #include <com/sun/star/presentation/XTransitionFactory.hpp>
26 #include "animatableshape.hxx"
27 #include "rgbcolor.hxx"
29 #include "screenupdater.hxx"
30 #include "animationactivity.hxx"
31 #include "activitiesfactory.hxx"
32 #include "numberanimation.hxx"
33 #include "transitioninfo.hxx"
34 #include "soundplayer.hxx"
36 #include <boost/utility.hpp>
42 /* Definition of Transitionfactory class */
43 class TransitionFactory
: private boost::noncopyable
46 /** Create a transition effect for shapes.
48 This method creates an AnimationActivity, which, when
49 run, performs the requested transition effect on the
53 Collection of activity parameters, see ActivitiesFactory
59 ShapeManager, to manage shape animation
64 @return the created activity, or NULL for no
67 static AnimationActivitySharedPtr
createShapeTransition(
68 const ActivitiesFactory::CommonParameters
& rParms
,
69 const AnimatableShapeSharedPtr
& rShape
,
70 const ShapeManagerSharedPtr
& rShapeManager
,
71 const ::basegfx::B2DVector
& rSlideSize
,
72 ::com::sun::star::uno::Reference
<
73 ::com::sun::star::animations::XTransitionFilter
> const& xTransition
);
76 /** Create a transition effect for slides.
78 This method creates a NumberAnimation, which,
79 when run, performs the requested transition effect
80 with the slide bitmaps.
82 @param rEnteringBitmap
83 Bitmap of the slide which 'enters' the screen.
86 Bitmap of the slide which 'leaves' the screen.
88 @param nTransitionType
89 Type of the transition (see XTransitionFilter)
91 @param nTransitionSubType
92 Subtype of the transition (see XTransitionFilter)
94 @param bTransitionDirection
95 Direction of the transition (see XTransitionFilter)
97 @param rTransitionFadeColor
98 Optional fade color for the transition
100 @return the created animation, or NULL for no
103 static NumberAnimationSharedPtr
createSlideTransition(
104 const SlideSharedPtr
& rLeavingSlide
,
105 const SlideSharedPtr
& rEnteringSlide
,
106 const UnoViewContainer
& rViewContainer
,
107 ScreenUpdater
& rScreenUpdater
,
108 EventMultiplexer
& rEventMultiplexer
,
109 const com::sun::star::uno::Reference
<
110 com::sun::star::presentation::XTransitionFactory
>&
112 sal_Int16 nTransitionType
,
113 sal_Int16 nTransitionSubType
,
114 bool bTransitionDirection
,
115 const RGBColor
& rTransitionFadeColor
,
116 const SoundPlayerSharedPtr
& rSoundPlayer
);
119 static const TransitionInfo
* getTransitionInfo(
120 sal_Int16 nTransitionType
, sal_Int16 nTransitionSubType
);
121 static const TransitionInfo
* getRandomTransitionInfo();
123 static AnimationActivitySharedPtr
createShapeTransition(
124 const ActivitiesFactory::CommonParameters
& rParms
,
125 const AnimatableShapeSharedPtr
& rShape
,
126 const ShapeManagerSharedPtr
& rShapeManager
,
127 const ::basegfx::B2DVector
& rSlideSize
,
128 ::com::sun::star::uno::Reference
<
129 ::com::sun::star::animations::XTransitionFilter
> const& xTransition
,
130 sal_Int16 nTransitionType
,
131 sal_Int16 nTransitionSubType
);
135 ~TransitionFactory();
140 #endif /* INCLUDED_SLIDESHOW_TRANSITIONFACTORY_HXX */
142 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */