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>
Public Member Functions | |
VBlankAttachment ()=default | |
Default constructor for creating an empty object. | |
VBlankAttachment (Component *c, std::function< void()> callbackIn) | |
Constructor. | |
VBlankAttachment (VBlankAttachment &&other) | |
VBlankAttachment & | operator= (VBlankAttachment &&other) |
~VBlankAttachment () override | |
Destructor. | |
bool | isEmpty () const |
Returns true for a default constructed object. | |
void | onVBlank () override |
Called on every vertical blank of the display to which the peer is associated. | |
void | componentParentHierarchyChanged (Component &) override |
Called to indicate that the component's parents have changed. | |
Public Member Functions inherited from ComponentPeer::VBlankListener | |
virtual | ~VBlankListener ()=default |
Destructor. | |
Public Member Functions inherited from ComponentListener | |
virtual | ~ComponentListener ()=default |
Destructor. | |
virtual void | componentMovedOrResized (Component &component, bool wasMoved, bool wasResized) |
Called when the component's position or size changes. | |
virtual void | componentBroughtToFront (Component &component) |
Called when the component is brought to the top of the z-order. | |
virtual void | componentVisibilityChanged (Component &component) |
Called when the component is made visible or invisible. | |
virtual void | componentChildrenChanged (Component &component) |
Called when the component has children added or removed, or their z-order changes. | |
virtual void | componentNameChanged (Component &component) |
Called when the component's name is changed. | |
virtual void | componentBeingDeleted (Component &component) |
Called when the component is in the process of being deleted. | |
virtual void | componentEnablementChanged (Component &component) |
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.
|
default |
Default constructor for creating an empty object.
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.
VBlankAttachment::VBlankAttachment | ( | VBlankAttachment && | other | ) |
|
override |
Destructor.
VBlankAttachment & VBlankAttachment::operator= | ( | VBlankAttachment && | other | ) |
bool VBlankAttachment::isEmpty | ( | ) | const |
Returns true for a default constructed object.
|
overridevirtual |
Called on every vertical blank of the display to which the peer is associated.
Implements ComponentPeer::VBlankListener.
|
overridevirtual |
Called to indicate that the component's parents have changed.
When a component is added or removed from its parent, all of its children will produce this notification (recursively - so all children of its children will also be called as well).
component | the component that this listener is registered with |
Reimplemented from ComponentListener.