diff --git a/extras/Demo/Builds/Android/jni/Android.mk b/extras/Demo/Builds/Android/jni/Android.mk index b85b25c97b..738b27f4fb 100644 --- a/extras/Demo/Builds/Android/jni/Android.mk +++ b/extras/Demo/Builds/Android/jni/Android.mk @@ -28,6 +28,7 @@ LOCAL_SRC_FILES := \ ../../../Source/Demos/ImagesDemo.cpp\ ../../../Source/Demos/JavaScript.cpp\ ../../../Source/Demos/KeyMappingsDemo.cpp\ + ../../../Source/Demos/LiveConstantDemo.cpp\ ../../../Source/Demos/MDIDemo.cpp\ ../../../Source/Demos/MidiDemo.cpp\ ../../../Source/Demos/MultithreadingDemo.cpp\ diff --git a/extras/Demo/Builds/Linux/Makefile b/extras/Demo/Builds/Linux/Makefile index 1cc8847459..00b8d57734 100644 --- a/extras/Demo/Builds/Linux/Makefile +++ b/extras/Demo/Builds/Linux/Makefile @@ -69,6 +69,7 @@ OBJECTS := \ $(OBJDIR)/ImagesDemo_ecf13aa3.o \ $(OBJDIR)/JavaScript_d6e42eb5.o \ $(OBJDIR)/KeyMappingsDemo_cf05c709.o \ + $(OBJDIR)/LiveConstantDemo_e3b18a9b.o \ $(OBJDIR)/MDIDemo_c476c2d7.o \ $(OBJDIR)/MidiDemo_75ebc30c.o \ $(OBJDIR)/MultithreadingDemo_ff566eaa.o \ @@ -221,6 +222,11 @@ $(OBJDIR)/KeyMappingsDemo_cf05c709.o: ../../Source/Demos/KeyMappingsDemo.cpp @echo "Compiling KeyMappingsDemo.cpp" @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" +$(OBJDIR)/LiveConstantDemo_e3b18a9b.o: ../../Source/Demos/LiveConstantDemo.cpp + -@mkdir -p $(OBJDIR) + @echo "Compiling LiveConstantDemo.cpp" + @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + $(OBJDIR)/MDIDemo_c476c2d7.o: ../../Source/Demos/MDIDemo.cpp -@mkdir -p $(OBJDIR) @echo "Compiling MDIDemo.cpp" diff --git a/extras/Demo/Builds/MacOSX/JuceDemo.xcodeproj/project.pbxproj b/extras/Demo/Builds/MacOSX/JuceDemo.xcodeproj/project.pbxproj index 915541927e..5ddbdff415 100644 --- a/extras/Demo/Builds/MacOSX/JuceDemo.xcodeproj/project.pbxproj +++ b/extras/Demo/Builds/MacOSX/JuceDemo.xcodeproj/project.pbxproj @@ -41,6 +41,7 @@ 7B3B359BCD73C20D0BFCDEA6 /* QTKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0374860044AB7A23CED0D26C /* QTKit.framework */; }; 7BEA73E4BB71CE05E542A6E8 /* BinaryData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8D70A7277DDD7B7974E9F178 /* BinaryData.cpp */; }; 7CA1524D7DE0C18C1F070C97 /* juce_cryptography.mm in Sources */ = {isa = PBXBuildFile; fileRef = B9D26C6C4CED62E6708B6865 /* juce_cryptography.mm */; }; + 7F933AA1FB06796E6D67C6E2 /* LiveConstantDemo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 92D3CD3845968E4FAB93576D /* LiveConstantDemo.cpp */; }; 7FBBD57A4D5BF1101490D3E8 /* AudioLatencyDemo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 01C6528C4A0646873D4C3429 /* AudioLatencyDemo.cpp */; }; 7FDB32957337BE65186DA1A2 /* juce_opengl.mm in Sources */ = {isa = PBXBuildFile; fileRef = 786CF1CA66289DB77845F8E9 /* juce_opengl.mm */; }; 9855E6AE1E9125FC6C3673D4 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 033BE48C56ED09055876AFB9 /* QuartzCore.framework */; }; @@ -636,6 +637,7 @@ 912E1A63093C3FA3BD2AFE61 /* juce_Button.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = juce_Button.cpp; path = ../../../../modules/juce_gui_basics/buttons/juce_Button.cpp; sourceTree = SOURCE_ROOT; }; 91F4E52A1B31FB5998FEF665 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = SOURCE_ROOT; }; 9200669E9DB4FE676A07CD77 /* juce_TextDragAndDropTarget.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = juce_TextDragAndDropTarget.h; path = ../../../../modules/juce_gui_basics/mouse/juce_TextDragAndDropTarget.h; sourceTree = SOURCE_ROOT; }; + 92D3CD3845968E4FAB93576D /* LiveConstantDemo.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = LiveConstantDemo.cpp; path = ../../Source/Demos/LiveConstantDemo.cpp; sourceTree = SOURCE_ROOT; }; 9327D6AA8805BE7AD971D68C /* juce_ApplicationProperties.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = juce_ApplicationProperties.h; path = ../../../../modules/juce_data_structures/app_properties/juce_ApplicationProperties.h; sourceTree = SOURCE_ROOT; }; 937A2E7B951F5D527DF54245 /* juce_PopupMenu.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = juce_PopupMenu.h; path = ../../../../modules/juce_gui_basics/menus/juce_PopupMenu.h; sourceTree = SOURCE_ROOT; }; 93B3667FE4186CD75426EA53 /* juce_PropertiesFile.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = juce_PropertiesFile.h; path = ../../../../modules/juce_data_structures/app_properties/juce_PropertiesFile.h; sourceTree = SOURCE_ROOT; }; @@ -722,6 +724,7 @@ ABDFE5D85E6ED3CBB8AE1F50 /* juce_PropertiesFile.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = juce_PropertiesFile.cpp; path = ../../../../modules/juce_data_structures/app_properties/juce_PropertiesFile.cpp; sourceTree = SOURCE_ROOT; }; AC043128E8D43D6EA4E29824 /* juce_PreferencesPanel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = juce_PreferencesPanel.h; path = ../../../../modules/juce_gui_extra/misc/juce_PreferencesPanel.h; sourceTree = SOURCE_ROOT; }; AC25983CE9B938D1DB002A98 /* juce_OpenGLTexture.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = juce_OpenGLTexture.h; path = ../../../../modules/juce_opengl/opengl/juce_OpenGLTexture.h; sourceTree = SOURCE_ROOT; }; + AC3132AD4826E77E807ACD3D /* juce_LiveConstantEditor.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = juce_LiveConstantEditor.cpp; path = ../../../../modules/juce_gui_extra/misc/juce_LiveConstantEditor.cpp; sourceTree = SOURCE_ROOT; }; AC3600881A53014EFC1CB8D2 /* juce_TextEditorKeyMapper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = juce_TextEditorKeyMapper.h; path = ../../../../modules/juce_gui_basics/keyboard/juce_TextEditorKeyMapper.h; sourceTree = SOURCE_ROOT; }; AC70FAD27248857B6D16BD33 /* AudioSynthesiserDemo.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = AudioSynthesiserDemo.cpp; path = ../../Source/Demos/AudioSynthesiserDemo.cpp; sourceTree = SOURCE_ROOT; }; AC7A214BA7B1A172F5B31735 /* juce_StringPairArray.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = juce_StringPairArray.cpp; path = ../../../../modules/juce_core/text/juce_StringPairArray.cpp; sourceTree = SOURCE_ROOT; }; @@ -740,6 +743,7 @@ B10A9A3B4A4C2507F514D5F2 /* juce_SortedSet.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = juce_SortedSet.h; path = ../../../../modules/juce_core/containers/juce_SortedSet.h; sourceTree = SOURCE_ROOT; }; B13A8EA6840489EB88D77800 /* juce_OggVorbisAudioFormat.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = juce_OggVorbisAudioFormat.h; path = ../../../../modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.h; sourceTree = SOURCE_ROOT; }; B17EF578E9B736B1C5A5E8BF /* juce_events.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = juce_events.h; path = ../../../../modules/juce_events/juce_events.h; sourceTree = SOURCE_ROOT; }; + B1C05A8D59655916054612D8 /* juce_LiveConstantEditor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = juce_LiveConstantEditor.h; path = ../../../../modules/juce_gui_extra/misc/juce_LiveConstantEditor.h; sourceTree = SOURCE_ROOT; }; B27A7B237782F9E15E4BF8D5 /* juce_graphics.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = juce_graphics.mm; path = ../../../../modules/juce_graphics/juce_graphics.mm; sourceTree = SOURCE_ROOT; }; B2BD3F284DBA9EDFFF80ECE1 /* juce_KeyPress.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = juce_KeyPress.cpp; path = ../../../../modules/juce_gui_basics/keyboard/juce_KeyPress.cpp; sourceTree = SOURCE_ROOT; }; B305C104F5A573E8AFEFA763 /* juce_AudioFormat.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = juce_AudioFormat.h; path = ../../../../modules/juce_audio_formats/format/juce_AudioFormat.h; sourceTree = SOURCE_ROOT; }; @@ -1500,6 +1504,8 @@ DADF2C478777BA8EEBB55CDD /* juce_ColourSelector.h */, 201E7DB01624212F01B85F5E /* juce_KeyMappingEditorComponent.cpp */, 94D8CEE59AC2644453705A74 /* juce_KeyMappingEditorComponent.h */, + AC3132AD4826E77E807ACD3D /* juce_LiveConstantEditor.cpp */, + B1C05A8D59655916054612D8 /* juce_LiveConstantEditor.h */, 293678404D17012C6E402AA4 /* juce_PreferencesPanel.cpp */, AC043128E8D43D6EA4E29824 /* juce_PreferencesPanel.h */, A464874D0B8C63AA78C937B7 /* juce_RecentlyOpenedFilesList.cpp */, @@ -1598,6 +1604,7 @@ 7DBF83B26277D13CB3FC1479 /* ImagesDemo.cpp */, CCEC8F9385AE939B24D27954 /* JavaScript.cpp */, F1E995A1E00C6545A4C3297B /* KeyMappingsDemo.cpp */, + 92D3CD3845968E4FAB93576D /* LiveConstantDemo.cpp */, 52E4BE1BCD56D3676C84BEB0 /* MDIDemo.cpp */, 28CB3F1A8BFCE1F01FD630A6 /* MidiDemo.cpp */, 9F75FFB61C74FEECE61A7138 /* MultithreadingDemo.cpp */, @@ -2912,6 +2919,7 @@ 9C30D9613D76EEFDB1653F34 /* ImagesDemo.cpp in Sources */, B810E94ECBCA231F60EBEA5F /* JavaScript.cpp in Sources */, 15B2A7314D1E347D65EC664D /* KeyMappingsDemo.cpp in Sources */, + 7F933AA1FB06796E6D67C6E2 /* LiveConstantDemo.cpp in Sources */, 52B925A3C2C3D9B8CB7E42C0 /* MDIDemo.cpp in Sources */, B65EF8DC596033D841E653C4 /* MidiDemo.cpp in Sources */, B402A461C4EE2203251F9BF1 /* MultithreadingDemo.cpp in Sources */, diff --git a/extras/Demo/Builds/VisualStudio2010/JuceDemo.vcxproj b/extras/Demo/Builds/VisualStudio2010/JuceDemo.vcxproj index 74fd01bd2f..2c721d4f51 100644 --- a/extras/Demo/Builds/VisualStudio2010/JuceDemo.vcxproj +++ b/extras/Demo/Builds/VisualStudio2010/JuceDemo.vcxproj @@ -145,6 +145,7 @@ + @@ -1175,6 +1176,9 @@ true + + true + true @@ -1675,6 +1679,7 @@ + diff --git a/extras/Demo/Builds/VisualStudio2010/JuceDemo.vcxproj.filters b/extras/Demo/Builds/VisualStudio2010/JuceDemo.vcxproj.filters index 23075e8e24..51ddc9b969 100644 --- a/extras/Demo/Builds/VisualStudio2010/JuceDemo.vcxproj.filters +++ b/extras/Demo/Builds/VisualStudio2010/JuceDemo.vcxproj.filters @@ -379,6 +379,9 @@ JuceDemo\Source\Demos + + JuceDemo\Source\Demos + JuceDemo\Source\Demos @@ -1498,6 +1501,9 @@ Juce Modules\juce_gui_extra\misc + + Juce Modules\juce_gui_extra\misc + Juce Modules\juce_gui_extra\misc @@ -2874,6 +2880,9 @@ Juce Modules\juce_gui_extra\misc + + Juce Modules\juce_gui_extra\misc + Juce Modules\juce_gui_extra\misc diff --git a/extras/Demo/Builds/VisualStudio2012/JuceDemo.vcxproj b/extras/Demo/Builds/VisualStudio2012/JuceDemo.vcxproj index c110b7b2c6..1c6f79b94a 100644 --- a/extras/Demo/Builds/VisualStudio2012/JuceDemo.vcxproj +++ b/extras/Demo/Builds/VisualStudio2012/JuceDemo.vcxproj @@ -151,6 +151,7 @@ + @@ -1181,6 +1182,9 @@ true + + true + true @@ -1681,6 +1685,7 @@ + diff --git a/extras/Demo/Builds/VisualStudio2012/JuceDemo.vcxproj.filters b/extras/Demo/Builds/VisualStudio2012/JuceDemo.vcxproj.filters index 23075e8e24..51ddc9b969 100644 --- a/extras/Demo/Builds/VisualStudio2012/JuceDemo.vcxproj.filters +++ b/extras/Demo/Builds/VisualStudio2012/JuceDemo.vcxproj.filters @@ -379,6 +379,9 @@ JuceDemo\Source\Demos + + JuceDemo\Source\Demos + JuceDemo\Source\Demos @@ -1498,6 +1501,9 @@ Juce Modules\juce_gui_extra\misc + + Juce Modules\juce_gui_extra\misc + Juce Modules\juce_gui_extra\misc @@ -2874,6 +2880,9 @@ Juce Modules\juce_gui_extra\misc + + Juce Modules\juce_gui_extra\misc + Juce Modules\juce_gui_extra\misc diff --git a/extras/Demo/Builds/VisualStudio2013/JuceDemo.vcxproj b/extras/Demo/Builds/VisualStudio2013/JuceDemo.vcxproj index cbc64e0bbf..007ec869bc 100644 --- a/extras/Demo/Builds/VisualStudio2013/JuceDemo.vcxproj +++ b/extras/Demo/Builds/VisualStudio2013/JuceDemo.vcxproj @@ -151,6 +151,7 @@ + @@ -1181,6 +1182,9 @@ true + + true + true @@ -1681,6 +1685,7 @@ + diff --git a/extras/Demo/Builds/VisualStudio2013/JuceDemo.vcxproj.filters b/extras/Demo/Builds/VisualStudio2013/JuceDemo.vcxproj.filters index fbc3422940..6171a56100 100644 --- a/extras/Demo/Builds/VisualStudio2013/JuceDemo.vcxproj.filters +++ b/extras/Demo/Builds/VisualStudio2013/JuceDemo.vcxproj.filters @@ -379,6 +379,9 @@ JuceDemo\Source\Demos + + JuceDemo\Source\Demos + JuceDemo\Source\Demos @@ -1498,6 +1501,9 @@ Juce Modules\juce_gui_extra\misc + + Juce Modules\juce_gui_extra\misc + Juce Modules\juce_gui_extra\misc @@ -2874,6 +2880,9 @@ Juce Modules\juce_gui_extra\misc + + Juce Modules\juce_gui_extra\misc + Juce Modules\juce_gui_extra\misc diff --git a/extras/Demo/Builds/iOS/JuceDemo.xcodeproj/project.pbxproj b/extras/Demo/Builds/iOS/JuceDemo.xcodeproj/project.pbxproj index 14b7785f8b..a8f81ceae6 100644 --- a/extras/Demo/Builds/iOS/JuceDemo.xcodeproj/project.pbxproj +++ b/extras/Demo/Builds/iOS/JuceDemo.xcodeproj/project.pbxproj @@ -36,6 +36,7 @@ 9C30D9613D76EEFDB1653F34 = { isa = PBXBuildFile; fileRef = 7DBF83B26277D13CB3FC1479; }; B810E94ECBCA231F60EBEA5F = { isa = PBXBuildFile; fileRef = CCEC8F9385AE939B24D27954; }; 15B2A7314D1E347D65EC664D = { isa = PBXBuildFile; fileRef = F1E995A1E00C6545A4C3297B; }; + 7F933AA1FB06796E6D67C6E2 = { isa = PBXBuildFile; fileRef = 92D3CD3845968E4FAB93576D; }; 52B925A3C2C3D9B8CB7E42C0 = { isa = PBXBuildFile; fileRef = 52E4BE1BCD56D3676C84BEB0; }; B65EF8DC596033D841E653C4 = { isa = PBXBuildFile; fileRef = 28CB3F1A8BFCE1F01FD630A6; }; B402A461C4EE2203251F9BF1 = { isa = PBXBuildFile; fileRef = 9F75FFB61C74FEECE61A7138; }; @@ -622,6 +623,7 @@ 912E1A63093C3FA3BD2AFE61 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Button.cpp"; path = "../../../../modules/juce_gui_basics/buttons/juce_Button.cpp"; sourceTree = "SOURCE_ROOT"; }; 91F4E52A1B31FB5998FEF665 = { isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Info.plist; sourceTree = "SOURCE_ROOT"; }; 9200669E9DB4FE676A07CD77 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_TextDragAndDropTarget.h"; path = "../../../../modules/juce_gui_basics/mouse/juce_TextDragAndDropTarget.h"; sourceTree = "SOURCE_ROOT"; }; + 92D3CD3845968E4FAB93576D = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = LiveConstantDemo.cpp; path = ../../Source/Demos/LiveConstantDemo.cpp; sourceTree = "SOURCE_ROOT"; }; 9327D6AA8805BE7AD971D68C = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ApplicationProperties.h"; path = "../../../../modules/juce_data_structures/app_properties/juce_ApplicationProperties.h"; sourceTree = "SOURCE_ROOT"; }; 937A2E7B951F5D527DF54245 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_PopupMenu.h"; path = "../../../../modules/juce_gui_basics/menus/juce_PopupMenu.h"; sourceTree = "SOURCE_ROOT"; }; 93B3667FE4186CD75426EA53 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_PropertiesFile.h"; path = "../../../../modules/juce_data_structures/app_properties/juce_PropertiesFile.h"; sourceTree = "SOURCE_ROOT"; }; @@ -706,6 +708,7 @@ ABDFE5D85E6ED3CBB8AE1F50 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_PropertiesFile.cpp"; path = "../../../../modules/juce_data_structures/app_properties/juce_PropertiesFile.cpp"; sourceTree = "SOURCE_ROOT"; }; AC043128E8D43D6EA4E29824 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_PreferencesPanel.h"; path = "../../../../modules/juce_gui_extra/misc/juce_PreferencesPanel.h"; sourceTree = "SOURCE_ROOT"; }; AC25983CE9B938D1DB002A98 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_OpenGLTexture.h"; path = "../../../../modules/juce_opengl/opengl/juce_OpenGLTexture.h"; sourceTree = "SOURCE_ROOT"; }; + AC3132AD4826E77E807ACD3D = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_LiveConstantEditor.cpp"; path = "../../../../modules/juce_gui_extra/misc/juce_LiveConstantEditor.cpp"; sourceTree = "SOURCE_ROOT"; }; AC3600881A53014EFC1CB8D2 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_TextEditorKeyMapper.h"; path = "../../../../modules/juce_gui_basics/keyboard/juce_TextEditorKeyMapper.h"; sourceTree = "SOURCE_ROOT"; }; AC70FAD27248857B6D16BD33 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = AudioSynthesiserDemo.cpp; path = ../../Source/Demos/AudioSynthesiserDemo.cpp; sourceTree = "SOURCE_ROOT"; }; AC7A214BA7B1A172F5B31735 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_StringPairArray.cpp"; path = "../../../../modules/juce_core/text/juce_StringPairArray.cpp"; sourceTree = "SOURCE_ROOT"; }; @@ -724,6 +727,7 @@ B10A9A3B4A4C2507F514D5F2 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_SortedSet.h"; path = "../../../../modules/juce_core/containers/juce_SortedSet.h"; sourceTree = "SOURCE_ROOT"; }; B13A8EA6840489EB88D77800 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_OggVorbisAudioFormat.h"; path = "../../../../modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.h"; sourceTree = "SOURCE_ROOT"; }; B17EF578E9B736B1C5A5E8BF = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_events.h"; path = "../../../../modules/juce_events/juce_events.h"; sourceTree = "SOURCE_ROOT"; }; + B1C05A8D59655916054612D8 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_LiveConstantEditor.h"; path = "../../../../modules/juce_gui_extra/misc/juce_LiveConstantEditor.h"; sourceTree = "SOURCE_ROOT"; }; B27A7B237782F9E15E4BF8D5 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_graphics.mm"; path = "../../../../modules/juce_graphics/juce_graphics.mm"; sourceTree = "SOURCE_ROOT"; }; B2BD3F284DBA9EDFFF80ECE1 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_KeyPress.cpp"; path = "../../../../modules/juce_gui_basics/keyboard/juce_KeyPress.cpp"; sourceTree = "SOURCE_ROOT"; }; B305C104F5A573E8AFEFA763 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AudioFormat.h"; path = "../../../../modules/juce_audio_formats/format/juce_AudioFormat.h"; sourceTree = "SOURCE_ROOT"; }; @@ -900,7 +904,6 @@ E4BD5632ADD38CF8BAD38A76 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_CallOutBox.cpp"; path = "../../../../modules/juce_gui_basics/windows/juce_CallOutBox.cpp"; sourceTree = "SOURCE_ROOT"; }; E5058DD199CEC42ECE922239 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Justification.h"; path = "../../../../modules/juce_graphics/placement/juce_Justification.h"; sourceTree = "SOURCE_ROOT"; }; E52756E1DB553ED02D829F61 = { isa = PBXFileReference; lastKnownFileType = file; name = "juce_module_info"; path = "../../../../modules/juce_cryptography/juce_module_info"; sourceTree = "SOURCE_ROOT"; }; - E5E02A3C4E942105FEDCA885 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ChannelRemappingAudioSource.h"; path = "../../../../modules/juce_audio_basics/sources/juce_ChannelRemappingAudioSource.h"; sourceTree = "SOURCE_ROOT"; }; E6333272C33612B6A7D6073E = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_AudioCDBurner.cpp"; path = "../../../../modules/juce_audio_devices/native/juce_win32_AudioCDBurner.cpp"; sourceTree = "SOURCE_ROOT"; }; E682A3A52BD15D5CA4933C12 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_RelativeParallelogram.h"; path = "../../../../modules/juce_gui_basics/positioning/juce_RelativeParallelogram.h"; sourceTree = "SOURCE_ROOT"; }; E6E0FE3CBDBE2554B527CF60 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_AudioSourcePlayer.cpp"; path = "../../../../modules/juce_audio_devices/sources/juce_AudioSourcePlayer.cpp"; sourceTree = "SOURCE_ROOT"; }; @@ -923,6 +926,7 @@ EACCBFA17F4D07ECE058EEBB = { isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMIDI.framework; path = System/Library/Frameworks/CoreMIDI.framework; sourceTree = SDKROOT; }; EB369EA30D31CD710A09B7FD = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_ios_MessageManager.mm"; path = "../../../../modules/juce_events/native/juce_ios_MessageManager.mm"; sourceTree = "SOURCE_ROOT"; }; EB6F5F8F57F0117C10735583 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AudioIODevice.h"; path = "../../../../modules/juce_audio_devices/audio_io/juce_AudioIODevice.h"; sourceTree = "SOURCE_ROOT"; }; + EC8A992EA9CFA558DB9F950E = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_CharacterFunctions.h"; path = "../../../../modules/juce_core/text/juce_CharacterFunctions.h"; sourceTree = "SOURCE_ROOT"; }; ECAB8BD2816B0BEFCD9F6961 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AsyncUpdater.h"; path = "../../../../modules/juce_events/broadcasters/juce_AsyncUpdater.h"; sourceTree = "SOURCE_ROOT"; }; ED6224ABC715AAB68661F4D4 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_box2d.cpp"; path = "../../../../modules/juce_box2d/juce_box2d.cpp"; sourceTree = "SOURCE_ROOT"; }; EE7001BD5206A8D8EA2D125B = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_RectangleList.h"; path = "../../../../modules/juce_graphics/geometry/juce_RectangleList.h"; sourceTree = "SOURCE_ROOT"; }; @@ -941,7 +945,7 @@ FBCD860CD7113A3136B127C8 = { isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreText.framework; path = System/Library/Frameworks/CoreText.framework; sourceTree = SDKROOT; }; 229D2DAADACF15540C3BBD15 = { isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = JuceDemo.app; sourceTree = "BUILT_PRODUCTS_DIR"; }; E34DFFF51D0F7C34FB826C4C = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FloatVectorOperations.h"; path = "../../../../modules/juce_audio_basics/buffers/juce_FloatVectorOperations.h"; sourceTree = "SOURCE_ROOT"; }; - EC8A992EA9CFA558DB9F950E = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_CharacterFunctions.h"; path = "../../../../modules/juce_core/text/juce_CharacterFunctions.h"; sourceTree = "SOURCE_ROOT"; }; + E5E02A3C4E942105FEDCA885 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ChannelRemappingAudioSource.h"; path = "../../../../modules/juce_audio_basics/sources/juce_ChannelRemappingAudioSource.h"; sourceTree = "SOURCE_ROOT"; }; ED80E9909586DD64BDE03A70 = { isa = PBXFileReference; lastKnownFileType = image.jpeg; name = portmeirion.jpg; path = ../../Resources/portmeirion.jpg; sourceTree = "SOURCE_ROOT"; }; EEAA1BB6254EDE07A7ABAD65 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_IIRFilterAudioSource.h"; path = "../../../../modules/juce_audio_basics/sources/juce_IIRFilterAudioSource.h"; sourceTree = "SOURCE_ROOT"; }; EFD1BD42000EE640A17EE1ED = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_AudioFormatReaderSource.cpp"; path = "../../../../modules/juce_audio_formats/format/juce_AudioFormatReaderSource.cpp"; sourceTree = "SOURCE_ROOT"; }; @@ -1010,6 +1014,7 @@ 7DBF83B26277D13CB3FC1479, CCEC8F9385AE939B24D27954, F1E995A1E00C6545A4C3297B, + 92D3CD3845968E4FAB93576D, 52E4BE1BCD56D3676C84BEB0, 28CB3F1A8BFCE1F01FD630A6, 9F75FFB61C74FEECE61A7138, @@ -1990,6 +1995,8 @@ DADF2C478777BA8EEBB55CDD, 201E7DB01624212F01B85F5E, 94D8CEE59AC2644453705A74, + AC3132AD4826E77E807ACD3D, + B1C05A8D59655916054612D8, 293678404D17012C6E402AA4, AC043128E8D43D6EA4E29824, A464874D0B8C63AA78C937B7, @@ -2232,6 +2239,7 @@ 9C30D9613D76EEFDB1653F34, B810E94ECBCA231F60EBEA5F, 15B2A7314D1E347D65EC664D, + 7F933AA1FB06796E6D67C6E2, 52B925A3C2C3D9B8CB7E42C0, B65EF8DC596033D841E653C4, B402A461C4EE2203251F9BF1, diff --git a/extras/Demo/JuceDemo.jucer b/extras/Demo/JuceDemo.jucer index 1de62e2d94..596918471a 100644 --- a/extras/Demo/JuceDemo.jucer +++ b/extras/Demo/JuceDemo.jucer @@ -238,6 +238,8 @@ + - + diff --git a/extras/Demo/JuceLibraryCode/AppConfig.h b/extras/Demo/JuceLibraryCode/AppConfig.h index 8b4bfd0e0f..7287e3426c 100644 --- a/extras/Demo/JuceLibraryCode/AppConfig.h +++ b/extras/Demo/JuceLibraryCode/AppConfig.h @@ -175,6 +175,10 @@ extern bool juceDemoRepaintDebuggingActive; //#define JUCE_WEB_BROWSER #endif +#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR + #define JUCE_ENABLE_LIVE_CONSTANT_EDITOR 1 +#endif + //============================================================================== // juce_video flags: diff --git a/extras/Demo/Source/Demos/LiveConstantDemo.cpp b/extras/Demo/Source/Demos/LiveConstantDemo.cpp new file mode 100644 index 0000000000..58370e5507 --- /dev/null +++ b/extras/Demo/Source/Demos/LiveConstantDemo.cpp @@ -0,0 +1,119 @@ +/* + ============================================================================== + + This file is part of the JUCE library - "Jules' Utility Class Extensions" + Copyright 2004-12 by Raw Material Software Ltd. + + ------------------------------------------------------------------------------ + + JUCE can be redistributed and/or modified under the terms of the GNU General + Public License (Version 2), as published by the Free Software Foundation. + A copy of the license is included in the JUCE distribution, or can be found + online at www.gnu.org/licenses. + + JUCE is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + ------------------------------------------------------------------------------ + + To release a closed-source product which uses JUCE, commercial licenses are + available: visit www.rawmaterialsoftware.com/juce for more information. + + ============================================================================== +*/ + +#include "../JuceDemoHeader.h" + + +//============================================================================== +struct LiveConstantDemoComponent : public Component +{ + LiveConstantDemoComponent() {} + + void paint (Graphics& g) + { + g.fillAll (JUCE_LIVE_CONSTANT (Colour (0xffe5e7a7))); + + g.setColour (JUCE_LIVE_CONSTANT (Colours::red.withAlpha (0.2f))); + int blockWidth = JUCE_LIVE_CONSTANT (200); + int blockHeight = JUCE_LIVE_CONSTANT (200); + g.fillRect ((getWidth() - blockWidth) / 2, (getHeight() - blockHeight) / 2, blockWidth, blockHeight); + + Colour fontColour = JUCE_LIVE_CONSTANT (Colour (0xff000a55)); + float fontSize = JUCE_LIVE_CONSTANT (30.0f); + + g.setColour (fontColour); + g.setFont (fontSize); + + g.drawFittedText (getDemoText(), getLocalBounds(), Justification::centred, 2); + } + + static String getDemoText() + { + return JUCE_LIVE_CONSTANT ("Hello world!"); + } +}; + +//============================================================================== +class LiveConstantEditorDemo : public Component, + private ButtonListener +{ +public: + LiveConstantEditorDemo() + : startButton ("Begin Demo") + { + descriptionLabel.setMinimumHorizontalScale (1.0f); + descriptionLabel.setText ("This demonstrates the JUCE_LIVE_CONSTANT macro, which allows you to quickly " + "adjust primitive values at runtime by just wrapping them in a macro.\n\n" + "To understand what's going on in this demo, you should have a look at the " + "LiveConstantDemoComponent class in LiveConstantDemo.cpp, where you can see " + "the code that's invoking the demo below...", + dontSendNotification); + + addAndMakeVisible (&descriptionLabel); + addAndMakeVisible (&startButton); + addChildComponent (&demoComp); + startButton.addListener (this); + } + + void paint (Graphics& g) override + { + g.fillAll (Colour::greyLevel (0.93f)); + } + + void resized() override + { + Rectangle r (getLocalBounds().reduced (10)); + + demoComp.setBounds (r); + + descriptionLabel.setBounds (r.removeFromTop (200)); + startButton.setBounds (r.removeFromTop (22).removeFromLeft (250)); + + demoComp.setBounds (r.withTrimmedTop (10)); + } + +private: + Label descriptionLabel; + TextButton startButton; + LiveConstantDemoComponent demoComp; + + void buttonClicked (Button*) override + { + startButton.setVisible (false); + demoComp.setVisible (true); + + descriptionLabel.setText ("Tweak some of the colours and values in the pop-up window to see what " + "the effect of your changes would be on the component below...", + dontSendNotification); + } + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LiveConstantEditorDemo); +}; + + +#if ! (JUCE_IOS || JUCE_ANDROID) + // This static object will register this demo type in a global list of demos.. + static JuceDemoType demo ("10 Components: Live Constants"); +#endif diff --git a/modules/juce_gui_extra/misc/juce_LiveConstantEditor.cpp b/modules/juce_gui_extra/misc/juce_LiveConstantEditor.cpp index dd975c5bf5..fcf7c05a19 100644 --- a/modules/juce_gui_extra/misc/juce_LiveConstantEditor.cpp +++ b/modules/juce_gui_extra/misc/juce_LiveConstantEditor.cpp @@ -111,8 +111,6 @@ LivePropertyEditorBase::LivePropertyEditorBase (LiveValueBase& v, CodeDocument& addAndMakeVisible (&name); addAndMakeVisible (&valueEditor); addAndMakeVisible (&sourceEditor); - sourceEditor.setWantsKeyboardFocus (false); - sourceEditor.setEnabled (false); findOriginalValueInCode(); selectOriginalValue(); @@ -121,6 +119,7 @@ LivePropertyEditorBase::LivePropertyEditorBase (LiveValueBase& v, CodeDocument& name.setText (v.name, dontSendNotification); valueEditor.setText (v.getStringValue(), dontSendNotification); valueEditor.addListener (this); + sourceEditor.setReadOnly (true); } void LivePropertyEditorBase::paint (Graphics& g) @@ -248,7 +247,7 @@ public: void resized() override { - Rectangle r (getLocalBounds()); + Rectangle r (getLocalBounds().reduced (2, 0)); for (int i = 0; i < editors.size(); ++i) editors.getUnchecked(i)->setBounds (r.removeFromTop (itemHeight)); @@ -278,8 +277,8 @@ public: setContentNonOwned (&viewport, true); setResizable (true, false); setResizeLimits (500, 400, 10000, 10000); - setVisible (true); centreWithSize (getWidth(), getHeight()); + setVisible (true); } void closeButtonPressed() override