LibreOffice Module slideshow (master) 1
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
slideshow::internal::SimpleContinuousActivityBase Class Referenceabstract

Simple, continuous animation. More...

#include <simplecontinuousactivitybase.hxx>

Inheritance diagram for slideshow::internal::SimpleContinuousActivityBase:
[legend]
Collaboration diagram for slideshow::internal::SimpleContinuousActivityBase:
[legend]

Public Member Functions

 SimpleContinuousActivityBase (const ActivityParameters &rParms)
 
virtual double calcTimeLag () const override
 Calculates whether the activity lags time. More...
 
virtual bool perform () override
 From Activity interface. More...
 
- Public Member Functions inherited from slideshow::internal::ActivityBase
 ActivityBase (const ActivityParameters &rParms)
 
virtual void dispose () override
 From Disposable interface. More...
 
virtual void setTargets (const AnimatableShapeSharedPtr &rShape, const ShapeAttributeLayerSharedPtr &rAttrLayer)=0
 Sets targets (shape and attributeLayer) More...
 
virtual bool perform ()=0
 Perform the activity associated with this interface's implementation. More...
 
virtual double calcTimeLag () const =0
 Calculates whether the activity lags time. More...
 
virtual bool isActive () const =0
 Query whether this activity is still continuing. More...
 
virtual void dequeued ()=0
 Notifies the Activity that it has now left the ActivitiesQueue. More...
 
virtual void end ()=0
 Forces this activity deactivate and get to its end state (if possible), but does not dispose. More...
 
- Public Member Functions inherited from slideshow::internal::Disposable
virtual ~Disposable ()
 
virtual void dispose ()=0
 Dispose all object references. More...
 
- Public Member Functions inherited from slideshow::internal::SharedPtrAble
virtual ~SharedPtrAble ()
 

Protected Member Functions

virtual void simplePerform (double nSimpleTime, sal_uInt32 nRepeatCount) const =0
 Hook for derived classes. More...
 
virtual void startAnimation () override
 Hook for derived classes. More...
 
- Protected Member Functions inherited from slideshow::internal::ActivityBase
virtual bool perform () override
 From Activity interface. More...
 
virtual double calcTimeLag () const override
 Calculates whether the activity lags time. More...
 
virtual bool isActive () const override
 Query whether this activity is still continuing. More...
 
void endActivity ()
 End this activity, in a regular way. More...
 
double calcAcceleratedTime (double nT) const
 Modify fractional time. More...
 
bool isDisposed () const
 
EventQueuegetEventQueue () const
 
const AnimatableShapeSharedPtrgetShape () const
 
const ShapeAttributeLayerSharedPtrgetShapeAttributeLayer () const
 
bool isRepeatCountValid () const
 
double getRepeatCount () const
 
bool isAutoReverse () const
 

Private Attributes

::canvas::tools::ElapsedTime maTimer
 Time elapsed since activity started. More...
 
const double mnMinSimpleDuration
 Simple duration of activity. More...
 
const sal_uInt32 mnMinNumberOfFrames
 Minimal number of frames to show (see ActivityParameters) More...
 
sal_uInt32 mnCurrPerformCalls
 Actual number of frames shown until now. More...
 

Detailed Description

Simple, continuous animation.

This class implements a simple, continuous animation without considering repeats or acceleration on the perform call. Only useful as a base class, you probably want to use ContinuousActivityBase.

Definition at line 35 of file simplecontinuousactivitybase.hxx.

Constructor & Destructor Documentation

◆ SimpleContinuousActivityBase()

slideshow::internal::SimpleContinuousActivityBase::SimpleContinuousActivityBase ( const ActivityParameters rParms)
explicit

Definition at line 29 of file simplecontinuousactivitybase.cxx.

Member Function Documentation

◆ calcTimeLag()

double slideshow::internal::SimpleContinuousActivityBase::calcTimeLag ( ) const
overridevirtual

Calculates whether the activity lags time.

If this method returns a time lag greater than 0.0, the ActivitiesQueue will adjust the global slideshow time, by subtracting the given amount of lag.

Returns
time lag or 0.0. Value must be greater or equal than zero.

Reimplemented from slideshow::internal::ActivityBase.

Definition at line 46 of file simplecontinuousactivitybase.cxx.

References slideshow::internal::ActivityBase::calcTimeLag(), canvas::tools::ElapsedTime::getElapsedTime(), slideshow::internal::ActivityBase::isActive(), maTimer, mnCurrPerformCalls, mnMinNumberOfFrames, mnMinSimpleDuration, and SAL_INFO.

◆ perform()

bool slideshow::internal::SimpleContinuousActivityBase::perform ( )
overridevirtual

◆ simplePerform()

virtual void slideshow::internal::SimpleContinuousActivityBase::simplePerform ( double  nSimpleTime,
sal_uInt32  nRepeatCount 
) const
protectedpure virtual

Hook for derived classes.

This method will be called from perform().

Parameters
nSimpleTimeSimple animation time, without repeat, acceleration or deceleration applied. This value is always in the [0,1] range, the repeat is accounted for with the nRepeatCount parameter.
nRepeatCountNumber of full repeats already performed

Implemented in slideshow::internal::ContinuousActivityBase, and slideshow::internal::ContinuousKeyTimeActivityBase.

Referenced by perform().

◆ startAnimation()

void slideshow::internal::SimpleContinuousActivityBase::startAnimation ( )
overrideprotectedvirtual

Hook for derived classes.

This method will be called from the first perform() invocation, to signal the start of the activity.

Implements slideshow::internal::ActivityBase.

Definition at line 39 of file simplecontinuousactivitybase.cxx.

Member Data Documentation

◆ maTimer

::canvas::tools::ElapsedTime slideshow::internal::SimpleContinuousActivityBase::maTimer
private

Time elapsed since activity started.

Definition at line 63 of file simplecontinuousactivitybase.hxx.

Referenced by calcTimeLag(), and perform().

◆ mnCurrPerformCalls

sal_uInt32 slideshow::internal::SimpleContinuousActivityBase::mnCurrPerformCalls
private

Actual number of frames shown until now.

Definition at line 72 of file simplecontinuousactivitybase.hxx.

Referenced by calcTimeLag(), and perform().

◆ mnMinNumberOfFrames

const sal_uInt32 slideshow::internal::SimpleContinuousActivityBase::mnMinNumberOfFrames
private

Minimal number of frames to show (see ActivityParameters)

Definition at line 69 of file simplecontinuousactivitybase.hxx.

Referenced by calcTimeLag().

◆ mnMinSimpleDuration

const double slideshow::internal::SimpleContinuousActivityBase::mnMinSimpleDuration
private

Simple duration of activity.

Definition at line 66 of file simplecontinuousactivitybase.hxx.

Referenced by calcTimeLag(), and perform().


The documentation for this class was generated from the following files: