mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-03 03:30:06 +00:00
Restructured folder and Updated Readme
This commit is contained in:
parent
8980ed2b9c
commit
b01383e8d0
282 changed files with 6 additions and 753 deletions
|
|
@ -1,116 +0,0 @@
|
|||
/*
|
||||
==============================================================================
|
||||
|
||||
Demonstration "Hello World" application in JUCE
|
||||
Copyright 2008 by Julian Storer.
|
||||
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
#include "../JuceLibraryCode/JuceHeader.h"
|
||||
#include "MainComponent.h"
|
||||
|
||||
//==============================================================================
|
||||
/**
|
||||
This is the top-level window that we'll pop up. Inside it, we'll create and
|
||||
show a component from the MainComponent.cpp file (you can open this file using
|
||||
the Jucer to edit it).
|
||||
*/
|
||||
class HelloWorldWindow : public DocumentWindow
|
||||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
HelloWorldWindow()
|
||||
: DocumentWindow ("JUCE Hello World!",
|
||||
Colours::lightgrey,
|
||||
DocumentWindow::allButtons,
|
||||
true)
|
||||
{
|
||||
// Create an instance of our main content component, and add it to our window..
|
||||
setContentOwned (new MainComponent(), true);
|
||||
|
||||
// Centre the window on the screen
|
||||
centreWithSize (getWidth(), getHeight());
|
||||
|
||||
// And show it!
|
||||
setVisible (true);
|
||||
}
|
||||
|
||||
~HelloWorldWindow()
|
||||
{
|
||||
// (the content component will be deleted automatically, so no need to do it here)
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
void closeButtonPressed() override
|
||||
{
|
||||
// When the user presses the close button, we'll tell the app to quit. This
|
||||
// HelloWorldWindow object will be deleted by the JUCEHelloWorldApplication class.
|
||||
JUCEApplication::quit();
|
||||
}
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
/** This is the application object that is started up when Juce starts. It handles
|
||||
the initialisation and shutdown of the whole application.
|
||||
*/
|
||||
class JUCEHelloWorldApplication : public JUCEApplication
|
||||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
JUCEHelloWorldApplication() {}
|
||||
|
||||
//==============================================================================
|
||||
void initialise (const String& commandLine) override
|
||||
{
|
||||
// For this demo, we'll just create the main window...
|
||||
helloWorldWindow = new HelloWorldWindow();
|
||||
|
||||
/* ..and now return, which will fall into to the main event
|
||||
dispatch loop, and this will run until something calls
|
||||
JUCEAppliction::quit().
|
||||
|
||||
In this case, JUCEAppliction::quit() will be called by the
|
||||
hello world window being clicked.
|
||||
*/
|
||||
}
|
||||
|
||||
void shutdown() override
|
||||
{
|
||||
// This method is where you should clear-up your app's resources..
|
||||
|
||||
// The helloWorldWindow variable is a ScopedPointer, so setting it to a null
|
||||
// pointer will delete the window.
|
||||
helloWorldWindow = nullptr;
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
const String getApplicationName() override
|
||||
{
|
||||
return "Hello World for JUCE";
|
||||
}
|
||||
|
||||
const String getApplicationVersion() override
|
||||
{
|
||||
// The ProjectInfo::versionString value is automatically updated by the Jucer, and
|
||||
// can be found in the JuceHeader.h file that it generates for our project.
|
||||
return ProjectInfo::versionString;
|
||||
}
|
||||
|
||||
bool moreThanOneInstanceAllowed() override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void anotherInstanceStarted (const String& commandLine) override
|
||||
{
|
||||
}
|
||||
|
||||
private:
|
||||
ScopedPointer<HelloWorldWindow> helloWorldWindow;
|
||||
};
|
||||
|
||||
|
||||
//==============================================================================
|
||||
// This macro creates the application's main() function..
|
||||
START_JUCE_APPLICATION (JUCEHelloWorldApplication)
|
||||
Loading…
Add table
Add a link
Reference in a new issue