|
Vital
|
A specialized SynthSlider that displays a popup menu of text options. More...
#include <text_selector.h>
Public Member Functions | |
| TextSelector (String name) | |
| Constructs a TextSelector with the given name. | |
| void | mouseDown (const MouseEvent &e) override |
| void | mouseUp (const MouseEvent &e) override |
| bool | shouldShowPopup () override |
| void | setLongStringLookup (const std::string *lookup) |
Public Member Functions inherited from SynthSlider | |
| SynthSlider (String name) | |
| virtual void | mouseDrag (const MouseEvent &e) override |
| virtual void | mouseEnter (const MouseEvent &e) override |
| virtual void | mouseExit (const MouseEvent &e) override |
| virtual void | mouseDoubleClick (const MouseEvent &e) override |
| virtual void | mouseWheelMove (const MouseEvent &e, const MouseWheelDetails &wheel) override |
| virtual void | focusLost (FocusChangeType cause) override |
| virtual void | valueChanged () override |
| Called when the slider value changes. Notifies GUIs. | |
| String | getRawTextFromValue (double value) |
| String | getSliderTextFromValue (double value) |
| String | getTextFromValue (double value) override |
| double | getValueFromText (const String &text) override |
| double | getAdjustedValue (double value) |
| double | getValueFromAdjusted (double value) |
| void | setValueFromAdjusted (double value) |
| virtual void | parentHierarchyChanged () override |
| Called when the parent hierarchy changes, updates references to synthesizer. | |
| virtual double | snapValue (double attemptedValue, DragMode dragMode) override |
| void | textEditorTextChanged (TextEditor &) override |
| TextEditor::Listener overrides for handling text entry. | |
| void | textEditorReturnKeyPressed (TextEditor &editor) override |
| void | textEditorFocusLost (TextEditor &editor) override |
| void | setSliderPositionFromText () |
| Sets the slider position from the current text in the text editor. | |
| void | showTextEntry () |
| Shows the text entry box for manual value entry. | |
| virtual void | drawShadow (Graphics &g) |
| void | drawRotaryShadow (Graphics &g) |
| void | snapToValue (bool snap, float value=0.0) |
| void | setScalingType (vital::ValueDetails::ValueScale scaling_type) |
| vital::ValueDetails::ValueScale | getScalingType () const |
| void | setStringLookup (const std::string *lookup) |
| void | setScrollEnabled (bool enabled) |
| const std::string * | getStringLookup () const |
| void | setUnits (const String &units) |
| String | getUnits () const |
| String | formatValue (float value) |
| void | setDefaultRange () |
| Sets the default parameter range based on the parameter details. | |
| void | addSliderListener (SliderListener *listener) |
| void | showPopup (bool primary) |
| void | hidePopup (bool primary) |
| void | setPopupPlacement (BubbleComponent::BubblePlacement placement) |
| void | setModulationPlacement (BubbleComponent::BubblePlacement placement) |
| BubbleComponent::BubblePlacement | getPopupPlacement () |
| BubbleComponent::BubblePlacement | getModulationPlacement () |
| void | notifyGuis () |
| Notifies GUI listeners of a value change. | |
| void | handlePopupResult (int result) |
| void | setSensitivity (double sensitivity) |
| double | getSensitivity () |
| Rectangle< int > | getModulationMeterBounds () const |
| bool | hasModulationArea () const |
| Rectangle< int > | getModulationArea () const |
| void | setModulationArea (Rectangle< int > area) |
| bool | isModulationBipolar () const |
| bool | isModulationStereo () const |
| bool | isModulationBypassed () const |
| void | setTextHeightPercentage (float percentage) |
| float | getTextHeightPercentage () |
| float | mouseHovering () const |
| std::vector< vital::ModulationConnection * > | getConnections () |
| void | setMouseWheelMovement (double movement) |
| void | setMaxDisplayCharacters (int characters) |
| void | setMaxDecimalPlaces (int decimal_places) |
| void | setTextEntrySizePercent (float width_percent, float height_percent) |
| void | setTextEntryWidthPercent (float percent) |
| void | setShiftIndexAmount (int shift_amount) |
| void | setShowPopupOnHover (bool show) |
| void | setPopupPrefix (String prefix) |
| void | setPopupSuffix (const juce::String &suffix) |
| void | setKnobSizeScale (float scale) |
| float | getKnobSizeScale () const override |
| void | useSuffix (bool use) |
| void | setExtraModulationTarget (Component *component) |
| Component * | getExtraModulationTarget () |
| void | setModulationBarRight (bool right) |
| bool | isModulationBarRight () |
| void | setDisplayMultiply (float multiply) |
| void | setDisplayExponentialBase (float base) |
| void | overrideValue (Skin::ValueId value_id, float value) |
| float | findValue (Skin::ValueId value_id) const override |
| void | setAlternateDisplay (Skin::ValueId id, float value, vital::ValueDetails details) |
| vital::ValueDetails * | getDisplayDetails () |
| OpenGlComponent * | getTextEditorComponent () |
Public Member Functions inherited from OpenGlSlider | |
| OpenGlSlider (String name) | |
| virtual void | resized () override |
| Called when the component is resized. Updates colors and display values. | |
| 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 |
| 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. | |
| void | setAlpha (float alpha, bool reset=false) |
| void | setDrawWhenNotVisible (bool draw) |
| SynthSection * | getSectionParent () |
Additional Inherited Members | |
Public Types inherited from SynthSlider | |
| enum | MenuId { kCancel = 0 , kArmMidiLearn , kClearMidiLearn , kDefaultValue , kManualEntry , kClearModulations , kModulationList } |
| Menu item IDs for the right-click popup menu. More... | |
Static Public Attributes inherited from SynthSlider | |
| static constexpr int | kDefaultFormatLength = 5 |
| static constexpr int | kDefaultFormatDecimalPlaces = 5 |
| static constexpr float | kDefaultTextEntryWidthPercent = 0.9f |
| static constexpr float | kDefaultTextEntryHeightPercent = 0.35f |
| static constexpr float | kModulationSensitivity = 0.003f |
| static constexpr float | kTextEntryHeightPercent = 0.6f |
| static constexpr float | kSlowDragMultiplier = 0.1f |
| static constexpr float | kDefaultSensitivity = 1.0f |
| static constexpr float | kDefaultTextHeightPercentage = 0.7f |
| static constexpr float | kDefaultRotaryDragLength = 200.0f |
| static constexpr float | kRotaryModulationControlPercent = 0.26f |
| static constexpr float | kLinearWidthPercent = 0.26f |
| static constexpr float | kLinearHandlePercent = 1.2f |
| static constexpr float | kLinearModulationPercent = 0.1f |
Static Public Attributes inherited from OpenGlSlider | |
| static constexpr float | kRotaryAngle = 0.8f * vital::kPi |
| The default rotary arc angle used for rotary sliders. | |
Protected Member Functions inherited from SynthSlider | |
| PopupItems | createPopupMenu () |
| void | setRotaryTextEntryBounds () |
| Sets bounds for text entry in rotary mode. | |
| void | setLinearTextEntryBounds () |
| Sets bounds for text entry in linear mode. | |
| void | notifyModulationAmountChanged () |
| Notifies listeners that modulation amount has changed. | |
| void | notifyModulationRemoved () |
| Notifies listeners that a modulation was removed. | |
| void | notifyModulationsChanged () |
| Notifies listeners that modulations changed. | |
A specialized SynthSlider that displays a popup menu of text options.
The TextSelector uses the slider value as an index into a string lookup table. When clicked, it shows a popup menu for the user to select a textual option.
| TextSelector::TextSelector | ( | String | name | ) |
Constructs a TextSelector with the given name.
Constructor.
| name | The name of the TextSelector. |
|
overridevirtual |
Handles mouse-down events. If not a right-click context menu, shows a popup with text options.
| e | The mouse event. |
Handles mouse-down events. Shows a popup menu with text options if it's a normal click, and defers to SynthSlider's mouseDown if it's a context menu click.
| e | The mouse event. |
Reimplemented from SynthSlider.
Reimplemented in TuningSelector.
|
overridevirtual |
Handles mouse-up events. Specifically handles context-menu logic.
| e | The mouse event. |
Handles mouse-up events. If it's a context-menu click, calls SynthSlider's mouseUp.
| e | The mouse event. |
Reimplemented from SynthSlider.
|
inline |
Sets an alternate lookup table for longer text strings.
| lookup | The alternate (long) lookup array of strings. |
|
inlineoverridevirtual |
Determines whether a popup should be shown on hover.
Reimplemented from SynthSlider.
|
protected |
Optional alternate lookup table for longer strings.