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.

78 lines
2.4KB

  1. /*
  2. ==============================================================================
  3. This file was auto-generated and contains the startup code for a PIP.
  4. ==============================================================================
  5. */
  6. #include "../JuceLibraryCode/JuceHeader.h"
  7. #include "%%filename%%"
  8. %%component_begin%%
  9. class Application : public JUCEApplication
  10. {
  11. public:
  12. //==============================================================================
  13. Application() {}
  14. const String getApplicationName() override { return "%%project_name%%"; }
  15. const String getApplicationVersion() override { return "%%project_version%%"; }
  16. void initialise (const String&) override { %%startup%% }
  17. void shutdown() override { %%shutdown%% }
  18. private:
  19. class MainWindow : public DocumentWindow
  20. {
  21. public:
  22. MainWindow (const String& name, Component* c, JUCEApplication& a)
  23. : DocumentWindow (name, Desktop::getInstance().getDefaultLookAndFeel()
  24. .findColour (ResizableWindow::backgroundColourId),
  25. DocumentWindow::allButtons),
  26. app (a)
  27. {
  28. setUsingNativeTitleBar (true);
  29. setContentOwned (c, true);
  30. #if JUCE_ANDROID || JUCE_IOS
  31. setFullScreen (true);
  32. #else
  33. setResizable (true, false);
  34. setResizeLimits (300, 250, 10000, 10000);
  35. centreWithSize (getWidth(), getHeight());
  36. #endif
  37. setVisible (true);
  38. }
  39. void closeButtonPressed() override
  40. {
  41. app.systemRequestedQuit();
  42. }
  43. private:
  44. JUCEApplication& app;
  45. //==============================================================================
  46. JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainWindow)
  47. };
  48. std::unique_ptr<MainWindow> mainWindow;
  49. };
  50. //==============================================================================
  51. START_JUCE_APPLICATION (Application)
  52. %%component_end%%
  53. %%audioprocessor_begin%%
  54. //==============================================================================
  55. AudioProcessor* JUCE_CALLTYPE createPluginFilter()
  56. {
  57. return new %%class_name%%();
  58. }
  59. %%audioprocessor_end%%
  60. %%console_begin%%
  61. %%console_end%%