Krotos Modules 3
Loading...
Searching...
No Matches
krotos::KwidgetGUI_Adsr Class Reference

#include <KwidgetGUI_Adsr.h>

Inheritance diagram for krotos::KwidgetGUI_Adsr:
krotos::KwidgetGUI

Classes

struct  ComponentIds
 
struct  Layout
 

Public Types

using Parameters = Kwidget_Adsr::Parameters
 
- Public Types inherited from krotos::KwidgetGUI
enum class  RenderStyle {
  normal = 0 , borderless , borderless_with_buttons , minimised ,
  NUM_STYLES
}
 

Public Member Functions

 KwidgetGUI_Adsr (Kwidget &owner)
 
void resized () override
 
- Public Member Functions inherited from krotos::KwidgetGUI
 KwidgetGUI (Kwidget &owner)
 
 ~KwidgetGUI () override=default
 
void moved () override
 
void paint (Graphics &g) override
 
void resized () override
 
void mouseDown (const MouseEvent &event) override
 
const String & getKwidgetType () const
 
const String & getKwidgetID () const
 
void setRenderStyle (RenderStyle newStyle)
 
int divideIntByFloat (int dividend, float divisor)
 
int multiplyIntByFloat (int mult, float factor)
 
virtual void finalSetup ()
 
void ignorePadding (bool ignore)
 
TopBarComponentgetTopBarComponent ()
 
KwidgetgetOwner ()
 

Private Attributes

struct krotos::KwidgetGUI_Adsr::Layout m_layout
 
AttachedSlider m_adsrAttack {Parameters::Attack}
 
AttachedSlider m_adsrDecay {Parameters::Decay}
 
AttachedSlider m_adsrSustain {Parameters::Sustain}
 
AttachedSlider m_adsrRelease {Parameters::Release}
 

Additional Inherited Members

- Public Attributes inherited from krotos::KwidgetGUI
std::function< void(const String &)> onDelete
 
- Protected Member Functions inherited from krotos::KwidgetGUI
std::unique_ptr< SliderParameterAttachment > createParameterAttachment (const String &paramID, Slider &slider)
 
std::unique_ptr< ButtonParameterAttachment > createParameterAttachment (const String &paramID, Button &button)
 
std::unique_ptr< ComboBoxParameterAttachment > createParameterAttachment (const String &paramID, ComboBox &comboBox)
 
std::unique_ptr< ParameterAttachment > createParameterAttachment (const String &paramID, std::function< void(float)> callback)
 
std::unique_ptr< LabelCustomParameterAttachmentcreateCustomParameterAttachment (const String &paramID, Label &label)
 
template<typename AttachedComponentType >
void addAttachedComponent (AttachedComponentType &component, const String &paramID, bool isDraggable=true)
 
template<typename AttachedComponentType >
void addAttachedComponent (Component &parent, AttachedComponentType &component, const String &paramID, bool isDraggable=true)
 
void addParameterCallback (const String &paramID, std::function< void(float)> callback)
 
- Protected Attributes inherited from krotos::KwidgetGUI
bool m_ignorePadding {false}
 
Rectangle< int > m_currentBounds
 
TextButton m_selectButton
 
TextButton m_deleteButton
 
Colour m_borderColour {Colours::fuchsia}
 
TopBarComponent m_topBarComponent
 
RenderStyle m_renderStyle {RenderStyle::normal}
 

Member Typedef Documentation

◆ Parameters

Constructor & Destructor Documentation

◆ KwidgetGUI_Adsr()

krotos::KwidgetGUI_Adsr::KwidgetGUI_Adsr ( Kwidget & owner)

All parameter attachments should be initialized in this constructor.

Member Function Documentation

◆ resized()

void krotos::KwidgetGUI_Adsr::resized ( )
override

Use this function to set the bounds of any child Components.

Member Data Documentation

◆ m_adsrAttack

AttachedSlider krotos::KwidgetGUI_Adsr::m_adsrAttack {Parameters::Attack}
private

◆ m_adsrDecay

AttachedSlider krotos::KwidgetGUI_Adsr::m_adsrDecay {Parameters::Decay}
private

◆ m_adsrRelease

AttachedSlider krotos::KwidgetGUI_Adsr::m_adsrRelease {Parameters::Release}
private

◆ m_adsrSustain

AttachedSlider krotos::KwidgetGUI_Adsr::m_adsrSustain {Parameters::Sustain}
private

◆ m_layout

struct krotos::KwidgetGUI_Adsr::Layout krotos::KwidgetGUI_Adsr::m_layout
private

The documentation for this class was generated from the following files: