/*
  ==============================================================================

    This file was auto-generated by the Jucer!

    It contains the basic startup code for a Juce application.

  ==============================================================================
*/

#include "../JuceLibraryCode/JuceHeader.h"
#include "MainWindow.h"
#include "BlipSim.h"

//==============================================================================
class BlipSimApplication  : public JUCEApplication
{
public:
  //==============================================================================
  BlipSimApplication()
  {
  }

  ~BlipSimApplication()
  {
  }

  //==============================================================================
  void initialise (const String& commandLine)
  {
    // Do your application's initialisation code here..
    std::cout << "Main" << std::endl;
    blipsim = new BlipSim();
    blipsim->initialise();
    mainWindow = new MainAppWindow();
  }

  void shutdown()
  {
    // Do your application's shutdown code here..
    blipsim->shutdown();
    deleteAndZero(blipsim);
    mainWindow = 0;
  }

  //==============================================================================
  void systemRequestedQuit()
  {
    quit();
  }

  //==============================================================================
  const String getApplicationName()
  {
    return "BlipSim";
  }

  const String getApplicationVersion()
  {
    return ProjectInfo::versionString;
  }

  bool moreThanOneInstanceAllowed()
  {
    return true;
  }

  void anotherInstanceStarted (const String& commandLine)
  {
        
  }

private:
  ScopedPointer <MainAppWindow> mainWindow;
  BlipSim* blipsim;
};

//==============================================================================
// This macro generates the main() routine that starts the app.
START_JUCE_APPLICATION(BlipSimApplication)
