9 : Button(labelText), m_connectedKwidgetID(kwidgetID)
11 setComponentID(labelText);
13 m_label.setText(labelText, dontSendNotification);
14 m_label.setJustificationType(Justification::centred);
15 m_label.setInterceptsMouseClicks(
false,
false);
26 m_label.setText(labelText, dontSendNotification);
34 m_label.setText(value.getValue().toString(), NotificationType::dontSendNotification);
40 const Colour dragOverOver(findColour(LassoComponent<TabbedComponent>::lassoOutlineColourId));
41 auto armedColour = findColour(LassoComponent<TabbedComponent>::lassoFillColourId);
42 auto bgColour =
m_armed ? armedColour : findColour(ListBox::ColourIds::backgroundColourId);
43 auto buttonBounds = getLocalBounds().toFloat();
49 : shouldDrawButtonAsDown || shouldDrawButtonAsHighlighted ? bgColour.brighter(hoverBrightness)
51 g.setColour(bgColour);
55 g.fillRoundedRectangle(buttonBounds, cornerSize);
64 p.addRoundedRectangle(
65 buttonBounds.getX(), buttonBounds.getY(), buttonBounds.getWidth(), buttonBounds.getHeight(),
66 cornerSize, cornerSize,
77 g.setColour(findColour(Label::ColourIds::textColourId));
105 auto sourceComponent = dragSourceDetails.sourceComponent;
111 onDropped(dragSourceDetails.description);
122 m_label.setText(value.toString(), NotificationType::dontSendNotification);
const float m_hoverOpacity
Definition DropComponent.h:120
void itemDragMove(const SourceDetails &) override
Definition DropComponent.cpp:95
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
@ 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
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