Krotos Modules 3
Loading...
Searching...
No Matches
KwidgetGUI_Sine.cpp
Go to the documentation of this file.
1
namespace
krotos
2
{
3
KwidgetGUI_Sine::KwidgetGUI_Sine
(
Kwidget
& k) :
KwidgetGUI
(k)
4
{
5
addAttachedComponent
(
m_amplitude
,
Parameters::Amplitude
);
6
}
7
8
void
KwidgetGUI_Sine::resized
()
9
{
10
KwidgetGUI::resized
();
11
Rectangle<int> bounds =
m_currentBounds
;
// current bounds holds the resized bounds from KM3 GUI
12
13
auto
sliderBounds = bounds.removeFromTop(
static_cast<
int
>
(0.75f *
static_cast<
float
>
(getHeight())));
14
15
m_amplitude
.setBounds(sliderBounds);
16
}
17
}
// namespace krotos
krotos::KwidgetGUI_Sine::KwidgetGUI_Sine
KwidgetGUI_Sine(Kwidget &owner)
Definition
KwidgetGUI_Sine.cpp:3
krotos::KwidgetGUI_Sine::m_amplitude
AttachedSlider m_amplitude
Definition
KwidgetGUI_Sine.h:13
krotos::KwidgetGUI_Sine::resized
void resized() override
Definition
KwidgetGUI_Sine.cpp:8
krotos::KwidgetGUI
Interface for a UI Component that controls a KwidgetProcessor.
Definition
KwidgetGUI.h:24
krotos::KwidgetGUI::addAttachedComponent
void addAttachedComponent(AttachedComponentType &component, const String ¶mID, bool isDraggable=true)
Definition
KwidgetGUI.h:112
krotos::KwidgetGUI::m_currentBounds
Rectangle< int > m_currentBounds
Definition
KwidgetGUI.h:146
krotos::KwidgetGUI::resized
void resized() override
Definition
KwidgetGUI.cpp:45
krotos::Kwidget
Definition
Kwidget.h:8
krotos
Definition
AirAbsorptionFilter.cpp:2
krotos::Kwidget_Sine::Parameters::Amplitude
static const String Amplitude
Definition
Kwidget_Sine.h:8
krotos_kwidget
kwidgets
sine
KwidgetGUI_Sine.cpp
Generated by
1.12.0