53 border_(
Shaders::kRoundedRectangleBorderFragment),
67 title_texts_[i] = std::make_unique<PlainTextComponent>(
"text",
"");
69 title_texts_[i]->setActive(
false);
106 std::unique_ptr<PlainTextComponent> title_texts_[
kMaxLines + 1];
107 std::vector<int> line_positions_;
108 std::vector<std::string> titles_;
141 setInterceptsMouseClicks(
false,
true);
A component for rendering multiple quads using OpenGL, with customizable colors, rounding,...
Definition open_gl_multi_quad.h:16
void setTargetComponent(Component *target_component)
Sets a target component to help position the quads.
Definition open_gl_multi_quad.h:358
A convenience class for a single quad rendered via OpenGL.
Definition open_gl_multi_quad.h:447
@ kLight
Definition open_gl_image_component.h:309
Manages and provides access to vertex and fragment shaders used by the OpenGL rendering pipeline.
Definition shaders.h:19
Base class for all synthesizer sections, providing UI layout, painting, and interaction logic.
Definition synth_section.h:193
void addSubSection(SynthSection *section, bool show=true)
Adds a subsection (another SynthSection) as a child.
Definition synth_section.cpp:457
void paintChildrenBackgrounds(Graphics &g)
Paints the backgrounds for all child sections.
Definition synth_section.cpp:274
void addOpenGlComponent(OpenGlComponent *open_gl_component, bool to_beginning=false)
Definition synth_section.cpp:489
virtual void initOpenGlComponents(OpenGlWrapper &open_gl)
Initializes all OpenGL components in this section and sub-sections.
Definition synth_section.cpp:349
A base class representing a component in a wavetable synthesis chain.
Definition wavetable_component.h:32
A background component with lines and titles for the overlay's control section.
Definition wavetable_component_overlay.h:42
void setPositions()
Updates all OpenGL components and text positions after changes to lines or titles.
Definition wavetable_component_overlay.cpp:7
static constexpr int kMaxLines
Maximum possible lines for control divisions.
Definition wavetable_component_overlay.h:45
void addTitle(const std::string &title)
Adds a title string for the next control section.
Definition wavetable_component_overlay.h:94
void addLine(int position)
Adds a vertical line divider at the given position.
Definition wavetable_component_overlay.h:88
void clearTitles()
Clears all control section titles.
Definition wavetable_component_overlay.h:82
ControlsBackground()
Constructs a ControlsBackground component.
Definition wavetable_component_overlay.h:52
void clearLines()
Clears all line divider positions.
Definition wavetable_component_overlay.h:77
A listener interface for receiving changes to the wavetable overlay.
Definition wavetable_component_overlay.h:118
virtual void frameDoneEditing()=0
Called when the user has finished editing the current frame.
virtual void frameChanged()=0
Called when the current frame is changed or updated.
virtual ~Listener()
Definition wavetable_component_overlay.h:120
A base overlay component for editing and interacting with a wavetable component's parameters.
Definition wavetable_component_overlay.h:22
virtual bool setFrequencyAmplitudeBounds(Rectangle< int > bounds)
Optionally set bounds for frequency-amplitude editing UI.
Definition wavetable_component_overlay.h:181
int getWidgetPadding()
Gets the widget padding.
Definition wavetable_component_overlay.cpp:109
void addFrameListener(Listener *listener)
Adds a listener for frame changes.
Definition wavetable_component_overlay.h:214
void setControlsWidth(int width)
Sets the total width for controls in the overlay.
Definition wavetable_component_overlay.h:267
void setComponent(WavetableComponent *component)
Sets the WavetableComponent that this overlay is editing.
Definition wavetable_component_overlay.cpp:81
static constexpr float kWidgetHeightForWidth
Definition wavetable_component_overlay.h:29
WavetableComponentOverlay(String name)
Constructs a WavetableComponentOverlay.
Definition wavetable_component_overlay.h:139
ControlsBackground controls_background_
Definition wavetable_component_overlay.h:300
virtual void setEditBounds(Rectangle< int > bounds)
Sets the editing bounds within which controls and titles are placed.
Definition wavetable_component_overlay.cpp:67
WavetableComponentOverlay()=delete
Deleted default constructor.
static constexpr float kShadowPercent
Definition wavetable_component_overlay.h:30
void setPadding(int padding)
Sets padding around controls and triggers a repaint.
Definition wavetable_component_overlay.h:242
void resetOverlay()
Resets the overlay, clearing any associated component.
Definition wavetable_component_overlay.cpp:76
std::vector< Listener * > listeners_
Definition wavetable_component_overlay.h:301
bool initialized_
Definition wavetable_component_overlay.h:304
static constexpr float kTitleHeightRatio
Definition wavetable_component_overlay.h:32
int getPadding()
Gets the current padding value.
Definition wavetable_component_overlay.h:248
static constexpr float kTitleHeightForWidth
Ratio constants for layout and sizing.
Definition wavetable_component_overlay.h:28
int getDividerX()
Gets the x position of a divider line.
Definition wavetable_component_overlay.cpp:101
Rectangle< int > edit_bounds_
Definition wavetable_component_overlay.h:302
static constexpr float kDividerPoint
Definition wavetable_component_overlay.h:31
void paintBackground(Graphics &g) override
Custom paint method for background.
Definition wavetable_component_overlay.h:155
static constexpr int kMaxGrid
Maximum grid lines used by some overlays.
Definition wavetable_component_overlay.h:25
float getTitleHeight()
Gets the title height based on ratio and current edit bounds.
Definition wavetable_component_overlay.cpp:97
virtual void setPowerScale(bool scale)
Sets whether to scale values like frequency display (optional override).
Definition wavetable_component_overlay.h:230
void initOpenGlComponents(OpenGlWrapper &open_gl) override
Initializes OpenGL components.
Definition wavetable_component_overlay.h:199
int getWidgetHeight()
Gets the widget height for controls.
Definition wavetable_component_overlay.cpp:105
bool initialized()
Checks if the overlay has been initialized.
Definition wavetable_component_overlay.h:208
WavetableComponent * current_component_
Definition wavetable_component_overlay.h:299
virtual void setFrequencyZoom(float zoom)
Sets the frequency zoom factor (optional override).
Definition wavetable_component_overlay.h:236
WavetableComponent * getComponent()
Gets the currently associated WavetableComponent.
Definition wavetable_component_overlay.h:260
int controls_width_
Definition wavetable_component_overlay.h:303
void removeListener(Listener *listener)
Removes a frame listener.
Definition wavetable_component_overlay.h:222
virtual bool setTimeDomainBounds(Rectangle< int > bounds)
Optionally set bounds for time-domain editing UI.
Definition wavetable_component_overlay.h:174
void notifyChanged(bool mouse_up)
Notifies listeners that a change has occurred to the frame.
Definition wavetable_component_overlay.cpp:86
int padding_
Definition wavetable_component_overlay.h:305
virtual bool setPhaseBounds(Rectangle< int > bounds)
Optionally set bounds for phase editing UI.
Definition wavetable_component_overlay.h:188
void playheadMoved(int position) override
Called when the wavetable playhead moves, but default does nothing.
Definition wavetable_component_overlay.h:161
Interface for objects that need to respond to organizer events.
Definition wavetable_organizer.h:109
A listener interface for objects interested in playhead position changes.
Definition wavetable_playhead.h:31
A helper struct containing references to OpenGL context, shaders, and display scale.
Definition shaders.h:174