Skip to content

Commit 7730b78

Browse files
authored
delete AccSlider (surge-synthesizer#7950)
1 parent e001ec9 commit 7730b78

File tree

1 file changed

+0
-54
lines changed

1 file changed

+0
-54
lines changed

src/surge-fx/SurgeFXEditor.h

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -114,60 +114,6 @@ class SurgefxAudioProcessorEditor : public juce::AudioProcessorEditor,
114114
std::vector<std::unique_ptr<KnobSource>> sources;
115115

116116
private:
117-
struct AccSlider : public juce::Slider
118-
{
119-
AccSlider() { setWantsKeyboardFocus(true); }
120-
juce::String getTextFromValue(double v) override
121-
{
122-
// std::cout << "GTFV " << v << std::endl;
123-
// return juce::Slider::getTextFromValue(v);
124-
// This is a bit of a hack to externalize this but
125-
return tv;
126-
}
127-
128-
juce::String tv;
129-
void setTextValue(juce::String s)
130-
{
131-
tv = s;
132-
if (auto *handler = getAccessibilityHandler())
133-
{
134-
handler->notifyAccessibilityEvent(juce::AccessibilityEvent::valueChanged);
135-
}
136-
}
137-
bool keyPressed(const juce::KeyPress &key) override
138-
{
139-
float amt = 0.05;
140-
if (key.getModifiers().isShiftDown())
141-
amt = 0.01;
142-
if (key.getKeyCode() == juce::KeyPress::upKey)
143-
{
144-
setValue(std::clamp(getValue() + amt, 0., 1.),
145-
juce::NotificationType::sendNotification);
146-
return true;
147-
}
148-
149-
if (key.getKeyCode() == juce::KeyPress::downKey)
150-
{
151-
setValue(std::clamp(getValue() - amt, 0., 1.),
152-
juce::NotificationType::sendNotification);
153-
return true;
154-
}
155-
156-
if (key.getKeyCode() == juce::KeyPress::homeKey)
157-
{
158-
setValue(1., juce::NotificationType::sendNotification);
159-
return true;
160-
}
161-
162-
if (key.getKeyCode() == juce::KeyPress::endKey)
163-
{
164-
setValue(0., juce::NotificationType::sendNotification);
165-
return true;
166-
}
167-
return false;
168-
}
169-
};
170-
171117
SurgeFXParamDisplay fxParamDisplay[n_fx_params];
172118
SurgeTempoSyncSwitch fxTempoSync[n_fx_params];
173119
SurgeTempoSyncSwitch fxDeactivated[n_fx_params];

0 commit comments

Comments
 (0)