Deluge Firmware 1.3.0
Build date: 2025.09.14
Loading...
Searching...
No Matches
deluge::gui::menu_item::PatchCableStrength Class Referenceabstract
Inheritance diagram for deluge::gui::menu_item::PatchCableStrength:
Collaboration diagram for deluge::gui::menu_item::PatchCableStrength:

Public Member Functions

void beginSession (MenuItem *navigatedBackwardFrom) final
 Begin an editing session with this menu item.
void endSession () final
 End an editing session with this menu item.
void readCurrentValue () final
 Like readValueAgain, but does not redraw.
void writeCurrentValue () override
int32_t getMinValue () const final
int32_t getMaxValue () const final
int32_t getNumDecimalPlaces () const final
virtual int32_t getDefaultEditPos ()
MenuPermission checkPermissionToBeginSession (ModControllableAudio *modControllable, int32_t whichThing, MultiRange **currentRange) override
virtual ParamDescriptor getDestinationDescriptor ()=0
virtual PatchSource getS ()=0
uint8_t getIndexOfPatchedParamToBlink () final
MenuItemselectButtonPress () final
 Handle a select button press.
ActionResult buttonAction (hid::Button b, bool on, bool inCardRoutine) override
 Handle an arbitrary button.
void selectEncoderAction (int32_t offset) override
 Handle select encoder movement.
void horizontalEncoderAction (int32_t offset) override
 Handle horizontal encoder movement.
modulation::params::Kind getParamKind ()
uint32_t getParamIndex ()
PatchSource getPatchSource () override
void renderOLED () override
 Root rendering routine for OLED.
void appendAdditionalDots (std::vector< uint8_t > &dotPositions) override
void unlearnAction () final
 Unlearn the parameter controlled by this menu.
bool allowsLearnMode () final
 Used by SoundEditor to determine if the current menu item can accept MIDI learning.
void learnKnob (MIDICable *cable, int32_t whichKnob, int32_t modKnobMode, int32_t midiChannel) final
ModelStackWithAutoParamgetModelStackWithParam (void *memory) override
void updateAutomationViewParameter () override
Public Member Functions inherited from deluge::gui::menu_item::Decimal
void renderInHorizontalMenu (int32_t startX, int32_t width, int32_t startY, int32_t height) override
NumberStyle getNumberStyle () const override
Public Member Functions inherited from deluge::gui::menu_item::Number
void drawHorizontalBar (int32_t yTop, int32_t marginL, int32_t marginR=-1, int32_t height=8)
Public Member Functions inherited from deluge::gui::menu_item::Value< int32_t >
 MenuItem ()
 MenuItem (deluge::l10n::String newName, deluge::l10n::String newTitle=deluge::l10n::String::EMPTY_STRING)
 MenuItem (const MenuItem &other)=delete
 MenuItem (const MenuItem &&other)=delete
void beginSession (MenuItem *navigatedBackwardFrom) override
 Begin an editing session with this menu item.
void selectEncoderAction (int32_t offset) override
 Handle select encoder movement.
void readValueAgain () override
 Re-read the value from the system and redraw the display to match.
bool selectEncoderActionEditsInstrument () final
 Used by the sound editor to mark the current instrument as edited when the select encoder is scrolled.
void setValue (int32_t value)
int32_t getValue ()
Public Member Functions inherited from MenuItem
 MenuItem (deluge::l10n::String newName, deluge::l10n::String newTitle=deluge::l10n::String::EMPTY_STRING)
 MenuItem (const MenuItem &other)=delete
 MenuItem (const MenuItem &&other)=delete
MenuItemoperator= (const MenuItem &other)=delete
MenuItemoperator= (const MenuItem &&other)=delete
virtual void verticalEncoderAction (int32_t offset)
 Handle vertical encoder movement.
virtual ActionResult timerCallback ()
 Handle a TimerName::UI_SPECIFIC event.
virtual bool usesAffectEntire ()
 Claim support for Kit AFFECT_ENTIRE editing.
virtual MenuPermission checkPermissionToBeginSession (ModControllableAudio *modControllable, int32_t whichThing, MultiRange **currentRange)
 Double-check that this MenuItem will work with the currently selected sound range.
virtual uint8_t shouldBlinkPatchingSourceShortcut (PatchSource s, uint8_t *colour)
virtual MenuItempatchingSourceShortcutPress (PatchSource s, bool previousPressStillActive=false)
 Action to take when a source shortcut is pressed.
virtual bool learnNoteOn (MIDICable &cable, int32_t channel, int32_t noteCode)
 Attempt to bind this menu item to a note code.
virtual void learnProgramChange (MIDICable &cable, int32_t channel, int32_t programNumber)
virtual void learnCC (MIDICable &cable, int32_t channel, int32_t ccNumber, int32_t value)
virtual bool shouldBlinkLearnLed ()
virtual bool isRangeDependent ()
 Returns true if this parameter is only relevant to some note ranges.
virtual std::string_view getTitle () const
 Get the title to be used when rendering on OLED, both as a deluge::gui::menu_item::Submenu and when displaying ourselves (using the default renderOLED implementation).
virtual uint8_t shouldDrawDotOnName ()
 Get the "draw dot state".
virtual void drawName ()
 Draw the name we want to use when selecting this in a deluge::gui::menu_item::Submenu to the 7SEG.
virtual std::string_view getName () const
 Get the actual name for use on OLED for deluge::gui::menu_item::Submenu s.
virtual bool isRelevant (ModControllableAudio *modControllable, int32_t whichThing)
 Check if this MenuItem should show up in a containing deluge::gui::menu_item::Submenu.
virtual bool shouldEnterSubmenu ()
 Check if selecting this menu item (with select encoder) should enter a submenu.
virtual int32_t getSubmenuItemTypeRenderLength ()
 Handle rendering of submenu item types.
virtual int32_t getSubmenuItemTypeRenderIconStart ()
virtual void renderSubmenuItemTypeForOled (int32_t yPixel)
virtual bool isSubmenu ()
virtual void setupNumberEditor ()
virtual void updatePadLights ()
virtual void getColumnLabel (StringBuf &label)
virtual bool showColumnLabel () const
 Show a label for the parameter in Horizontal menu.
virtual int32_t getColumnSpan () const
 Get the number of occupied virtual columns in Horizontal menu.
virtual bool showNotification () const
 Show a popup with the full name and value of the editing parameter at the top of Horizontal menu.
virtual bool allowToBeginSessionFromHorizontalMenu ()
 Allow entering menu session by selecting the menu item twice in Horizontal menu.
Public Member Functions inherited from MenuItemWithCCLearning
virtual ParamDescriptor getLearningThing ()=0
void unlearnAction ()
bool allowsLearnMode () const
void learnKnob (MIDICable *cable, int32_t whichKnob, int32_t modKnobMode, int32_t midiChannel)
Public Member Functions inherited from deluge::gui::menu_item::Automation
MenuItemselectButtonPress ()
ActionResult buttonAction (deluge::hid::Button b, bool on, bool inCardRoutine)
void selectAutomationViewParameter (bool clipMinder)
void handleAutomationViewParameterUpdate ()
 MenuItem::updateAutomationViewParameter forwards here when necessary.

Public Attributes

uint32_t delayHorizontalScrollUntil = 0
 Used when scrolling horizontally to briefly catch on min / max decimal number edit position.
deluge::l10n::String title
 Can get overridden by getTitle(). Actual max num chars for OLED display is 14.
const deluge::l10n::String name
 Default name for use on OLED for deluge::gui::menu_item::Submenu s.
deluge::gui::menu_item::HorizontalMenuparent {nullptr}

Protected Member Functions

ModelStackWithAutoParamgetModelStack (void *memory, bool allowCreation=false)
void getNotificationValue (StringBuf &valueBuf) override
 Get the parameter value string to show in the popup.
Protected Member Functions inherited from deluge::gui::menu_item::Decimal
void drawValue () override
virtual int32_t getDefaultEditPos () const
virtual int32_t getNumberEditSize ()
void drawPixelsForOled () override
 Paints the pixels below the standard title block.
virtual void drawActualValue (bool justDidHorizontalScroll=false)
Protected Member Functions inherited from deluge::gui::menu_item::Number
float getNormalizedValue ()
void renderInHorizontalMenu (int32_t startX, int32_t width, int32_t startY, int32_t height) override
void drawKnob (int32_t startX, int32_t startY, int32_t width, int32_t height)
void drawVerticalBar (int32_t startX, int32_t startY, int32_t slotWidth, int32_t slotHeight)
void drawLevel (int32_t startX, int32_t startY, int32_t slotWidth, int32_t slotHeight)
void drawPercent (int32_t startX, int32_t startY, int32_t width, int32_t height)
void drawSlider (int32_t startX, int32_t startY, int32_t slotWidth, int32_t slotHeight)
void drawLengthSlider (int32_t startX, int32_t startY, int32_t slotWidth, int32_t slotHeight, bool minSliderPos=3)

Private Member Functions

bool isInHorizontalMenu () const
void setPatchCablePolarity (Polarity newPolarity)
void updatePolarityUI ()

Private Attributes

Polarity polarityInTheUI_
bool patchCableExists_ = false

Additional Inherited Members

static void drawItemsForOled (std::span< std::string_view > options, int32_t selectedOption, int32_t offset=0)
 Internal helper which can draw the standard deluge::gui::menu_item::Submenu layout.
Static Protected Member Functions inherited from deluge::gui::menu_item::Decimal
static int32_t getNumNonZeroDecimals (int32_t value)

Member Function Documentation

◆ allowsLearnMode()

bool deluge::gui::menu_item::PatchCableStrength::allowsLearnMode ( )
inlinefinalvirtual

Used by SoundEditor to determine if the current menu item can accept MIDI learning.

Reimplemented from MenuItem.

◆ appendAdditionalDots()

void deluge::gui::menu_item::PatchCableStrength::appendAdditionalDots ( std::vector< uint8_t > & dotPositions)
overridevirtual

Reimplemented from deluge::gui::menu_item::Decimal.

◆ beginSession()

void deluge::gui::menu_item::PatchCableStrength::beginSession ( MenuItem * navigatedBackwardFrom)
finalvirtual

Begin an editing session with this menu item.

Should make sure the menu's internal state matches the system and redraw the display.

Reimplemented from deluge::gui::menu_item::Decimal.

◆ buttonAction()

ActionResult deluge::gui::menu_item::PatchCableStrength::buttonAction ( hid::Button b,
bool on,
bool inCardRoutine )
overridevirtual

Handle an arbitrary button.

The returned result is forwarded up the View stack, so returning ActionResult::DEALT_WITH will suppress buttons going to the current View.

This is called with (b == SELECT_ENC && on) immediately after the menu is entered, or after selectButtonPress is called and returns NO_NAVIGATION.

Reimplemented from MenuItem.

◆ endSession()

void deluge::gui::menu_item::PatchCableStrength::endSession ( )
finalvirtual

End an editing session with this menu item.

Reimplemented from MenuItem.

◆ getIndexOfPatchedParamToBlink()

uint8_t deluge::gui::menu_item::PatchCableStrength::getIndexOfPatchedParamToBlink ( )
finalvirtual
Returns
the parameter index (deluge::modulation::params) that the SoundEditor should look for in paramShortcutsForSounds.

Reimplemented from MenuItem.

◆ getMaxValue()

int32_t deluge::gui::menu_item::PatchCableStrength::getMaxValue ( ) const
inlinenodiscardfinalvirtual

◆ getMinValue()

int32_t deluge::gui::menu_item::PatchCableStrength::getMinValue ( ) const
inlinenodiscardfinalvirtual

Reimplemented from deluge::gui::menu_item::Number.

◆ getModelStackWithParam()

ModelStackWithAutoParam * deluge::gui::menu_item::PatchCableStrength::getModelStackWithParam ( void * memory)
overridevirtual

◆ getNotificationValue()

void deluge::gui::menu_item::PatchCableStrength::getNotificationValue ( StringBuf & valueBuf)
inlineoverrideprotectedvirtual

Get the parameter value string to show in the popup.

Needs to be overridden

Reimplemented from deluge::gui::menu_item::Decimal.

◆ getNumDecimalPlaces()

int32_t deluge::gui::menu_item::PatchCableStrength::getNumDecimalPlaces ( ) const
inlinenodiscardfinalvirtual

◆ getParamIndex()

uint32_t deluge::gui::menu_item::PatchCableStrength::getParamIndex ( )
virtual
Returns
the parameter index (deluge::modulation::params) we edit if we're a patched param, otherwise 255.

Reimplemented from MenuItem.

◆ getParamKind()

deluge::modulation::params::Kind deluge::gui::menu_item::PatchCableStrength::getParamKind ( )
virtual

Declares which parameter we intend to edit. SoundEditor uses this to find which shortcut pad to blink based on paramShortcutsForSounds.

Returns
the parameter kind (deluge::modulation::params::Kind) we edit if we're a patched param, otherwise Kind::NONE

Reimplemented from MenuItem.

◆ getPatchSource()

PatchSource deluge::gui::menu_item::PatchCableStrength::getPatchSource ( )
overridevirtual

◆ horizontalEncoderAction()

void deluge::gui::menu_item::PatchCableStrength::horizontalEncoderAction ( int32_t offset)
overridevirtual

Handle horizontal encoder movement.

Parameters
offsetmust be either -1 or 1, jumping is not supported by many children.

Reimplemented from deluge::gui::menu_item::Decimal.

◆ learnKnob()

void deluge::gui::menu_item::PatchCableStrength::learnKnob ( MIDICable * cable,
int32_t whichKnob,
int32_t modKnobMode,
int32_t midiChannel )
inlinefinalvirtual

Learn a mod knob to the parameter edited by this menu.

Parameters
cableThe MIDI cable to learn from, or null if a mod knob is to be learned.

Reimplemented from MenuItem.

◆ readCurrentValue()

void deluge::gui::menu_item::PatchCableStrength::readCurrentValue ( )
finalvirtual

Like readValueAgain, but does not redraw.

Reimplemented from MenuItem.

◆ renderOLED()

void deluge::gui::menu_item::PatchCableStrength::renderOLED ( )
overridevirtual

Root rendering routine for OLED.

If you want a title, you probably want to override drawPixelsForOled instead or you will need to paint the title yourself. Uses the title from getTitle() when rendering.

Reimplemented from MenuItem.

◆ selectButtonPress()

MenuItem * deluge::gui::menu_item::PatchCableStrength::selectButtonPress ( )
finalvirtual

Handle a select button press.

Returns
  • NO_NAVIGATION if the SoundEditor should stay on the current menu.
  • nullptr if the SoundEditor should go up one level in the menu stack.
  • otherwise, enter the returned menu.

Reimplemented from MenuItem.

◆ selectEncoderAction()

void deluge::gui::menu_item::PatchCableStrength::selectEncoderAction ( int32_t offset)
overridevirtual

Handle select encoder movement.

Child classes which override this should be careful to handle offsets larger than 1, as holding shift and scrolling will increase them.

Reimplemented from deluge::gui::menu_item::Decimal.

◆ unlearnAction()

void deluge::gui::menu_item::PatchCableStrength::unlearnAction ( )
inlinefinalvirtual

Unlearn the parameter controlled by this menu.

Reimplemented from MenuItem.

◆ updateAutomationViewParameter()

void deluge::gui::menu_item::PatchCableStrength::updateAutomationViewParameter ( )
overridevirtual

Called to inform automation view that the active parameter has changed. Parameters inheriting from Automation forward there, no-op for everything else.

Reimplemented from MenuItem.

◆ writeCurrentValue()

void deluge::gui::menu_item::PatchCableStrength::writeCurrentValue ( )
overridevirtual

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