You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
2.0 KiB
63 lines
2.0 KiB
/*
|
|
==============================================================================
|
|
|
|
This file contains the startup code for a PIP.
|
|
|
|
==============================================================================
|
|
*/
|
|
|
|
#include <JuceHeader.h>
|
|
#include "HelloWorldDemo.h"
|
|
|
|
class Application : public juce::JUCEApplication
|
|
{
|
|
public:
|
|
//==============================================================================
|
|
Application() = default;
|
|
|
|
const juce::String getApplicationName() override { return "HelloWorldDemo"; }
|
|
const juce::String getApplicationVersion() override { return "1.0.0"; }
|
|
|
|
void initialise (const juce::String&) override
|
|
{
|
|
mainWindow.reset (new MainWindow ("HelloWorldDemo", new HelloWorldDemo, *this));
|
|
}
|
|
|
|
void shutdown() override { mainWindow = nullptr; }
|
|
|
|
private:
|
|
class MainWindow : public juce::DocumentWindow
|
|
{
|
|
public:
|
|
MainWindow (const juce::String& name, juce::Component* c, JUCEApplication& a)
|
|
: DocumentWindow (name, juce::Desktop::getInstance().getDefaultLookAndFeel()
|
|
.findColour (ResizableWindow::backgroundColourId),
|
|
juce::DocumentWindow::allButtons),
|
|
app (a)
|
|
{
|
|
setUsingNativeTitleBar (true);
|
|
setContentOwned (c, true);
|
|
|
|
setResizable (false, false);
|
|
centreWithSize (getWidth(), getHeight());
|
|
|
|
setVisible (true);
|
|
}
|
|
|
|
void closeButtonPressed() override
|
|
{
|
|
app.systemRequestedQuit();
|
|
}
|
|
|
|
private:
|
|
JUCEApplication& app;
|
|
|
|
//==============================================================================
|
|
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainWindow)
|
|
};
|
|
|
|
std::unique_ptr<MainWindow> mainWindow;
|
|
};
|
|
|
|
//==============================================================================
|
|
START_JUCE_APPLICATION (Application)
|
|
|