Krotos Modules 3
Loading...
Searching...
No Matches
AttachedToggleButton.h
Go to the documentation of this file.
1#pragma once
2namespace krotos
3{
4 //==============================================================================
9 class AttachedToggleButton : public Component
10 {
11 public:
13 AttachedToggleButton(const String& labelText);
14
15 void resized() override;
16
18 Label& getLabel();
19
21 Button& getButton();
22
24 Button& getControlComponent();
25
27 std::unique_ptr<ButtonParameterAttachment>& getAttachment();
28
30 std::function<void()> onStateChange;
31
34 void setDragAndDropDescription(const var& description);
35
36 private:
38 ToggleButton m_toggleButton;
39 std::unique_ptr<ButtonParameterAttachment> m_attachment;
40
41 JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(AttachedToggleButton)
42 };
43} // namespace krotos
This class combines a ToggleButton, Label, and a ButtonParameterAttachment to simplify the process of...
Definition AttachedToggleButton.h:10
Button & getControlComponent()
Definition AttachedToggleButton.cpp:28
std::unique_ptr< ButtonParameterAttachment > m_attachment
Definition AttachedToggleButton.h:39
DraggableLabel m_label
Definition AttachedToggleButton.h:37
Button & getButton()
Definition AttachedToggleButton.cpp:26
std::function< void()> onStateChange
Definition AttachedToggleButton.h:30
Label & getLabel()
Definition AttachedToggleButton.cpp:24
std::unique_ptr< ButtonParameterAttachment > & getAttachment()
Definition AttachedToggleButton.cpp:30
void setDragAndDropDescription(const var &description)
Definition AttachedToggleButton.cpp:32
void resized() override
Definition AttachedToggleButton.cpp:22
ToggleButton m_toggleButton
Definition AttachedToggleButton.h:38
AttachedToggleButton(const String &labelText)
Definition AttachedToggleButton.cpp:5
A Label that can be dragged and dropped e.g. onto a DropComponent.
Definition DraggableLabel.h:9
Definition AirAbsorptionFilter.cpp:2