openshot-audio  0.1.7
Public Member Functions | List of all members
AnimatedAppComponent Class Referenceabstract

#include <juce_AnimatedAppComponent.h>

Inheritance diagram for AnimatedAppComponent:
Timer

Public Member Functions

 AnimatedAppComponent ()
 
void setFramesPerSecond (int framesPerSecond)
 
virtual void update ()=0
 
int getFrameCounter () const noexcept
 
int getMillisecondsSinceLastUpdate () const noexcept
 

Detailed Description

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.

Constructor & Destructor Documentation

AnimatedAppComponent::AnimatedAppComponent ( )

Member Function Documentation

int AnimatedAppComponent::getFrameCounter ( ) const
inlinenoexcept

Returns the number of times that update() has been called since the component started running.

int AnimatedAppComponent::getMillisecondsSinceLastUpdate ( ) const
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.

virtual void AnimatedAppComponent::update ( )
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.


The documentation for this class was generated from the following files: