Loading...
Searching...
No Matches
VBlankAttachment Class Referencefinal

Helper class to synchronise Component updates to the vertical blank event of the display that the Component is presented on. More...

#include <juce_VBlankAttachment.h>

Inheritance diagram for VBlankAttachment:

Public Member Functions

 VBlankAttachment ()=default
 Default constructor for creating an empty object.
 
 VBlankAttachment (Component *c, std::function< void()> callbackIn)
 Constructor.
 
 VBlankAttachment (Component *c, std::function< void(double)> callbackIn)
 Constructor.
 
 VBlankAttachment (VBlankAttachment &&other)
 
VBlankAttachmentoperator= (VBlankAttachment &&other)
 
 ~VBlankAttachment () override
 Destructor.
 
bool isEmpty () const
 Returns true for a default constructed object.
 

Detailed Description

Helper class to synchronise Component updates to the vertical blank event of the display that the Component is presented on.

This is useful when animating the Component's contents.

Constructor & Destructor Documentation

◆ VBlankAttachment() [1/4]

VBlankAttachment::VBlankAttachment ( )
default

Default constructor for creating an empty object.

◆ VBlankAttachment() [2/4]

VBlankAttachment::VBlankAttachment ( Component * c,
std::function< void()> callbackIn )

Constructor.

Creates an attachment that will call the passed in function at every vertical blank event of the display that the passed in Component is currently visible on.

The Component must be valid for the entire lifetime of the VBlankAttachment.

You should prefer the other constructor, where the callback also receives a timestamp parameter. This constructor is only provided for compatibility with the earlier JUCE implementation.

◆ VBlankAttachment() [3/4]

VBlankAttachment::VBlankAttachment ( Component * c,
std::function< void(double)> callbackIn )

Constructor.

Creates an attachment that will call the passed in function at every vertical blank event of the display that the passed in Component is currently visible on.

The Component must be valid for the entire lifetime of the VBlankAttachment.

The provided callback is called with a monotonically increasing value expressed in seconds that corresponds to the time of the next frame to be presented. Use this value to synchronise drawing across all classes using a VBlankAttachment.

◆ VBlankAttachment() [4/4]

VBlankAttachment::VBlankAttachment ( VBlankAttachment && other)

◆ ~VBlankAttachment()

VBlankAttachment::~VBlankAttachment ( )
override

Destructor.

Member Function Documentation

◆ operator=()

VBlankAttachment & VBlankAttachment::operator= ( VBlankAttachment && other)

◆ isEmpty()

bool VBlankAttachment::isEmpty ( ) const

Returns true for a default constructed object.


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