LibreOffice Module slideshow (master) 1
Public Types | Public Member Functions | Private Attributes | List of all members
slideshow::internal::SetActivity< AnimationT > Class Template Reference

Templated setter for animation values. More...

#include <setactivity.hxx>

Inheritance diagram for slideshow::internal::SetActivity< AnimationT >:
[legend]
Collaboration diagram for slideshow::internal::SetActivity< AnimationT >:
[legend]

Public Types

typedef ::std::shared_ptr< AnimationT > AnimationSharedPtrT
 
typedef AnimationT::ValueType ValueT
 

Public Member Functions

 SetActivity (const ActivitiesFactory::CommonParameters &rParms, AnimationSharedPtrT xAnimation, ValueT aToValue)
 
virtual void dispose () override
 Dispose all object references. More...
 
virtual double calcTimeLag () const override
 Calculates whether the activity lags time. More...
 
virtual bool perform () override
 Perform the activity associated with this interface's implementation. More...
 
virtual bool isActive () const override
 Query whether this activity is still continuing. More...
 
virtual void dequeued () override
 Notifies the Activity that it has now left the ActivitiesQueue. More...
 
virtual void end () override
 Forces this activity deactivate and get to its end state (if possible), but does not dispose. More...
 
virtual void setTargets (const AnimatableShapeSharedPtr &rShape, const ShapeAttributeLayerSharedPtr &rAttrLayer) override
 Sets targets (shape and attributeLayer) 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 ()
 

Private Attributes

AnimationSharedPtrT mpAnimation
 
AnimatableShapeSharedPtr mpShape
 
ShapeAttributeLayerSharedPtr mpAttributeLayer
 
EventSharedPtr mpEndEvent
 
EventQueuemrEventQueue
 
ValueT maToValue
 
bool mbIsActive
 

Detailed Description

template<class AnimationT>
class slideshow::internal::SetActivity< AnimationT >

Templated setter for animation values.

This template class implements the AnimationActivity interface, but only the perform() and setAttributeLayer() methods are functional. To be used for set animations.

See also
AnimationSetNode.

Definition at line 41 of file setactivity.hxx.

Member Typedef Documentation

◆ AnimationSharedPtrT

template<class AnimationT >
typedef ::std::shared_ptr< AnimationT > slideshow::internal::SetActivity< AnimationT >::AnimationSharedPtrT

Definition at line 44 of file setactivity.hxx.

◆ ValueT

template<class AnimationT >
typedef AnimationT::ValueType slideshow::internal::SetActivity< AnimationT >::ValueT

Definition at line 45 of file setactivity.hxx.

Constructor & Destructor Documentation

◆ SetActivity()

template<class AnimationT >
slideshow::internal::SetActivity< AnimationT >::SetActivity ( const ActivitiesFactory::CommonParameters rParms,
AnimationSharedPtrT  xAnimation,
ValueT  aToValue 
)
inline

Member Function Documentation

◆ calcTimeLag()

template<class AnimationT >
virtual double slideshow::internal::SetActivity< AnimationT >::calcTimeLag ( ) const
inlineoverridevirtual

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.

Implements slideshow::internal::Activity.

Definition at line 73 of file setactivity.hxx.

◆ dequeued()

template<class AnimationT >
virtual void slideshow::internal::SetActivity< AnimationT >::dequeued ( )
inlineoverridevirtual

Notifies the Activity that it has now left the ActivitiesQueue.

Use this method to react on the queue removal event. For animated shapes, this is e.g. used to switch back to the non-sprite presentation mode of the shape.

Implements slideshow::internal::Activity.

Definition at line 102 of file setactivity.hxx.

◆ dispose()

template<class AnimationT >
virtual void slideshow::internal::SetActivity< AnimationT >::dispose ( )
inlineoverridevirtual

◆ end()

template<class AnimationT >
virtual void slideshow::internal::SetActivity< AnimationT >::end ( )
inlineoverridevirtual

Forces this activity deactivate and get to its end state (if possible), but does not dispose.

Implements slideshow::internal::Activity.

Definition at line 106 of file setactivity.hxx.

References slideshow::internal::SetActivity< AnimationT >::perform().

◆ isActive()

template<class AnimationT >
virtual bool slideshow::internal::SetActivity< AnimationT >::isActive ( ) const
inlineoverridevirtual

Query whether this activity is still continuing.

Returns
true, if this activity still continues. Returns false, if activity has ended. It is required that operator() returns false, when isActive() returns false. Furthermore, it is required that the inactive state is persistent; an activity that has become inactive (i.e. isActive() once returned false) must stay in that state eternally.

Implements slideshow::internal::Activity.

Definition at line 97 of file setactivity.hxx.

References slideshow::internal::SetActivity< AnimationT >::mbIsActive.

Referenced by slideshow::internal::SetActivity< AnimationT >::perform().

◆ perform()

template<class AnimationT >
virtual bool slideshow::internal::SetActivity< AnimationT >::perform ( )
inlineoverridevirtual

◆ setTargets()

template<class AnimationT >
virtual void slideshow::internal::SetActivity< AnimationT >::setTargets ( const AnimatableShapeSharedPtr rShape,
const ShapeAttributeLayerSharedPtr rAttrLayer 
)
inlineoverridevirtual

Sets targets (shape and attributeLayer)

Since attribute layers can only be generated when the animation starts, the Activity owner must be able to pass it into the Activity after initial creation. The same applies to the actual shape the animation must run for, since e.g. subsetted shapes are generated close before the animation starts, too (this is not necessary in and out of itself, but for performance reasons. Otherwise, character iterations produce tons of subset shapes).

Parameters
rShapeShape to play the animation on.
rAttrLayerAttribute layer to change the animated values on.

Implements slideshow::internal::AnimationActivity.

Definition at line 111 of file setactivity.hxx.

References ENSURE_OR_THROW, slideshow::internal::SetActivity< AnimationT >::mpAttributeLayer, and slideshow::internal::SetActivity< AnimationT >::mpShape.

Member Data Documentation

◆ maToValue

template<class AnimationT >
ValueT slideshow::internal::SetActivity< AnimationT >::maToValue
private

◆ mbIsActive

template<class AnimationT >
bool slideshow::internal::SetActivity< AnimationT >::mbIsActive
private

◆ mpAnimation

template<class AnimationT >
AnimationSharedPtrT slideshow::internal::SetActivity< AnimationT >::mpAnimation
private

◆ mpAttributeLayer

template<class AnimationT >
ShapeAttributeLayerSharedPtr slideshow::internal::SetActivity< AnimationT >::mpAttributeLayer
private

◆ mpEndEvent

template<class AnimationT >
EventSharedPtr slideshow::internal::SetActivity< AnimationT >::mpEndEvent
private

◆ mpShape

template<class AnimationT >
AnimatableShapeSharedPtr slideshow::internal::SetActivity< AnimationT >::mpShape
private

◆ mrEventQueue

template<class AnimationT >
EventQueue& slideshow::internal::SetActivity< AnimationT >::mrEventQueue
private

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