10 class DropComponent :
public Button,
public DragAndDropTarget,
private Value::Listener
14 DropComponent(
const String& labelText,
const String& kwidgetID =
"");
27 void setText(
const String& labelText);
36 void paintButton(Graphics& g,
bool shouldDrawButtonAsHighlighted,
bool shouldDrawButtonAsDown)
override;
53 void itemDropped(
const SourceDetails& dragSourceDetails)
override;
A component for dropping draggable juce objects onto.
Definition DropComponent.h:11
const float m_hoverOpacity
Definition DropComponent.h:120
void itemDragMove(const SourceDetails &) override
Definition DropComponent.cpp:95
String m_connectedKwidgetID
Definition DropComponent.h:107
bool m_somethingIsBeingDraggedOver
Definition DropComponent.h:109
Label m_label
Definition DropComponent.h:106
const float m_defaultOpacity
Definition DropComponent.h:120
std::function< void(var desc)> onDropped
Definition DropComponent.h:51
void itemDragExit(const SourceDetails &) override
Definition DropComponent.cpp:97
const float m_armedHoverBrightnessAmount
Definition DropComponent.h:121
void paintButton(Graphics &g, bool shouldDrawButtonAsHighlighted, bool shouldDrawButtonAsDown) override
Definition DropComponent.cpp:38
RoundedCorner m_cornerToRound
Definition DropComponent.h:115
Value m_labelValue
Definition DropComponent.h:113
RoundedCorner
Rounded corner state enum.
Definition DropComponent.h:67
@ BottomLeft
Definition DropComponent.h:70
@ BottomRight
Definition DropComponent.h:71
@ Top
Definition DropComponent.h:72
@ TopRight
Definition DropComponent.h:69
@ Bottom
Definition DropComponent.h:73
@ All
Definition DropComponent.h:74
@ TopLeft
Definition DropComponent.h:68
@ None
Definition DropComponent.h:75
void setArmed(bool isArmed)
Sets the component to draw with a visual indication that it has active modulation assigned to it.
Definition DropComponent.cpp:125
var m_lastDesc
Definition DropComponent.h:111
void resized() override
Definition DropComponent.cpp:19
bool isInterestedInDragSource(const SourceDetails &) override
Definition DropComponent.cpp:83
void setLabelValue(Value &labelValue)
Assign a Value object to the DropComponent Label text. This will assign a Listener to the given value...
Definition DropComponent.cpp:30
static const Identifier DragSource
Set this identifier in your drag source component properties so DropComponent will be interested in i...
Definition DropComponent.h:103
float m_cornerSize
Definition DropComponent.h:119
void itemDropped(const SourceDetails &dragSourceDetails) override
Definition DropComponent.cpp:103
void valueChanged(Value &value) override
Definition DropComponent.cpp:120
var getDescription()
Definition DropComponent.cpp:118
bool m_armed
Definition DropComponent.h:122
String & getConnectedKwidgetID()
Returns the ID of the kwidget this drop component is assigning modulation to.
Definition DropComponent.h:61
void setRoundedCorner(RoundedCorner cornerToRound, float cornerSize=4.0f)
Sets which corners to draw as rounded and their size as a radius.
Definition DropComponent.h:81
void setText(const String &labelText)
Definition DropComponent.cpp:24
void itemDragEnter(const SourceDetails &) override
Definition DropComponent.cpp:89
const float m_hoverBrightnessAmount
Definition DropComponent.h:120
DropComponent(const String &labelText, const String &kwidgetID="")
Definition DropComponent.cpp:8
Label & getLabel()
Definition DropComponent.cpp:22
Definition AirAbsorptionFilter.cpp:2