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.
Get a new toggle button kind of placed (split later)
- Loading branch information
1 parent
7570f73
commit 5b69ec0
Showing
8 changed files
with
107 additions
and
1 deletion.
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
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 |
28 changes: 28 additions & 0 deletions
28
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,28 @@ | ||
|
||
// 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); | ||
|
||
enum ColourIds | ||
{ | ||
backgroundColourId = 0x1006504, | ||
highightColourId = 0x1006505, | ||
}; | ||
|
||
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
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