Vital
|
A specialized slider-like component allowing selection of modulation sources or destinations from a popup menu. More...
#include <modulation_matrix.h>
Public Member Functions | |
ModulationSelector (String name, const std::vector< String > *selections, PopupItems *popup_items, bool dual_menu) | |
Constructs a ModulationSelector. | |
String | getTextFromValue (double value) override |
Converts a numeric value to a display text representing the currently selected modulation. | |
String | getSelection () |
Gets the currently selected modulation string. | |
bool | connected () const |
Checks if the selector is currently connected (not at default/off selection). | |
void | setValueFromName (const String &name, NotificationType notification_type) |
Sets the current value based on a given name. | |
void | mouseDown (const juce::MouseEvent &e) override |
Handles mouse down events, showing the popup selection menu. | |
![]() | |
OpenGlSlider (String name) | |
virtual void | resized () override |
Called when the component is resized. Updates colors and display values. | |
virtual void | valueChanged () override |
Called when the slider value changes. Redraws the image to reflect the new value. | |
void | parentHierarchyChanged () override |
Called when the parent hierarchy changes. Used for retrieving parent sections. | |
void | paintToImage (bool paint) |
bool | isText () const |
bool | isTextOrCurve () const |
bool | isModulationKnob () const |
bool | isRotaryQuad () const |
bool | isHorizontalQuad () const |
bool | isVerticalQuad () const |
OpenGlComponent * | getImageComponent () |
OpenGlComponent * | getQuadComponent () |
void | setMaxArc (float arc) |
void | setModulationKnob () |
Marks this slider as a modulation knob. | |
void | setModulationAmount (float modulation) |
float | getModulationAmount () const |
virtual float | getKnobSizeScale () const |
bool | isBipolar () const |
bool | isActive () const |
void | setBipolar (bool bipolar=true) |
void | setActive (bool active=true) |
virtual Colour | getModColor () const |
virtual Colour | getBackgroundColor () const |
virtual Colour | getUnselectedColor () const |
virtual Colour | getSelectedColor () const |
virtual Colour | getThumbColor () const |
int | getLinearSliderWidth () |
void | setSliderDisplayValues () |
Sets the slider display values (positions, sizes) based on current style. | |
void | redoImage (bool skip_image=false) |
void | setColors () |
Updates internal colors based on the current skin and state. | |
virtual float | findValue (Skin::ValueId value_id) const |
void | setAlpha (float alpha, bool reset=false) |
void | setDrawWhenNotVisible (bool draw) |
SynthSection * | getSectionParent () |
Static Public Member Functions | |
static void | modulationSelectionCallback (int result, ModulationSelector *selector) |
Callback for modulation popup menu selections. | |
Additional Inherited Members | |
![]() | |
static constexpr float | kRotaryAngle = 0.8f * vital::kPi |
The default rotary arc angle used for rotary sliders. | |
![]() | |
SynthSection * | parent_ |
The parent SynthSection. | |
A specialized slider-like component allowing selection of modulation sources or destinations from a popup menu.
|
inline |
Constructs a ModulationSelector.
name | The name for the selector. |
selections | A pointer to a vector of selection strings. |
popup_items | A pointer to a PopupItems structure for building menus. |
dual_menu | Whether the selector uses dual-level menus. |
|
inline |
Checks if the selector is currently connected (not at default/off selection).
|
inline |
Gets the currently selected modulation string.
|
override |
Converts a numeric value to a display text representing the currently selected modulation.
value | The numeric value representing the selection index. |
|
inlinestatic |
Callback for modulation popup menu selections.
result | The menu item index selected. |
selector | The ModulationSelector instance. |
|
override |
Handles mouse down events, showing the popup selection menu.
e | The mouse event. |
void ModulationSelector::setValueFromName | ( | const String & | name, |
NotificationType | notification_type ) |
Sets the current value based on a given name.
name | The name to match. |
notification_type | The notification type for value changes. |