LibreOffice Module slideshow (master) 1
activitiesfactory.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#ifndef INCLUDED_SLIDESHOW_SOURCE_INC_ACTIVITIESFACTORY_HXX
21#define INCLUDED_SLIDESHOW_SOURCE_INC_ACTIVITIESFACTORY_HXX
22
23#include <com/sun/star/animations/XAnimate.hpp>
24#include <com/sun/star/animations/XAnimateColor.hpp>
25
26#include "animationactivity.hxx"
27#include "activitiesqueue.hxx"
28#include "event.hxx"
29#include "eventqueue.hxx"
30#include "shape.hxx"
31#include "numberanimation.hxx"
32#include "enumanimation.hxx"
33#include "coloranimation.hxx"
34#include "hslcoloranimation.hxx"
35#include "stringanimation.hxx"
36#include "boolanimation.hxx"
37#include "pairanimation.hxx"
38
39#include <optional>
40#include <utility>
41
42/* Definition of ActivitiesFactory class */
43
45{
48 {
50 EventSharedPtr xEndEvent,
51 EventQueue& rEventQueue,
52 ActivitiesQueue& rActivitiesQueue,
53 double nMinDuration,
54 sal_uInt32 nMinNumberOfFrames,
55 bool bAutoReverse,
56 ::std::optional<double> const& aRepeats,
57 double nAcceleration,
58 double nDeceleration,
59 ShapeSharedPtr xShape,
60 const ::basegfx::B2DVector& rSlideBounds )
61 : mpEndEvent(std::move( xEndEvent )),
62 mrEventQueue( rEventQueue ),
63 mrActivitiesQueue( rActivitiesQueue ),
64 mnMinDuration( nMinDuration ),
65 mnMinNumberOfFrames( nMinNumberOfFrames ),
66 maRepeats( aRepeats ),
67 mnAcceleration( nAcceleration ),
68 mnDeceleration( nDeceleration ),
69 mpShape(std::move( xShape )),
70 maSlideBounds( rSlideBounds ),
71 mbAutoReverse( bAutoReverse ) {}
72
75
80
92
102
111 ::std::optional<double> const maRepeats;
112
115
118
121
124
127 };
128
147 const CommonParameters& rParms,
148 const NumberAnimationSharedPtr& rAnimator,
149 const css::uno::Reference< css::animations::XAnimate >& xNode );
150
169 const CommonParameters& rParms,
170 const EnumAnimationSharedPtr& rAnimator,
171 const css::uno::Reference< css::animations::XAnimate >& xNode );
172
191 const CommonParameters& rParms,
192 const ColorAnimationSharedPtr& rAnimator,
193 const css::uno::Reference< css::animations::XAnimate >& xNode );
194
213 const CommonParameters& rParms,
214 const HSLColorAnimationSharedPtr& rAnimator,
215 const css::uno::Reference< css::animations::XAnimateColor >& xNode );
216
235 const CommonParameters& rParms,
236 const PairAnimationSharedPtr& rAnimator,
237 const css::uno::Reference< css::animations::XAnimate >& xNode );
238
257 const CommonParameters& rParms,
258 const StringAnimationSharedPtr& rAnimator,
259 const css::uno::Reference< css::animations::XAnimate >& xNode );
260
279 const CommonParameters& rParms,
280 const BoolAnimationSharedPtr& rAnimator,
281 const css::uno::Reference< css::animations::XAnimate >& xNode );
282
301 const CommonParameters& rParms,
302 const NumberAnimationSharedPtr& rAnimator,
303 bool bDirectionForward );
304
305} // namespace presentation::internal
306
307#endif // INCLUDED_SLIDESHOW_SOURCE_INC_ACTIVITIESFACTORY_HXX
308
309/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
This class handles the XSprite updates needed for animations, such as moves, scales etc.
This class handles events in a presentation.
Definition: eventqueue.hxx:41
AnimationActivitySharedPtr createAnimateActivity(const CommonParameters &rParms, const NumberAnimationSharedPtr &rAnimator, const css::uno::Reference< css::animations::XAnimate > &xNode)
Create an activity from an XAnimate node.
AnimationActivitySharedPtr createSimpleActivity(const CommonParameters &rParms, const NumberAnimationSharedPtr &rAnimator, bool bDirectionForward)
Create a simple activity for the given animator.
::std::shared_ptr< NumberAnimation > NumberAnimationSharedPtr
::std::shared_ptr< AnimationActivity > AnimationActivitySharedPtr
::std::shared_ptr< HSLColorAnimation > HSLColorAnimationSharedPtr
::std::shared_ptr< PairAnimation > PairAnimationSharedPtr
::std::shared_ptr< BoolAnimation > BoolAnimationSharedPtr
::std::shared_ptr< Event > EventSharedPtr
Definition: event.hxx:76
::std::shared_ptr< EnumAnimation > EnumAnimationSharedPtr
::std::shared_ptr< StringAnimation > StringAnimationSharedPtr
::std::shared_ptr< Shape > ShapeSharedPtr
::std::shared_ptr< ColorAnimation > ColorAnimationSharedPtr
EventQueue & mrEventQueue
Event queue to insert the end event into.
bool mbAutoReverse
When true, activity is played reversed after mnDuration.
::std::optional< double > const maRepeats
Number of repeats for the simple duration.
sal_uInt32 mnMinNumberOfFrames
Minimal number of frames for this activity.
ActivitiesQueue & mrActivitiesQueue
Event queue to insert the end event into.
EventSharedPtr mpEndEvent
End event to fire when animation is over.
ShapeSharedPtr mpShape
Shape, to get bounds from.
double mnDeceleration
Fraction of simple time to decelerate animation.
double mnAcceleration
Fraction of simple time to accelerate animation.
::basegfx::B2DVector maSlideBounds
LayerManager, to get page size from.
CommonParameters(EventSharedPtr xEndEvent, EventQueue &rEventQueue, ActivitiesQueue &rActivitiesQueue, double nMinDuration, sal_uInt32 nMinNumberOfFrames, bool bAutoReverse, ::std::optional< double > const &aRepeats, double nAcceleration, double nDeceleration, ShapeSharedPtr xShape, const ::basegfx::B2DVector &rSlideBounds)
double mnMinDuration
Simple duration of the activity.