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.

73 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) : DocumentWindow (name,
  23. Desktop::getInstance().getDefaultLookAndFeel()
  24. .findColour (ResizableWindow::backgroundColourId),
  25. DocumentWindow::allButtons)
  26. {
  27. setUsingNativeTitleBar (true);
  28. setContentOwned (c, true);
  29. #if JUCE_ANDROID || JUCE_IOS
  30. setFullScreen (true);
  31. #else
  32. setResizable (true, false);
  33. setResizeLimits (300, 250, 10000, 10000);
  34. centreWithSize (getWidth(), getHeight());
  35. #endif
  36. setVisible (true);
  37. }
  38. void closeButtonPressed() override
  39. {
  40. JUCEApplication::getInstance()->systemRequestedQuit();
  41. }
  42. private:
  43. JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainWindow)
  44. };
  45. ScopedPointer<MainWindow> mainWindow;
  46. };
  47. //==============================================================================
  48. START_JUCE_APPLICATION (Application)
  49. %%component_end%%
  50. %%audioprocessor_begin%%
  51. //==============================================================================
  52. AudioProcessor* JUCE_CALLTYPE createPluginFilter()
  53. {
  54. return new %%class_name%%();
  55. }
  56. %%audioprocessor_end%%
  57. %%console_begin%%
  58. %%console_end%%