Krotos Modules 3
Loading...
Searching...
No Matches
KwidgetGUI_Adsr.cpp
Go to the documentation of this file.
1
namespace
krotos
2
{
3
const
String
KwidgetGUI_Adsr::ComponentIds::SliderAttack
{
"Attack"
};
4
const
String
KwidgetGUI_Adsr::ComponentIds::SliderDecay
{
"Decay"
};
5
const
String
KwidgetGUI_Adsr::ComponentIds::SliderSustain
{
"Sustain"
};
6
const
String
KwidgetGUI_Adsr::ComponentIds::SliderRelease
{
"Release"
};
7
8
KwidgetGUI_Adsr::KwidgetGUI_Adsr
(
Kwidget
& k) :
KwidgetGUI
(k)
9
{
10
using
P =
Parameters
;
11
m_borderColour
= Colours::aquamarine;
12
13
addAttachedComponent
(
m_adsrAttack
, P::Attack);
14
m_adsrAttack
.setComponentID(
ComponentIds::SliderAttack
);
15
addAttachedComponent
(
m_adsrDecay
, P::Decay);
16
m_adsrDecay
.setComponentID(
ComponentIds::SliderDecay
);
17
addAttachedComponent
(
m_adsrSustain
, P::Sustain);
18
m_adsrSustain
.setComponentID(
ComponentIds::SliderSustain
);
19
addAttachedComponent
(
m_adsrRelease
, P::Release);
20
m_adsrRelease
.setComponentID(
ComponentIds::SliderRelease
);
21
22
ignorePadding
(
true
);
23
}
24
25
void
KwidgetGUI_Adsr::resized
()
26
{
27
KwidgetGUI::resized
();
28
29
// rotary sliders
30
m_adsrAttack
.setBounds(
m_layout
.
rotSliderTopL
);
31
m_adsrDecay
.setBounds(
m_layout
.
rotSliderTopM
);
32
m_adsrSustain
.setBounds(
m_layout
.
rotSliderBottomL
);
33
m_adsrRelease
.setBounds(
m_layout
.
rotSliderBottomM
);
34
}
35
}
// namespace krotos
krotos::KwidgetGUI_Adsr::KwidgetGUI_Adsr
KwidgetGUI_Adsr(Kwidget &owner)
Definition
KwidgetGUI_Adsr.cpp:8
krotos::KwidgetGUI_Adsr::m_adsrDecay
AttachedSlider m_adsrDecay
Definition
KwidgetGUI_Adsr.h:38
krotos::KwidgetGUI_Adsr::m_adsrSustain
AttachedSlider m_adsrSustain
Definition
KwidgetGUI_Adsr.h:39
krotos::KwidgetGUI_Adsr::Parameters
Kwidget_Adsr::Parameters Parameters
Definition
KwidgetGUI_Adsr.h:6
krotos::KwidgetGUI_Adsr::m_layout
struct krotos::KwidgetGUI_Adsr::Layout m_layout
krotos::KwidgetGUI_Adsr::m_adsrAttack
AttachedSlider m_adsrAttack
Definition
KwidgetGUI_Adsr.h:37
krotos::KwidgetGUI_Adsr::m_adsrRelease
AttachedSlider m_adsrRelease
Definition
KwidgetGUI_Adsr.h:40
krotos::KwidgetGUI_Adsr::resized
void resized() override
Definition
KwidgetGUI_Adsr.cpp:25
krotos::KwidgetGUI
Interface for a UI Component that controls a KwidgetProcessor.
Definition
KwidgetGUI.h:24
krotos::KwidgetGUI::ignorePadding
void ignorePadding(bool ignore)
Definition
KwidgetGUI.h:86
krotos::KwidgetGUI::m_borderColour
Colour m_borderColour
Definition
KwidgetGUI.h:149
krotos::KwidgetGUI::addAttachedComponent
void addAttachedComponent(AttachedComponentType &component, const String ¶mID, bool isDraggable=true)
Definition
KwidgetGUI.h:112
krotos::KwidgetGUI::resized
void resized() override
Definition
KwidgetGUI.cpp:45
krotos::Kwidget
Definition
Kwidget.h:8
krotos
Definition
AirAbsorptionFilter.cpp:2
krotos::KwidgetGUI_Adsr::ComponentIds::SliderDecay
static const String SliderDecay
Definition
KwidgetGUI_Adsr.h:17
krotos::KwidgetGUI_Adsr::ComponentIds::SliderRelease
static const String SliderRelease
Definition
KwidgetGUI_Adsr.h:19
krotos::KwidgetGUI_Adsr::ComponentIds::SliderAttack
static const String SliderAttack
Definition
KwidgetGUI_Adsr.h:16
krotos::KwidgetGUI_Adsr::ComponentIds::SliderSustain
static const String SliderSustain
Definition
KwidgetGUI_Adsr.h:18
krotos::KwidgetGUI_Adsr::Layout::rotSliderBottomL
const Rectangle< int > rotSliderBottomL
Definition
KwidgetGUI_Adsr.h:30
krotos::KwidgetGUI_Adsr::Layout::rotSliderTopM
const Rectangle< int > rotSliderTopM
Definition
KwidgetGUI_Adsr.h:31
krotos::KwidgetGUI_Adsr::Layout::rotSliderBottomM
const Rectangle< int > rotSliderBottomM
Definition
KwidgetGUI_Adsr.h:32
krotos::KwidgetGUI_Adsr::Layout::rotSliderTopL
const Rectangle< int > rotSliderTopL
Definition
KwidgetGUI_Adsr.h:29
krotos_kwidget
kwidgets
adsr
KwidgetGUI_Adsr.cpp
Generated by
1.12.0