generated from sudara/pamplejuce
-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1deac9f
commit cce84fc
Showing
5 changed files
with
54 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
libs/tote_bag/juce_gui/components/widgets/tbl_ToggleButton.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// 2023 Tote Bag Labs | ||
|
||
#include "tbl_ToggleButton.h" | ||
|
||
namespace tote_bag | ||
{ | ||
ToggleButton::ToggleButton (const juce::String& parameterId, | ||
juce::AudioProcessorValueTreeState& stateToControl) | ||
: juce::ToggleButton (parameterId) | ||
, buttonValue (stateToControl, parameterId, *this) | ||
{ | ||
setClickingTogglesState (true); | ||
} | ||
} // namespace tote_bag |
22 changes: 22 additions & 0 deletions
22
libs/tote_bag/juce_gui/components/widgets/tbl_ToggleButton.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
// 2023 Tote Bag Labs | ||
|
||
#pragma once | ||
|
||
#include <juce_audio_processors/juce_audio_processors.h> | ||
#include <juce_gui_basics/juce_gui_basics.h> | ||
|
||
namespace tote_bag | ||
{ | ||
class ToggleButton : public juce::ToggleButton | ||
{ | ||
public: | ||
ToggleButton (const juce::String& parameterId, | ||
juce::AudioProcessorValueTreeState& stateToControl); | ||
|
||
private: | ||
juce::AudioProcessorValueTreeState::ButtonAttachment buttonValue; | ||
|
||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ToggleButton) | ||
}; | ||
} // namespace tote_bag |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters