54 if ((
nullptr == effect) || (!effect->isReady ()))
74 void cancel (
bool moveToEndPosition)
override
77 if (moveToEndPosition)
81 lastEffectPtr->cancel (moveToEndPosition);
85 void addAnimation (std::unique_ptr<AnimationType> effect)
87 sequence.push_back (std::move (effect));
93 return effect->getValue (index);
105 if (juce::isPositiveAndBelow (index,
sequence.size ()))
114 std::vector<std::unique_ptr<AnimationType>>
sequence;
Abstract base class for objects that can generate a useful series of values to drive UI animations.
Definition: animatedValue.h:34
Abstract base class; all the real action happens in the derived templated Animation class,...
Definition: animation.h:39
Status
Definition: animation.h:42
@ processing
The animation is running right now.
@ finished
Finished running, okay to clean up.
A container animation object that holds several animations and executes them in order.
Definition: chain.h:41
bool isFinished() override
Definition: chain.h:48
AnimationType::Status gotoTime(juce::int64 timeInMs) override
Advance all active animations to this point in time.
Definition: chain.h:60
AnimationType * getEffect(int index)
Definition: chain.h:103
AnimatedValue * getValue(size_t index) override
Retrieve a pointer to one of this animation's value objects.
Definition: chain.h:90
bool isReady() const override
Definition: chain.h:50
void cancel(bool moveToEndPosition) override
Cancel an in-progress animation, optionally moving directly to its end value.
Definition: chain.h:74
std::vector< std::unique_ptr< AnimationType > > sequence
the vector that owns our chain of effects.
Definition: chain.h:114
int currentEffect
index (into the sequence vector) of the effect that we are currently processing.
Definition: chain.h:118