The animated values of one component that the layout and its States share, so a base value (the layout's "alpha" and "scale" entries) and a state's value (e.g.
More...
#include <gin_states.h>
Inherits juce::ReferenceCountedObject.
|
| std::function< void(juce::Component &)> | onStep |
| | Called with the component on every step of its alpha or scale.
|
The animated values of one component that the layout and its States share, so a base value (the layout's "alpha" and "scale" entries) and a state's value (e.g.
a hover scale) drive the same animation instead of fighting over it. A state's value wins while the state is active; leaving it eases back to the base value. Values:
- "alpha" (Component::setAlpha, 0 hides, see LayoutSupport), base 1 without an entry
- "scale" (an AnimatedScale about the "origin"), base 1 without an entry
- "imageFilter" (a spec, see ImageFilter): sets the filter of every AnimatedImageFilter the component owns and eases their amount to 1, to 0 when no state sets one
- "boxShadow" (see BoxShadow), base none without an entry
Timings come from Transition::forProperty for "alpha", "scale" and the filters' own property names ("imageFilter" by default). Kept in the component's properties, it lives as long as the component. Created on demand; LayoutSupport, States and AnimatedImageFilter use it, code rarely needs to.
◆ ~AnimatedProperties()
| AnimatedProperties::~AnimatedProperties |
( |
| ) |
|
|
override |
◆ get()
The component's, created when it has none.
◆ find()
The component's, nullptr when it has none.
◆ setBaseAlpha()
| void AnimatedProperties::setBaseAlpha |
( |
float | alpha, |
|
|
bool | animate ) |
The base values; animate false applies at once (a component's first layout).
◆ setBaseScale()
| void AnimatedProperties::setBaseScale |
( |
float | scale, |
|
|
juce::Point< float > | origin, |
|
|
bool | animate ) |
◆ setStateValues()
| void AnimatedProperties::setStateValues |
( |
const juce::var & | values | ) |
|
The active states' values merged into one object ("alpha", "scale", "imageFilter"), void when no state is active.
◆ getStateValues()
| const juce::var & AnimatedProperties::getStateValues |
( |
| ) |
const |
◆ addImageFilter()
◆ removeImageFilter()
◆ setBaseShadow()
| void AnimatedProperties::setBaseShadow |
( |
const ShadowList & | shadow, |
|
|
bool | animate ) |
The box shadow's base value and outline radius (see BoxShadow).
◆ setShadowRadius()
| void AnimatedProperties::setShadowRadius |
( |
float | radius | ) |
|
◆ getShadow()
| const ShadowList & AnimatedProperties::getShadow |
( |
| ) |
const |
The shadow as it shows now, mid-transition included.
◆ getShadowRadius()
| float AnimatedProperties::getShadowRadius |
( |
| ) |
const |
◆ onStep
| std::function<void (juce::Component&)> AnimatedProperties::onStep |
Called with the component on every step of its alpha or scale.
The documentation for this class was generated from the following file: