openshot-audio
0.1.6
|
#include <juce_AnimatedAppComponent.h>
Public Member Functions | |
AnimatedAppComponent () | |
void | setFramesPerSecond (int framesPerSecond) |
virtual void | update ()=0 |
int | getFrameCounter () const noexcept |
int | getMillisecondsSinceLastUpdate () const noexcept |
A base class for writing simple one-page graphical apps.
A subclass can inherit from this and implement just a few methods such as paint() and mouse-handling. The base class provides some simple abstractions to take care of continuously repainting itself.
AnimatedAppComponent::AnimatedAppComponent | ( | ) |
|
inlinenoexcept |
Returns the number of times that update() has been called since the component started running.
|
noexcept |
When called from update(), this returns the number of milliseconds since the last update call. This might be useful for accurately timing animations, etc.
void AnimatedAppComponent::setFramesPerSecond | ( | int | framesPerSecond | ) |
Your subclass can call this to start a timer running which will call update() and repaint the component at the given frequency.
|
pure virtual |
Called periodically, at the frequency specified by setFramesPerSecond(). This is a the best place to do things like advancing animation parameters, checking the mouse position, etc.