Krotos Modules 3
Loading...
Searching...
No Matches
AttachedComboBox.cpp
Go to the documentation of this file.
1#include "AttachedComboBox.h"
2
3namespace krotos
4{
6 {
7 m_comboBox.addItemList(items, 1);
8 addAndMakeVisible(m_comboBox);
9
10 m_comboBox.onChange = [this] {
11 if (onStateChange != nullptr)
12 {
14 }
15 };
16 }
17
18 void AttachedComboBox::resized() { m_comboBox.setBounds(getLocalBounds()); }
19
21
22 std::unique_ptr<ComboBoxParameterAttachment>& AttachedComboBox::getAttachment() { return m_attachment; }
23
24 void AttachedComboBox::setDragAndDropDescription(const var& /*description*/)
25 {
26 // ComboBox cannot be dragged, so nothing to do here
27 }
28
29} // namespace krotos
ComboBox m_comboBox
Definition AttachedComboBox.h:31
std::unique_ptr< ComboBoxParameterAttachment > & getAttachment()
Definition AttachedComboBox.cpp:22
AttachedComboBox(StringArray items)
Definition AttachedComboBox.cpp:5
void setDragAndDropDescription(const var &description)
Definition AttachedComboBox.cpp:24
std::function< void()> onStateChange
Definition AttachedComboBox.h:24
std::unique_ptr< ComboBoxParameterAttachment > m_attachment
Definition AttachedComboBox.h:32
void resized() override
Definition AttachedComboBox.cpp:18
ComboBox & getControlComponent()
Definition AttachedComboBox.cpp:20
Definition AirAbsorptionFilter.cpp:2