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

An overlay for controlling a WaveLineSource in the wavetable editor. More...

#include <wave_line_source_overlay.h>

Inheritance diagram for WaveLineSourceOverlay:
WavetableComponentOverlay LineEditor::Listener SynthSection WavetablePlayhead::Listener WavetableOrganizer::Listener SynthButton::ButtonListener

Public Member Functions

 WaveLineSourceOverlay ()
 Constructor.
 
virtual ~WaveLineSourceOverlay ()
 Destructor.
 
void resized () override
 Called when the overlay is resized.
 
virtual void frameSelected (WavetableKeyframe *keyframe) override
 Called when a new frame is selected in the wavetable editor.
 
virtual void frameDragged (WavetableKeyframe *keyframe, int position) override
 Called when a frame is dragged, but this overlay does not respond to frame dragging.
 
virtual void setEditBounds (Rectangle< int > bounds) override
 Sets the editing bounds for the UI controls.
 
virtual bool setTimeDomainBounds (Rectangle< int > bounds) override
 Sets the bounding box for the time domain display area (line editor).
 
void renderOpenGlComponents (OpenGlWrapper &open_gl, bool animate) override
 Renders any openGL components, including the line editor.
 
void setPhase (float phase) override
 Sets the waveform phase (not used here).
 
void lineEditorScrolled (const MouseEvent &e, const MouseWheelDetails &wheel) override
 Called when the line editor is scrolled.
 
void togglePaintMode (bool enabled, bool temporary_switch) override
 Toggles painting mode (not used in this overlay).
 
void fileLoaded () override
 Callback for file loading completion (not used here).
 
void importLfo () override
 Imports an LFO (not used in this overlay).
 
void exportLfo () override
 Exports an LFO (not used in this overlay).
 
void pointChanged (int index, Point< float > position, bool mouse_up) override
 Callback when a line point changes its position.
 
void powersChanged (bool mouse_up) override
 Callback when line powers/curvature change.
 
void pointAdded (int index, Point< float > position) override
 Callback when a line point is added.
 
void pointRemoved (int index) override
 Callback when a point is removed.
 
void pointsAdded (int index, int num_points_added) override
 Callback when multiple points are added.
 
void pointsRemoved (int index, int num_points_removed) override
 Callback when multiple points are removed.
 
void sliderValueChanged (Slider *moved_slider) override
 Called when a slider in this overlay changes its value.
 
void sliderDragEnded (Slider *moved_slider) override
 Called when a slider in this overlay finishes being dragged.
 
void setLineSource (WaveLineSource *line_source)
 Sets the WaveLineSource associated with this overlay.
 
- Public Member Functions inherited from WavetableComponentOverlay
 WavetableComponentOverlay (String name)
 Constructs a WavetableComponentOverlay.
 
 WavetableComponentOverlay ()=delete
 Deleted default constructor.
 
void paintBackground (Graphics &g) override
 Custom paint method for background.
 
void playheadMoved (int position) override
 Called when the wavetable playhead moves, but default does nothing.
 
virtual bool setFrequencyAmplitudeBounds (Rectangle< int > bounds)
 Optionally set bounds for frequency-amplitude editing UI.
 
virtual bool setPhaseBounds (Rectangle< int > bounds)
 Optionally set bounds for phase editing UI.
 
void resetOverlay ()
 Resets the overlay, clearing any associated component.
 
void initOpenGlComponents (OpenGlWrapper &open_gl) override
 Initializes OpenGL components.
 
bool initialized ()
 Checks if the overlay has been initialized.
 
void addFrameListener (Listener *listener)
 Adds a listener for frame changes.
 
void removeListener (Listener *listener)
 Removes a frame listener.
 
virtual void setPowerScale (bool scale)
 Sets whether to scale values like frequency display (optional override).
 
virtual void setFrequencyZoom (float zoom)
 Sets the frequency zoom factor (optional override).
 
void setPadding (int padding)
 Sets padding around controls and triggers a repaint.
 
int getPadding ()
 Gets the current padding value.
 
void setComponent (WavetableComponent *component)
 Sets the WavetableComponent that this overlay is editing.
 
WavetableComponentgetComponent ()
 Gets the currently associated WavetableComponent.
 
- Public Member Functions inherited from SynthSection
 SynthSection (const String &name)
 Constructs a SynthSection with a given name.
 
virtual ~SynthSection ()=default
 
void setParent (const SynthSection *parent)
 Sets the parent SynthSection.
 
float findValue (Skin::ValueId value_id) const
 Finds a value in the skin overrides or from the parent if not found locally.
 
virtual void reset ()
 Resets the section and all sub-sections.
 
virtual void paint (Graphics &g) override
 Called when the component should paint itself.
 
virtual void paintSidewaysHeadingText (Graphics &g)
 Paints the section name heading text vertically if sideways_heading_ is true.
 
virtual void paintHeadingText (Graphics &g)
 Paints the heading text for this section, either sideways or horizontally.
 
virtual void setSkinValues (const Skin &skin, bool top_level)
 Sets skin values (colors, sizes) and applies them to sub-sections.
 
void setSkinOverride (Skin::SectionOverride skin_override)
 
virtual void repaintBackground ()
 Requests a repaint of the background.
 
void showPopupBrowser (SynthSection *owner, Rectangle< int > bounds, std::vector< File > directories, String extensions, std::string passthrough_name, std::string additional_folders_name)
 Shows a file browser popup (e.g., for loading samples or wavetables).
 
void updatePopupBrowser (SynthSection *owner)
 Updates the currently visible popup browser if any.
 
void showPopupSelector (Component *source, Point< int > position, const PopupItems &options, std::function< void(int)> callback, std::function< void()> cancel={ })
 Shows a popup selector with options.
 
void showDualPopupSelector (Component *source, Point< int > position, int width, const PopupItems &options, std::function< void(int)> callback)
 Shows a dual popup selector for hierarchical selection.
 
void showPopupDisplay (Component *source, const std::string &text, BubbleComponent::BubblePlacement placement, bool primary)
 Shows a brief popup display (like a tooltip).
 
void hidePopupDisplay (bool primary)
 Hides the currently shown popup display.
 
virtual void loadFile (const File &file)
 Loads a file (e.g., a sample or wavetable). Overridden by subclasses.
 
virtual File getCurrentFile ()
 Gets the currently loaded file. Overridden by subclasses.
 
virtual std::string getFileName ()
 Gets the name of the currently loaded file. Overridden by subclasses.
 
virtual std::string getFileAuthor ()
 Gets the author metadata of the currently loaded file. Overridden by subclasses.
 
virtual void paintContainer (Graphics &g)
 Paints the container background, body, heading, etc.
 
virtual void paintBody (Graphics &g, Rectangle< int > bounds)
 Paints the body background within given bounds.
 
virtual void paintBorder (Graphics &g, Rectangle< int > bounds)
 Paints the border around given bounds.
 
virtual void paintBody (Graphics &g)
 Paints the section body background using the entire component area.
 
virtual void paintBorder (Graphics &g)
 Paints the border around the entire component.
 
int getComponentShadowWidth ()
 Gets the width of shadow around components.
 
virtual void paintTabShadow (Graphics &g)
 Paints a tab-like shadow effect around the component.
 
void paintTabShadow (Graphics &g, Rectangle< int > bounds)
 Paints a tab shadow effect within specified bounds.
 
virtual void paintBackgroundShadow (Graphics &g)
 Stub for painting background shadows. Overridden by subclasses if needed.
 
virtual void setSizeRatio (float ratio)
 Sets the size ratio for scaling UI elements.
 
void paintKnobShadows (Graphics &g)
 Paints knob shadows for all sliders.
 
Font getLabelFont ()
 Gets a suitable font for label text.
 
void setLabelFont (Graphics &g)
 Sets the Graphics context font and color for labels.
 
void drawLabelConnectionForComponents (Graphics &g, Component *left, Component *right)
 Draws a rectangular connection between labels of two components.
 
void drawLabelBackground (Graphics &g, Rectangle< int > bounds, bool text_component=false)
 Draws a background for a label area.
 
void drawLabelBackgroundForComponent (Graphics &g, Component *component)
 Draws label background for a specific component.
 
Rectangle< int > getDividedAreaBuffered (Rectangle< int > full_area, int num_sections, int section, int buffer)
 Divides an area into equal sections with buffering, returns the specified section.
 
Rectangle< int > getDividedAreaUnbuffered (Rectangle< int > full_area, int num_sections, int section, int buffer)
 Divides an area into equal sections without extra buffering, returns the specified section.
 
Rectangle< int > getLabelBackgroundBounds (Rectangle< int > bounds, bool text_component=false)
 Gets the background bounds for a label.
 
Rectangle< int > getLabelBackgroundBounds (Component *component, bool text_component=false)
 Gets the label background bounds for a component.
 
void drawLabel (Graphics &g, String text, Rectangle< int > component_bounds, bool text_component=false)
 Draws a label text below a component.
 
void drawLabelForComponent (Graphics &g, String text, Component *component, bool text_component=false)
 Draws a label for a given component.
 
void drawTextBelowComponent (Graphics &g, String text, Component *component, int space, int padding=0)
 Draws text below a component with optional padding.
 
virtual void paintChildrenShadows (Graphics &g)
 Paints shadows for child sections.
 
void paintChildrenBackgrounds (Graphics &g)
 Paints the backgrounds for all child sections.
 
void paintOpenGlChildrenBackgrounds (Graphics &g)
 Paints the backgrounds for all OpenGL child components.
 
void paintChildBackground (Graphics &g, SynthSection *child)
 Paints a child's background specifically.
 
void paintChildShadow (Graphics &g, SynthSection *child)
 Paints a child's shadow specifically.
 
void paintOpenGlBackground (Graphics &g, OpenGlComponent *child)
 Paints the background of an OpenGlComponent child.
 
void drawTextComponentBackground (Graphics &g, Rectangle< int > bounds, bool extend_to_label)
 Draws a background for a text component area.
 
void drawTempoDivider (Graphics &g, Component *sync)
 Draws a divider line for tempo-related controls.
 
virtual void destroyOpenGlComponents (OpenGlWrapper &open_gl)
 Destroys all OpenGL components in this section and sub-sections.
 
virtual void buttonClicked (Button *clicked_button) override
 Called when a button is clicked. Updates the synth parameter accordingly.
 
virtual void guiChanged (SynthButton *button) override
 Called when a SynthButton state changes (GUI interaction).
 
std::map< std::string, SynthSlider * > getAllSliders ()
 Gets all sliders registered in this section.
 
std::map< std::string, ToggleButton * > getAllButtons ()
 Gets all toggle buttons registered in this section.
 
std::map< std::string, ModulationButton * > getAllModulationButtons ()
 Gets all modulation buttons registered in this section.
 
virtual void setActive (bool active)
 Sets the active state of this section and sub-sections.
 
bool isActive () const
 Checks if the section is currently active.
 
virtual void animate (bool animate)
 Triggers animation state change in sub-sections if needed.
 
virtual void setAllValues (vital::control_map &controls)
 Sets values for all known parameters from a control map.
 
virtual void setValue (const std::string &name, vital::mono_float value, NotificationType notification)
 Sets a single parameter value for a known control.
 
void addModulationButton (ModulationButton *button, bool show=true)
 Adds a modulation button to this section.
 
void addSubSection (SynthSection *section, bool show=true)
 Adds a subsection (another SynthSection) as a child.
 
void removeSubSection (SynthSection *section)
 Removes a previously added subsection.
 
virtual void setScrollWheelEnabled (bool enabled)
 Enables or disables scroll wheel support for this section and sub-sections.
 
ToggleButton * activator () const
 Gets the activator toggle button if any.
 
void setSkinValues (std::map< Skin::ValueId, float > values)
 Sets custom skin values for this section.
 
void setSkinValue (Skin::ValueId id, float value)
 Sets a single skin value override.
 
float getTitleWidth ()
 
float getPadding ()
 
float getPowerButtonOffset () const
 
float getKnobSectionHeight ()
 
float getSliderWidth ()
 
float getSliderOverlap ()
 
float getSliderOverlapWithSpace ()
 
float getTextComponentHeight ()
 
float getStandardKnobSize ()
 
float getTotalKnobHeight ()
 
float getTextSectionYOffset ()
 
float getModButtonWidth ()
 
float getModFontSize ()
 
float getWidgetMargin ()
 
float getWidgetRounding ()
 
float getSizeRatio () const
 
int getPopupWidth () const
 
int getDualPopupWidth () const
 
- Public Member Functions inherited from SynthButton::ButtonListener
virtual ~ButtonListener ()
 Virtual destructor.
 
- Public Member Functions inherited from WavetablePlayhead::Listener
virtual ~Listener ()
 
- Public Member Functions inherited from WavetableOrganizer::Listener
virtual ~Listener ()
 
virtual void positionsUpdated ()
 Called when keyframe positions or arrangement changes.
 
virtual void wheelMoved (const MouseEvent &e, const MouseWheelDetails &wheel)
 Called when the mouse wheel is moved over the organizer.
 
- Public Member Functions inherited from LineEditor::Listener
virtual ~Listener ()
 

Static Public Attributes

static constexpr int kDefaultXGrid = 6
 Default horizontal grid size.
 
static constexpr int kDefaultYGrid = 4
 Default vertical grid size.
 
static constexpr float kFillAlpha = 0.6f
 Alpha value for fill rendering.
 
- Static Public Attributes inherited from WavetableComponentOverlay
static constexpr int kMaxGrid = 16
 Maximum grid lines used by some overlays.
 
static constexpr float kTitleHeightForWidth = 0.1f
 Ratio constants for layout and sizing.
 
static constexpr float kWidgetHeightForWidth = 0.08f
 
static constexpr float kShadowPercent = 0.1f
 
static constexpr float kDividerPoint = 0.44f
 
static constexpr float kTitleHeightRatio = 0.4f
 
- Static Public Attributes inherited from SynthSection
static constexpr int kDefaultPowerButtonOffset = 0
 
static constexpr float kPowerButtonPaddingPercent = 0.29f
 
static constexpr float kTransposeHeightPercent = 0.5f
 
static constexpr float kTuneHeightPercent = 0.4f
 
static constexpr float kJointModulationRadiusPercent = 0.1f
 
static constexpr float kJointModulationExtensionPercent = 0.6666f
 
static constexpr float kPitchLabelPercent = 0.33f
 
static constexpr float kJointLabelHeightPercent = 0.4f
 
static constexpr double kTransposeMouseSensitivity = 0.2
 
static constexpr float kJointLabelBorderRatioX = 0.05f
 
static constexpr int kDefaultBodyRounding = 4
 
static constexpr int kDefaultLabelHeight = 10
 
static constexpr int kDefaultLabelBackgroundHeight = 16
 
static constexpr int kDefaultLabelBackgroundWidth = 56
 
static constexpr int kDefaultLabelBackgroundRounding = 4
 
static constexpr int kDefaultPadding = 2
 
static constexpr int kDefaultPopupMenuWidth = 150
 
static constexpr int kDefaultDualPopupMenuWidth = 340
 
static constexpr int kDefaultStandardKnobSize = 32
 
static constexpr int kDefaultKnobThickness = 2
 
static constexpr float kDefaultKnobModulationAmountThickness = 2.0f
 
static constexpr int kDefaultKnobModulationMeterSize = 43
 
static constexpr int kDefaultKnobModulationMeterThickness = 4
 
static constexpr int kDefaultModulationButtonWidth = 64
 
static constexpr int kDefaultModFontSize = 10
 
static constexpr int kDefaultKnobSectionHeight = 64
 
static constexpr int kDefaultSliderWidth = 24
 
static constexpr int kDefaultTextWidth = 80
 
static constexpr int kDefaultTextHeight = 24
 
static constexpr int kDefaultWidgetMargin = 6
 
static constexpr float kDefaultWidgetFillFade = 0.3f
 
static constexpr float kDefaultWidgetLineWidth = 4.0f
 
static constexpr float kDefaultWidgetFillCenter = 0.0f
 

Protected Attributes

WaveLineSourceline_source_
 The associated WaveLineSource.
 
WaveLineSource::WaveLineSourceKeyframecurrent_frame_
 Currently selected frame data.
 
std::unique_ptr< LineGeneratordefault_line_generator_
 Default line generator model.
 
std::unique_ptr< LineEditoreditor_
 Line editor for modifying line source points.
 
std::unique_ptr< SynthSliderpull_power_
 Control for pull power parameter.
 
std::unique_ptr< SynthSliderhorizontal_grid_
 Control for horizontal grid size.
 
std::unique_ptr< SynthSlidervertical_grid_
 Control for vertical grid size.
 
std::unique_ptr< Component > horizontal_incrementers_
 Incrementer buttons for horizontal grid slider.
 
std::unique_ptr< Component > vertical_incrementers_
 Incrementer buttons for vertical grid slider.
 
std::unique_ptr< Slider > interpolation_selector_
 Possibly unused, defined in code for future functionality.
 
- Protected Attributes inherited from WavetableComponentOverlay
WavetableComponentcurrent_component_
 
ControlsBackground controls_background_
 
std::vector< Listener * > listeners_
 
Rectangle< int > edit_bounds_
 
int controls_width_
 
bool initialized_
 
int padding_
 
- Protected Attributes inherited from SynthSection
std::map< Skin::ValueId, float > value_lookup_
 
std::vector< SynthSection * > sub_sections_
 
std::vector< OpenGlComponent * > open_gl_components_
 
std::map< std::string, SynthSlider * > slider_lookup_
 
std::map< std::string, Button * > button_lookup_
 
std::map< std::string, ModulationButton * > modulation_buttons_
 
std::map< std::string, SynthSlider * > all_sliders_
 
std::map< std::string, ToggleButton * > all_buttons_
 
std::map< std::string, ModulationButton * > all_modulation_buttons_
 
const SynthSectionparent_
 
SynthButtonactivator_
 
PresetSelectorpreset_selector_
 
bool preset_selector_half_width_
 
std::unique_ptr< OffOverlayoff_overlay_
 
Skin::SectionOverride skin_override_
 
float size_ratio_
 
bool active_
 
bool sideways_heading_
 

Additional Inherited Members

- Protected Member Functions inherited from WavetableComponentOverlay
void setControlsWidth (int width)
 Sets the total width for controls in the overlay.
 
void notifyChanged (bool mouse_up)
 Notifies listeners that a change has occurred to the frame.
 
float getTitleHeight ()
 Gets the title height based on ratio and current edit bounds.
 
int getDividerX ()
 Gets the x position of a divider line.
 
int getWidgetHeight ()
 Gets the widget height for controls.
 
int getWidgetPadding ()
 Gets the widget padding.
 
- Protected Member Functions inherited from SynthSection
void setSliderHasHzAlternateDisplay (SynthSlider *slider)
 
void setSidewaysHeading (bool sideways)
 
void addToggleButton (ToggleButton *button, bool show)
 
void addButton (OpenGlToggleButton *button, bool show=true)
 
void addButton (OpenGlShapeButton *button, bool show=true)
 
void addSlider (SynthSlider *slider, bool show=true, bool listen=true)
 
void addOpenGlComponent (OpenGlComponent *open_gl_component, bool to_beginning=false)
 
void setActivator (SynthButton *activator)
 
void createOffOverlay ()
 
void setPresetSelector (PresetSelector *preset_selector, bool half=false)
 
void paintJointControlSliderBackground (Graphics &g, int x, int y, int width, int height)
 
void paintJointControlBackground (Graphics &g, int x, int y, int width, int height)
 
void paintJointControl (Graphics &g, int x, int y, int width, int height, const std::string &name)
 
void placeJointControls (int x, int y, int width, int height, SynthSlider *left, SynthSlider *right, Component *widget=nullptr)
 
void placeTempoControls (int x, int y, int width, int height, SynthSlider *tempo, SynthSlider *sync)
 
void placeRotaryOption (Component *option, SynthSlider *rotary)
 
void placeKnobsInArea (Rectangle< int > area, std::vector< Component * > knobs)
 
void lockCriticalSection ()
 
void unlockCriticalSection ()
 
Rectangle< int > getPresetBrowserBounds ()
 
int getTitleTextRight ()
 
Rectangle< int > getPowerButtonBounds ()
 
Rectangle< int > getTitleBounds ()
 
float getDisplayScale () const
 
virtual int getPixelMultiple () const
 

Detailed Description

An overlay for controlling a WaveLineSource in the wavetable editor.

This overlay provides an interface to edit a custom line-based waveform source. It features a line editor where users can manipulate points that define the waveform shape, as well as controls for grid size and a "pull power" parameter that influences how the lines interpolate between points.

Constructor & Destructor Documentation

◆ WaveLineSourceOverlay()

WaveLineSourceOverlay::WaveLineSourceOverlay ( )

Constructor.

Initializes all UI components including line editor and control sliders for grid and pull power.

◆ ~WaveLineSourceOverlay()

WaveLineSourceOverlay::~WaveLineSourceOverlay ( )
virtual

Destructor.

Member Function Documentation

◆ exportLfo()

void WaveLineSourceOverlay::exportLfo ( )
inlineoverridevirtual

Exports an LFO (not used in this overlay).

Implements LineEditor::Listener.

◆ fileLoaded()

void WaveLineSourceOverlay::fileLoaded ( )
overridevirtual

Callback for file loading completion (not used here).

Implements LineEditor::Listener.

◆ frameDragged()

virtual void WaveLineSourceOverlay::frameDragged ( WavetableKeyframe * keyframe,
int position )
inlineoverridevirtual

Called when a frame is dragged, but this overlay does not respond to frame dragging.

Parameters
keyframeThe dragged WavetableKeyframe.
positionThe new position of the frame.

Implements WavetableOrganizer::Listener.

◆ frameSelected()

void WaveLineSourceOverlay::frameSelected ( WavetableKeyframe * keyframe)
overridevirtual

Called when a new frame is selected in the wavetable editor.

Parameters
keyframeThe newly selected WavetableKeyframe or nullptr if none.

If the frame belongs to the associated WaveLineSource, it updates the editor with the frame's line model.

Implements WavetableOrganizer::Listener.

◆ importLfo()

void WaveLineSourceOverlay::importLfo ( )
inlineoverridevirtual

Imports an LFO (not used in this overlay).

Implements LineEditor::Listener.

◆ lineEditorScrolled()

void WaveLineSourceOverlay::lineEditorScrolled ( const MouseEvent & e,
const MouseWheelDetails & wheel )
overridevirtual

Called when the line editor is scrolled.

Parameters
eMouse event details.
wheelThe wheel details.

Implements LineEditor::Listener.

◆ pointAdded()

void WaveLineSourceOverlay::pointAdded ( int index,
Point< float > position )
overridevirtual

Callback when a line point is added.

Parameters
indexThe index at which the new point was inserted.
positionThe position of the new point.

Reimplemented from LineEditor::Listener.

◆ pointChanged()

void WaveLineSourceOverlay::pointChanged ( int index,
Point< float > position,
bool mouse_up )
overridevirtual

Callback when a line point changes its position.

Parameters
indexThe index of the changed point.
positionThe new position of the point.
mouse_upTrue if the mouse button was released after this change.

Reimplemented from LineEditor::Listener.

◆ pointRemoved()

void WaveLineSourceOverlay::pointRemoved ( int index)
overridevirtual

Callback when a point is removed.

Parameters
indexThe index of the removed point.

Reimplemented from LineEditor::Listener.

◆ pointsAdded()

void WaveLineSourceOverlay::pointsAdded ( int index,
int num_points_added )
overridevirtual

Callback when multiple points are added.

Parameters
indexThe insertion index.
num_points_addedThe number of points added.

Reimplemented from LineEditor::Listener.

◆ pointsRemoved()

void WaveLineSourceOverlay::pointsRemoved ( int index,
int num_points_removed )
overridevirtual

Callback when multiple points are removed.

Parameters
indexThe starting index of removal.
num_points_removedThe number of points removed.

Reimplemented from LineEditor::Listener.

◆ powersChanged()

void WaveLineSourceOverlay::powersChanged ( bool mouse_up)
overridevirtual

Callback when line powers/curvature change.

Parameters
mouse_upTrue if changes concluded with a mouse release.

Reimplemented from LineEditor::Listener.

◆ renderOpenGlComponents()

void WaveLineSourceOverlay::renderOpenGlComponents ( OpenGlWrapper & open_gl,
bool animate )
inlineoverridevirtual

Renders any openGL components, including the line editor.

Parameters
open_glReference to the OpenGL wrapper.
animateWhether to animate the rendering.

Reimplemented from SynthSection.

◆ resized()

void WaveLineSourceOverlay::resized ( )
overridevirtual

Called when the overlay is resized.

Sets colors and fill parameters on the line editor.

Reimplemented from SynthSection.

◆ setEditBounds()

void WaveLineSourceOverlay::setEditBounds ( Rectangle< int > bounds)
overridevirtual

Sets the editing bounds for the UI controls.

Parameters
boundsThe rectangular area representing the editing UI space.

Reimplemented from WavetableComponentOverlay.

◆ setLineSource()

void WaveLineSourceOverlay::setLineSource ( WaveLineSource * line_source)
inline

Sets the WaveLineSource associated with this overlay.

Parameters
line_sourceThe WaveLineSource to control.

◆ setPhase()

void WaveLineSourceOverlay::setPhase ( float phase)
inlineoverridevirtual

Sets the waveform phase (not used here).

Parameters
phaseThe new phase value.

Implements LineEditor::Listener.

◆ setTimeDomainBounds()

bool WaveLineSourceOverlay::setTimeDomainBounds ( Rectangle< int > bounds)
overridevirtual

Sets the bounding box for the time domain display area (line editor).

Parameters
boundsThe rectangular area for the time domain editor.
Returns
True if successfully set, else false.

Reimplemented from WavetableComponentOverlay.

◆ sliderDragEnded()

void WaveLineSourceOverlay::sliderDragEnded ( Slider * moved_slider)
override

Called when a slider in this overlay finishes being dragged.

Parameters
moved_sliderPointer to the finished slider.

◆ sliderValueChanged()

void WaveLineSourceOverlay::sliderValueChanged ( Slider * moved_slider)
overridevirtual

Called when a slider in this overlay changes its value.

Parameters
moved_sliderPointer to the changed slider.

Reimplemented from SynthSection.

◆ togglePaintMode()

void WaveLineSourceOverlay::togglePaintMode ( bool enabled,
bool temporary_switch )
inlineoverridevirtual

Toggles painting mode (not used in this overlay).

Parameters
enabledWhether painting mode is enabled.
temporary_switchWhether the switch is temporary.

Implements LineEditor::Listener.

Member Data Documentation

◆ current_frame_

WaveLineSource::WaveLineSourceKeyframe* WaveLineSourceOverlay::current_frame_
protected

Currently selected frame data.

◆ default_line_generator_

std::unique_ptr<LineGenerator> WaveLineSourceOverlay::default_line_generator_
protected

Default line generator model.

◆ editor_

std::unique_ptr<LineEditor> WaveLineSourceOverlay::editor_
protected

Line editor for modifying line source points.

◆ horizontal_grid_

std::unique_ptr<SynthSlider> WaveLineSourceOverlay::horizontal_grid_
protected

Control for horizontal grid size.

◆ horizontal_incrementers_

std::unique_ptr<Component> WaveLineSourceOverlay::horizontal_incrementers_
protected

Incrementer buttons for horizontal grid slider.

◆ interpolation_selector_

std::unique_ptr<Slider> WaveLineSourceOverlay::interpolation_selector_
protected

Possibly unused, defined in code for future functionality.

◆ kDefaultXGrid

int WaveLineSourceOverlay::kDefaultXGrid = 6
staticconstexpr

Default horizontal grid size.

◆ kDefaultYGrid

int WaveLineSourceOverlay::kDefaultYGrid = 4
staticconstexpr

Default vertical grid size.

◆ kFillAlpha

float WaveLineSourceOverlay::kFillAlpha = 0.6f
staticconstexpr

Alpha value for fill rendering.

◆ line_source_

WaveLineSource* WaveLineSourceOverlay::line_source_
protected

The associated WaveLineSource.

◆ pull_power_

std::unique_ptr<SynthSlider> WaveLineSourceOverlay::pull_power_
protected

Control for pull power parameter.

◆ vertical_grid_

std::unique_ptr<SynthSlider> WaveLineSourceOverlay::vertical_grid_
protected

Control for vertical grid size.

◆ vertical_incrementers_

std::unique_ptr<Component> WaveLineSourceOverlay::vertical_incrementers_
protected

Incrementer buttons for vertical grid slider.


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