A UI component that displays the current playhead position in a wavetable editor.
More...
#include <wavetable_playhead_info.h>
A UI component that displays the current playhead position in a wavetable editor.
WavetablePlayheadInfo listens to a WavetablePlayhead and shows the current frame position as a textual number. Whenever the playhead moves, this component updates and redraws the display.
◆ WavetablePlayheadInfo()
WavetablePlayheadInfo::WavetablePlayheadInfo |
( |
| ) |
|
|
inline |
◆ paint()
void WavetablePlayheadInfo::paint |
( |
Graphics & | g | ) |
|
|
override |
Paints the current playhead position text onto the component.
- Parameters
-
g | The graphics context used for painting. |
◆ playheadMoved()
void WavetablePlayheadInfo::playheadMoved |
( |
int | position | ) |
|
|
overridevirtual |
Called when the associated playhead moves to a new position.
- Parameters
-
position | The new playhead position. |
Updates the displayed position and repaints the component.
Implements WavetablePlayhead::Listener.
◆ resized()
void WavetablePlayheadInfo::resized |
( |
| ) |
|
|
override |
Called when the component is resized.
Triggers a repaint to ensure that the displayed text is positioned correctly within the new bounds.
◆ playhead_position_
int WavetablePlayheadInfo::playhead_position_ |
|
protected |
The current playhead position being displayed.
The documentation for this class was generated from the following files: