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

A simple container for a holding multiple drop components used for assigning modulation to a kwidget which has more than 1 modulation source. More...

#include <MultiDropComponent.h>

Inheritance diagram for krotos::MultiDropComponent:

Public Member Functions

 MultiDropComponent (const String &labelText, const String &kwidgetID, int numModulators)
 
void resized () override
 
void paint (Graphics &g) override
 
String & getConnectedKwidgetID ()
 
const OwnedArray< DropComponent > & getDropComponents () const noexcept
 
int getNumDropComponents () const noexcept
 
DropComponentgetDropComponent (int index)
 
void setEnableAutoCornerRounding (bool roundCorners)
 Automatically round corners of drop components when they are arranged in a square formation.
 

Private Attributes

const size_t max_drop_components {6}
 
ModulationAssignerDropArea m_dropArea
 
String m_connectedKwidgetID {""}
 
Label m_label
 
bool m_drawHeader {true}
 
bool m_automaticCornerRounding {true}
 

Static Private Attributes

static constexpr float m_labelFontHeight {15.0f}
 

Detailed Description

A simple container for a holding multiple drop components used for assigning modulation to a kwidget which has more than 1 modulation source.

Essentially just a parent for a ModulationAssignerDropArea with some high level config functions.

See also
ModulationAssignerDropArea

Constructor & Destructor Documentation

◆ MultiDropComponent()

krotos::MultiDropComponent::MultiDropComponent ( const String & labelText,
const String & kwidgetID,
int numModulators )

Member Function Documentation

◆ getConnectedKwidgetID()

String & krotos::MultiDropComponent::getConnectedKwidgetID ( )
inline

Returns the kwidget ID associated with this multi drop component.

◆ getDropComponent()

DropComponent * krotos::MultiDropComponent::getDropComponent ( int index)
inline

Returns a specific drop component of a given index

◆ getDropComponents()

const OwnedArray< DropComponent > & krotos::MultiDropComponent::getDropComponents ( ) const
inlinenoexcept

Returns an array of all the child drop components.

◆ getNumDropComponents()

int krotos::MultiDropComponent::getNumDropComponents ( ) const
inlinenoexcept

Returns the number of child drop components

◆ paint()

void krotos::MultiDropComponent::paint ( Graphics & g)
override

◆ resized()

void krotos::MultiDropComponent::resized ( )
override

◆ setEnableAutoCornerRounding()

void krotos::MultiDropComponent::setEnableAutoCornerRounding ( bool roundCorners)
inline

Automatically round corners of drop components when they are arranged in a square formation.

Member Data Documentation

◆ m_automaticCornerRounding

bool krotos::MultiDropComponent::m_automaticCornerRounding {true}
private

◆ m_connectedKwidgetID

String krotos::MultiDropComponent::m_connectedKwidgetID {""}
private

◆ m_drawHeader

bool krotos::MultiDropComponent::m_drawHeader {true}
private

◆ m_dropArea

ModulationAssignerDropArea krotos::MultiDropComponent::m_dropArea
private

◆ m_label

Label krotos::MultiDropComponent::m_label
private

◆ m_labelFontHeight

float krotos::MultiDropComponent::m_labelFontHeight {15.0f}
staticconstexprprivate

◆ max_drop_components

const size_t krotos::MultiDropComponent::max_drop_components {6}
private

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