Loading...
Searching...
No Matches
VBlankAnimatorUpdater Class Reference

Similar to AnimatorUpdater, but automatically calls update() whenever the screen refreshes. More...

#include <juce_VBlankAnimatorUpdater.h>

Inheritance diagram for VBlankAnimatorUpdater:

Public Member Functions

 VBlankAnimatorUpdater (Component *c)
 Constructs a VBlankAnimatorUpdater that is synchronised to the refresh rate of the monitor that the provided Component is being displayed on.
 
void addAnimator (const Animator &animator)
 Registers an Animator with the updater.
 
void addAnimator (const Animator &animator, std::function< void()> onComplete)
 Registers an Animator with the updater and specifies a callback to be called upon the completion of the Animator.
 
void removeAnimator (const Animator &animator)
 Removes an Animator.
 

Detailed Description

Similar to AnimatorUpdater, but automatically calls update() whenever the screen refreshes.

Constructor & Destructor Documentation

◆ VBlankAnimatorUpdater()

VBlankAnimatorUpdater::VBlankAnimatorUpdater ( Component * c)
explicit

Constructs a VBlankAnimatorUpdater that is synchronised to the refresh rate of the monitor that the provided Component is being displayed on.

References AnimatorUpdater::update().

Member Function Documentation

◆ addAnimator() [1/2]

void AnimatorUpdater::addAnimator ( const Animator & animator)

Registers an Animator with the updater.

◆ addAnimator() [2/2]

void AnimatorUpdater::addAnimator ( const Animator & animator,
std::function< void()> onComplete )

Registers an Animator with the updater and specifies a callback to be called upon the completion of the Animator.

This callback can be used for cleanup purposes e.g.

animatorUpdater.addAnimator (someComponentPtr->getAnimator(),
[&someComponentPtr] { someComponentPtr.reset(); });

◆ removeAnimator()

void AnimatorUpdater::removeAnimator ( const Animator & animator)

Removes an Animator.


The documentation for this class was generated from the following file:
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram