84 void reset()
override;
134 void enableSelections() { selections_enabled_ =
true; modulation_buttons_[0]->select(
true); }
147 for (
auto& modulation_button : modulation_buttons_)
148 modulation_button->setConnectRight(connect);
163 for (
auto& button : modulation_buttons_)
164 button->setDrawBorder(draw);
173 int getModulationIndex(String name);
179 int getNumModulationsToShow();
181 std::vector<std::unique_ptr<ModulationButton>> modulation_buttons_;
182 std::vector<Listener*> listeners_;
184 bool selections_enabled_;
185 int min_modulations_shown_;
Interface for objects interested in ModulationTabSelector events.
Definition modulation_tab_selector.h:22
virtual ~Listener()=default
virtual void modulationSelected(ModulationTabSelector *selector, int index)=0
Called when a modulation source within this selector is selected.
A section of the GUI providing multiple modulation sources as tabs.
Definition modulation_tab_selector.h:16
void modulationConnectionChanged() override
Called when a modulation connection changes (e.g., a new connection added or removed).
Definition modulation_tab_selector.cpp:131
virtual ~ModulationTabSelector()
Destructor.
ModulationButton * getButton(int index)
Gets a pointer to a specific ModulationButton by index.
Definition modulation_tab_selector.h:156
ModulationTabSelector(std::string prefix, int number)
Constructs a ModulationTabSelector with a given prefix and number of tabs.
Definition modulation_tab_selector.cpp:6
void drawBorders(bool draw)
Enables or disables border drawing for each tab.
Definition modulation_tab_selector.h:162
void addListener(Listener *listener)
Registers a listener to receive events from this ModulationTabSelector.
Definition modulation_tab_selector.h:111
void reset() override
Resets the tab selector to its default state.
Definition modulation_tab_selector.cpp:96
void setVertical(bool vertical)
Sets whether tabs should be arranged vertically.
Definition modulation_tab_selector.h:129
void paintBackground(Graphics &g) override
Paints the component background and tab shadows.
Definition modulation_tab_selector.cpp:27
void checkNumShown(bool should_repaint)
Checks the number of modulations that should be displayed and updates the layout.
Definition modulation_tab_selector.cpp:63
void connectRight(bool connect)
Configures whether the tabs should connect visually to the right.
Definition modulation_tab_selector.h:146
void resized() override
Called when the component is resized.
Definition modulation_tab_selector.cpp:59
void paintTabShadow(Graphics &g) override
Paints a shadow behind the tabs.
Definition modulation_tab_selector.cpp:49
void setMinModulationsShown(int num)
Sets the minimum number of modulations to show before revealing additional ones.
Definition modulation_tab_selector.h:140
void registerModulationButtons(SynthSection *synth_section)
Registers all modulation buttons with a given SynthSection.
Definition modulation_tab_selector.cpp:141
void modulationClicked(ModulationButton *source) override
Called when a modulation button within this selector is clicked.
Definition modulation_tab_selector.cpp:112
void modulationCleared() override
Called when all modulations for a source have been cleared.
Definition modulation_tab_selector.cpp:136
void enableSelections()
Enables the ability for one of the tabs to remain selected.
Definition modulation_tab_selector.h:134
void setFontSize(float font_size)
Sets the font size used for the modulation button labels.
Definition modulation_tab_selector.cpp:146
void endModulationMap() override
Called when modulation mapping ends.
Definition modulation_tab_selector.cpp:126
Base class for all synthesizer sections, providing UI layout, painting, and interaction logic.
Definition synth_section.h:193