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

## 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.

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

- juce_gui_basics/windows/juce_VBlankAttachment.h

Inheritance diagram for juce::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)
VBlankAttachment & | operator= (VBlankAttachment &&other)
| ~VBlankAttachment () override
| Destructor.
bool | isEmpty () const
| Returns true for a default constructed object.

## Constructors and Destructors

## VBlankAttachment() [1/4]

juce::VBlankAttachment::VBlankAttachment | ( |  | ) |

default

Default constructor for creating an empty object.

Referenced by operator=(), and VBlankAttachment().

## VBlankAttachment() [2/4]

juce::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]

juce::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]

juce::VBlankAttachment::VBlankAttachment | ( | VBlankAttachment && | other | ) |

References VBlankAttachment().

## ~VBlankAttachment()

juce::VBlankAttachment::~VBlankAttachment | ( |  | ) |

override

Destructor.

## Member Functions

## operator=()

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

References VBlankAttachment().

## isEmpty()

bool juce::VBlankAttachment::isEmpty | ( |  | ) | const

inline

Returns true for a default constructed object.

### Purchase

Get JUCE

### Discover

What's New in JUCE Features

### Learn

Documentaion Tutorials Made with JUCE Resources

### Support

JUCE Forum Newsletter Archive

### About

Contact Us JUCE Legal JUCE Licensing FAQ

### Events

Audio Developer Conference
© Raw Material Software Limited