Vital
Loading...
Searching...
No Matches
wavetable_playhead_info.h
Go to the documentation of this file.
1/*
2Summary:
3
4WavetablePlayheadInfo is a component that displays the current integer position of a wavetable playhead as text. It implements the WavetablePlayhead::Listener interface, updating the displayed value whenever the playhead moves. The display is styled according to the current UI skin.
5 */
6
7#pragma once
8
9#include "JuceHeader.h"
10#include "wavetable_playhead.h"
11
20class WavetablePlayheadInfo : public Component, public WavetablePlayhead::Listener {
21public:
28
33 void paint(Graphics& g) override;
34
41 void resized() override;
42
49 void playheadMoved(int position) override;
50
51protected:
53
54 JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(WavetablePlayheadInfo)
55};
A listener interface for objects interested in playhead position changes.
Definition wavetable_playhead.h:31
A UI component that displays the current playhead position in a wavetable editor.
Definition wavetable_playhead_info.h:20
void resized() override
Called when the component is resized.
Definition wavetable_playhead_info.cpp:26
WavetablePlayheadInfo()
Constructs the WavetablePlayheadInfo component.
Definition wavetable_playhead_info.h:27
void playheadMoved(int position) override
Called when the associated playhead moves to a new position.
Definition wavetable_playhead_info.cpp:31
void paint(Graphics &g) override
Paints the current playhead position text onto the component.
Definition wavetable_playhead_info.cpp:9
int playhead_position_
The current playhead position being displayed.
Definition wavetable_playhead_info.h:52