Krotos Modules 3
Loading...
Searching...
No Matches
KwidgetGUI_MoogVcf.cpp
Go to the documentation of this file.
1namespace krotos
2{
4 {
5 using P = Parameters;
6
9
10 addAndMakeVisible(m_bypass);
12 }
13
15 {
17 Rectangle<int> bounds = m_currentBounds;
18 FlexBox fb;
19
20 fb.flexDirection = FlexBox::Direction::row;
21 fb.flexWrap = FlexBox::Wrap::wrap;
22 fb.alignContent = FlexBox::AlignContent::stretch;
23 fb.alignItems = FlexBox::AlignItems::stretch;
24 fb.justifyContent = FlexBox::JustifyContent::center;
25
26 FlexItem::Margin margin{2.0f, 2.0f, 2.0f, 2.0f};
27 fb.items.add(FlexItem(m_cutoff).withMargin(margin).withMinWidth(20).withMinHeight(80).withFlex(1.0f));
28 fb.items.add(FlexItem(m_resonance).withMargin(margin).withMinWidth(20).withMinHeight(80).withFlex(1.0f));
29
30 auto bottomBounds = bounds;
31 auto topBounds = bottomBounds.removeFromTop(30);
32
33 auto bypassBounds = topBounds;
34
35 fb.performLayout(bottomBounds);
36 m_bypass.setBounds(bypassBounds);
37 }
38} // namespace krotos
AttachedSlider m_cutoff
Definition KwidgetGUI_MoogVcf.h:13
KwidgetGUI_MoogVcf(Kwidget &owner)
Definition KwidgetGUI_MoogVcf.cpp:3
AttachedSlider m_resonance
Definition KwidgetGUI_MoogVcf.h:13
Kwidget_MoogVcf::Parameters Parameters
Definition KwidgetGUI_MoogVcf.h:6
ToggleButton m_bypass
Definition KwidgetGUI_MoogVcf.h:15
std::unique_ptr< ButtonParameterAttachment > m_bypassAttachment
Definition KwidgetGUI_MoogVcf.h:16
void resized() override
Definition KwidgetGUI_MoogVcf.cpp:14
Interface for a UI Component that controls a KwidgetProcessor.
Definition KwidgetGUI.h:24
std::unique_ptr< SliderParameterAttachment > createParameterAttachment(const String &paramID, Slider &slider)
Definition KwidgetGUI.cpp:72
void addAttachedComponent(AttachedComponentType &component, const String &paramID, bool isDraggable=true)
Definition KwidgetGUI.h:112
Rectangle< int > m_currentBounds
Definition KwidgetGUI.h:146
void resized() override
Definition KwidgetGUI.cpp:45
Definition Kwidget.h:8
Definition AirAbsorptionFilter.cpp:2