LibreOffice Module slideshow (master) 1
activityparameters.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_ENGINE_ACTIVITIES_ACTIVITYPARAMETERS_HXX
21#define INCLUDED_SLIDESHOW_SOURCE_ENGINE_ACTIVITIES_ACTIVITYPARAMETERS_HXX
22
23#include <event.hxx>
24#include <eventqueue.hxx>
25#include <expressionnode.hxx>
26#include <wakeupevent.hxx>
27
28#include <optional>
29#include <vector>
30
31namespace slideshow::internal {
32
39{
78 const EventSharedPtr& rEndEvent,
79 EventQueue& rEventQueue,
80 ActivitiesQueue& rActivitiesQueue,
81 double nMinDuration,
82 ::std::optional<double> const& rRepeats,
83 double nAccelerationFraction,
84 double nDecelerationFraction,
85 sal_uInt32 nMinNumberOfFrames,
86 bool bAutoReverse )
87 : mrEndEvent( rEndEvent ),
89 mrEventQueue( rEventQueue ),
90 mrActivitiesQueue( rActivitiesQueue ),
91 mpFormula(),
93 mnMinDuration( nMinDuration ),
94 mrRepeats( rRepeats ),
95 mnAccelerationFraction( nAccelerationFraction ),
96 mnDecelerationFraction( nDecelerationFraction ),
97 mnMinNumberOfFrames( nMinNumberOfFrames ),
98 mbAutoReverse( bAutoReverse ) {}
99
104
107
110
112 std::shared_ptr<ExpressionNode> mpFormula;
113
115 ::std::vector< double > maDiscreteTimes;
116
118 const double mnMinDuration;
119 ::std::optional<double> const& mrRepeats;
122
124 const sal_uInt32 mnMinNumberOfFrames;
125
127 const bool mbAutoReverse;
128};
129
130} // namespace presentation::internal
131
132#endif // INCLUDED_SLIDESHOW_SOURCE_ENGINE_ACTIVITIES_ACTIVITYPARAMETERS_HXX
133
134/* 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
::std::shared_ptr< Event > EventSharedPtr
Definition: event.hxx:76
::std::shared_ptr< WakeupEvent > WakeupEventSharedPtr
Definition: wakeupevent.hxx:77
Parameter struct for animation activities.
ActivitiesQueue & mrActivitiesQueue
ActivitiesQueue to add events to.
const double mnMinDuration
Total duration of activity (including all repeats)
::std::optional< double > const & mrRepeats
const EventSharedPtr & mrEndEvent
End event to fire, when activity is over.
::std::vector< double > maDiscreteTimes
Key times, for discrete and key time activities.
ActivityParameters(const EventSharedPtr &rEndEvent, EventQueue &rEventQueue, ActivitiesQueue &rActivitiesQueue, double nMinDuration, ::std::optional< double > const &rRepeats, double nAccelerationFraction, double nDecelerationFraction, sal_uInt32 nMinNumberOfFrames, bool bAutoReverse)
Create.
EventQueue & mrEventQueue
EventQueue to add events to.
WakeupEventSharedPtr mpWakeupEvent
Wakeup event to use for discrete activities.
const sal_uInt32 mnMinNumberOfFrames
Minimal number of frames this activity must render.
std::shared_ptr< ExpressionNode > mpFormula
Optional formula.
const bool mbAutoReverse
When true, activity is played reversed after mnDuration.