upgrade to JUCE 5.4.3. Remove (probably) unused JUCE modules. Remove VST2 target (it's been end-of-life'd by Steinberg and by JUCE)
This commit is contained in:
@ -56,7 +56,7 @@ public:
|
||||
BubbleMessageComponent (int fadeOutLengthMs = 150);
|
||||
|
||||
/** Destructor. */
|
||||
~BubbleMessageComponent();
|
||||
~BubbleMessageComponent() override;
|
||||
|
||||
//==============================================================================
|
||||
/** Shows a message bubble at a particular position.
|
||||
|
@ -27,46 +27,22 @@
|
||||
namespace juce
|
||||
{
|
||||
|
||||
class ColourSelector::ColourComponentSlider : public Slider
|
||||
struct ColourComponentSlider : public Slider
|
||||
{
|
||||
public:
|
||||
ColourComponentSlider (const String& name)
|
||||
: Slider (name)
|
||||
ColourComponentSlider (const String& name) : Slider (name)
|
||||
{
|
||||
setRange (0.0, 255.0, 1.0);
|
||||
}
|
||||
|
||||
String getTextFromValue (double value)
|
||||
String getTextFromValue (double value) override
|
||||
{
|
||||
return String::toHexString ((int) value).toUpperCase().paddedLeft ('0', 2);
|
||||
}
|
||||
|
||||
double getValueFromText (const String& text)
|
||||
double getValueFromText (const String& text) override
|
||||
{
|
||||
return (double) text.getHexValue32();
|
||||
}
|
||||
|
||||
JUCE_DECLARE_NON_COPYABLE (ColourComponentSlider)
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
class ColourSelector::ColourSpaceMarker : public Component
|
||||
{
|
||||
public:
|
||||
ColourSpaceMarker()
|
||||
{
|
||||
setInterceptsMouseClicks (false, false);
|
||||
}
|
||||
|
||||
void paint (Graphics& g) override
|
||||
{
|
||||
g.setColour (Colour::greyLevel (0.1f));
|
||||
g.drawEllipse (1.0f, 1.0f, getWidth() - 2.0f, getHeight() - 2.0f, 1.0f);
|
||||
g.setColour (Colour::greyLevel (0.9f));
|
||||
g.drawEllipse (2.0f, 2.0f, getWidth() - 4.0f, getHeight() - 4.0f, 1.0f);
|
||||
}
|
||||
|
||||
JUCE_DECLARE_NON_COPYABLE (ColourSpaceMarker)
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
@ -74,7 +50,7 @@ class ColourSelector::ColourSpaceView : public Component
|
||||
{
|
||||
public:
|
||||
ColourSpaceView (ColourSelector& cs, float& hue, float& sat, float& val, int edgeSize)
|
||||
: owner (cs), h (hue), s (sat), v (val), lastHue (0.0f), edge (edgeSize)
|
||||
: owner (cs), h (hue), s (sat), v (val), edge (edgeSize)
|
||||
{
|
||||
addAndMakeVisible (marker);
|
||||
setMouseCursor (MouseCursor::CrosshairCursor);
|
||||
@ -128,7 +104,7 @@ public:
|
||||
if (lastHue != h)
|
||||
{
|
||||
lastHue = h;
|
||||
colours = Image();
|
||||
colours = {};
|
||||
repaint();
|
||||
}
|
||||
|
||||
@ -137,7 +113,7 @@ public:
|
||||
|
||||
void resized() override
|
||||
{
|
||||
colours = Image();
|
||||
colours = {};
|
||||
updateMarker();
|
||||
}
|
||||
|
||||
@ -146,55 +122,40 @@ private:
|
||||
float& h;
|
||||
float& s;
|
||||
float& v;
|
||||
float lastHue;
|
||||
ColourSpaceMarker marker;
|
||||
float lastHue = 0;
|
||||
const int edge;
|
||||
Image colours;
|
||||
|
||||
struct ColourSpaceMarker : public Component
|
||||
{
|
||||
ColourSpaceMarker()
|
||||
{
|
||||
setInterceptsMouseClicks (false, false);
|
||||
}
|
||||
|
||||
void paint (Graphics& g) override
|
||||
{
|
||||
g.setColour (Colour::greyLevel (0.1f));
|
||||
g.drawEllipse (1.0f, 1.0f, getWidth() - 2.0f, getHeight() - 2.0f, 1.0f);
|
||||
g.setColour (Colour::greyLevel (0.9f));
|
||||
g.drawEllipse (2.0f, 2.0f, getWidth() - 4.0f, getHeight() - 4.0f, 1.0f);
|
||||
}
|
||||
};
|
||||
|
||||
ColourSpaceMarker marker;
|
||||
|
||||
void updateMarker()
|
||||
{
|
||||
marker.setBounds (roundToInt ((getWidth() - edge * 2) * s),
|
||||
roundToInt ((getHeight() - edge * 2) * (1.0f - v)),
|
||||
edge * 2, edge * 2);
|
||||
auto markerSize = jmax (14, edge * 2);
|
||||
auto area = getLocalBounds().reduced (edge);
|
||||
|
||||
marker.setBounds (Rectangle<int> (markerSize, markerSize)
|
||||
.withCentre (area.getRelativePoint (s, 1.0f - v)));
|
||||
}
|
||||
|
||||
JUCE_DECLARE_NON_COPYABLE (ColourSpaceView)
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
class ColourSelector::HueSelectorMarker : public Component
|
||||
{
|
||||
public:
|
||||
HueSelectorMarker()
|
||||
{
|
||||
setInterceptsMouseClicks (false, false);
|
||||
}
|
||||
|
||||
void paint (Graphics& g) override
|
||||
{
|
||||
auto cw = (float) getWidth();
|
||||
auto ch = (float) getHeight();
|
||||
|
||||
Path p;
|
||||
p.addTriangle (1.0f, 1.0f,
|
||||
cw * 0.3f, ch * 0.5f,
|
||||
1.0f, ch - 1.0f);
|
||||
|
||||
p.addTriangle (cw - 1.0f, 1.0f,
|
||||
cw * 0.7f, ch * 0.5f,
|
||||
cw - 1.0f, ch - 1.0f);
|
||||
|
||||
g.setColour (Colours::white.withAlpha (0.75f));
|
||||
g.fillPath (p);
|
||||
|
||||
g.setColour (Colours::black.withAlpha (0.75f));
|
||||
g.strokePath (p, PathStrokeType (1.2f));
|
||||
}
|
||||
|
||||
private:
|
||||
JUCE_DECLARE_NON_COPYABLE (HueSelectorMarker)
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
class ColourSelector::HueSelectorComp : public Component
|
||||
{
|
||||
@ -221,7 +182,11 @@ public:
|
||||
|
||||
void resized() override
|
||||
{
|
||||
marker.setBounds (0, roundToInt ((getHeight() - edge * 2) * h), getWidth(), edge * 2);
|
||||
auto markerSize = jmax (14, edge * 2);
|
||||
auto area = getLocalBounds().reduced (edge);
|
||||
|
||||
marker.setBounds (Rectangle<int> (getWidth(), markerSize)
|
||||
.withCentre (area.getRelativePoint (0.5f, h)));
|
||||
}
|
||||
|
||||
void mouseDown (const MouseEvent& e) override
|
||||
@ -242,9 +207,39 @@ public:
|
||||
private:
|
||||
ColourSelector& owner;
|
||||
float& h;
|
||||
HueSelectorMarker marker;
|
||||
const int edge;
|
||||
|
||||
struct HueSelectorMarker : public Component
|
||||
{
|
||||
HueSelectorMarker()
|
||||
{
|
||||
setInterceptsMouseClicks (false, false);
|
||||
}
|
||||
|
||||
void paint (Graphics& g) override
|
||||
{
|
||||
auto cw = (float) getWidth();
|
||||
auto ch = (float) getHeight();
|
||||
|
||||
Path p;
|
||||
p.addTriangle (1.0f, 1.0f,
|
||||
cw * 0.3f, ch * 0.5f,
|
||||
1.0f, ch - 1.0f);
|
||||
|
||||
p.addTriangle (cw - 1.0f, 1.0f,
|
||||
cw * 0.7f, ch * 0.5f,
|
||||
cw - 1.0f, ch - 1.0f);
|
||||
|
||||
g.setColour (Colours::white.withAlpha (0.75f));
|
||||
g.fillPath (p);
|
||||
|
||||
g.setColour (Colours::black.withAlpha (0.75f));
|
||||
g.strokePath (p, PathStrokeType (1.2f));
|
||||
}
|
||||
};
|
||||
|
||||
HueSelectorMarker marker;
|
||||
|
||||
JUCE_DECLARE_NON_COPYABLE (HueSelectorComp)
|
||||
};
|
||||
|
||||
@ -285,10 +280,8 @@ private:
|
||||
{
|
||||
if (comp != nullptr)
|
||||
{
|
||||
if (result == 1)
|
||||
comp->setColourFromSwatch();
|
||||
else if (result == 2)
|
||||
comp->setSwatchFromColour();
|
||||
if (result == 1) comp->setColourFromSwatch();
|
||||
if (result == 2) comp->setSwatchFromColour();
|
||||
}
|
||||
}
|
||||
|
||||
@ -334,14 +327,16 @@ ColourSelector::ColourSelector (int sectionsToShow, int edge, int gapAroundColou
|
||||
|
||||
sliders[3]->setVisible ((flags & showAlphaChannel) != 0);
|
||||
|
||||
for (int i = 4; --i >= 0;)
|
||||
sliders[i]->onValueChange = [this] { changeColour(); };
|
||||
for (auto& slider : sliders)
|
||||
{ // braces needed here to avoid a VS2013 compiler bug
|
||||
slider->onValueChange = [this] { changeColour(); };
|
||||
}
|
||||
}
|
||||
|
||||
if ((flags & showColourspace) != 0)
|
||||
{
|
||||
colourSpace.reset (new ColourSpaceView (*this, h, s, v, gapAroundColourSpaceComponent));
|
||||
hueSelector.reset (new HueSelectorComp (*this, h, gapAroundColourSpaceComponent));
|
||||
hueSelector.reset (new HueSelectorComp (*this, h, gapAroundColourSpaceComponent));
|
||||
|
||||
addAndMakeVisible (colourSpace.get());
|
||||
addAndMakeVisible (hueSelector.get());
|
||||
@ -455,12 +450,12 @@ void ColourSelector::paint (Graphics& g)
|
||||
g.setColour (findColour (labelTextColourId));
|
||||
g.setFont (11.0f);
|
||||
|
||||
for (int i = 4; --i >= 0;)
|
||||
for (auto& slider : sliders)
|
||||
{
|
||||
if (sliders[i]->isVisible())
|
||||
g.drawText (sliders[i]->getName() + ":",
|
||||
0, sliders[i]->getY(),
|
||||
sliders[i]->getX() - 8, sliders[i]->getHeight(),
|
||||
if (slider->isVisible())
|
||||
g.drawText (slider->getName() + ":",
|
||||
0, slider->getY(),
|
||||
slider->getX() - 8, slider->getHeight(),
|
||||
Justification::centredRight, false);
|
||||
}
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ public:
|
||||
int gapAroundColourSpaceComponent = 7);
|
||||
|
||||
/** Destructor. */
|
||||
~ColourSelector();
|
||||
~ColourSelector() override;
|
||||
|
||||
//==============================================================================
|
||||
/** Returns the colour that the user has currently selected.
|
||||
@ -133,19 +133,14 @@ public:
|
||||
labelTextColourId = 0x1007001 /**< the colour used for the labels next to the sliders. */
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
// These need to be public otherwise the Projucer's live-build engine will complain
|
||||
class ColourSpaceView;
|
||||
class HueSelectorComp;
|
||||
|
||||
private:
|
||||
//==============================================================================
|
||||
class ColourSpaceView;
|
||||
class HueSelectorComp;
|
||||
class SwatchComponent;
|
||||
class ColourComponentSlider;
|
||||
class ColourSpaceMarker;
|
||||
class HueSelectorMarker;
|
||||
friend class ColourSpaceView;
|
||||
friend struct ContainerDeletePolicy<ColourSpaceView>;
|
||||
friend class HueSelectorComp;
|
||||
friend struct ContainerDeletePolicy<HueSelectorComp>;
|
||||
|
||||
Colour colour;
|
||||
float h, s, v;
|
||||
|
@ -345,7 +345,7 @@ public:
|
||||
owner.getMappings().addChangeListener (this);
|
||||
}
|
||||
|
||||
~TopLevelItem()
|
||||
~TopLevelItem() override
|
||||
{
|
||||
owner.getMappings().removeChangeListener (this);
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ public:
|
||||
bool showResetToDefaultButton);
|
||||
|
||||
/** Destructor. */
|
||||
~KeyMappingEditorComponent();
|
||||
~KeyMappingEditorComponent() override;
|
||||
|
||||
//==============================================================================
|
||||
/** Sets up the colours to use for parts of the component.
|
||||
@ -125,9 +125,6 @@ private:
|
||||
class MappingItem;
|
||||
class CategoryItem;
|
||||
class ItemComponent;
|
||||
friend class TopLevelItem;
|
||||
friend struct ContainerDeletePolicy<ChangeKeyButton>;
|
||||
friend struct ContainerDeletePolicy<TopLevelItem>;
|
||||
std::unique_ptr<TopLevelItem> treeItem;
|
||||
|
||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (KeyMappingEditorComponent)
|
||||
|
@ -38,7 +38,7 @@ class AllComponentRepainter : private Timer,
|
||||
{
|
||||
public:
|
||||
AllComponentRepainter() {}
|
||||
~AllComponentRepainter() { clearSingletonInstance(); }
|
||||
~AllComponentRepainter() override { clearSingletonInstance(); }
|
||||
|
||||
JUCE_DECLARE_SINGLETON (AllComponentRepainter, false)
|
||||
|
||||
@ -280,7 +280,7 @@ public:
|
||||
|
||||
void resized() override
|
||||
{
|
||||
Rectangle<int> r (getLocalBounds().reduced (2, 0));
|
||||
auto r = getLocalBounds().reduced (2, 0);
|
||||
|
||||
for (int i = 0; i < editors.size(); ++i)
|
||||
editors.getUnchecked(i)->setBounds (r.removeFromTop (itemHeight));
|
||||
@ -314,7 +314,7 @@ public:
|
||||
setVisible (true);
|
||||
}
|
||||
|
||||
~EditorWindow()
|
||||
~EditorWindow() override
|
||||
{
|
||||
setLookAndFeel (nullptr);
|
||||
}
|
||||
|
@ -196,7 +196,7 @@ namespace LiveConstantEditor
|
||||
{
|
||||
public:
|
||||
ValueList();
|
||||
~ValueList();
|
||||
~ValueList() override;
|
||||
|
||||
JUCE_DECLARE_SINGLETON (ValueList, false)
|
||||
|
||||
@ -204,17 +204,13 @@ namespace LiveConstantEditor
|
||||
LiveValue<Type>& getValue (const char* file, int line, const Type& initialValue)
|
||||
{
|
||||
const ScopedLock sl (lock);
|
||||
typedef LiveValue<Type> ValueType;
|
||||
|
||||
for (int i = 0; i < values.size(); ++i)
|
||||
{
|
||||
LiveValueBase* v = values.getUnchecked(i);
|
||||
using ValueType = LiveValue<Type>;
|
||||
|
||||
for (auto* v : values)
|
||||
if (v->sourceLine == line && v->sourceFile == file)
|
||||
return *static_cast<ValueType*> (v);
|
||||
}
|
||||
|
||||
ValueType* v = new ValueType (file, line, initialValue);
|
||||
auto v = new ValueType (file, line, initialValue);
|
||||
addValue (v);
|
||||
return *v;
|
||||
}
|
||||
@ -224,8 +220,6 @@ namespace LiveConstantEditor
|
||||
OwnedArray<CodeDocument> documents;
|
||||
Array<File> documentFiles;
|
||||
class EditorWindow;
|
||||
friend class EditorWindow;
|
||||
friend struct ContainerDeletePolicy<EditorWindow>;
|
||||
Component::SafePointer<EditorWindow> editorWindow;
|
||||
CriticalSection lock;
|
||||
|
||||
|
@ -57,7 +57,7 @@ public:
|
||||
PreferencesPanel();
|
||||
|
||||
/** Destructor. */
|
||||
~PreferencesPanel();
|
||||
~PreferencesPanel() override;
|
||||
|
||||
//==============================================================================
|
||||
/** Creates a page using a set of drawables to define the page's icon.
|
||||
|
@ -142,7 +142,7 @@ public:
|
||||
file, then the URL should be "sounds/my_sound.caf".
|
||||
|
||||
For a custom sound on Android, set URL to the name of a raw resource file
|
||||
(without an extention) that was included when exporting an Android project in
|
||||
(without an extension) that was included when exporting an Android project in
|
||||
Projucer (see "Extra Android Raw Resources" setting). */
|
||||
|
||||
var properties; /**< Optional: collection of additional properties that may be passed as a dictionary. */
|
||||
@ -396,7 +396,7 @@ public:
|
||||
*/
|
||||
struct Category
|
||||
{
|
||||
juce::String identifier; /**< unique indentifier */
|
||||
juce::String identifier; /**< unique identifier */
|
||||
juce::Array<Action> actions; /**< optional list of actions within this category */
|
||||
bool sendDismissAction = false; /**< whether dismiss action will be sent to the app (from iOS 10 only) */
|
||||
};
|
||||
@ -593,7 +593,7 @@ public:
|
||||
*/
|
||||
struct Listener
|
||||
{
|
||||
virtual ~Listener() {}
|
||||
virtual ~Listener() = default;
|
||||
|
||||
/** This callback will be called after you call requestSettingsUsed() or
|
||||
requestPermissionsWithSettings().
|
||||
@ -615,7 +615,7 @@ public:
|
||||
notification was received when the app was in the foreground already. On iOS 10 it will be
|
||||
called when a user presses on a notification
|
||||
|
||||
Note: on Android, if remote notification was received while the app was in the background and
|
||||
Note: On Android, if remote notification was received while the app was in the background and
|
||||
then user pressed on it, the notification object received in this callback will contain only
|
||||
"properties" member set. Hence, if you want to know what was the notification title, content
|
||||
etc, you need to set them as additional properties, so that you will be able to restore them
|
||||
@ -694,7 +694,7 @@ public:
|
||||
|
||||
private:
|
||||
PushNotifications();
|
||||
~PushNotifications();
|
||||
~PushNotifications() override;
|
||||
|
||||
ListenerList<PushNotifications::Listener> listeners;
|
||||
|
||||
|
@ -158,14 +158,14 @@ void RecentlyOpenedFilesList::forgetRecentFileNatively (const File& file)
|
||||
// from the recent list, so we clear them all and add them back excluding
|
||||
// the specified file
|
||||
|
||||
auto* sharedDocController = [NSDocumentController sharedDocumentController];
|
||||
auto* recentDocumentURLs = [sharedDocController recentDocumentURLs];
|
||||
auto sharedDocController = [NSDocumentController sharedDocumentController];
|
||||
auto recentDocumentURLs = [sharedDocController recentDocumentURLs];
|
||||
|
||||
[sharedDocController clearRecentDocuments: nil];
|
||||
|
||||
auto* nsFile = createNSURLFromFile (file);
|
||||
|
||||
auto* reverseEnumerator = [recentDocumentURLs reverseObjectEnumerator];
|
||||
auto reverseEnumerator = [recentDocumentURLs reverseObjectEnumerator];
|
||||
|
||||
for (NSURL* url : reverseEnumerator)
|
||||
if (! [url isEqual:nsFile])
|
||||
|
@ -106,7 +106,7 @@ public:
|
||||
bool useDropShadow);
|
||||
|
||||
/** Destructor. */
|
||||
~SplashScreen();
|
||||
~SplashScreen() override;
|
||||
|
||||
/** Tells the component to auto-delete itself after a timeout period, or when the
|
||||
mouse is clicked.
|
||||
|
@ -59,7 +59,7 @@ public:
|
||||
SystemTrayIconComponent();
|
||||
|
||||
/** Destructor. */
|
||||
~SystemTrayIconComponent();
|
||||
~SystemTrayIconComponent() override;
|
||||
|
||||
//==============================================================================
|
||||
/** Changes the image shown in the taskbar. */
|
||||
|
@ -56,7 +56,7 @@ public:
|
||||
explicit WebBrowserComponent (bool unloadPageWhenBrowserIsHidden = true);
|
||||
|
||||
/** Destructor. */
|
||||
~WebBrowserComponent();
|
||||
~WebBrowserComponent() override;
|
||||
|
||||
//==============================================================================
|
||||
/** Sends the browser to a particular URL.
|
||||
@ -134,10 +134,10 @@ public:
|
||||
void visibilityChanged() override;
|
||||
/** @internal */
|
||||
void focusGained (FocusChangeType) override;
|
||||
|
||||
/** @internal */
|
||||
class Pimpl;
|
||||
private:
|
||||
//==============================================================================
|
||||
class Pimpl;
|
||||
std::unique_ptr<Pimpl> browser;
|
||||
bool blankPageShown = false, unloadPageWhenBrowserIsHidden;
|
||||
String lastURL;
|
||||
@ -147,10 +147,6 @@ private:
|
||||
void reloadLastURL();
|
||||
void checkWindowAssociation();
|
||||
|
||||
#if JUCE_ANDROID
|
||||
friend bool juce_webViewPageLoadStarted (WebBrowserComponent*, const String&);
|
||||
#endif
|
||||
|
||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WebBrowserComponent)
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user