Vital
|
Base class for all synthesizer sections, providing UI layout, painting, and interaction logic. More...
#include <synth_section.h>
Classes | |
class | OffOverlay |
A semi-transparent overlay shown when the section is inactive. More... | |
Public Member Functions | |
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 | resized () override |
Called when the component is resized. Arranges layout of child components. | |
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 | paintBackground (Graphics &g) |
Paints the background of the section. Calls paintContainer, heading, knobs, children. | |
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 | initOpenGlComponents (OpenGlWrapper &open_gl) |
Initializes all OpenGL components in this section and sub-sections. | |
virtual void | renderOpenGlComponents (OpenGlWrapper &open_gl, bool animate) |
Renders all OpenGL components in this section and sub-sections. | |
virtual void | destroyOpenGlComponents (OpenGlWrapper &open_gl) |
Destroys all OpenGL components in this section and sub-sections. | |
virtual void | sliderValueChanged (Slider *moved_slider) override |
Called when a slider value changes. Updates the synth parameter accordingly. | |
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 |
![]() | |
virtual | ~ButtonListener () |
Virtual destructor. | |
Static Public Attributes | |
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 Member Functions | |
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 |
Protected Attributes | |
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 SynthSection * | parent_ |
SynthButton * | activator_ |
PresetSelector * | preset_selector_ |
bool | preset_selector_half_width_ |
std::unique_ptr< OffOverlay > | off_overlay_ |
Skin::SectionOverride | skin_override_ |
float | size_ratio_ |
bool | active_ |
bool | sideways_heading_ |
Base class for all synthesizer sections, providing UI layout, painting, and interaction logic.
SynthSection serves as a container for UI elements in Vital. It supports nested sections, OpenGL components, sliders, buttons, and modulations. It handles painting backgrounds, labels, shadows, and complex UI layouts like joint controls and tempo controls.
SynthSection::SynthSection | ( | const String & | name | ) |
Constructs a SynthSection with a given name.
name | The name of the section. |
|
virtualdefault |
|
inline |
Gets the activator toggle button if any.
|
protected |
|
protected |
void SynthSection::addModulationButton | ( | ModulationButton * | button, |
bool | show = true ) |
Adds a modulation button to this section.
button | The ModulationButton pointer. |
show | True to add to visible layout. |
|
protected |
|
protected |
void SynthSection::addSubSection | ( | SynthSection * | section, |
bool | show = true ) |
Adds a subsection (another SynthSection) as a child.
section | The sub-section to add. |
show | True to make it visible. |
|
protected |
|
virtual |
Triggers animation state change in sub-sections if needed.
animate | True if animation is desired. |
Reimplemented in FullInterface.
|
overridevirtual |
Called when a button is clicked. Updates the synth parameter accordingly.
clicked_button | The button clicked. |
Reimplemented in AboutSection, BankExporter, DeleteSection, DownloadSection, DraggableEffect, EqualizerSection, FileSourceOverlay, FilterSection, FrequencyFilterOverlay, HeaderSection, LfoSection, LogoSection, ModulationManager, ModulationMatrix, ModulationMatrixRow, OscillatorOptions, OscillatorSection, OscillatorUnison, OversampleSettings, PopupBrowser, PresetBrowser, PresetSelector, SampleSection, SaveSection, SingleMacroSection, SynthPresetSelector, TransposeQuantizeCallOut, UpdateCheckSection, VoiceSection, VoiceSettings, WavetableComponentList, WavetableEditSection, and WaveWarpOverlay.
|
protected |
|
virtual |
Destroys all OpenGL components in this section and sub-sections.
open_gl | The OpenGlWrapper context. |
Reimplemented in ContentList, EffectsInterface, ModulationManager, ModulationMatrix, PopupList, PresetList, and SelectionList.
void SynthSection::drawLabel | ( | Graphics & | g, |
String | text, | ||
Rectangle< int > | component_bounds, | ||
bool | text_component = false ) |
Draws a label text below a component.
g | The Graphics context. |
text | The label text. |
component | The reference component. |
text_component | True if for a text component. |
void SynthSection::drawLabelBackground | ( | Graphics & | g, |
Rectangle< int > | bounds, | ||
bool | text_component = false ) |
Draws a background for a label area.
g | The Graphics context. |
bounds | The rectangle area for the label. |
text_component | True if drawing for a text component. |
void SynthSection::drawLabelBackgroundForComponent | ( | Graphics & | g, |
Component * | component ) |
Draws label background for a specific component.
g | The Graphics context. |
component | The component needing label background. |
void SynthSection::drawLabelConnectionForComponents | ( | Graphics & | g, |
Component * | left, | ||
Component * | right ) |
Draws a rectangular connection between labels of two components.
g | The Graphics context. |
left | The left component. |
right | The right component. |
|
inline |
Draws a label for a given component.
g | The Graphics context. |
text | The label text. |
component | The component to label. |
text_component | True if for a text component. |
void SynthSection::drawTempoDivider | ( | Graphics & | g, |
Component * | sync ) |
Draws a divider line for tempo-related controls.
g | The Graphics context. |
sync | The tempo sync component. |
void SynthSection::drawTextBelowComponent | ( | Graphics & | g, |
String | text, | ||
Component * | component, | ||
int | space, | ||
int | padding = 0 ) |
Draws text below a component with optional padding.
g | The Graphics context. |
text | The text to draw. |
component | The reference component. |
space | Vertical space below the component. |
padding | Horizontal padding. |
void SynthSection::drawTextComponentBackground | ( | Graphics & | g, |
Rectangle< int > | bounds, | ||
bool | extend_to_label ) |
Draws a background for a text component area.
g | The Graphics context. |
bounds | The area to draw. |
extend_to_label | True to extend background up to label area. |
float SynthSection::findValue | ( | Skin::ValueId | value_id | ) | const |
Finds a value in the skin overrides or from the parent if not found locally.
value_id | The Skin value ID to lookup. |
|
inline |
Gets all toggle buttons registered in this section.
|
inline |
Gets all modulation buttons registered in this section.
|
inline |
Gets all sliders registered in this section.
int SynthSection::getComponentShadowWidth | ( | ) |
Gets the width of shadow around components.
|
inlinevirtual |
Gets the currently loaded file. Overridden by subclasses.
Reimplemented in LfoSection, ModulationMatrix, OscillatorSection, SampleSection, and WavetableEditSection.
|
protected |
Rectangle< int > SynthSection::getDividedAreaBuffered | ( | Rectangle< int > | full_area, |
int | num_sections, | ||
int | section, | ||
int | buffer ) |
Divides an area into equal sections with buffering, returns the specified section.
full_area | The full rectangle area. |
num_sections | Total number of sections. |
section | The index of the section to retrieve. |
buffer | The spacing between sections. |
Rectangle< int > SynthSection::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.
full_area | The full rectangle area. |
num_sections | Total number of sections. |
section | The index of the section to retrieve. |
buffer | The spacing between sections. |
|
inline |
|
inlinevirtual |
Gets the author metadata of the currently loaded file. Overridden by subclasses.
Reimplemented in OscillatorSection.
|
inlinevirtual |
Gets the name of the currently loaded file. Overridden by subclasses.
Reimplemented in OscillatorSection.
float SynthSection::getKnobSectionHeight | ( | ) |
|
inline |
Gets the label background bounds for a component.
component | The component. |
text_component | True if for a text component. |
Rectangle< int > SynthSection::getLabelBackgroundBounds | ( | Rectangle< int > | bounds, |
bool | text_component = false ) |
Gets the background bounds for a label.
bounds | The component bounds. |
text_component | True if for a text component. |
Font SynthSection::getLabelFont | ( | ) |
Gets a suitable font for label text.
float SynthSection::getModButtonWidth | ( | ) |
float SynthSection::getModFontSize | ( | ) |
float SynthSection::getPadding | ( | ) |
|
protectedvirtual |
Reimplemented in FullInterface.
|
inline |
|
protected |
|
inline |
|
protected |
|
inline |
float SynthSection::getSliderOverlap | ( | ) |
float SynthSection::getSliderOverlapWithSpace | ( | ) |
float SynthSection::getSliderWidth | ( | ) |
float SynthSection::getStandardKnobSize | ( | ) |
float SynthSection::getTextComponentHeight | ( | ) |
float SynthSection::getTextSectionYOffset | ( | ) |
|
protected |
|
protected |
float SynthSection::getTitleWidth | ( | ) |
|
inline |
float SynthSection::getWidgetMargin | ( | ) |
float SynthSection::getWidgetRounding | ( | ) |
|
overridevirtual |
Called when a SynthButton state changes (GUI interaction).
button | The SynthButton changed. |
Reimplemented from SynthButton::ButtonListener.
void SynthSection::hidePopupDisplay | ( | bool | primary | ) |
Hides the currently shown popup display.
primary | True if hiding the primary popup display. |
|
virtual |
Initializes all OpenGL components in this section and sub-sections.
open_gl | The OpenGlWrapper context. |
Reimplemented in ContentList, EffectsInterface, ModulationManager, ModulationMatrix, PopupList, PresetList, SelectionList, and WavetableComponentOverlay.
|
inline |
Checks if the section is currently active.
|
inlinevirtual |
Loads a file (e.g., a sample or wavetable). Overridden by subclasses.
file | The file to load. |
Reimplemented in FileSourceOverlay, LfoSection, ModulationMatrix, OscillatorSection, SampleSection, and WavetableEditSection.
|
protected |
|
overridevirtual |
Called when the component should paint itself.
g | The Graphics context. |
Reimplemented in DraggableEffect, and TransposeQuantizeCallOut.
|
virtual |
Paints the background of the section. Calls paintContainer, heading, knobs, children.
g | The Graphics context. |
Reimplemented in BankExporter, BendSection, ChorusSection, CompressorSection, ContentList, DelaySection, DisplaySettings, DistortionSection, DragDropEffectOrder, DraggableEffect, DualPopupSelector, EffectsContainer, EffectsInterface, EnvelopeSection, EqualizerSection, ExtraModSection, FilterSection, FlangerSection, FullInterface, HeaderSection, HelpPanel, KeyboardInterface, LfoSection, LogoSection, MacroKnobSection, MasterControlsInterface, ModulationInterface, ModulationManager, ModulationMatrix, ModulationMatrixRow, ModulationTabSelector, OscillatorAdvancedSection, OscillatorOptions, OscillatorSection, OscillatorUnison, Overlay, OversampleSettings, PhaserSection, PopupBrowser, PopupList, PortamentoSection, PresetBrowser, PresetList, PresetSelector, RandomSection, ReverbSection, SampleSection, SelectionList, SingleMacroSection, SinglePopupSelector, SynthesisInterface, SynthPresetSelector, VoiceSection, VoiceSettings, VolumeSection, WavetableComponentList, WavetableComponentOverlay, WavetableEditSection, WavetableOrganizer, and WavetablePlayhead.
|
inlinevirtual |
Stub for painting background shadows. Overridden by subclasses if needed.
g | The Graphics context. |
Reimplemented in BankExporter, BendSection, ChorusSection, CompressorSection, ContentList, DelaySection, DisplaySettings, DistortionSection, DualPopupSelector, EqualizerSection, ExtraModSection, FilterSection, FlangerSection, KeyboardInterface, ModulationInterface, ModulationMatrix, OscillatorOptions, OscillatorSection, OscillatorUnison, OutputDisplays, OversampleSettings, PhaserSection, PopupBrowser, PopupList, PortamentoSection, PresetBrowser, PresetList, ReverbSection, SampleSection, SelectionList, SingleMacroSection, SinglePopupSelector, VoiceSection, VoiceSettings, and WavetableEditSection.
|
virtual |
Paints the section body background using the entire component area.
g | The Graphics context. |
|
virtual |
Paints the body background within given bounds.
g | The Graphics context. |
bounds | The area to paint. |
|
virtual |
Paints the border around the entire component.
g | The Graphics context. |
|
virtual |
Paints the border around given bounds.
g | The Graphics context. |
bounds | The rectangle area. |
void SynthSection::paintChildBackground | ( | Graphics & | g, |
SynthSection * | child ) |
Paints a child's background specifically.
g | The Graphics context. |
child | The child SynthSection. |
void SynthSection::paintChildrenBackgrounds | ( | Graphics & | g | ) |
Paints the backgrounds for all child sections.
g | The Graphics context. |
|
virtual |
Paints shadows for child sections.
g | The Graphics context. |
Reimplemented in EffectsInterface.
void SynthSection::paintChildShadow | ( | Graphics & | g, |
SynthSection * | child ) |
Paints a child's shadow specifically.
g | The Graphics context. |
child | The child SynthSection. |
|
virtual |
Paints the container background, body, heading, etc.
g | The Graphics context. |
|
virtual |
Paints the heading text for this section, either sideways or horizontally.
g | The Graphics context. |
|
protected |
|
protected |
|
protected |
void SynthSection::paintKnobShadows | ( | Graphics & | g | ) |
Paints knob shadows for all sliders.
g | The Graphics context. |
void SynthSection::paintOpenGlBackground | ( | Graphics & | g, |
OpenGlComponent * | child ) |
Paints the background of an OpenGlComponent child.
g | The Graphics context. |
child | The OpenGlComponent child. |
void SynthSection::paintOpenGlChildrenBackgrounds | ( | Graphics & | g | ) |
Paints the backgrounds for all OpenGL child components.
g | The Graphics context. |
|
virtual |
Paints the section name heading text vertically if sideways_heading_ is true.
g | The Graphics context. |
|
virtual |
Paints a tab-like shadow effect around the component.
g | The Graphics context. |
Reimplemented in ModulationTabSelector.
void SynthSection::paintTabShadow | ( | Graphics & | g, |
Rectangle< int > | bounds ) |
Paints a tab shadow effect within specified bounds.
g | The Graphics context. |
bounds | The area to apply the shadow. |
|
protected |
|
protected |
|
protected |
|
protected |
void SynthSection::removeSubSection | ( | SynthSection * | section | ) |
Removes a previously added subsection.
section | The sub-section to remove. |
|
virtual |
Renders all OpenGL components in this section and sub-sections.
open_gl | The OpenGlWrapper context. |
animate | True if animation is desired. |
Reimplemented in AboutSection, ContentList, DownloadSection, DragDropEffectOrder, DraggableEffect, EffectsInterface, EqualizerSection, ModulationManager, ModulationMatrix, PopupList, PresetList, SelectionList, WaveLineSourceOverlay, and WavetableEditSection.
|
virtual |
Requests a repaint of the background.
Reimplemented in ModulationMatrixRow.
|
virtual |
Resets the section and all sub-sections.
Reimplemented in EnvelopeSection, FullInterface, HeaderSection, HelpPanel, LfoSection, ModulationInterface, ModulationManager, ModulationTabSelector, OscillatorSection, SampleSection, SingleMacroSection, and WavetableEditSection.
|
overridevirtual |
Called when the component is resized. Arranges layout of child components.
Reimplemented in AboutSection, AudioFileViewer, BankExporter, BendSection, ChorusSection, CompressorSection, ContentList, DelaySection, DeleteSection, DisplaySettings, DistortionSection, DownloadSection, DragDropEffectOrder, DraggableEffect, DualPopupSelector, EffectsInterface, EnvelopeSection, EqualizerSection, ExpiredSection, ExtraModSection, FilterSection, FlangerSection, FullInterface, HeaderSection, HelpPanel, KeyboardInterface, LfoSection, LogoSection, MacroKnobSection, MasterControlsInterface, ModulationInterface, ModulationManager, ModulationMatrix, ModulationMatrixRow, ModulationTabSelector, OscillatorAdvancedSection, OscillatorOptions, OscillatorSection, OscillatorUnison, OutputDisplays, Overlay, OversampleSettings, PhaserSection, PopupBrowser, PopupDisplay, PopupList, PortamentoSection, PresetBrowser, PresetList, PresetSelector, RandomSection, ReverbSection, SampleSection, SaveSection, SelectionList, SingleMacroSection, SinglePopupSelector, SynthesisInterface, SynthPresetSelector, TransposeQuantizeCallOut, UpdateCheckSection, VoiceSection, VoiceSettings, VolumeSection, WaveLineSourceOverlay, WaveSourceOverlay, WavetableComponentList, WavetableEditSection, WavetableOrganizer, and WavetablePlayhead.
|
protected |
|
virtual |
Sets the active state of this section and sub-sections.
active | True to activate, false to deactivate. |
Reimplemented in ChorusSection, CompressorSection, DelaySection, DistortionSection, EqualizerSection, FilterSection, FlangerSection, OscillatorSection, PhaserSection, ReverbSection, and SampleSection.
|
virtual |
Sets values for all known parameters from a control map.
controls | The map of parameter names to control objects. |
Reimplemented in CompressorSection, DelaySection, DistortionSection, DragDropEffectOrder, FilterSection, FullInterface, HeaderSection, LfoSection, ModulationMatrix, OscillatorOptions, OscillatorSection, OscillatorUnison, OversampleSettings, PortamentoSection, RandomSection, SampleSection, VoiceSection, and VoiceSettings.
void SynthSection::setLabelFont | ( | Graphics & | g | ) |
Sets the Graphics context font and color for labels.
g | The Graphics context. |
|
inline |
Sets the parent SynthSection.
parent | The parent section. |
|
inlineprotected |
|
virtual |
Enables or disables scroll wheel support for this section and sub-sections.
enabled | True to enable scroll wheel changes, false to disable. |
Reimplemented in EqualizerSection.
|
inlineprotected |
|
virtual |
Sets the size ratio for scaling UI elements.
ratio | The scaling ratio. |
Reimplemented in Overlay.
|
inline |
|
inline |
Sets a single skin value override.
id | The Skin::ValueId enum. |
value | The value to set. |
|
virtual |
Sets skin values (colors, sizes) and applies them to sub-sections.
skin | The Skin object. |
top_level | True if this is the top-level call. |
Reimplemented in OscillatorSection.
|
inline |
Sets custom skin values for this section.
values | A map of Skin::ValueId to float values. |
|
protected |
|
virtual |
Sets a single parameter value for a known control.
name | The parameter name. |
value | The new value. |
notification | Whether to send notifications to listeners. |
void SynthSection::showDualPopupSelector | ( | Component * | source, |
Point< int > | position, | ||
int | width, | ||
const PopupItems & | options, | ||
std::function< void(int)> | callback ) |
Shows a dual popup selector for hierarchical selection.
source | The component launching the selector. |
position | The position relative to source for the popup. |
width | Desired width of the popup. |
options | The PopupItems to display. |
callback | Callback when selection is made. |
void SynthSection::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).
owner | The SynthSection requesting the browser. |
bounds | The area where the browser should appear. |
directories | A list of directories to browse. |
extensions | The file extensions allowed. |
passthrough_name | A name for a passthrough folder. |
additional_folders_name | A name for additional folders category. |
void SynthSection::showPopupDisplay | ( | Component * | source, |
const std::string & | text, | ||
BubbleComponent::BubblePlacement | placement, | ||
bool | primary ) |
Shows a brief popup display (like a tooltip).
source | The component requesting the display. |
text | The text to show. |
placement | The bubble placement relative to the source. |
primary | True if using the primary popup display slot. |
void SynthSection::showPopupSelector | ( | Component * | source, |
Point< int > | position, | ||
const PopupItems & | options, | ||
std::function< void(int)> | callback, | ||
std::function< void()> | cancel = { } ) |
Shows a popup selector with options.
source | The component launching the selector. |
position | The position relative to source to show the popup. |
options | The PopupItems to display. |
callback | Callback when selection is made. |
cancel | Optional callback if cancelled. |
|
overridevirtual |
Called when a slider value changes. Updates the synth parameter accordingly.
moved_slider | The slider that changed. |
Reimplemented in BendSection, CompressorSection, DelaySection, DisplaySettings, DistortionSection, EqualizerSection, FileSourceOverlay, FrequencyFilterOverlay, HeaderSection, LfoSection, ModulationManager, ModulationMatrix, ModulationMatrixRow, OscillatorUnison, PhaseModifierOverlay, PortamentoSection, RandomSection, ReverbSection, SlewLimiterOverlay, WaveFoldOverlay, WaveLineSourceOverlay, WaveSourceOverlay, WaveWarpOverlay, and WaveWindowOverlay.
|
protected |
void SynthSection::updatePopupBrowser | ( | SynthSection * | owner | ) |
Updates the currently visible popup browser if any.
owner | The SynthSection that owns the browser. |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |