Loading...
Searching...
No Matches
Public Member Functions | List of all members
VBlankAttachment Class Referencefinal

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

Inheritance diagram for VBlankAttachment:

Public Member Functions

 VBlankAttachment ()
 Default constructor for creating an empty object.
 
 VBlankAttachment (Component *c, std::function< void()> callbackIn)
 Constructor.
 
 VBlankAttachment (VBlankAttachment &&other)
 
VBlankAttachmentoperator= (VBlankAttachment &&other)
 
 ~VBlankAttachment () override
 Destructor.
 
bool isEmpty ()
 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.
 
virtual void onVBlank ()=0
 Called on every vertical blank of the display to which the peer is associated.
 
- 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 componentParentHierarchyChanged (Component &component)
 Called to indicate that the component's parents have changed.
 
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)
 

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/3]

VBlankAttachment::VBlankAttachment ( )

Default constructor for creating an empty object.

◆ VBlankAttachment() [2/3]

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() [3/3]

VBlankAttachment::VBlankAttachment ( VBlankAttachment &&  other)

◆ ~VBlankAttachment()

VBlankAttachment::~VBlankAttachment ( )
override

Destructor.

Member Function Documentation

◆ operator=()

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

◆ isEmpty()

bool VBlankAttachment::isEmpty ( )

Returns true for a default constructed object.

◆ onVBlank()

void VBlankAttachment::onVBlank ( )
overridevirtual

Called on every vertical blank of the display to which the peer is associated.

Implements ComponentPeer::VBlankListener.

◆ componentParentHierarchyChanged()

void VBlankAttachment::componentParentHierarchyChanged ( Component component)
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).

Parameters
componentthe component that this listener is registered with
See also
Component::parentHierarchyChanged

Reimplemented from ComponentListener.


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