Hi,
I used JUCE 7 for a while and always included JuceHeader.h.
Now I switched to JUCE 8 and I get an error that ToggleButton is not defined.
I’m probably doing something wrong, but I just don’t see it.
I hope someone can help me with this…
the error message is this:
Error (active) E0020 identifier “ToggleButton” is undefined
Note that I also tried to include “modules/juce_gui_basics/juce_gui_basics.h”
But the error remains the same.
#pragma once
#include <JuceHeader.h>
#define SAMPLES_BUF_SIZE 2000
class TimeLine : public juce::Component
{
public:
//
TimeLine();
~TimeLine() override;
void paint(juce::Graphics& g) override;
void resized() override;
void addSamples(float* samples, int num);
private:
//
// GUI components
//
ToggleButton mToggleRecord;
//
// data
//
float mCurrMin;
float mCurrMax;
int mCurrSamples;
float mBufferMin[SAMPLES_BUF_SIZE];
float mBufferMax[SAMPLES_BUF_SIZE];
int mAddIndex;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(TimeLine)
};
