Krotos Modules 3
Loading...
Searching...
No Matches
MultiDropComponent.h
Go to the documentation of this file.
1
2#pragma once
3
5
6namespace krotos
7{
15 class MultiDropComponent : public Component
16 {
17 public:
18 MultiDropComponent(const String& labelText, const String& kwidgetID, int numModulators);
19
20 void resized() override;
21 void paint(Graphics& g) override;
22
27
31 const OwnedArray<DropComponent>& getDropComponents() const noexcept { return m_dropArea.getDropComponents(); }
32
34 int getNumDropComponents() const noexcept { return m_dropArea.getNumDropComponents(); };
35
38
43
44 private:
45 const size_t max_drop_components{6};
46
49 Label m_label;
50 static constexpr float m_labelFontHeight{15.0f};
51 bool m_drawHeader{true};
53 JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(MultiDropComponent)
54 };
55
56} // namespace krotos
A component for dropping draggable juce objects onto.
Definition DropComponent.h:11
Definition ModulationAssignerDropArea.h:12
const OwnedArray< DropComponent > & getDropComponents() const noexcept
Returns an array of the child drop components.
Definition ModulationAssignerDropArea.h:21
int getNumDropComponents() const noexcept
Returns the number of child drop components.
Definition ModulationAssignerDropArea.h:26
A simple container for a holding multiple drop components used for assigning modulation to a kwidget ...
Definition MultiDropComponent.h:16
void resized() override
Definition MultiDropComponent.cpp:39
String & getConnectedKwidgetID()
Definition MultiDropComponent.h:26
void paint(Graphics &g) override
Definition MultiDropComponent.cpp:54
const size_t max_drop_components
Definition MultiDropComponent.h:45
Label m_label
Definition MultiDropComponent.h:49
static constexpr float m_labelFontHeight
Definition MultiDropComponent.h:50
const OwnedArray< DropComponent > & getDropComponents() const noexcept
Definition MultiDropComponent.h:31
bool m_automaticCornerRounding
Definition MultiDropComponent.h:52
void setEnableAutoCornerRounding(bool roundCorners)
Automatically round corners of drop components when they are arranged in a square formation.
Definition MultiDropComponent.h:42
int getNumDropComponents() const noexcept
Definition MultiDropComponent.h:34
ModulationAssignerDropArea m_dropArea
Definition MultiDropComponent.h:47
String m_connectedKwidgetID
Definition MultiDropComponent.h:48
MultiDropComponent(const String &labelText, const String &kwidgetID, int numModulators)
Definition MultiDropComponent.cpp:5
bool m_drawHeader
Definition MultiDropComponent.h:51
DropComponent * getDropComponent(int index)
Definition MultiDropComponent.h:37
Definition AirAbsorptionFilter.cpp:2