Browse Source

Projucer: Added a "PIP Creator" utility tool

tags/2021-05-28
ed 7 years ago
parent
commit
8a467e7dc3
18 changed files with 710 additions and 38 deletions
  1. +7
    -1
      extras/Projucer/Builds/MacOSX/Projucer.xcodeproj/project.pbxproj
  2. +3
    -0
      extras/Projucer/Builds/VisualStudio2013/Projucer_App.vcxproj
  3. +9
    -0
      extras/Projucer/Builds/VisualStudio2013/Projucer_App.vcxproj.filters
  4. +3
    -0
      extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj
  5. +9
    -0
      extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj.filters
  6. +3
    -0
      extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj
  7. +9
    -0
      extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj.filters
  8. +152
    -14
      extras/Projucer/JuceLibraryCode/BinaryData.cpp
  9. +7
    -1
      extras/Projucer/JuceLibraryCode/BinaryData.h
  10. +6
    -0
      extras/Projucer/Projucer.jucer
  11. +333
    -0
      extras/Projucer/Source/Application/Windows/jucer_PIPCreatorWindowComponent.h
  12. +31
    -16
      extras/Projucer/Source/Application/jucer_Application.cpp
  13. +4
    -1
      extras/Projucer/Source/Application/jucer_Application.h
  14. +6
    -5
      extras/Projucer/Source/Application/jucer_CommandIDs.h
  15. +1
    -0
      extras/Projucer/Source/Application/jucer_Main.cpp
  16. +107
    -0
      extras/Projucer/Source/BinaryData/Templates/jucer_PIPAudioProcessorTemplate.h
  17. +17
    -0
      extras/Projucer/Source/BinaryData/Templates/jucer_PIPTemplate.h
  18. +3
    -0
      extras/Projucer/Source/Project/UI/jucer_ContentViewComponents.h

+ 7
- 1
extras/Projucer/Builds/MacOSX/Projucer.xcodeproj/project.pbxproj View File

@@ -110,6 +110,7 @@
0F8C000E5FF4A2DAC1FEF8EB = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "jucer_ProjucerLookAndFeel.cpp"; path = "../../Source/Utility/UI/jucer_ProjucerLookAndFeel.cpp"; sourceTree = "SOURCE_ROOT"; };
11DC04468BC6023671017EBF = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_NewFileWizard.h"; path = "../../Source/Wizards/jucer_NewFileWizard.h"; sourceTree = "SOURCE_ROOT"; };
11DEED05110D3D1D02FCFFB6 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_ComponentTypeHandler.h"; path = "../../Source/ComponentEditor/Components/jucer_ComponentTypeHandler.h"; sourceTree = "SOURCE_ROOT"; };
124232706D1C8A3CA49E70CD = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_PIPCreatorWindowComponent.h"; path = "../../Source/Application/Windows/jucer_PIPCreatorWindowComponent.h"; sourceTree = "SOURCE_ROOT"; };
129F2DE0FEF154F8F8C7A74E = {isa = PBXFileReference; lastKnownFileType = file.jar; name = "gradle-wrapper.jar"; path = "../../Source/BinaryData/gradle/gradle-wrapper.jar"; sourceTree = "SOURCE_ROOT"; };
133F1E428260C5ADDF496DF9 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "jucer_ComponentLayout.cpp"; path = "../../Source/ComponentEditor/jucer_ComponentLayout.cpp"; sourceTree = "SOURCE_ROOT"; };
159DE1FEE2099398983CDDF0 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_ErrorList.h"; path = "../../Source/LiveBuildEngine/jucer_ErrorList.h"; sourceTree = "SOURCE_ROOT"; };
@@ -179,6 +180,7 @@
4D5F0CA8D1273144681A1D48 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "jucer_JucerTreeViewBase.cpp"; path = "../../Source/Utility/UI/jucer_JucerTreeViewBase.cpp"; sourceTree = "SOURCE_ROOT"; };
4D698BF12BCD6B0896BCDF17 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_AutoUpdater.h"; path = "../../Source/Application/jucer_AutoUpdater.h"; sourceTree = "SOURCE_ROOT"; };
4E671236FDBD5AD4699740C6 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_JucerCommandIDs.h"; path = "../../Source/ComponentEditor/UI/jucer_JucerCommandIDs.h"; sourceTree = "SOURCE_ROOT"; };
4ECF029E3A69BF42FED1503D = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_PIPAudioProcessorTemplate.h"; path = "../../Source/BinaryData/Templates/jucer_PIPAudioProcessorTemplate.h"; sourceTree = "SOURCE_ROOT"; };
4F687965FBE86EAFDB3ACFEC = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = BinaryData.h; path = ../../JuceLibraryCode/BinaryData.h; sourceTree = "SOURCE_ROOT"; };
4FF81FC167C924C47BD8C1C9 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "jucer_ProjectSaver.cpp"; path = "../../Source/ProjectSaving/jucer_ProjectSaver.cpp"; sourceTree = "SOURCE_ROOT"; };
50498FF6EA3901CBD58223B3 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_ObjectTypes.h"; path = "../../Source/ComponentEditor/jucer_ObjectTypes.h"; sourceTree = "SOURCE_ROOT"; };
@@ -380,6 +382,7 @@
E3BADF21095BC23DE2CB454F = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_ProjectTreeItemBase.h"; path = "../../Source/Project/UI/Sidebar/jucer_ProjectTreeItemBase.h"; sourceTree = "SOURCE_ROOT"; };
E468FDB5504C5D9315B2D04F = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_ComponentDocument.h"; path = "../../Source/ComponentEditor/Documents/jucer_ComponentDocument.h"; sourceTree = "SOURCE_ROOT"; };
E5D6C36496F5BC84D7213BE8 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
E67999BF57B139E00207A374 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_PIPTemplate.h"; path = "../../Source/BinaryData/Templates/jucer_PIPTemplate.h"; sourceTree = "SOURCE_ROOT"; };
E96597BBC6A98255B51B94DC = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; };
E983E6DDE3318B872EBE347F = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudioKit.framework; path = System/Library/Frameworks/CoreAudioKit.framework; sourceTree = SDKROOT; };
EAC1731150A7F79D59BAA0B6 = {isa = PBXFileReference; lastKnownFileType = file.svg; name = "export_visualStudio.svg"; path = "../../Source/BinaryData/Icons/export_visualStudio.svg"; sourceTree = "SOURCE_ROOT"; };
@@ -412,6 +415,7 @@
D91E7F8FEF9290195D56782C,
C736264708F3F68BA745BA29,
EB2E723DC3DB150A8A644D08,
124232706D1C8A3CA49E70CD,
DDC382008FFD9F9E0B2B0EDD,
F7C74E934C954F6F1A3BE4F9,
92926A4D3CC4BB2A9D35EB0B, ); name = Windows; sourceTree = "<group>"; };
@@ -486,7 +490,9 @@
C607639897ED2538CBB860D0,
023B92AC0340305762412E90,
3F7C5B53347A487C7FBD2223,
3DC2ED15A9DFAAEF3D2ACDDF, ); name = Templates; sourceTree = "<group>"; };
4ECF029E3A69BF42FED1503D,
3DC2ED15A9DFAAEF3D2ACDDF,
E67999BF57B139E00207A374, ); name = Templates; sourceTree = "<group>"; };
A9399733CAA07BDAB958242C = {isa = PBXGroup; children = (
8CF70DA9AB4725126B9F55BE,
F0F189518721D46C0F94FD56,


+ 3
- 0
extras/Projucer/Builds/VisualStudio2013/Projucer_App.vcxproj View File

@@ -1450,6 +1450,7 @@
<ClInclude Include="..\..\Source\Application\Windows\jucer_EditorColourSchemeWindowComponent.h"/>
<ClInclude Include="..\..\Source\Application\Windows\jucer_FloatingToolWindow.h"/>
<ClInclude Include="..\..\Source\Application\Windows\jucer_GlobalPathsWindowComponent.h"/>
<ClInclude Include="..\..\Source\Application\Windows\jucer_PIPCreatorWindowComponent.h"/>
<ClInclude Include="..\..\Source\Application\Windows\jucer_SVGPathDataWindowComponent.h"/>
<ClInclude Include="..\..\Source\Application\Windows\jucer_TranslationToolWindowComponent.h"/>
<ClInclude Include="..\..\Source\Application\Windows\jucer_UTF8WindowComponent.h"/>
@@ -1476,6 +1477,8 @@
<ClInclude Include="..\..\Source\BinaryData\Templates\jucer_NewInlineComponentTemplate.h"/>
<ClInclude Include="..\..\Source\BinaryData\Templates\jucer_OpenGLComponentSimpleTemplate.h"/>
<ClInclude Include="..\..\Source\BinaryData\Templates\jucer_OpenGLComponentTemplate.h"/>
<ClInclude Include="..\..\Source\BinaryData\Templates\jucer_PIPAudioProcessorTemplate.h"/>
<ClInclude Include="..\..\Source\BinaryData\Templates\jucer_PIPTemplate.h"/>
<ClInclude Include="..\..\Source\CodeEditor\jucer_DocumentEditorComponent.h"/>
<ClInclude Include="..\..\Source\CodeEditor\jucer_ItemPreviewComponent.h"/>
<ClInclude Include="..\..\Source\CodeEditor\jucer_LiveBuildCodeEditor.h"/>


+ 9
- 0
extras/Projucer/Builds/VisualStudio2013/Projucer_App.vcxproj.filters View File

@@ -1827,6 +1827,9 @@
<ClInclude Include="..\..\Source\Application\Windows\jucer_GlobalPathsWindowComponent.h">
<Filter>Projucer\Application\Windows</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\Application\Windows\jucer_PIPCreatorWindowComponent.h">
<Filter>Projucer\Application\Windows</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\Application\Windows\jucer_SVGPathDataWindowComponent.h">
<Filter>Projucer\Application\Windows</Filter>
</ClInclude>
@@ -1905,6 +1908,12 @@
<ClInclude Include="..\..\Source\BinaryData\Templates\jucer_OpenGLComponentTemplate.h">
<Filter>Projucer\BinaryData\Templates</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\BinaryData\Templates\jucer_PIPAudioProcessorTemplate.h">
<Filter>Projucer\BinaryData\Templates</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\BinaryData\Templates\jucer_PIPTemplate.h">
<Filter>Projucer\BinaryData\Templates</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\CodeEditor\jucer_DocumentEditorComponent.h">
<Filter>Projucer\CodeEditor</Filter>
</ClInclude>


+ 3
- 0
extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj View File

@@ -1450,6 +1450,7 @@
<ClInclude Include="..\..\Source\Application\Windows\jucer_EditorColourSchemeWindowComponent.h"/>
<ClInclude Include="..\..\Source\Application\Windows\jucer_FloatingToolWindow.h"/>
<ClInclude Include="..\..\Source\Application\Windows\jucer_GlobalPathsWindowComponent.h"/>
<ClInclude Include="..\..\Source\Application\Windows\jucer_PIPCreatorWindowComponent.h"/>
<ClInclude Include="..\..\Source\Application\Windows\jucer_SVGPathDataWindowComponent.h"/>
<ClInclude Include="..\..\Source\Application\Windows\jucer_TranslationToolWindowComponent.h"/>
<ClInclude Include="..\..\Source\Application\Windows\jucer_UTF8WindowComponent.h"/>
@@ -1476,6 +1477,8 @@
<ClInclude Include="..\..\Source\BinaryData\Templates\jucer_NewInlineComponentTemplate.h"/>
<ClInclude Include="..\..\Source\BinaryData\Templates\jucer_OpenGLComponentSimpleTemplate.h"/>
<ClInclude Include="..\..\Source\BinaryData\Templates\jucer_OpenGLComponentTemplate.h"/>
<ClInclude Include="..\..\Source\BinaryData\Templates\jucer_PIPAudioProcessorTemplate.h"/>
<ClInclude Include="..\..\Source\BinaryData\Templates\jucer_PIPTemplate.h"/>
<ClInclude Include="..\..\Source\CodeEditor\jucer_DocumentEditorComponent.h"/>
<ClInclude Include="..\..\Source\CodeEditor\jucer_ItemPreviewComponent.h"/>
<ClInclude Include="..\..\Source\CodeEditor\jucer_LiveBuildCodeEditor.h"/>


+ 9
- 0
extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj.filters View File

@@ -1827,6 +1827,9 @@
<ClInclude Include="..\..\Source\Application\Windows\jucer_GlobalPathsWindowComponent.h">
<Filter>Projucer\Application\Windows</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\Application\Windows\jucer_PIPCreatorWindowComponent.h">
<Filter>Projucer\Application\Windows</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\Application\Windows\jucer_SVGPathDataWindowComponent.h">
<Filter>Projucer\Application\Windows</Filter>
</ClInclude>
@@ -1905,6 +1908,12 @@
<ClInclude Include="..\..\Source\BinaryData\Templates\jucer_OpenGLComponentTemplate.h">
<Filter>Projucer\BinaryData\Templates</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\BinaryData\Templates\jucer_PIPAudioProcessorTemplate.h">
<Filter>Projucer\BinaryData\Templates</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\BinaryData\Templates\jucer_PIPTemplate.h">
<Filter>Projucer\BinaryData\Templates</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\CodeEditor\jucer_DocumentEditorComponent.h">
<Filter>Projucer\CodeEditor</Filter>
</ClInclude>


+ 3
- 0
extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj View File

@@ -1450,6 +1450,7 @@
<ClInclude Include="..\..\Source\Application\Windows\jucer_EditorColourSchemeWindowComponent.h"/>
<ClInclude Include="..\..\Source\Application\Windows\jucer_FloatingToolWindow.h"/>
<ClInclude Include="..\..\Source\Application\Windows\jucer_GlobalPathsWindowComponent.h"/>
<ClInclude Include="..\..\Source\Application\Windows\jucer_PIPCreatorWindowComponent.h"/>
<ClInclude Include="..\..\Source\Application\Windows\jucer_SVGPathDataWindowComponent.h"/>
<ClInclude Include="..\..\Source\Application\Windows\jucer_TranslationToolWindowComponent.h"/>
<ClInclude Include="..\..\Source\Application\Windows\jucer_UTF8WindowComponent.h"/>
@@ -1476,6 +1477,8 @@
<ClInclude Include="..\..\Source\BinaryData\Templates\jucer_NewInlineComponentTemplate.h"/>
<ClInclude Include="..\..\Source\BinaryData\Templates\jucer_OpenGLComponentSimpleTemplate.h"/>
<ClInclude Include="..\..\Source\BinaryData\Templates\jucer_OpenGLComponentTemplate.h"/>
<ClInclude Include="..\..\Source\BinaryData\Templates\jucer_PIPAudioProcessorTemplate.h"/>
<ClInclude Include="..\..\Source\BinaryData\Templates\jucer_PIPTemplate.h"/>
<ClInclude Include="..\..\Source\CodeEditor\jucer_DocumentEditorComponent.h"/>
<ClInclude Include="..\..\Source\CodeEditor\jucer_ItemPreviewComponent.h"/>
<ClInclude Include="..\..\Source\CodeEditor\jucer_LiveBuildCodeEditor.h"/>


+ 9
- 0
extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj.filters View File

@@ -1827,6 +1827,9 @@
<ClInclude Include="..\..\Source\Application\Windows\jucer_GlobalPathsWindowComponent.h">
<Filter>Projucer\Application\Windows</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\Application\Windows\jucer_PIPCreatorWindowComponent.h">
<Filter>Projucer\Application\Windows</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\Application\Windows\jucer_SVGPathDataWindowComponent.h">
<Filter>Projucer\Application\Windows</Filter>
</ClInclude>
@@ -1905,6 +1908,12 @@
<ClInclude Include="..\..\Source\BinaryData\Templates\jucer_OpenGLComponentTemplate.h">
<Filter>Projucer\BinaryData\Templates</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\BinaryData\Templates\jucer_PIPAudioProcessorTemplate.h">
<Filter>Projucer\BinaryData\Templates</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\BinaryData\Templates\jucer_PIPTemplate.h">
<Filter>Projucer\BinaryData\Templates</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\CodeEditor\jucer_DocumentEditorComponent.h">
<Filter>Projucer\CodeEditor</Filter>
</ClInclude>


+ 152
- 14
extras/Projucer/JuceLibraryCode/BinaryData.cpp View File

@@ -7051,8 +7051,120 @@ static const unsigned char temp_binary_data_51[] =
const char* jucer_OpenGLComponentTemplate_h = (const char*) temp_binary_data_51;
//================== jucer_PIPMain.cpp ==================
//================== jucer_PIPAudioProcessorTemplate.h ==================
static const unsigned char temp_binary_data_52[] =
"class %%class_name%% : public AudioProcessor\r\n"
"{\r\n"
"public:\r\n"
" //==============================================================================\r\n"
" %%class_name%%()\r\n"
" : AudioProcessor (BusesProperties().withInput (\"Input\", AudioChannelSet::stereo())\r\n"
" .withOutput (\"Output\", AudioChannelSet::stereo()))\r\n"
" {\r\n"
" }\r\n"
"\r\n"
" ~%%class_name%%()\r\n"
" {\r\n"
" }\r\n"
"\r\n"
" //==============================================================================\r\n"
" void prepareToPlay (double, int) override\r\n"
" {\r\n"
" // Use this method as the place to do any pre-playback\r\n"
" // initialisation that you need..\r\n"
" }\r\n"
"\r\n"
" void releaseResources() override\r\n"
" {\r\n"
" // When playback stops, you can use this as an opportunity to free up any\r\n"
" // spare memory, etc.\r\n"
" }\r\n"
"\r\n"
" void processBlock (AudioBuffer<float>& buffer, MidiBuffer&) override\r\n"
" {\r\n"
" ScopedNoDenormals noDenormals;\r\n"
" auto totalNumInputChannels = getTotalNumInputChannels();\r\n"
" auto totalNumOutputChannels = getTotalNumOutputChannels();\r\n"
"\r\n"
" // In case we have more outputs than inputs, this code clears any output\r\n"
" // channels that didn't contain input data, (because these aren't\r\n"
" // guaranteed to be empty - they may contain garbage).\r\n"
" // This is here to avoid people getting screaming feedback\r\n"
" // when they first compile a plugin, but obviously you don't need to keep\r\n"
" // this code if your algorithm always overwrites all the output channels.\r\n"
" for (auto i = totalNumInputChannels; i < totalNumOutputChannels; ++i)\r\n"
" buffer.clear (i, 0, buffer.getNumSamples());\r\n"
"\r\n"
" // This is the place where you'd normally do the guts of your plugin's\r\n"
" // audio processing...\r\n"
" // Make sure to reset the state if your inner loop is processing\r\n"
" // the samples and the outer loop is handling the channels.\r\n"
" // Alternatively, you can process the samples with the channels\r\n"
" // interleaved by keeping the same state.\r\n"
" for (int channel = 0; channel < totalNumInputChannels; ++channel)\r\n"
" {\r\n"
" auto* channelData = buffer.getWritePointer (channel);\r\n"
"\r\n"
" // ..do something to the data...\r\n"
" }\r\n"
" }\r\n"
"\r\n"
" //==============================================================================\r\n"
" AudioProcessorEditor* createEditor() override { return nullptr; }\r\n"
" bool hasEditor() const override { return false; }\r\n"
"\r\n"
" //==============================================================================\r\n"
" const String getName() const override { return \"%%name%%\"; }\r\n"
" bool acceptsMidi() const override { return false; }\r\n"
" bool producesMidi() const override { return false; }\r\n"
" double getTailLengthSeconds() const override { return 0; }\r\n"
"\r\n"
" //==============================================================================\r\n"
" int getNumPrograms() override { return 1; }\r\n"
" int getCurrentProgram() override { return 0; }\r\n"
" void setCurrentProgram (int) override {}\r\n"
" const String getProgramName (int) override { return {}; }\r\n"
" void changeProgramName (int, const String&) override {}\r\n"
"\r\n"
" //==============================================================================\r\n"
" void getStateInformation (MemoryBlock& destData) override\r\n"
" {\r\n"
" // You should use this method to store your parameters in the memory block.\r\n"
" // You could do that either as raw data, or use the XML or ValueTree classes\r\n"
" // as intermediaries to make it easy to save and load complex data.\r\n"
" }\r\n"
"\r\n"
" void setStateInformation (const void* data, int sizeInBytes) override\r\n"
" {\r\n"
" // You should use this method to restore your parameters from this memory block,\r\n"
" // whose contents will have been created by the getStateInformation() call.\r\n"
" }\r\n"
"\r\n"
" //==============================================================================\r\n"
" bool isBusesLayoutSupported (const BusesLayout& layouts) const override\r\n"
" {\r\n"
" // This is the place where you check if the layout is supported.\r\n"
" // In this template code we only support mono or stereo.\r\n"
" if (layouts.getMainOutputChannelSet() != AudioChannelSet::mono()\r\n"
" && layouts.getMainOutputChannelSet() != AudioChannelSet::stereo())\r\n"
" return false;\r\n"
"\r\n"
" // This checks if the input layout matches the output layout\r\n"
" if (layouts.getMainOutputChannelSet() != layouts.getMainInputChannelSet())\r\n"
" return false;\r\n"
"\r\n"
" return true;\r\n"
" }\r\n"
"\r\n"
"private:\r\n"
" //==============================================================================\r\n"
" JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (%%class_name%%)\r\n"
"};\r\n";
const char* jucer_PIPAudioProcessorTemplate_h = (const char*) temp_binary_data_52;
//================== jucer_PIPMain.cpp ==================
static const unsigned char temp_binary_data_53[] =
"/*\r\n"
" ==============================================================================\r\n"
"\r\n"
@@ -7126,10 +7238,32 @@ static const unsigned char temp_binary_data_52[] =
"%%console_begin%%\r\n"
"%%console_end%%\r\n";
const char* jucer_PIPMain_cpp = (const char*) temp_binary_data_52;
const char* jucer_PIPMain_cpp = (const char*) temp_binary_data_53;
//================== jucer_PIPTemplate.h ==================
static const unsigned char temp_binary_data_54[] =
"/*******************************************************************************\r\n"
" The block below describes the properties of this PIP. A PIP is a short snippet\r\n"
" of code that can be read by the Projucer and used to generate a JUCE project.\r\n"
"\r\n"
" BEGIN_JUCE_PIP_METADATA\r\n"
"\r\n"
"%%pip_metadata%%\r\n"
"\r\n"
" END_JUCE_PIP_METADATA\r\n"
"\r\n"
"*******************************************************************************/\r\n"
"\r\n"
"#pragma once\r\n"
"\r\n"
"\r\n"
"//==============================================================================\r\n"
"%%pip_code%%\r\n";
const char* jucer_PIPTemplate_h = (const char*) temp_binary_data_54;
//================== colourscheme_dark.xml ==================
static const unsigned char temp_binary_data_53[] =
static const unsigned char temp_binary_data_55[] =
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n"
"\r\n"
"<COLOUR_SCHEME font=\"&lt;Monospaced&gt;; 13.0\">\r\n"
@@ -7154,10 +7288,10 @@ static const unsigned char temp_binary_data_53[] =
" <COLOUR name=\"Error\" colour=\"FFE60000\"/>\r\n"
"</COLOUR_SCHEME>\r\n";
const char* colourscheme_dark_xml = (const char*) temp_binary_data_53;
const char* colourscheme_dark_xml = (const char*) temp_binary_data_55;
//================== colourscheme_light.xml ==================
static const unsigned char temp_binary_data_54[] =
static const unsigned char temp_binary_data_56[] =
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n"
"\r\n"
"<COLOUR_SCHEME font=\"&lt;Monospaced&gt;; 13.0\">\r\n"
@@ -7182,16 +7316,16 @@ static const unsigned char temp_binary_data_54[] =
" <COLOUR name=\"Error\" colour=\"ffcc0000\"/>\r\n"
"</COLOUR_SCHEME>\r\n";
const char* colourscheme_light_xml = (const char*) temp_binary_data_54;
const char* colourscheme_light_xml = (const char*) temp_binary_data_56;
//================== nothingtoseehere.txt ==================
static const unsigned char temp_binary_data_55[] =
static const unsigned char temp_binary_data_57[] =
"VUEtMTk3NTkzMTgtNA==";
const char* nothingtoseehere_txt = (const char*) temp_binary_data_55;
const char* nothingtoseehere_txt = (const char*) temp_binary_data_57;
//================== offlinepage.html ==================
static const unsigned char temp_binary_data_56[] =
static const unsigned char temp_binary_data_58[] =
"<html>\n"
" <head>\n"
" <meta http-equiv=\"X-UA-Compatible\" content=\"IE=11\">\n"
@@ -7235,10 +7369,10 @@ static const unsigned char temp_binary_data_56[] =
" </body>\n"
"</html>";
const char* offlinepage_html = (const char*) temp_binary_data_56;
const char* offlinepage_html = (const char*) temp_binary_data_58;
//================== projucer_EULA.txt ==================
static const unsigned char temp_binary_data_57[] =
static const unsigned char temp_binary_data_59[] =
"\r\n"
"IMPORTANT NOTICE: PLEASE READ CAREFULLY BEFORE INSTALLING THE SOFTWARE:\r\n"
"\r\n"
@@ -7402,10 +7536,10 @@ static const unsigned char temp_binary_data_57[] =
"\r\n"
"10.6. Please note that this License, its subject matter and its formation, are governed by English law. You and we both agree to that the courts of England and Wales will have exclusive jurisdiction.\r\n";
const char* projucer_EULA_txt = (const char*) temp_binary_data_57;
const char* projucer_EULA_txt = (const char*) temp_binary_data_59;
//================== RecentFilesMenuTemplate.nib ==================
static const unsigned char temp_binary_data_58[] =
static const unsigned char temp_binary_data_60[] =
{ 98,112,108,105,115,116,48,48,212,0,1,0,2,0,3,0,4,0,5,0,6,1,53,1,54,88,36,118,101,114,115,105,111,110,88,36,111,98,106,101,99,116,115,89,36,97,114,99,104,105,118,101,114,84,36,116,111,112,18,0,1,134,160,175,16,74,0,7,0,8,0,31,0,35,0,36,0,42,0,46,0,50,
0,53,0,57,0,74,0,77,0,78,0,86,0,87,0,97,0,112,0,113,0,114,0,119,0,120,0,121,0,124,0,128,0,129,0,132,0,143,0,144,0,145,0,149,0,153,0,162,0,163,0,164,0,169,0,173,0,180,0,181,0,182,0,185,0,192,0,193,0,200,0,201,0,208,0,209,0,216,0,217,0,224,0,225,0,226,
0,229,0,230,0,232,0,249,1,11,1,29,1,30,1,31,1,32,1,33,1,34,1,35,1,36,1,37,1,38,1,39,1,40,1,41,1,42,1,43,1,44,1,47,1,50,85,36,110,117,108,108,219,0,9,0,10,0,11,0,12,0,13,0,14,0,15,0,16,0,17,0,18,0,19,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,27,0,28,0,29,0,
@@ -7442,7 +7576,7 @@ static const unsigned char temp_binary_data_58[] =
7,157,7,159,7,161,7,163,7,165,7,167,7,169,7,171,7,173,7,175,7,177,7,179,7,181,7,190,7,192,7,225,7,227,7,229,7,231,7,233,7,235,7,237,7,239,7,241,7,243,7,245,7,247,7,249,7,251,7,253,7,255,8,2,8,5,8,8,8,11,8,14,8,17,8,20,8,23,8,26,8,29,8,32,8,35,8,38,8,
41,8,44,8,53,8,55,8,56,8,65,8,67,8,68,8,77,8,92,8,97,8,115,8,120,8,134,0,0,0,0,0,0,2,2,0,0,0,0,0,0,1,57,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,136,0,0 };
const char* RecentFilesMenuTemplate_nib = (const char*) temp_binary_data_58;
const char* RecentFilesMenuTemplate_nib = (const char*) temp_binary_data_60;
const char* getNamedResource (const char*, int&) throw();
@@ -7507,7 +7641,9 @@ const char* getNamedResource (const char* resourceNameUTF8, int& numBytes) throw
case 0x6bdeb129: numBytes = 2174; return jucer_OpenGLComponentSimpleTemplate_h;
case 0x7fbac252: numBytes = 1665; return jucer_OpenGLComponentTemplate_cpp;
case 0x491fa0d7: numBytes = 1263; return jucer_OpenGLComponentTemplate_h;
case 0xbc050edc: numBytes = 4926; return jucer_PIPAudioProcessorTemplate_h;
case 0xf4ca9e9a: numBytes = 2446; return jucer_PIPMain_cpp;
case 0x0b16e320: numBytes = 517; return jucer_PIPTemplate_h;
case 0x763d39dc: numBytes = 1050; return colourscheme_dark_xml;
case 0xe8b08520: numBytes = 1050; return colourscheme_light_xml;
case 0x938e96ec: numBytes = 20; return nothingtoseehere_txt;
@@ -7575,7 +7711,9 @@ const char* namedResourceList[] =
"jucer_OpenGLComponentSimpleTemplate_h",
"jucer_OpenGLComponentTemplate_cpp",
"jucer_OpenGLComponentTemplate_h",
"jucer_PIPAudioProcessorTemplate_h",
"jucer_PIPMain_cpp",
"jucer_PIPTemplate_h",
"colourscheme_dark_xml",
"colourscheme_light_xml",
"nothingtoseehere_txt",


+ 7
- 1
extras/Projucer/JuceLibraryCode/BinaryData.h View File

@@ -164,9 +164,15 @@ namespace BinaryData
extern const char* jucer_OpenGLComponentTemplate_h;
const int jucer_OpenGLComponentTemplate_hSize = 1263;
extern const char* jucer_PIPAudioProcessorTemplate_h;
const int jucer_PIPAudioProcessorTemplate_hSize = 4926;
extern const char* jucer_PIPMain_cpp;
const int jucer_PIPMain_cppSize = 2446;
extern const char* jucer_PIPTemplate_h;
const int jucer_PIPTemplate_hSize = 517;
extern const char* colourscheme_dark_xml;
const int colourscheme_dark_xmlSize = 1050;
@@ -189,7 +195,7 @@ namespace BinaryData
extern const char* namedResourceList[];
// Number of elements in the namedResourceList array.
const int namedResourceListSize = 59;
const int namedResourceListSize = 61;
// If you provide the name of one of the binary resource variables above, this function will
// return the corresponding data and its size (or a null pointer if the name isn't found).


+ 6
- 0
extras/Projucer/Projucer.jucer View File

@@ -117,6 +117,8 @@
file="Source/Application/Windows/jucer_FloatingToolWindow.h"/>
<FILE id="dqgeFF" name="jucer_GlobalPathsWindowComponent.h" compile="0"
resource="0" file="Source/Application/Windows/jucer_GlobalPathsWindowComponent.h"/>
<FILE id="snVgLV" name="jucer_PIPCreatorWindowComponent.h" compile="0"
resource="0" file="Source/Application/Windows/jucer_PIPCreatorWindowComponent.h"/>
<FILE id="RyqPBc" name="jucer_SVGPathDataWindowComponent.h" compile="0"
resource="0" file="Source/Application/Windows/jucer_SVGPathDataWindowComponent.h"/>
<FILE id="ideTas" name="jucer_TranslationToolWindowComponent.h" compile="0"
@@ -255,8 +257,12 @@
resource="1" file="Source/BinaryData/Templates/jucer_OpenGLComponentTemplate.cpp"/>
<FILE id="Edyh5d" name="jucer_OpenGLComponentTemplate.h" compile="0"
resource="1" file="Source/BinaryData/Templates/jucer_OpenGLComponentTemplate.h"/>
<FILE id="BVHe2G" name="jucer_PIPAudioProcessorTemplate.h" compile="0"
resource="1" file="Source/BinaryData/Templates/jucer_PIPAudioProcessorTemplate.h"/>
<FILE id="aUkNL5" name="jucer_PIPMain.cpp" compile="0" resource="1"
file="Source/BinaryData/Templates/jucer_PIPMain.cpp"/>
<FILE id="WqDCf0" name="jucer_PIPTemplate.h" compile="0" resource="1"
file="Source/BinaryData/Templates/jucer_PIPTemplate.h"/>
</GROUP>
<FILE id="oXM3fR" name="colourscheme_dark.xml" compile="0" resource="1"
file="Source/BinaryData/colourscheme_dark.xml"/>


+ 333
- 0
extras/Projucer/Source/Application/Windows/jucer_PIPCreatorWindowComponent.h View File

@@ -0,0 +1,333 @@
/*
==============================================================================
This file is part of the JUCE library.
Copyright (c) 2017 - ROLI Ltd.
JUCE is an open source library subject to commercial or open-source
licensing.
By using JUCE, you agree to the terms of both the JUCE 5 End-User License
Agreement and JUCE 5 Privacy Policy (both updated and effective as of the
27th April 2017).
End User License Agreement: www.juce.com/juce-5-licence
Privacy Policy: www.juce.com/juce-5-privacy-policy
Or: You may also use this code under the terms of the GPL v3 (see
www.gnu.org/licenses).
JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
DISCLAIMED.
==============================================================================
*/
#pragma once
//==============================================================================
static String getWidthLimitedStringFromVarArray (const var& varArray) noexcept
{
if (! varArray.isArray())
return {};
int numLines = 1;
const int lineWidth = 100;
const String indent (" ");
String str;
if (auto* arr = varArray.getArray())
{
for (auto& v : *arr)
{
if ((str.length() + v.toString().length()) > (lineWidth * numLines))
{
str += newLine;
str += indent;
++numLines;
}
str += v.toString() + (arr->indexOf (v) != arr->size() - 1 ? ", " : "");
}
}
return str;
}
//==============================================================================
class PIPCreatorWindowComponent : public Component,
private ValueTree::Listener
{
public:
PIPCreatorWindowComponent()
{
setLookAndFeel (lf = new PIPCreatorLookAndFeel());
addAndMakeVisible (propertyViewport);
propertyViewport.setViewedComponent (&propertyGroup, false);
buildProps();
addAndMakeVisible (createButton);
createButton.onClick = [this]
{
FileChooser fc ("Save PIP File",
File::getSpecialLocation (File::SpecialLocationType::userDesktopDirectory)
.getChildFile (nameValue.get().toString() + ".h"));
fc.browseForFileToSave (true);
createPIPFile (fc.getResult());
};
pipTree.addListener (this);
}
~PIPCreatorWindowComponent()
{
setLookAndFeel (nullptr);
}
void resized() override
{
auto bounds = getLocalBounds();
createButton.setBounds (bounds.removeFromBottom (50).reduced (100, 10));
propertyGroup.updateSize (0, 0, getWidth() - propertyViewport.getScrollBarThickness());
propertyViewport.setBounds (bounds);
}
private:
//==============================================================================
struct PIPCreatorLookAndFeel : public ProjucerLookAndFeel
{
PIPCreatorLookAndFeel() {}
Rectangle<int> getPropertyComponentContentPosition (PropertyComponent& component)
{
auto textW = jmin (200, component.getWidth() / 3);
return { textW, 0, component.getWidth() - textW, component.getHeight() - 1 };
}
};
//==============================================================================
void buildProps()
{
PropertyListBuilder builder;
builder.add (new TextPropertyComponent (nameValue, "Name", 256, false),
"The name of your JUCE project.");
builder.add (new TextPropertyComponent (versionValue, "Version", 16, false),
"This will be used for the \"Project Version\" field in the Projucer.");
builder.add (new TextPropertyComponent (vendorValue, "Vendor", 2048, false),
"This will be used for the \"Company Name\" field in the Projucer.");
builder.add (new TextPropertyComponent (websiteValue, "Website", 2048, false),
"This will be used for the \"Company Website\" field in the Projucer");
builder.add (new TextPropertyComponent (descriptionValue, "Description", 2048, true),
"A short description of your JUCE project.");
{
Array<var> moduleVars;
for (auto& m : getJUCEModules())
moduleVars.add (m);
builder.add (new MultiChoicePropertyComponent (dependenciesValue, "Dependencies",
getJUCEModules(), moduleVars),
"The JUCE modules that should be added to your project.");
}
{
Array<var> exporterVars;
for (auto& e : ProjectExporter::getExporterValueTreeNames())
exporterVars.add (e.toLowerCase());
builder.add (new MultiChoicePropertyComponent (exportersValue, "Exporters",
ProjectExporter::getExporterNames(), exporterVars),
"The exporters that should be added to your project.");
}
builder.add (new TextPropertyComponent (moduleFlagsValue, "Module Flags", 2048, true),
"Use this to set one, or many, of the JUCE module flags");
builder.add (new TextPropertyComponent (definesValue, "Defines", 2048, true),
"This sets some global preprocessor definitions for your project. Used to populate the \"Preprocessor Definitions\" field in the Projucer.");
builder.add (new ChoicePropertyComponent (typeValue, "Type",
{ "Component", "Plugin", "Console Application" },
{ "Component", "AudioProcessor", "Console" }),
"The project type.");
builder.add (new TextPropertyComponent (mainClassValue, "Main Class", 2048, false),
"The name of the main class that should be instantiated. "
"There can only be one main class and it must have a default constructor. "
"Depending on the type, this may need to inherit from a specific JUCE class");
builder.add (new ChoicePropertyComponent (useLocalCopyValue, "Use Local Copy"),
"Enable this to specify that the PIP file should be copied to the generated project directory instead of just referred to.");
propertyGroup.setProperties (builder);
}
//==============================================================================
void valueTreePropertyChanged (ValueTree&, const Identifier& id) override
{
if (id == Ids::type)
{
auto type = typeValue.get().toString();
if (type == "Component")
{
nameValue.setDefault ("MyComponentPIP");
dependenciesValue.setDefault (getModulesRequiredForComponent());
mainClassValue.setDefault ("MyComponent");
}
else if (type == "AudioProcessor")
{
nameValue.setDefault ("MyPluginPIP");
dependenciesValue.setDefault (getModulesRequiredForAudioProcessor());
mainClassValue.setDefault ("MyPlugin");
}
else if (type == "Console")
{
nameValue.setDefault ("MyConsolePIP");
dependenciesValue.setDefault (getModulesRequiredForConsole());
mainClassValue.setDefault ({});
}
MessageManager::callAsync ([this]
{
buildProps();
resized();
});
}
}
void valueTreeChildAdded (ValueTree&, ValueTree&) override {}
void valueTreeChildRemoved (ValueTree&, ValueTree&, int) override {}
void valueTreeChildOrderChanged (ValueTree&, int, int) override {}
void valueTreeParentChanged (ValueTree&) override {}
//==============================================================================
String getFormattedMetadataString() const noexcept
{
StringArray metadata;
{
StringArray section;
if (nameValue.get().toString().isNotEmpty()) section.add (" name: " + nameValue.get().toString());
if (versionValue.get().toString().isNotEmpty()) section.add (" version: " + versionValue.get().toString());
if (vendorValue.get().toString().isNotEmpty()) section.add (" vendor: " + vendorValue.get().toString());
if (websiteValue.get().toString().isNotEmpty()) section.add (" website: " + websiteValue.get().toString());
if (descriptionValue.get().toString().isNotEmpty()) section.add (" description: " + descriptionValue.get().toString());
if (! section.isEmpty())
metadata.add (section.joinIntoString (getLineEnding()));
}
{
StringArray section;
auto dependenciesString = getWidthLimitedStringFromVarArray (dependenciesValue.get());
if (dependenciesString.isNotEmpty()) section.add (" dependencies: " + dependenciesString);
auto exportersString = getWidthLimitedStringFromVarArray (exportersValue.get());
if (exportersString.isNotEmpty()) section.add (" exporters: " + exportersString);
if (! section.isEmpty())
metadata.add (section.joinIntoString (getLineEnding()));
}
{
StringArray section;
if (moduleFlagsValue.get().toString().isNotEmpty()) section.add (" moduleFlags: " + moduleFlagsValue.get().toString());
if (definesValue.get().toString().isNotEmpty()) section.add (" defines: " + definesValue.get().toString());
if (! section.isEmpty())
metadata.add (section.joinIntoString (getLineEnding()));
}
{
StringArray section;
if (typeValue.get().toString().isNotEmpty()) section.add (" type: " + typeValue.get().toString());
if (mainClassValue.get().toString().isNotEmpty()) section.add (" mainClass: " + mainClassValue.get().toString());
if (! section.isEmpty())
metadata.add (section.joinIntoString (getLineEnding()));
}
{
StringArray section;
if (useLocalCopyValue.get()) section.add (" useLocalCopy: " + useLocalCopyValue.get().toString());
if (! section.isEmpty())
metadata.add (section.joinIntoString (getLineEnding()));
}
return metadata.joinIntoString (String (getLineEnding()) + getLineEnding());
}
void createPIPFile (File fileToSave)
{
String fileTemplate (BinaryData::jucer_PIPTemplate_h);
fileTemplate = fileTemplate.replace ("%%pip_metadata%%", getFormattedMetadataString());
auto type = typeValue.get().toString();
if (type == "Component")
{
String componentCode (BinaryData::jucer_ContentCompSimpleTemplate_h);
componentCode = componentCode.substring (componentCode.indexOf ("class %%content_component_class%%"))
.replace ("%%content_component_class%%", mainClassValue.get().toString());
fileTemplate = fileTemplate.replace ("%%pip_code%%", componentCode);
}
else if (type == "AudioProcessor")
{
String audioProcessorCode (BinaryData::jucer_PIPAudioProcessorTemplate_h);
audioProcessorCode = audioProcessorCode.replace ("%%class_name%%", mainClassValue.get().toString())
.replace ("%%name%%", nameValue.get().toString());
fileTemplate = fileTemplate.replace ("%%pip_code%%", audioProcessorCode);
}
else if (type == "Console")
{
String consoleCode (BinaryData::jucer_MainConsoleAppTemplate_cpp);
consoleCode = consoleCode.substring (consoleCode.indexOf ("int main (int argc, char* argv[])"));
fileTemplate = fileTemplate.replace ("%%pip_code%%", consoleCode);
}
if (fileToSave.create())
fileToSave.replaceWithText (fileTemplate);
}
//==============================================================================
ScopedPointer<LookAndFeel> lf;
Viewport propertyViewport;
PropertyGroupComponent propertyGroup { "PIP Creator", { getIcons().juceLogo, Colours::transparentBlack } };
TextButton createButton { "Create PIP" };
ValueTree pipTree { "PIPSettings" };
ValueWithDefault nameValue { pipTree, Ids::name, nullptr, "MyComponentPIP" },
versionValue { pipTree, Ids::version, nullptr },
vendorValue { pipTree, Ids::vendor, nullptr },
websiteValue { pipTree, Ids::website, nullptr },
descriptionValue { pipTree, Ids::description, nullptr },
dependenciesValue { pipTree, Ids::dependencies_, nullptr, getModulesRequiredForComponent() },
exportersValue { pipTree, Ids::exporters, nullptr,
StringArray (ProjectExporter::getValueTreeNameForExporter (ProjectExporter::getCurrentPlatformExporterName()).toLowerCase()) },
moduleFlagsValue { pipTree, Ids::moduleFlags, nullptr },
definesValue { pipTree, Ids::defines, nullptr },
typeValue { pipTree, Ids::type, nullptr, "Component" },
mainClassValue { pipTree, Ids::mainClass, nullptr, "MyComponent" },
useLocalCopyValue { pipTree, Ids::useLocalCopy, nullptr, false };
//==============================================================================
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PIPCreatorWindowComponent)
};

+ 31
- 16
extras/Projucer/Source/Application/jucer_Application.cpp View File

@@ -380,6 +380,7 @@ void ProjucerApplication::createFileMenu (PopupMenu& menu)
{
menu.addCommandItem (commandManager, CommandIDs::newProject);
menu.addCommandItem (commandManager, CommandIDs::newProjectFromClipboard);
menu.addCommandItem (commandManager, CommandIDs::newPIP);
menu.addSeparator();
menu.addCommandItem (commandManager, CommandIDs::open);
@@ -902,6 +903,7 @@ void ProjucerApplication::getAllCommands (Array <CommandID>& commands)
const CommandID ids[] = { CommandIDs::newProject,
CommandIDs::newProjectFromClipboard,
CommandIDs::newPIP,
CommandIDs::open,
CommandIDs::launchDemoRunner,
CommandIDs::closeAllWindows,
@@ -936,6 +938,11 @@ void ProjucerApplication::getCommandInfo (CommandID commandID, ApplicationComman
result.defaultKeypresses.add (KeyPress ('n', ModifierKeys::commandModifier | ModifierKeys::shiftModifier, 0));
break;
case CommandIDs::newPIP:
result.setInfo ("New PIP...", "Opens the PIP Creator utility for creating a new PIP", CommandCategories::general, 0);
result.defaultKeypresses.add (KeyPress ('p', ModifierKeys::commandModifier, 0));
break;
case CommandIDs::launchDemoRunner:
#if JUCE_LINUX
if (makeProcess.isRunning())
@@ -1045,6 +1052,7 @@ bool ProjucerApplication::perform (const InvocationInfo& info)
{
case CommandIDs::newProject: createNewProject(); break;
case CommandIDs::newProjectFromClipboard: createNewProjectFromClipboard(); break;
case CommandIDs::newPIP: createNewPIP(); break;
case CommandIDs::open: askUserToOpenFile(); break;
case CommandIDs::launchDemoRunner: launchDemoRunner(); break;
case CommandIDs::saveAll: openDocumentManager.saveAll(); break;
@@ -1094,6 +1102,11 @@ void ProjucerApplication::createNewProjectFromClipboard()
}
}
void ProjucerApplication::createNewPIP()
{
showPIPCreatorWindow();
}
void ProjucerApplication::updateNewlyOpenedProject (Project& p)
{
LiveBuildProjectSettings::updateNewlyOpenedProject (p);
@@ -1147,8 +1160,7 @@ void ProjucerApplication::showUTF8ToolWindow()
if (utf8Window != nullptr)
utf8Window->toFront (true);
else
new FloatingToolWindow ("UTF-8 String Literal Converter",
"utf8WindowPos",
new FloatingToolWindow ("UTF-8 String Literal Converter", "utf8WindowPos",
new UTF8Component(), utf8Window, true,
500, 500, 300, 300, 1000, 1000);
}
@@ -1158,8 +1170,7 @@ void ProjucerApplication::showSVGPathDataToolWindow()
if (svgPathWindow != nullptr)
svgPathWindow->toFront (true);
else
new FloatingToolWindow ("SVG Path Converter",
"svgPathWindowPos",
new FloatingToolWindow ("SVG Path Converter", "svgPathWindowPos",
new SVGPathDataComponent(), svgPathWindow, true,
500, 500, 300, 300, 1000, 1000);
}
@@ -1179,9 +1190,8 @@ void ProjucerApplication::showApplicationUsageDataAgreementPopup()
if (applicationUsageDataWindow != nullptr)
applicationUsageDataWindow->toFront (true);
else
new FloatingToolWindow ("Application Usage Analytics",
{}, new ApplicationUsageDataWindowComponent (isPaidOrGPL()),
applicationUsageDataWindow, false,
new FloatingToolWindow ("Application Usage Analytics", {},
new ApplicationUsageDataWindowComponent (isPaidOrGPL()), applicationUsageDataWindow, false,
400, 300, 400, 300, 400, 300);
}
@@ -1196,8 +1206,7 @@ void ProjucerApplication::showPathsWindow (bool highlightJUCEPath)
if (pathsWindow != nullptr)
pathsWindow->toFront (true);
else
new FloatingToolWindow ("Global Paths",
"pathsWindowPos",
new FloatingToolWindow ("Global Paths", "pathsWindowPos",
new GlobalPathsWindowComponent(), pathsWindow, false,
600, 650, 600, 650, 600, 650);
@@ -1211,14 +1220,19 @@ void ProjucerApplication::showEditorColourSchemeWindow()
if (editorColourSchemeWindow != nullptr)
editorColourSchemeWindow->toFront (true);
else
{
new FloatingToolWindow ("Editor Colour Scheme",
"editorColourSchemeWindowPos",
new EditorColourSchemeWindowComponent(),
editorColourSchemeWindow,
false,
new FloatingToolWindow ("Editor Colour Scheme", "editorColourSchemeWindowPos",
new EditorColourSchemeWindowComponent(), editorColourSchemeWindow, false,
500, 500, 500, 500, 500, 500);
}
}
void ProjucerApplication::showPIPCreatorWindow()
{
if (pipCreatorWindow != nullptr)
pipCreatorWindow->toFront (true);
else
new FloatingToolWindow ("PIP Creator", "pipCreatorWindowPos",
new PIPCreatorWindowComponent(), pipCreatorWindow, false,
600, 750, 600, 750, 600, 750);
}
void ProjucerApplication::launchForumBrowser()
@@ -1425,6 +1439,7 @@ void ProjucerApplication::setColourScheme (int index, bool saveSetting)
if (applicationUsageDataWindow != nullptr) applicationUsageDataWindow->sendLookAndFeelChange();
if (pathsWindow != nullptr) pathsWindow->sendLookAndFeelChange();
if (editorColourSchemeWindow != nullptr) editorColourSchemeWindow->sendLookAndFeelChange();
if (pipCreatorWindow != nullptr) pipCreatorWindow->sendLookAndFeelChange();
auto* mcm = ModalComponentManager::getInstance();
for (auto i = 0; i < mcm->getNumModalComponents(); ++i)


+ 4
- 1
extras/Projucer/Source/Application/jucer_Application.h View File

@@ -93,6 +93,7 @@ public:
//==============================================================================
void createNewProject();
void createNewProjectFromClipboard();
void createNewPIP();
void updateNewlyOpenedProject (Project&);
void askUserToOpenFile();
bool openFile (const File&);
@@ -114,6 +115,8 @@ public:
void showPathsWindow (bool highlightJUCEPath = false);
void showEditorColourSchemeWindow();
void showPIPCreatorWindow();
void launchForumBrowser();
void launchModulesBrowser();
void launchClassesBrowser();
@@ -150,7 +153,7 @@ public:
ScopedPointer<ApplicationCommandManager> commandManager;
ScopedPointer<Component> utf8Window, svgPathWindow, aboutWindow, applicationUsageDataWindow,
pathsWindow, editorColourSchemeWindow;
pathsWindow, editorColourSchemeWindow, pipCreatorWindow;
ScopedPointer<FileLogger> logger;


+ 6
- 5
extras/Projucer/Source/Application/jucer_CommandIDs.h View File

@@ -35,12 +35,13 @@ namespace CommandIDs
{
newProject = 0x300000,
newProjectFromClipboard = 0x300001,
open = 0x300002,
closeDocument = 0x300003,
saveDocument = 0x300004,
saveDocumentAs = 0x300005,
newPIP = 0x300002,
open = 0x300003,
closeDocument = 0x300004,
saveDocument = 0x300005,
saveDocumentAs = 0x300006,
launchDemoRunner = 0x300006,
launchDemoRunner = 0x300007,
closeProject = 0x300010,
saveProject = 0x300011,


+ 1
- 0
extras/Projucer/Source/Application/jucer_Main.cpp View File

@@ -37,6 +37,7 @@
#include "Windows/jucer_ApplicationUsageDataWindowComponent.h"
#include "Windows/jucer_EditorColourSchemeWindowComponent.h"
#include "Windows/jucer_GlobalPathsWindowComponent.h"
#include "Windows/jucer_PIPCreatorWindowComponent.h"
#include "Windows/jucer_FloatingToolWindow.h"
#include "../LiveBuildEngine/jucer_MessageIDs.h"


+ 107
- 0
extras/Projucer/Source/BinaryData/Templates/jucer_PIPAudioProcessorTemplate.h View File

@@ -0,0 +1,107 @@
class %%class_name%% : public AudioProcessor
{
public:
//==============================================================================
%%class_name%%()
: AudioProcessor (BusesProperties().withInput ("Input", AudioChannelSet::stereo())
.withOutput ("Output", AudioChannelSet::stereo()))
{
}
~%%class_name%%()
{
}
//==============================================================================
void prepareToPlay (double, int) override
{
// Use this method as the place to do any pre-playback
// initialisation that you need..
}
void releaseResources() override
{
// When playback stops, you can use this as an opportunity to free up any
// spare memory, etc.
}
void processBlock (AudioBuffer<float>& buffer, MidiBuffer&) override
{
ScopedNoDenormals noDenormals;
auto totalNumInputChannels = getTotalNumInputChannels();
auto totalNumOutputChannels = getTotalNumOutputChannels();
// In case we have more outputs than inputs, this code clears any output
// channels that didn't contain input data, (because these aren't
// guaranteed to be empty - they may contain garbage).
// This is here to avoid people getting screaming feedback
// when they first compile a plugin, but obviously you don't need to keep
// this code if your algorithm always overwrites all the output channels.
for (auto i = totalNumInputChannels; i < totalNumOutputChannels; ++i)
buffer.clear (i, 0, buffer.getNumSamples());
// This is the place where you'd normally do the guts of your plugin's
// audio processing...
// Make sure to reset the state if your inner loop is processing
// the samples and the outer loop is handling the channels.
// Alternatively, you can process the samples with the channels
// interleaved by keeping the same state.
for (int channel = 0; channel < totalNumInputChannels; ++channel)
{
auto* channelData = buffer.getWritePointer (channel);
// ..do something to the data...
}
}
//==============================================================================
AudioProcessorEditor* createEditor() override { return nullptr; }
bool hasEditor() const override { return false; }
//==============================================================================
const String getName() const override { return "%%name%%"; }
bool acceptsMidi() const override { return false; }
bool producesMidi() const override { return false; }
double getTailLengthSeconds() const override { return 0; }
//==============================================================================
int getNumPrograms() override { return 1; }
int getCurrentProgram() override { return 0; }
void setCurrentProgram (int) override {}
const String getProgramName (int) override { return {}; }
void changeProgramName (int, const String&) override {}
//==============================================================================
void getStateInformation (MemoryBlock& destData) override
{
// You should use this method to store your parameters in the memory block.
// You could do that either as raw data, or use the XML or ValueTree classes
// as intermediaries to make it easy to save and load complex data.
}
void setStateInformation (const void* data, int sizeInBytes) override
{
// You should use this method to restore your parameters from this memory block,
// whose contents will have been created by the getStateInformation() call.
}
//==============================================================================
bool isBusesLayoutSupported (const BusesLayout& layouts) const override
{
// This is the place where you check if the layout is supported.
// In this template code we only support mono or stereo.
if (layouts.getMainOutputChannelSet() != AudioChannelSet::mono()
&& layouts.getMainOutputChannelSet() != AudioChannelSet::stereo())
return false;
// This checks if the input layout matches the output layout
if (layouts.getMainOutputChannelSet() != layouts.getMainInputChannelSet())
return false;
return true;
}
private:
//==============================================================================
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (%%class_name%%)
};

+ 17
- 0
extras/Projucer/Source/BinaryData/Templates/jucer_PIPTemplate.h View File

@@ -0,0 +1,17 @@
/*******************************************************************************
The block below describes the properties of this PIP. A PIP is a short snippet
of code that can be read by the Projucer and used to generate a JUCE project.
BEGIN_JUCE_PIP_METADATA
%%pip_metadata%%
END_JUCE_PIP_METADATA
*******************************************************************************/
#pragma once
//==============================================================================
%%pip_code%%

+ 3
- 0
extras/Projucer/Source/Project/UI/jucer_ContentViewComponents.h View File

@@ -263,6 +263,9 @@ public:
infoButtons.getLast()->setAssociatedComponent (prop);
prop->setTooltip ({}); // set the tooltip to empty so it only displays when its button is clicked
}
if (auto* multiChoice = dynamic_cast<MultiChoicePropertyComponent*> (prop))
multiChoice->onHeightChange = [this] { updateSize (getX(), getY(), getWidth()); };
}
}


Loading…
Cancel
Save