diff --git a/extras/Introjucer/Builds/CodeBlocks/The Introjucer.cbp b/extras/Introjucer/Builds/CodeBlocks/The Introjucer.cbp
index 82d0be3f23..c94495e98e 100644
--- a/extras/Introjucer/Builds/CodeBlocks/The Introjucer.cbp
+++ b/extras/Introjucer/Builds/CodeBlocks/The Introjucer.cbp
@@ -271,6 +271,10 @@
+
+
+
+
diff --git a/extras/Introjucer/Builds/MacOSX/The Introjucer.xcodeproj/project.pbxproj b/extras/Introjucer/Builds/MacOSX/The Introjucer.xcodeproj/project.pbxproj
index d43b3a2864..e318a74226 100644
--- a/extras/Introjucer/Builds/MacOSX/The Introjucer.xcodeproj/project.pbxproj
+++ b/extras/Introjucer/Builds/MacOSX/The Introjucer.xcodeproj/project.pbxproj
@@ -704,7 +704,6 @@
C83992DA0BE30EA3CD06EA98 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ProgressBar.h"; path = "../../../../modules/juce_gui_basics/widgets/juce_ProgressBar.h"; sourceTree = "SOURCE_ROOT"; };
C85B4D62B96F4A44890F20E2 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_SortedSet.h"; path = "../../../../modules/juce_core/containers/juce_SortedSet.h"; sourceTree = "SOURCE_ROOT"; };
C8A229ACD244F402C57286CD = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_ProjectExport_MSVC.h"; path = "../../Source/Project Saving/jucer_ProjectExport_MSVC.h"; sourceTree = "SOURCE_ROOT"; };
- C90C66C5727759D5CBD5FB07 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_AbstractFifo.cpp"; path = "../../../../modules/juce_core/containers/juce_AbstractFifo.cpp"; sourceTree = "SOURCE_ROOT"; };
C9616830BB2474066AC8C910 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_ResourceFile.h"; path = "../../Source/Project Saving/jucer_ResourceFile.h"; sourceTree = "SOURCE_ROOT"; };
C9871C46DEDD05103443DC33 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_NewLine.h"; path = "../../../../modules/juce_core/text/juce_NewLine.h"; sourceTree = "SOURCE_ROOT"; };
C9DCA94BF8A4C583E5392755 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_MultiTimer.cpp"; path = "../../../../modules/juce_events/timers/juce_MultiTimer.cpp"; sourceTree = "SOURCE_ROOT"; };
@@ -714,12 +713,14 @@
CBE0B96838EE76C9CB8E1230 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ColourGradient.cpp"; path = "../../../../modules/juce_graphics/colour/juce_ColourGradient.cpp"; sourceTree = "SOURCE_ROOT"; };
CC3F5263B16932FF4E74B9D8 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_CodeEditorComponent.h"; path = "../../../../modules/juce_gui_extra/code_editor/juce_CodeEditorComponent.h"; sourceTree = "SOURCE_ROOT"; };
CC63B9EC2E95FD4AF7608D8E = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_CharacterFunctions.h"; path = "../../../../modules/juce_core/text/juce_CharacterFunctions.h"; sourceTree = "SOURCE_ROOT"; };
+ CD140A1C0161176682F6CA29 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ResizableWindow.cpp"; path = "../../../../modules/juce_gui_basics/windows/juce_ResizableWindow.cpp"; sourceTree = "SOURCE_ROOT"; };
CD3216F23C7B273B010A8D12 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_CustomTypeface.h"; path = "../../../../modules/juce_graphics/fonts/juce_CustomTypeface.h"; sourceTree = "SOURCE_ROOT"; };
CD8F40A9EF6ECAD083543974 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_WildcardFileFilter.h"; path = "../../../../modules/juce_gui_basics/filebrowser/juce_WildcardFileFilter.h"; sourceTree = "SOURCE_ROOT"; };
CDCAF0EC777DA2884AEB2B59 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Label.cpp"; path = "../../../../modules/juce_gui_basics/widgets/juce_Label.cpp"; sourceTree = "SOURCE_ROOT"; };
CDDF5BDC75277F7B83A38885 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_PropertySet.cpp"; path = "../../../../modules/juce_core/containers/juce_PropertySet.cpp"; sourceTree = "SOURCE_ROOT"; };
CDF8F65F9079B2C14A740F0F = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ImageButton.h"; path = "../../../../modules/juce_gui_basics/buttons/juce_ImageButton.h"; sourceTree = "SOURCE_ROOT"; };
CE1DFE4E3908943656E180AD = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_UnitTest.cpp"; path = "../../../../modules/juce_core/unit_tests/juce_UnitTest.cpp"; sourceTree = "SOURCE_ROOT"; };
+ CF0615A1AF1A514A60322B50 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_MouseCursor.h"; path = "../../../../modules/juce_gui_basics/mouse/juce_MouseCursor.h"; sourceTree = "SOURCE_ROOT"; };
CF21D9DB3AEC0A4DCAB36A99 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "jucer_Icons.cpp"; path = "../../Source/Utility/jucer_Icons.cpp"; sourceTree = "SOURCE_ROOT"; };
CF6C8BD0DA3D8CD4E99EBADA = { isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; };
CF8011B3C67B609032974DA5 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "jucer_NewCppFileTemplate.cpp"; path = "../../Source/BinaryData/jucer_NewCppFileTemplate.cpp"; sourceTree = "SOURCE_ROOT"; };
@@ -734,6 +735,7 @@
D2F1CF252F7EC62B35A21CB6 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_DropShadowEffect.cpp"; path = "../../../../modules/juce_graphics/effects/juce_DropShadowEffect.cpp"; sourceTree = "SOURCE_ROOT"; };
D2F80DA0946A5EE01FC016CA = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_CharPointer_UTF32.h"; path = "../../../../modules/juce_core/text/juce_CharPointer_UTF32.h"; sourceTree = "SOURCE_ROOT"; };
D374DC78AAC02504576AA9B3 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_GroupComponentHandler.h"; path = "../../Source/ComponentEditor/components/jucer_GroupComponentHandler.h"; sourceTree = "SOURCE_ROOT"; };
+ D376B9B54EC944E766AFEC45 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_PopupMenu.cpp"; path = "../../../../modules/juce_gui_basics/menus/juce_PopupMenu.cpp"; sourceTree = "SOURCE_ROOT"; };
D4444EC6342A2A7BC4F7BC46 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_ComponentTextProperty.h"; path = "../../Source/ComponentEditor/properties/jucer_ComponentTextProperty.h"; sourceTree = "SOURCE_ROOT"; };
D4697A0232AECE5DAC5E332E = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ChoicePropertyComponent.cpp"; path = "../../../../modules/juce_gui_basics/properties/juce_ChoicePropertyComponent.cpp"; sourceTree = "SOURCE_ROOT"; };
D4E56676E2EF83404EDCBA8C = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_TextEditor.cpp"; path = "../../../../modules/juce_gui_basics/widgets/juce_TextEditor.cpp"; sourceTree = "SOURCE_ROOT"; };
@@ -742,68 +744,67 @@
D5057D7B18ABD5E810A6F830 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_DirectWriteTypeface.cpp"; path = "../../../../modules/juce_graphics/native/juce_win32_DirectWriteTypeface.cpp"; sourceTree = "SOURCE_ROOT"; };
D526C38D581425949BA0E4AC = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_FilePreviewComponent.h"; path = "../../Source/Application/jucer_FilePreviewComponent.h"; sourceTree = "SOURCE_ROOT"; };
D53B54D1786A1FFC024BF064 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_cryptography.mm"; path = "../../../../modules/juce_cryptography/juce_cryptography.mm"; sourceTree = "SOURCE_ROOT"; };
+ D5A6D00DEFDC650AF432A698 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Initialisation.h"; path = "../../../../modules/juce_gui_basics/application/juce_Initialisation.h"; sourceTree = "SOURCE_ROOT"; };
D678882D133090214AF681BC = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ThreadLocalValue.h"; path = "../../../../modules/juce_core/threads/juce_ThreadLocalValue.h"; sourceTree = "SOURCE_ROOT"; };
D6C91E2BF537F75A80F5C1DB = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ListBox.h"; path = "../../../../modules/juce_gui_basics/widgets/juce_ListBox.h"; sourceTree = "SOURCE_ROOT"; };
D75EAC16FAECCC51E3669193 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ApplicationCommandInfo.h"; path = "../../../../modules/juce_gui_basics/commands/juce_ApplicationCommandInfo.h"; sourceTree = "SOURCE_ROOT"; };
+ D780ED33573AED5AD383A036 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_CaretComponent.h"; path = "../../../../modules/juce_gui_basics/keyboard/juce_CaretComponent.h"; sourceTree = "SOURCE_ROOT"; };
D782DA091AD3ECE158FC6A5F = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ButtonPropertyComponent.h"; path = "../../../../modules/juce_gui_basics/properties/juce_ButtonPropertyComponent.h"; sourceTree = "SOURCE_ROOT"; };
+ D7A7F1AA9F313B0CCAAA73A0 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_MathsFunctions.h"; path = "../../../../modules/juce_core/maths/juce_MathsFunctions.h"; sourceTree = "SOURCE_ROOT"; };
+ D800DE818BEDBF4579D15B1D = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_mac_AppleRemote.mm"; path = "../../../../modules/juce_gui_extra/native/juce_mac_AppleRemote.mm"; sourceTree = "SOURCE_ROOT"; };
D87FC8F6834E9DC9C8E88B94 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_JustificationProperty.h"; path = "../../Source/ComponentEditor/properties/jucer_JustificationProperty.h"; sourceTree = "SOURCE_ROOT"; };
D926E13AB5AD647A7A00F486 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_linux_Network.cpp"; path = "../../../../modules/juce_core/native/juce_linux_Network.cpp"; sourceTree = "SOURCE_ROOT"; };
D92A6E9404A30EED32DCE4ED = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_RelativePositionedRectangle.h"; path = "../../Source/ComponentEditor/ui/jucer_RelativePositionedRectangle.h"; sourceTree = "SOURCE_ROOT"; };
- DA345D5B9DABD049F90DC96F = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_GeneratedCode.h"; path = "../../Source/ComponentEditor/jucer_GeneratedCode.h"; sourceTree = "SOURCE_ROOT"; };
- DAF84A553D264705FA6EB6FF = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_TreeViewHandler.h"; path = "../../Source/ComponentEditor/components/jucer_TreeViewHandler.h"; sourceTree = "SOURCE_ROOT"; };
- DBE0CDE1B017190ABBFF557C = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_ProjectExport_CodeBlocks.h"; path = "../../Source/Project Saving/jucer_ProjectExport_CodeBlocks.h"; sourceTree = "SOURCE_ROOT"; };
- DC5E7FF30B01118F6DAEC38F = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Time.cpp"; path = "../../../../modules/juce_core/time/juce_Time.cpp"; sourceTree = "SOURCE_ROOT"; };
- DC922C6A65D260C18E888E49 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "jucer_ComponentTemplate.cpp"; path = "../../Source/BinaryData/jucer_ComponentTemplate.cpp"; sourceTree = "SOURCE_ROOT"; };
- DD00494140C86144306A9356 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Array.h"; path = "../../../../modules/juce_core/containers/juce_Array.h"; sourceTree = "SOURCE_ROOT"; };
- DE8DF5D263F40F65581CFDE4 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ChildProcess.cpp"; path = "../../../../modules/juce_core/threads/juce_ChildProcess.cpp"; sourceTree = "SOURCE_ROOT"; };
- DF725A596B7BCD7520CC0A9F = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "jucer_ResourceEditorPanel.cpp"; path = "../../Source/ComponentEditor/ui/jucer_ResourceEditorPanel.cpp"; sourceTree = "SOURCE_ROOT"; };
- DFC6364D81D9C60BD4CA9D12 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_RelativeTime.cpp"; path = "../../../../modules/juce_core/time/juce_RelativeTime.cpp"; sourceTree = "SOURCE_ROOT"; };
- E0F9CA57E44F7F7E7E217E47 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_ComponentUndoableAction.h"; path = "../../Source/ComponentEditor/components/jucer_ComponentUndoableAction.h"; sourceTree = "SOURCE_ROOT"; };
- E2374E15D65425C4101237E2 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_NewComponentTemplate.h"; path = "../../Source/BinaryData/jucer_NewComponentTemplate.h"; sourceTree = "SOURCE_ROOT"; };
- E2C1C995D554A3F0A363CE58 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Thread.h"; path = "../../../../modules/juce_core/threads/juce_Thread.h"; sourceTree = "SOURCE_ROOT"; };
- E2DBA3307837B64AFCCD8F8D = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_File.cpp"; path = "../../../../modules/juce_core/files/juce_File.cpp"; sourceTree = "SOURCE_ROOT"; };
- E570E57CC1FCEF78B54A7084 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FileOutputStream.h"; path = "../../../../modules/juce_core/files/juce_FileOutputStream.h"; sourceTree = "SOURCE_ROOT"; };
- E5D6C36496F5BC84D7213BE8 = { isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
- E65A820D34BF39478B7C5925 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_DocumentEditorComponent.h"; path = "../../Source/Application/jucer_DocumentEditorComponent.h"; sourceTree = "SOURCE_ROOT"; };
- E6F5CEC32EDC917B054467EF = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ReadWriteLock.cpp"; path = "../../../../modules/juce_core/threads/juce_ReadWriteLock.cpp"; sourceTree = "SOURCE_ROOT"; };
- E720FBCD836FF3AA466C31B6 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_HighResolutionTimer.cpp"; path = "../../../../modules/juce_core/threads/juce_HighResolutionTimer.cpp"; sourceTree = "SOURCE_ROOT"; };
- E7F7033084AC10FB77B0F77A = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "jucer_ConfigPage.cpp"; path = "../../Source/Project/jucer_ConfigPage.cpp"; sourceTree = "SOURCE_ROOT"; };
- E96597BBC6A98255B51B94DC = { isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; };
- 25F52316D256B4534BED16D1 = { isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Introjucer.app; sourceTree = "BUILT_PRODUCTS_DIR"; };
- CD140A1C0161176682F6CA29 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ResizableWindow.cpp"; path = "../../../../modules/juce_gui_basics/windows/juce_ResizableWindow.cpp"; sourceTree = "SOURCE_ROOT"; };
- CF0615A1AF1A514A60322B50 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_MouseCursor.h"; path = "../../../../modules/juce_gui_basics/mouse/juce_MouseCursor.h"; sourceTree = "SOURCE_ROOT"; };
- D376B9B54EC944E766AFEC45 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_PopupMenu.cpp"; path = "../../../../modules/juce_gui_basics/menus/juce_PopupMenu.cpp"; sourceTree = "SOURCE_ROOT"; };
- D5A6D00DEFDC650AF432A698 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Initialisation.h"; path = "../../../../modules/juce_gui_basics/application/juce_Initialisation.h"; sourceTree = "SOURCE_ROOT"; };
- D780ED33573AED5AD383A036 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_CaretComponent.h"; path = "../../../../modules/juce_gui_basics/keyboard/juce_CaretComponent.h"; sourceTree = "SOURCE_ROOT"; };
- D7A7F1AA9F313B0CCAAA73A0 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_MathsFunctions.h"; path = "../../../../modules/juce_core/maths/juce_MathsFunctions.h"; sourceTree = "SOURCE_ROOT"; };
- D800DE818BEDBF4579D15B1D = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_mac_AppleRemote.mm"; path = "../../../../modules/juce_gui_extra/native/juce_mac_AppleRemote.mm"; sourceTree = "SOURCE_ROOT"; };
D9342535EA61901A1AD816C6 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_linux_WebBrowserComponent.cpp"; path = "../../../../modules/juce_gui_extra/native/juce_linux_WebBrowserComponent.cpp"; sourceTree = "SOURCE_ROOT"; };
D95D7B49EC6C6BDCB5A1B988 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_ios_MessageManager.mm"; path = "../../../../modules/juce_events/native/juce_ios_MessageManager.mm"; sourceTree = "SOURCE_ROOT"; };
D9B077E2ECDDA94961E134D7 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_StringPairArray.h"; path = "../../../../modules/juce_core/text/juce_StringPairArray.h"; sourceTree = "SOURCE_ROOT"; };
D9E59DE07A815AB303A297D9 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_data_structures.mm"; path = "../../../../modules/juce_data_structures/juce_data_structures.mm"; sourceTree = "SOURCE_ROOT"; };
+ DA345D5B9DABD049F90DC96F = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_GeneratedCode.h"; path = "../../Source/ComponentEditor/jucer_GeneratedCode.h"; sourceTree = "SOURCE_ROOT"; };
+ DAF84A553D264705FA6EB6FF = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_TreeViewHandler.h"; path = "../../Source/ComponentEditor/components/jucer_TreeViewHandler.h"; sourceTree = "SOURCE_ROOT"; };
DB20268A566DABEAE3F2CBEE = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_RectanglePlacement.cpp"; path = "../../../../modules/juce_graphics/placement/juce_RectanglePlacement.cpp"; sourceTree = "SOURCE_ROOT"; };
DB876F7873F42DC685A58CA7 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_JPEGLoader.cpp"; path = "../../../../modules/juce_graphics/image_formats/juce_JPEGLoader.cpp"; sourceTree = "SOURCE_ROOT"; };
+ DBE0CDE1B017190ABBFF557C = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_ProjectExport_CodeBlocks.h"; path = "../../Source/Project Saving/jucer_ProjectExport_CodeBlocks.h"; sourceTree = "SOURCE_ROOT"; };
+ DC5E7FF30B01118F6DAEC38F = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Time.cpp"; path = "../../../../modules/juce_core/time/juce_Time.cpp"; sourceTree = "SOURCE_ROOT"; };
DCCB75165B7C73A589498E87 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_linux_Windowing.cpp"; path = "../../../../modules/juce_gui_basics/native/juce_linux_Windowing.cpp"; sourceTree = "SOURCE_ROOT"; };
DD2494D5F1C081898D616AF5 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_KeyListener.cpp"; path = "../../../../modules/juce_gui_basics/keyboard/juce_KeyListener.cpp"; sourceTree = "SOURCE_ROOT"; };
DD985A60FB76E976AF91852D = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_SHA256.h"; path = "../../../../modules/juce_cryptography/hashing/juce_SHA256.h"; sourceTree = "SOURCE_ROOT"; };
- DE40B42B57F29C650CB7F2AD = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_RecentlyOpenedFilesList.h"; path = "../../../../modules/juce_gui_extra/misc/juce_RecentlyOpenedFilesList.h"; sourceTree = "SOURCE_ROOT"; };
DE5F3C9EF6BFFDE73AF9E7FC = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_DirectoryContentsDisplayComponent.cpp"; path = "../../../../modules/juce_gui_basics/filebrowser/juce_DirectoryContentsDisplayComponent.cpp"; sourceTree = "SOURCE_ROOT"; };
- DEF579B1433EB8DEE7AB50F8 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Drawable.cpp"; path = "../../../../modules/juce_gui_basics/drawables/juce_Drawable.cpp"; sourceTree = "SOURCE_ROOT"; };
+ DF725A596B7BCD7520CC0A9F = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "jucer_ResourceEditorPanel.cpp"; path = "../../Source/ComponentEditor/ui/jucer_ResourceEditorPanel.cpp"; sourceTree = "SOURCE_ROOT"; };
DF7BB5B6B394EDEEF5F5B4B8 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_CallbackMessage.h"; path = "../../../../modules/juce_events/messages/juce_CallbackMessage.h"; sourceTree = "SOURCE_ROOT"; };
+ E5D6C36496F5BC84D7213BE8 = { isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
+ E65A820D34BF39478B7C5925 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_DocumentEditorComponent.h"; path = "../../Source/Application/jucer_DocumentEditorComponent.h"; sourceTree = "SOURCE_ROOT"; };
+ E7F7033084AC10FB77B0F77A = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "jucer_ConfigPage.cpp"; path = "../../Source/Project/jucer_ConfigPage.cpp"; sourceTree = "SOURCE_ROOT"; };
+ E96597BBC6A98255B51B94DC = { isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; };
+ 25F52316D256B4534BED16D1 = { isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Introjucer.app; sourceTree = "BUILT_PRODUCTS_DIR"; };
+ C90C66C5727759D5CBD5FB07 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_AbstractFifo.cpp"; path = "../../../../modules/juce_core/containers/juce_AbstractFifo.cpp"; sourceTree = "SOURCE_ROOT"; };
+ D3E139185095C486DD3D61F2 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_TranslationTool.h"; path = "../../Source/Utility/jucer_TranslationTool.h"; sourceTree = "SOURCE_ROOT"; };
+ DC922C6A65D260C18E888E49 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "jucer_ComponentTemplate.cpp"; path = "../../Source/BinaryData/jucer_ComponentTemplate.cpp"; sourceTree = "SOURCE_ROOT"; };
+ DD00494140C86144306A9356 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Array.h"; path = "../../../../modules/juce_core/containers/juce_Array.h"; sourceTree = "SOURCE_ROOT"; };
+ DE40B42B57F29C650CB7F2AD = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_RecentlyOpenedFilesList.h"; path = "../../../../modules/juce_gui_extra/misc/juce_RecentlyOpenedFilesList.h"; sourceTree = "SOURCE_ROOT"; };
+ DE8DF5D263F40F65581CFDE4 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ChildProcess.cpp"; path = "../../../../modules/juce_core/threads/juce_ChildProcess.cpp"; sourceTree = "SOURCE_ROOT"; };
+ DEF579B1433EB8DEE7AB50F8 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Drawable.cpp"; path = "../../../../modules/juce_gui_basics/drawables/juce_Drawable.cpp"; sourceTree = "SOURCE_ROOT"; };
+ DFC6364D81D9C60BD4CA9D12 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_RelativeTime.cpp"; path = "../../../../modules/juce_core/time/juce_RelativeTime.cpp"; sourceTree = "SOURCE_ROOT"; };
E07C56267CBB46FC44EF2026 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Image.cpp"; path = "../../../../modules/juce_graphics/images/juce_Image.cpp"; sourceTree = "SOURCE_ROOT"; };
+ E0F9CA57E44F7F7E7E217E47 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_ComponentUndoableAction.h"; path = "../../Source/ComponentEditor/components/jucer_ComponentUndoableAction.h"; sourceTree = "SOURCE_ROOT"; };
E1C16C872E34BCB144B469F9 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_EdgeTable.h"; path = "../../../../modules/juce_graphics/geometry/juce_EdgeTable.h"; sourceTree = "SOURCE_ROOT"; };
+ E2374E15D65425C4101237E2 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_NewComponentTemplate.h"; path = "../../Source/BinaryData/jucer_NewComponentTemplate.h"; sourceTree = "SOURCE_ROOT"; };
E27F0860F27023BAA9798B46 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Rectangle.h"; path = "../../../../modules/juce_graphics/geometry/juce_Rectangle.h"; sourceTree = "SOURCE_ROOT"; };
E284B565DBD647DC0830D23B = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ButtonPropertyComponent.cpp"; path = "../../../../modules/juce_gui_basics/properties/juce_ButtonPropertyComponent.cpp"; sourceTree = "SOURCE_ROOT"; };
+ E2C1C995D554A3F0A363CE58 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Thread.h"; path = "../../../../modules/juce_core/threads/juce_Thread.h"; sourceTree = "SOURCE_ROOT"; };
+ E2DBA3307837B64AFCCD8F8D = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_File.cpp"; path = "../../../../modules/juce_core/files/juce_File.cpp"; sourceTree = "SOURCE_ROOT"; };
E3FF16862AA1B2F943DC616C = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ImageCache.cpp"; path = "../../../../modules/juce_graphics/images/juce_ImageCache.cpp"; sourceTree = "SOURCE_ROOT"; };
E446FFE889CD490FDE3F0F2B = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ThreadWithProgressWindow.cpp"; path = "../../../../modules/juce_gui_basics/windows/juce_ThreadWithProgressWindow.cpp"; sourceTree = "SOURCE_ROOT"; };
E4BB22E27C5AA4B666F265BD = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_TextButtonHandler.h"; path = "../../Source/ComponentEditor/components/jucer_TextButtonHandler.h"; sourceTree = "SOURCE_ROOT"; };
E4E74B2BC3F3CB5A4F4DC55E = { isa = PBXFileReference; lastKnownFileType = file; name = "juce_module_info"; path = "../../../../modules/juce_gui_basics/juce_module_info"; sourceTree = "SOURCE_ROOT"; };
E530742870F07704E9616358 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ToolbarItemComponent.h"; path = "../../../../modules/juce_gui_basics/widgets/juce_ToolbarItemComponent.h"; sourceTree = "SOURCE_ROOT"; };
E54D0994D31E20A0A05EBA2B = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_SystemTrayIconComponent.h"; path = "../../../../modules/juce_gui_extra/misc/juce_SystemTrayIconComponent.h"; sourceTree = "SOURCE_ROOT"; };
+ E570E57CC1FCEF78B54A7084 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FileOutputStream.h"; path = "../../../../modules/juce_core/files/juce_FileOutputStream.h"; sourceTree = "SOURCE_ROOT"; };
E60E28D1B7491047DEA236AE = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_ProjectContentComponent.h"; path = "../../Source/Project/jucer_ProjectContentComponent.h"; sourceTree = "SOURCE_ROOT"; };
E642193A9990C48CFB6479A9 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FileListComponent.h"; path = "../../../../modules/juce_gui_basics/filebrowser/juce_FileListComponent.h"; sourceTree = "SOURCE_ROOT"; };
E654E3A3CD45A888C5F773DF = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_MenuBarModel.h"; path = "../../../../modules/juce_gui_basics/menus/juce_MenuBarModel.h"; sourceTree = "SOURCE_ROOT"; };
+ E6F5CEC32EDC917B054467EF = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ReadWriteLock.cpp"; path = "../../../../modules/juce_core/threads/juce_ReadWriteLock.cpp"; sourceTree = "SOURCE_ROOT"; };
E70CA21960A64CCB835725FF = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "jucer_ProjectType.cpp"; path = "../../Source/Project/jucer_ProjectType.cpp"; sourceTree = "SOURCE_ROOT"; };
+ E720FBCD836FF3AA466C31B6 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_HighResolutionTimer.cpp"; path = "../../../../modules/juce_core/threads/juce_HighResolutionTimer.cpp"; sourceTree = "SOURCE_ROOT"; };
E73C7E17116F6085765622E3 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Drawable.h"; path = "../../../../modules/juce_gui_basics/drawables/juce_Drawable.h"; sourceTree = "SOURCE_ROOT"; };
E7A4604F766ABC8BE26C94A1 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_RelativeParallelogram.cpp"; path = "../../../../modules/juce_gui_basics/positioning/juce_RelativeParallelogram.cpp"; sourceTree = "SOURCE_ROOT"; };
E7B6A0CBA0D27A095E83F5B7 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_WebBrowserComponent.cpp"; path = "../../../../modules/juce_gui_extra/native/juce_win32_WebBrowserComponent.cpp"; sourceTree = "SOURCE_ROOT"; };
@@ -946,6 +947,7 @@
1F421199C40092BFEE0658C2,
631983AA62673015F8D7453B,
9BC8AE609A07657CEF587548,
+ D3E139185095C486DD3D61F2,
8090981F07A76E465DAAADF4 ); name = Utility; sourceTree = ""; };
FC22321797D433148500EDDA = { isa = PBXGroup; children = (
2E680E2C65684A4272AE079A,
diff --git a/extras/Introjucer/Builds/VisualStudio2005/The Introjucer.vcproj b/extras/Introjucer/Builds/VisualStudio2005/The Introjucer.vcproj
index 73a26d54ba..cd80a5f197 100644
--- a/extras/Introjucer/Builds/VisualStudio2005/The Introjucer.vcproj
+++ b/extras/Introjucer/Builds/VisualStudio2005/The Introjucer.vcproj
@@ -198,6 +198,7 @@
+
diff --git a/extras/Introjucer/Builds/VisualStudio2008/The Introjucer.vcproj b/extras/Introjucer/Builds/VisualStudio2008/The Introjucer.vcproj
index 69dfed469e..5d09c747b1 100644
--- a/extras/Introjucer/Builds/VisualStudio2008/The Introjucer.vcproj
+++ b/extras/Introjucer/Builds/VisualStudio2008/The Introjucer.vcproj
@@ -198,6 +198,7 @@
+
diff --git a/extras/Introjucer/Builds/VisualStudio2010/The Introjucer.vcxproj b/extras/Introjucer/Builds/VisualStudio2010/The Introjucer.vcxproj
index 14d301eb0d..237ada9812 100644
--- a/extras/Introjucer/Builds/VisualStudio2010/The Introjucer.vcxproj
+++ b/extras/Introjucer/Builds/VisualStudio2010/The Introjucer.vcxproj
@@ -1050,6 +1050,7 @@
+
diff --git a/extras/Introjucer/Builds/VisualStudio2010/The Introjucer.vcxproj.filters b/extras/Introjucer/Builds/VisualStudio2010/The Introjucer.vcxproj.filters
index 4b4e00755d..152bdb2f64 100644
--- a/extras/Introjucer/Builds/VisualStudio2010/The Introjucer.vcxproj.filters
+++ b/extras/Introjucer/Builds/VisualStudio2010/The Introjucer.vcxproj.filters
@@ -1416,6 +1416,9 @@
The Introjucer\Utility
+
+ The Introjucer\Utility
+
The Introjucer\Utility
diff --git a/extras/Introjucer/Builds/VisualStudio2012/The Introjucer.vcxproj b/extras/Introjucer/Builds/VisualStudio2012/The Introjucer.vcxproj
index 091eba2cd9..812e11935d 100644
--- a/extras/Introjucer/Builds/VisualStudio2012/The Introjucer.vcxproj
+++ b/extras/Introjucer/Builds/VisualStudio2012/The Introjucer.vcxproj
@@ -1056,6 +1056,7 @@
+
diff --git a/extras/Introjucer/Builds/VisualStudio2012/The Introjucer.vcxproj.filters b/extras/Introjucer/Builds/VisualStudio2012/The Introjucer.vcxproj.filters
index 4b4e00755d..152bdb2f64 100644
--- a/extras/Introjucer/Builds/VisualStudio2012/The Introjucer.vcxproj.filters
+++ b/extras/Introjucer/Builds/VisualStudio2012/The Introjucer.vcxproj.filters
@@ -1416,6 +1416,9 @@
The Introjucer\Utility
+
+ The Introjucer\Utility
+
The Introjucer\Utility
diff --git a/extras/Introjucer/Introjucer.jucer b/extras/Introjucer/Introjucer.jucer
index 2012af90b5..e579c692fc 100644
--- a/extras/Introjucer/Introjucer.jucer
+++ b/extras/Introjucer/Introjucer.jucer
@@ -209,6 +209,8 @@
file="Source/Utility/jucer_StoredSettings.cpp"/>
+
diff --git a/extras/Introjucer/Source/Application/jucer_Application.h b/extras/Introjucer/Source/Application/jucer_Application.h
index c198f270c2..1546954051 100644
--- a/extras/Introjucer/Source/Application/jucer_Application.h
+++ b/extras/Introjucer/Source/Application/jucer_Application.h
@@ -207,19 +207,19 @@ public:
virtual StringArray getMenuNames()
{
- const char* const names[] = { "File", "Edit", "View", "Window", "Jucer", "Tools", nullptr };
+ const char* const names[] = { "File", "Edit", "View", "Window", "GUI Editor", "Tools", nullptr };
return StringArray (names);
}
virtual void createMenu (PopupMenu& menu, const String& menuName)
{
- if (menuName == "File") createFileMenu (menu);
- else if (menuName == "Edit") createEditMenu (menu);
- else if (menuName == "View") createViewMenu (menu);
- else if (menuName == "Window") createWindowMenu (menu);
- else if (menuName == "Tools") createToolsMenu (menu);
- else if (menuName == "Jucer") createGUIEditorMenu (menu);
- else jassertfalse; // names have changed?
+ if (menuName == "File") createFileMenu (menu);
+ else if (menuName == "Edit") createEditMenu (menu);
+ else if (menuName == "View") createViewMenu (menu);
+ else if (menuName == "Window") createWindowMenu (menu);
+ else if (menuName == "Tools") createToolsMenu (menu);
+ else if (menuName == "GUI Editor") createGUIEditorMenu (menu);
+ else jassertfalse; // names have changed?
}
virtual void createFileMenu (PopupMenu& menu)
@@ -318,6 +318,7 @@ public:
{
menu.addCommandItem (commandManager, CommandIDs::updateModules);
menu.addCommandItem (commandManager, CommandIDs::showUTF8Tool);
+ menu.addCommandItem (commandManager, CommandIDs::showTranslationTool);
}
virtual void handleMainMenuCommand (int menuItemID)
diff --git a/extras/Introjucer/Source/Project/jucer_ProjectContentComponent.cpp b/extras/Introjucer/Source/Project/jucer_ProjectContentComponent.cpp
index 0c963f3dc2..1f1dcb96fb 100644
--- a/extras/Introjucer/Source/Project/jucer_ProjectContentComponent.cpp
+++ b/extras/Introjucer/Source/Project/jucer_ProjectContentComponent.cpp
@@ -30,7 +30,7 @@
#include "jucer_ConfigPage.h"
#include "jucer_TreeViewTypes.h"
#include "../Project Saving/jucer_ProjectExporter.h"
-
+#include "../Utility/jucer_TranslationTool.h"
//==============================================================================
class FileTreeTab : public TreePanelBase
@@ -546,6 +546,26 @@ void ProjectContentComponent::showBubbleMessage (const Rectangle& pos, cons
bubbleMessage.showAt (pos, AttributedString (text), 3000, true, false);
}
+//==============================================================================
+void ProjectContentComponent::showTranslationTool()
+{
+ if (translationTool != nullptr)
+ {
+ translationTool->toFront (true);
+ }
+ else if (project != nullptr)
+ {
+ TranslationToolComponent* ttc = new TranslationToolComponent();
+ ttc->initialiseForProject (*project);
+
+ new FloatingToolWindow ("Translation File Builder",
+ "transToolWindowPos_" + project->getProjectUID(),
+ ttc, translationTool,
+ 600, 700,
+ 500, 400, 10000, 10000);
+ }
+}
+
//==============================================================================
ApplicationCommandTarget* ProjectContentComponent::getNextCommandTarget()
{
@@ -566,7 +586,8 @@ void ProjectContentComponent::getAllCommands (Array & commands)
CommandIDs::goToPreviousDoc,
CommandIDs::goToNextDoc,
CommandIDs::goToCounterpart,
- CommandIDs::deleteSelectedItem };
+ CommandIDs::deleteSelectedItem,
+ CommandIDs::showTranslationTool };
commands.addArray (ids, numElementsInArray (ids));
}
@@ -691,6 +712,10 @@ void ProjectContentComponent::getCommandInfo (const CommandID commandID, Applica
result.setActive (dynamic_cast (treeViewTabs.getCurrentContentComponent()) != nullptr);
break;
+ case CommandIDs::showTranslationTool:
+ result.setInfo ("Translation File Builder", "Shows the translation file helper tool", CommandCategories::general, 0);
+ break;
+
default:
break;
}
@@ -751,6 +776,8 @@ bool ProjectContentComponent::perform (const InvocationInfo& info)
break;
+ case CommandIDs::showTranslationTool: showTranslationTool(); break;
+
default:
return false;
}
diff --git a/extras/Introjucer/Source/Project/jucer_ProjectContentComponent.h b/extras/Introjucer/Source/Project/jucer_ProjectContentComponent.h
index 5a9d0c636b..c082462002 100644
--- a/extras/Introjucer/Source/Project/jucer_ProjectContentComponent.h
+++ b/extras/Introjucer/Source/Project/jucer_ProjectContentComponent.h
@@ -102,6 +102,7 @@ protected:
OpenDocumentManager::Document* currentDocument;
RecentDocumentList recentDocumentList;
ScopedPointer logo;
+ ScopedPointer translationTool;
TabbedComponent treeViewTabs;
ScopedPointer resizerBar;
@@ -114,6 +115,7 @@ protected:
void changeListenerCallback (ChangeBroadcaster*);
TreeView* getFilesTreeView() const;
ProjectTreeViewBase* getFilesTreeRoot() const;
+ void showTranslationTool();
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ProjectContentComponent)
};
diff --git a/extras/Introjucer/Source/Utility/jucer_TranslationTool.h b/extras/Introjucer/Source/Utility/jucer_TranslationTool.h
new file mode 100644
index 0000000000..4c30b1736b
--- /dev/null
+++ b/extras/Introjucer/Source/Utility/jucer_TranslationTool.h
@@ -0,0 +1,347 @@
+/*
+ ==============================================================================
+
+ This file is part of the JUCE library - "Jules' Utility Class Extensions"
+ Copyright 2004-11 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.
+
+ ==============================================================================
+*/
+
+#ifndef __JUCER_TRANSLATIONTOOL_H_E4B7E119__
+#define __JUCER_TRANSLATIONTOOL_H_E4B7E119__
+
+
+struct TranslationHelpers
+{
+ static void addString (StringArray& strings, const String& s)
+ {
+ if (s.isNotEmpty() && ! strings.contains (s))
+ strings.add (s);
+ }
+
+ static void scanFileForTranslations (StringArray& strings, const File& file)
+ {
+ const String content (file.loadFileAsString());
+
+ String::CharPointerType p (content.getCharPointer());
+
+ for (;;)
+ {
+ p = CharacterFunctions::find (p, CharPointer_ASCII ("TRANS"));
+
+ if (p.isEmpty())
+ break;
+
+ p += 5;
+ p = p.findEndOfWhitespace();
+
+ if (*p == '(')
+ {
+ ++p;
+ MemoryOutputStream text;
+ parseStringLiteral (p, text);
+
+ addString (strings, text.toString());
+ }
+ }
+ }
+
+ static void parseStringLiteral (String::CharPointerType& p, MemoryOutputStream& out) noexcept
+ {
+ p = p.findEndOfWhitespace();
+
+ if (p.getAndAdvance() == '"')
+ {
+ String::CharPointerType start (p);
+
+ for (;;)
+ {
+ juce_wchar c = *p;
+
+ if (c == '"')
+ {
+ out << String (start, p);
+ parseStringLiteral (++p, out);
+ return;
+ }
+
+ if (c == 0)
+ break;
+
+ if (c == '\\')
+ {
+ out << String (start, p);
+ ++p;
+ out << String::charToString (readEscapedChar (p));
+ start = p + 1;
+ }
+
+ ++p;
+ }
+ }
+ }
+
+ static juce_wchar readEscapedChar (String::CharPointerType& p)
+ {
+ juce_wchar c = *p;
+
+ switch (c)
+ {
+ case '"':
+ case '\\':
+ case '/': break;
+
+ case 'b': c = '\b'; break;
+ case 'f': c = '\f'; break;
+ case 'n': c = '\n'; break;
+ case 'r': c = '\r'; break;
+ case 't': c = '\t'; break;
+
+ case 'x':
+ ++p;
+ c = 0;
+
+ for (int i = 4; --i >= 0;)
+ {
+ const int digitValue = CharacterFunctions::getHexDigitValue (*p);
+ if (digitValue < 0)
+ break;
+
+ ++p;
+ c = (juce_wchar) ((c << 4) + digitValue);
+ }
+
+ break;
+
+ case '0': case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+ c = 0;
+
+ for (int i = 4; --i >= 0;)
+ {
+ const int digitValue = *p - '0';
+ if (digitValue < 0 || digitValue > 7)
+ break;
+
+ ++p;
+ c = (juce_wchar) ((c << 3) + digitValue);
+ }
+
+ break;
+
+ default:
+ break;
+ }
+
+ return c;
+ }
+
+ static void scanFilesForTranslations (StringArray& strings, const Project::Item& p)
+ {
+ if (p.isFile())
+ {
+ const File file (p.getFile());
+
+ if (file.hasFileExtension (sourceOrHeaderFileExtensions))
+ scanFileForTranslations (strings, file);
+ }
+
+ for (int i = 0; i < p.getNumChildren(); ++i)
+ scanFilesForTranslations (strings, p.getChild (i));
+ }
+
+ static void scanProject (StringArray& strings, Project& project)
+ {
+ scanFilesForTranslations (strings, project.getMainGroup());
+
+ const File modulesFolder (ModuleList::getDefaultModulesFolder (&project));
+
+ OwnedArray modules;
+ ModuleList moduleList;
+ moduleList.rescan (modulesFolder);
+ project.createRequiredModules (moduleList, modules);
+
+ for (int j = 0; j < modules.size(); ++j)
+ {
+ const File localFolder (modules.getUnchecked(j)->getLocalFolderFor (project));
+
+ Array files;
+ modules.getUnchecked(j)->findBrowseableFiles (localFolder, files);
+
+ for (int i = 0; i < files.size(); ++i)
+ scanFileForTranslations (strings, files.getReference(i));
+ }
+ }
+
+ static const char* getMungingSeparator() { return "JCTRIDX"; }
+
+ static StringArray breakApart (const String& munged)
+ {
+ StringArray lines, result;
+ lines.addLines (munged);
+
+ String currentItem;
+
+ for (int i = 0; i < lines.size(); ++i)
+ {
+ if (lines[i].contains (getMungingSeparator()))
+ {
+ if (currentItem.isNotEmpty())
+ result.add (currentItem);
+
+ currentItem = String::empty;
+ }
+ else
+ {
+ if (currentItem.isNotEmpty())
+ currentItem << newLine;
+
+ currentItem << lines[i];
+ }
+ }
+
+ return result;
+ }
+
+ static String escapeString (const String& s)
+ {
+ return s.replace ("\"", "\\\"")
+ .replace ("\'", "\\\'")
+ .replace ("\t", "\\t")
+ .replace ("\r", "\\r")
+ .replace ("\n", "\\n");
+ }
+
+ static String getPreTranslationText (Project& project)
+ {
+ StringArray strings;
+ scanProject (strings, project);
+
+ MemoryOutputStream s;
+ for (int i = 0; i < strings.size(); ++i)
+ {
+ s << getMungingSeparator() << i << "." << newLine << strings[i];
+
+ if (i < strings.size() - 1)
+ s << newLine;
+ }
+
+ return s.toString();
+ }
+};
+
+//==============================================================================
+class TranslationToolComponent : public Component,
+ public ButtonListener
+{
+public:
+ TranslationToolComponent()
+ : editorPre (documentPre, nullptr),
+ editorPost (documentPost, nullptr),
+ editorResult (documentResult, nullptr)
+ {
+ setLookAndFeel (&lf);
+
+ instructionsLabel.setText ("This tool scans your project for all TRANS() macros, and "
+ "assembles them into a blob of text that can be automatically "
+ "translated and disassembled into a JUCE translation file...", dontSendNotification);
+ addAndMakeVisible (&instructionsLabel);
+
+ label1.setText ("Copy-and-paste this text into Google Translate or some other translator:", dontSendNotification);
+ addAndMakeVisible (&label1);
+
+ label2.setText ("...then, take the translated result and paste it into this box:", dontSendNotification);
+ addAndMakeVisible (&label2);
+
+ label3.setText ("Finally: Click the 'Generate' button, and a valid translation file will be created below...", dontSendNotification);
+ addAndMakeVisible (&label3);
+
+ addAndMakeVisible (&editorPre);
+ addAndMakeVisible (&editorPost);
+ addAndMakeVisible (&editorResult);
+
+ generateButton.setButtonText (TRANS("Generate"));
+ addAndMakeVisible (&generateButton);
+ generateButton.addListener (this);
+ }
+
+ void paint (Graphics& g)
+ {
+ IntrojucerLookAndFeel::fillWithBackgroundTexture (*this, g);
+ }
+
+ void resized()
+ {
+ Rectangle r (getLocalBounds());
+
+ r.removeFromTop (120);
+
+ editorPre.setBounds (10, 95, getWidth() - 20, 130);
+ editorPost.setBounds (10, 271, getWidth() - 20, 114);
+ editorResult.setBounds (10, 470, getWidth() - 20, getHeight() - 480);
+
+ generateButton.setBounds (getWidth() - 150, 413, 140, 30);
+ label1.setBounds (6, 58, getWidth() - 12, 26);
+ label2.setBounds (6, 238, getWidth() - 12, 25);
+ label3.setBounds (6, 402, generateButton.getX() - 20, 54);
+ instructionsLabel.setBounds (6, 10, getWidth() - 12, 44);
+ }
+
+ void initialiseForProject (Project& project)
+ {
+ documentPre.replaceAllContent (TranslationHelpers::getPreTranslationText (project));
+ editorPre.selectAll();
+ }
+
+private:
+ CodeDocument documentPre, documentPost, documentResult;
+ CodeEditorComponent editorPre, editorPost, editorResult;
+ juce::Label label1, label2, label3;
+ juce::TextButton generateButton;
+ juce::Label instructionsLabel;
+
+ IntrojucerLookAndFeel lf;
+
+ void buttonClicked (Button*)
+ {
+ StringArray mappings;
+
+ StringArray preStrings (TranslationHelpers::breakApart (documentPre.getAllContent()));
+ StringArray postStrings (TranslationHelpers::breakApart (documentPost.getAllContent()));
+
+ if (postStrings.size() != preStrings.size())
+ {
+ AlertWindow::showMessageBoxAsync (AlertWindow::WarningIcon,
+ TRANS("Error"),
+ TRANS("The pre- and post-translation text doesn't match!\n\n"
+ "Perhaps it got mangled by the translator?"));
+ return;
+ }
+
+ for (int i = 0; i < preStrings.size(); ++i)
+ mappings.add (TranslationHelpers::escapeString (preStrings[i]).quoted()
+ + " = "
+ + TranslationHelpers::escapeString (postStrings[i]).quoted());
+
+ documentResult.replaceAllContent (mappings.joinIntoString (newLine));
+ }
+};
+
+
+#endif // __JUCER_TRANSLATIONTOOL_H_E4B7E119__