Krotos Modules 3
Loading...
Searching...
No Matches
KwidgetGUI_TriggerButton.h
Go to the documentation of this file.
1namespace krotos
2{
3 //======================================= KwidgetGUI_TriggerButton
4 //========================================================================
6 {
7 public:
9
12
13 void paint(Graphics& g) override;
14 void resized() override;
15
16 void setPerformMode(bool performMode)
17 {
18 m_performMode = performMode;
19 resized();
20 }
21
22 private:
23 struct Constants
24 {
25 const int LabelPadding{40};
26 // TODO These values should come from custom LookAndFeel object
27 const int FontSize{11};
28 const float KerningFactor{0.02f};
30
31 void showContextMenu();
32
33 bool m_performMode{false};
34
36 std::unique_ptr<TriggerButtonParameterAttachment> m_triggerButtonAttachment;
37
39
40 const int m_padding{5};
41
42 std::unique_ptr<AttachedLabel> m_editableLabel{nullptr};
43
44 JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(KwidgetGUI_TriggerButton)
45 };
46} // namespace krotos
Draws a context menu button which has a kebab icon with mouse hover states.
Definition DrawableButtonHelpers.h:55
Definition KwidgetGUI_TriggerButton.h:6
bool m_performMode
Definition KwidgetGUI_TriggerButton.h:33
void setPerformMode(bool performMode)
Definition KwidgetGUI_TriggerButton.h:16
struct krotos::KwidgetGUI_TriggerButton::Constants constants
void resized() override
Definition KwidgetGUI_TriggerButton.cpp:81
std::unique_ptr< AttachedLabel > m_editableLabel
Definition KwidgetGUI_TriggerButton.h:42
std::unique_ptr< TriggerButtonParameterAttachment > m_triggerButtonAttachment
Definition KwidgetGUI_TriggerButton.h:36
~KwidgetGUI_TriggerButton()
Definition KwidgetGUI_TriggerButton.cpp:41
KwidgetGUI_TriggerButton(Kwidget &owner)
Definition KwidgetGUI_TriggerButton.cpp:5
const int m_padding
Definition KwidgetGUI_TriggerButton.h:40
TriggerButton m_onClickButton
Definition KwidgetGUI_TriggerButton.h:35
ContextMenuButton m_contextMenu
Definition KwidgetGUI_TriggerButton.h:38
void paint(Graphics &g) override
Definition KwidgetGUI_TriggerButton.cpp:79
void showContextMenu()
Definition KwidgetGUI_TriggerButton.cpp:49
Interface for a UI Component that controls a KwidgetProcessor.
Definition KwidgetGUI.h:24
Definition Kwidget.h:8
A circular TriggerButton UI component.
Definition TriggerButton.h:12
Definition AirAbsorptionFilter.cpp:2
Definition Kwidget_TriggerButton.h:18
Definition KwidgetGUI_TriggerButton.h:24
const int FontSize
Definition KwidgetGUI_TriggerButton.h:27
const float KerningFactor
Definition KwidgetGUI_TriggerButton.h:28
const int LabelPadding
Definition KwidgetGUI_TriggerButton.h:25