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.

57 lines
2.0KB

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