Vital
Loading...
Searching...
No Matches
WavetableComponentViewport Class Reference

A Viewport subclass that notifies listeners when the visible area changes. More...

#include <wavetable_component_list.h>

Inheritance diagram for WavetableComponentViewport:

Classes

class  Listener
 Interface for objects wanting to know when the viewport scrolls. More...
 

Public Member Functions

void addListener (Listener *listener)
 Adds a listener that will be notified on scroll events.
 
void visibleAreaChanged (const Rectangle< int > &newVisibleArea) override
 Overridden to notify listeners when the visible area changes.
 

Detailed Description

A Viewport subclass that notifies listeners when the visible area changes.

WavetableComponentViewport allows registering listeners to be informed whenever the user scrolls through the contained components. This helps in synchronizing UI elements or other overlays as the viewport content shifts.

Member Function Documentation

◆ addListener()

void WavetableComponentViewport::addListener ( Listener * listener)
inline

Adds a listener that will be notified on scroll events.

Parameters
listenerThe listener to add.

◆ visibleAreaChanged()

void WavetableComponentViewport::visibleAreaChanged ( const Rectangle< int > & newVisibleArea)
inlineoverride

Overridden to notify listeners when the visible area changes.

Parameters
newVisibleAreaThe new visible area in the component's coordinates.

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