The JUCE cross-platform C++ framework, with DISTRHO/KXStudio specific changes
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.

60 lines
2.1KB

  1. /*
  2. ==============================================================================
  3. This file was auto-generated!
  4. It contains the basic startup code for a Juce application.
  5. ==============================================================================
  6. */
  7. #include "../JuceLibraryCode/JuceHeader.h"
  8. #include "MainComponent.h"
  9. //==============================================================================
  10. class BlocksSynthApplication : public JUCEApplication
  11. {
  12. public:
  13. //==============================================================================
  14. BlocksSynthApplication() {}
  15. const String getApplicationName() override { return ProjectInfo::projectName; }
  16. const String getApplicationVersion() override { return ProjectInfo::versionString; }
  17. //==============================================================================
  18. void initialise (const String& /*commandLine*/) override { mainWindow = new MainWindow (getApplicationName()); }
  19. void shutdown() override { mainWindow = nullptr; }
  20. //==============================================================================
  21. struct MainWindow : public DocumentWindow
  22. {
  23. MainWindow (String name) : DocumentWindow (name,
  24. Colours::lightgrey,
  25. DocumentWindow::allButtons)
  26. {
  27. setUsingNativeTitleBar (true);
  28. setContentOwned (new MainComponent(), true);
  29. centreWithSize (getWidth(), getHeight());
  30. setResizable (true, true);
  31. setVisible (true);
  32. }
  33. void closeButtonPressed() override
  34. {
  35. JUCEApplication::getInstance()->systemRequestedQuit();
  36. }
  37. TooltipWindow tooltipWindow;
  38. JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainWindow)
  39. };
  40. private:
  41. ScopedPointer<MainWindow> mainWindow;
  42. };
  43. //==============================================================================
  44. START_JUCE_APPLICATION (BlocksSynthApplication)