LibreOffice Module slideshow (master) 1
|
Simple, continuous animation. More...
#include <simplecontinuousactivitybase.hxx>
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 |
EventQueue & | getEventQueue () const |
const AnimatableShapeSharedPtr & | getShape () const |
const ShapeAttributeLayerSharedPtr & | getShapeAttributeLayer () 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... | |
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.
|
explicit |
Definition at line 29 of file simplecontinuousactivitybase.cxx.
|
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.
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.
|
overridevirtual |
From Activity interface.
Derived classes should override, call this first and then perform their work.
Reimplemented from slideshow::internal::ActivityBase.
Reimplemented in slideshow::internal::ContinuousActivityBase, and slideshow::internal::ContinuousKeyTimeActivityBase.
Definition at line 110 of file simplecontinuousactivitybase.cxx.
References slideshow::internal::ActivityBase::endActivity(), canvas::tools::ElapsedTime::getElapsedTime(), slideshow::internal::ActivityBase::getRepeatCount(), slideshow::internal::ActivityBase::isActive(), slideshow::internal::ActivityBase::isAutoReverse(), slideshow::internal::ActivityBase::isRepeatCountValid(), maTimer, mnCurrPerformCalls, mnMinSimpleDuration, slideshow::internal::ActivityBase::perform(), and simplePerform().
|
protectedpure virtual |
Hook for derived classes.
This method will be called from perform().
nSimpleTime | Simple 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. |
nRepeatCount | Number of full repeats already performed |
Implemented in slideshow::internal::ContinuousActivityBase, and slideshow::internal::ContinuousKeyTimeActivityBase.
Referenced by perform().
|
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.
|
private |
Time elapsed since activity started.
Definition at line 63 of file simplecontinuousactivitybase.hxx.
Referenced by calcTimeLag(), and perform().
|
private |
Actual number of frames shown until now.
Definition at line 72 of file simplecontinuousactivitybase.hxx.
Referenced by calcTimeLag(), and perform().
|
private |
Minimal number of frames to show (see ActivityParameters)
Definition at line 69 of file simplecontinuousactivitybase.hxx.
Referenced by calcTimeLag().
|
private |
Simple duration of activity.
Definition at line 66 of file simplecontinuousactivitybase.hxx.
Referenced by calcTimeLag(), and perform().