diff --git a/extras/Introjucer/Builds/CodeBlocks/The Introjucer.cbp b/extras/Introjucer/Builds/CodeBlocks/The Introjucer.cbp
index 3e92e5da7c..3c26970e9e 100644
--- a/extras/Introjucer/Builds/CodeBlocks/The Introjucer.cbp
+++ b/extras/Introjucer/Builds/CodeBlocks/The Introjucer.cbp
@@ -2740,6 +2740,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -3028,14 +3052,6 @@
-
-
-
-
-
-
-
-
diff --git a/extras/Introjucer/Builds/MacOSX/The Introjucer.xcodeproj/project.pbxproj b/extras/Introjucer/Builds/MacOSX/The Introjucer.xcodeproj/project.pbxproj
index c4a4375d2c..3117ffa67a 100644
--- a/extras/Introjucer/Builds/MacOSX/The Introjucer.xcodeproj/project.pbxproj
+++ b/extras/Introjucer/Builds/MacOSX/The Introjucer.xcodeproj/project.pbxproj
@@ -170,6 +170,7 @@
1F9BBDFA52513AD34D906D2A = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_HyperlinkButtonHandler.h"; path = "../../Source/ComponentEditor/components/jucer_HyperlinkButtonHandler.h"; sourceTree = "SOURCE_ROOT"; };
1FA92F8F2B26C6CEC8B1D737 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_ButtonDocument.h"; path = "../../Source/ComponentEditor/documents/jucer_ButtonDocument.h"; sourceTree = "SOURCE_ROOT"; };
202591AAB1ABCFE458F33F7C = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_DrawableButton.cpp"; path = "../../../../modules/juce_gui_basics/buttons/juce_DrawableButton.cpp"; sourceTree = "SOURCE_ROOT"; };
+ 203CF0F8F72A516BB1CC5422 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_LookAndFeel_V2.h"; path = "../../../../modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.h"; sourceTree = "SOURCE_ROOT"; };
206D399250A42034706E5434 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ToolbarButton.h"; path = "../../../../modules/juce_gui_basics/buttons/juce_ToolbarButton.h"; sourceTree = "SOURCE_ROOT"; };
20FC504E8FB8D30E890A9837 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ChoicePropertyComponent.h"; path = "../../../../modules/juce_gui_basics/properties/juce_ChoicePropertyComponent.h"; sourceTree = "SOURCE_ROOT"; };
2107C02B684C7F5B75662333 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_Registry.cpp"; path = "../../../../modules/juce_core/native/juce_win32_Registry.cpp"; sourceTree = "SOURCE_ROOT"; };
@@ -202,7 +203,6 @@
263D9041F9B7D6A79DC38CD6 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_ComponentLayoutEditor.h"; path = "../../Source/ComponentEditor/ui/jucer_ComponentLayoutEditor.h"; sourceTree = "SOURCE_ROOT"; };
263F153E8A277E02A3754BBF = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ToolbarButton.cpp"; path = "../../../../modules/juce_gui_basics/buttons/juce_ToolbarButton.cpp"; sourceTree = "SOURCE_ROOT"; };
269A454F1FF081DA67FFD578 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "jucer_JucerDocument.cpp"; path = "../../Source/ComponentEditor/jucer_JucerDocument.cpp"; sourceTree = "SOURCE_ROOT"; };
- 26C4A38525D6A327C0102D18 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_OldSchoolLookAndFeel.cpp"; path = "../../../../modules/juce_gui_extra/lookandfeel/juce_OldSchoolLookAndFeel.cpp"; sourceTree = "SOURCE_ROOT"; };
271A1D94B96A8B7C949FD8ED = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ComponentMovementWatcher.cpp"; path = "../../../../modules/juce_gui_basics/layout/juce_ComponentMovementWatcher.cpp"; sourceTree = "SOURCE_ROOT"; };
27A2B025813B7E54E0862642 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_PaintElementUndoableAction.h"; path = "../../Source/ComponentEditor/paintelements/jucer_PaintElementUndoableAction.h"; sourceTree = "SOURCE_ROOT"; };
295A9B126C98FE15F5A8B81E = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_FilePropertyComponent.h"; path = "../../Source/ComponentEditor/properties/jucer_FilePropertyComponent.h"; sourceTree = "SOURCE_ROOT"; };
@@ -481,11 +481,13 @@
83EB0CAD2379BD53DBEB9D0F = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_mac_Threads.mm"; path = "../../../../modules/juce_core/native/juce_mac_Threads.mm"; sourceTree = "SOURCE_ROOT"; };
8427B23B886EDC0E1839D7C1 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ResizableBorderComponent.cpp"; path = "../../../../modules/juce_gui_basics/layout/juce_ResizableBorderComponent.cpp"; sourceTree = "SOURCE_ROOT"; };
84444B1D8FCE50BA88CDE7BF = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_FileChooser.cpp"; path = "../../../../modules/juce_gui_basics/native/juce_win32_FileChooser.cpp"; sourceTree = "SOURCE_ROOT"; };
+ 845CE323405ACC3A7E84EEAE = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_LookAndFeel_V3.h"; path = "../../../../modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V3.h"; sourceTree = "SOURCE_ROOT"; };
848D1FD80E9CA20E4977B516 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_SHA256.cpp"; path = "../../../../modules/juce_cryptography/hashing/juce_SHA256.cpp"; sourceTree = "SOURCE_ROOT"; };
84AADFD13AF2A6F6F4681051 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Primes.h"; path = "../../../../modules/juce_cryptography/encryption/juce_Primes.h"; sourceTree = "SOURCE_ROOT"; };
8575C117887D90BDF84397C3 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_SubregionStream.h"; path = "../../../../modules/juce_core/streams/juce_SubregionStream.h"; sourceTree = "SOURCE_ROOT"; };
859DCE43FF52E0BF3E9E9540 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_RelativeCoordinate.h"; path = "../../../../modules/juce_gui_basics/positioning/juce_RelativeCoordinate.h"; sourceTree = "SOURCE_ROOT"; };
863A117E6B25D1FF3AEE8F0F = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_NotificationType.h"; path = "../../../../modules/juce_events/messages/juce_NotificationType.h"; sourceTree = "SOURCE_ROOT"; };
+ 864B6C25114F4416FFAA1838 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_LookAndFeel_V1.h"; path = "../../../../modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V1.h"; sourceTree = "SOURCE_ROOT"; };
865A30767AAA44DAE7683C8B = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_SystemStats.h"; path = "../../../../modules/juce_core/system/juce_SystemStats.h"; sourceTree = "SOURCE_ROOT"; };
867C3547D1301204924989F9 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_RelativePoint.cpp"; path = "../../../../modules/juce_gui_basics/positioning/juce_RelativePoint.cpp"; sourceTree = "SOURCE_ROOT"; };
86DADC3D8463C21DF2751EA6 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_UIViewComponent.h"; path = "../../../../modules/juce_gui_extra/embedding/juce_UIViewComponent.h"; sourceTree = "SOURCE_ROOT"; };
@@ -590,6 +592,7 @@
A243C85FC2C37FD73F115E67 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_BasicNativeHeaders.h"; path = "../../../../modules/juce_core/native/juce_BasicNativeHeaders.h"; sourceTree = "SOURCE_ROOT"; };
A28743047698F6C02194A218 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ToggleButton.cpp"; path = "../../../../modules/juce_gui_basics/buttons/juce_ToggleButton.cpp"; sourceTree = "SOURCE_ROOT"; };
A2A081D9DA35B3D1F183C3FE = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_graphics.mm"; path = "../../../../modules/juce_graphics/juce_graphics.mm"; sourceTree = "SOURCE_ROOT"; };
+ A2FBC2BA5FFB83CFCD61F399 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_LookAndFeel_V3.cpp"; path = "../../../../modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V3.cpp"; sourceTree = "SOURCE_ROOT"; };
A37D773DEFB69C248D703F40 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_mac_Windowing.mm"; path = "../../../../modules/juce_gui_basics/native/juce_mac_Windowing.mm"; sourceTree = "SOURCE_ROOT"; };
A3DB226F40C387078864E68A = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_mac_NSViewComponent.mm"; path = "../../../../modules/juce_gui_extra/native/juce_mac_NSViewComponent.mm"; sourceTree = "SOURCE_ROOT"; };
A4422A360A9FB7BCC315BEF4 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_linux_CommonFile.cpp"; path = "../../../../modules/juce_core/native/juce_linux_CommonFile.cpp"; sourceTree = "SOURCE_ROOT"; };
@@ -673,7 +676,6 @@
BDCE974230A7401C0E9D28BB = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_CallOutBox.h"; path = "../../../../modules/juce_gui_basics/windows/juce_CallOutBox.h"; sourceTree = "SOURCE_ROOT"; };
BDE24BA8FEAE654645079B84 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Variant.cpp"; path = "../../../../modules/juce_core/containers/juce_Variant.cpp"; sourceTree = "SOURCE_ROOT"; };
BDEBB0AC32DDA8C16FFE6011 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_TooltipClient.h"; path = "../../../../modules/juce_gui_basics/mouse/juce_TooltipClient.h"; sourceTree = "SOURCE_ROOT"; };
- BE90AA37929461DF6F6A9E13 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_OldSchoolLookAndFeel.h"; path = "../../../../modules/juce_gui_extra/lookandfeel/juce_OldSchoolLookAndFeel.h"; sourceTree = "SOURCE_ROOT"; };
BE97579323E97AF084D41476 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_DirectoryContentsList.cpp"; path = "../../../../modules/juce_gui_basics/filebrowser/juce_DirectoryContentsList.cpp"; sourceTree = "SOURCE_ROOT"; };
BF171B0762D5550B797869F2 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Expression.h"; path = "../../../../modules/juce_core/maths/juce_Expression.h"; sourceTree = "SOURCE_ROOT"; };
BF3CEF080FA013E2778DCE90 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_Project.h"; path = "../../Source/Project/jucer_Project.h"; sourceTree = "SOURCE_ROOT"; };
@@ -756,7 +758,6 @@
D926E13AB5AD647A7A00F486 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_linux_Network.cpp"; path = "../../../../modules/juce_core/native/juce_linux_Network.cpp"; 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"; };
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"; };
DAF84A553D264705FA6EB6FF = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_TreeViewHandler.h"; path = "../../Source/ComponentEditor/components/jucer_TreeViewHandler.h"; 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"; };
@@ -774,6 +775,7 @@
D87FC8F6834E9DC9C8E88B94 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_JustificationProperty.h"; path = "../../Source/ComponentEditor/properties/jucer_JustificationProperty.h"; sourceTree = "SOURCE_ROOT"; };
D92A6E9404A30EED32DCE4ED = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "jucer_RelativePositionedRectangle.h"; path = "../../Source/ComponentEditor/ui/jucer_RelativePositionedRectangle.h"; 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"; };
+ 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"; };
DB20268A566DABEAE3F2CBEE = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_RectanglePlacement.cpp"; path = "../../../../modules/juce_graphics/placement/juce_RectanglePlacement.cpp"; sourceTree = "SOURCE_ROOT"; };
DC922C6A65D260C18E888E49 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "jucer_ComponentTemplate.cpp"; path = "../../Source/BinaryData/jucer_ComponentTemplate.cpp"; sourceTree = "SOURCE_ROOT"; };
@@ -798,6 +800,7 @@
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"; };
E4E74B2BC3F3CB5A4F4DC55E = { isa = PBXFileReference; lastKnownFileType = file; name = "juce_module_info"; path = "../../../../modules/juce_gui_basics/juce_module_info"; sourceTree = "SOURCE_ROOT"; };
+ E4F9D1E097CC2C1D1291823C = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_LookAndFeel_V2.cpp"; path = "../../../../modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp"; 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"; };
@@ -814,6 +817,7 @@
E7E122AE104E79BB641B07B3 = { isa = PBXFileReference; lastKnownFileType = file; name = "juce_module_info"; path = "../../../../modules/juce_data_structures/juce_module_info"; sourceTree = "SOURCE_ROOT"; };
E7E1C4F416CFA44BE7DD1A74 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_KeyboardFocusTraverser.h"; path = "../../../../modules/juce_gui_basics/keyboard/juce_KeyboardFocusTraverser.h"; sourceTree = "SOURCE_ROOT"; };
E7E1D60BC7AEF79AA7B65B7C = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_String.cpp"; path = "../../../../modules/juce_core/text/juce_String.cpp"; sourceTree = "SOURCE_ROOT"; };
+ E7F098BA306EC789242AB9A8 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_LookAndFeel_V1.cpp"; path = "../../../../modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V1.cpp"; sourceTree = "SOURCE_ROOT"; };
E82C9EF1A74D867BBFF2090D = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_RSAKey.cpp"; path = "../../../../modules/juce_cryptography/encryption/juce_RSAKey.cpp"; sourceTree = "SOURCE_ROOT"; };
E99F5A31373E9BDEAC40792F = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_android_FileChooser.cpp"; path = "../../../../modules/juce_gui_basics/native/juce_android_FileChooser.cpp"; sourceTree = "SOURCE_ROOT"; };
E9B8C3CA480AE94BEA852EA9 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_ios_Windowing.mm"; path = "../../../../modules/juce_gui_basics/native/juce_ios_Windowing.mm"; sourceTree = "SOURCE_ROOT"; };
@@ -1688,7 +1692,13 @@
F994D79D564B5F8D06E6766E ); name = properties; sourceTree = ""; };
C2A68B1BEC638D0513BF25C1 = { isa = PBXGroup; children = (
9BDE235186FA9648EEECB373,
- AE84254C46407F84EB70A370 ); name = lookandfeel; sourceTree = ""; };
+ AE84254C46407F84EB70A370,
+ E7F098BA306EC789242AB9A8,
+ 864B6C25114F4416FFAA1838,
+ E4F9D1E097CC2C1D1291823C,
+ 203CF0F8F72A516BB1CC5422,
+ A2FBC2BA5FFB83CFCD61F399,
+ 845CE323405ACC3A7E84EEAE ); name = lookandfeel; sourceTree = ""; };
00C2E5EAA46FC2E94B735C42 = { isa = PBXGroup; children = (
DE5F3C9EF6BFFDE73AF9E7FC,
808503667FBB423F81780796,
@@ -1787,10 +1797,7 @@
A1C82396A9A0F9A296AA7E6B,
99DD90B64BC5CC5FF68FA0C5,
86DADC3D8463C21DF2751EA6 ); name = embedding; sourceTree = ""; };
- DD35BF639F13CB10E9ACF910 = { isa = PBXGroup; children = (
- 26C4A38525D6A327C0102D18,
- BE90AA37929461DF6F6A9E13 ); name = lookandfeel; sourceTree = ""; };
- F50C1ADB9086D61160516CB7 = { isa = PBXGroup; children = (
+ 4B54A6F89F9AC7EF540646B4 = { isa = PBXGroup; children = (
53DB14312FF9B861739F6747,
51D0841BECA0E4405EDEC794,
5CB6ACA0F14EDE47A4F7BCC2,
@@ -1807,7 +1814,7 @@
F9D77BAA08889D69E0C43F25,
E54D0994D31E20A0A05EBA2B,
63B74F9D9F43393F6427501C ); name = misc; sourceTree = ""; };
- 4C0BD8F18173E3D675D03872 = { isa = PBXGroup; children = (
+ B09CB33C943D2DE7005C9E75 = { isa = PBXGroup; children = (
53704A9E32438DCEFF6A155B,
58858190E0EE0AA6955EA236,
2E540A9137E245EFADCFABB3,
@@ -1824,9 +1831,8 @@
9DEFBE65118D0527555955A2,
1D09D8A2B803860D8927C366,
A1B124604F7F471E01D8AA6E,
- DD35BF639F13CB10E9ACF910,
- F50C1ADB9086D61160516CB7,
- 4C0BD8F18173E3D675D03872,
+ 4B54A6F89F9AC7EF540646B4,
+ B09CB33C943D2DE7005C9E75,
57FD2D74F5DCFF42099CA738,
17C645785FB20AA2E91ED84B ); name = "juce_gui_extra"; sourceTree = ""; };
8A24D1B6925535A868974986 = { isa = PBXGroup; children = (
diff --git a/extras/Introjucer/Builds/VisualStudio2005/The Introjucer.vcproj b/extras/Introjucer/Builds/VisualStudio2005/The Introjucer.vcproj
index aa576e0056..98ad66460c 100644
--- a/extras/Introjucer/Builds/VisualStudio2005/The Introjucer.vcproj
+++ b/extras/Introjucer/Builds/VisualStudio2005/The Introjucer.vcproj
@@ -3203,6 +3203,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -3582,19 +3615,6 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/extras/Introjucer/Builds/VisualStudio2008/The Introjucer.vcproj b/extras/Introjucer/Builds/VisualStudio2008/The Introjucer.vcproj
index 08c65fc9ac..8e954fc14b 100644
--- a/extras/Introjucer/Builds/VisualStudio2008/The Introjucer.vcproj
+++ b/extras/Introjucer/Builds/VisualStudio2008/The Introjucer.vcproj
@@ -3203,6 +3203,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -3582,19 +3615,6 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/extras/Introjucer/Builds/VisualStudio2010/The Introjucer.vcxproj b/extras/Introjucer/Builds/VisualStudio2010/The Introjucer.vcxproj
index 29c1d5d027..695b67e3a1 100644
--- a/extras/Introjucer/Builds/VisualStudio2010/The Introjucer.vcxproj
+++ b/extras/Introjucer/Builds/VisualStudio2010/The Introjucer.vcxproj
@@ -864,6 +864,15 @@
true
+
+ true
+
+
+ true
+
+
+ true
+
true
@@ -957,9 +966,6 @@
true
-
- true
-
true
@@ -1413,6 +1419,9 @@
+
+
+
@@ -1446,7 +1455,6 @@
-
diff --git a/extras/Introjucer/Builds/VisualStudio2010/The Introjucer.vcxproj.filters b/extras/Introjucer/Builds/VisualStudio2010/The Introjucer.vcxproj.filters
index d4db0c4d5f..3e0cecea4f 100644
--- a/extras/Introjucer/Builds/VisualStudio2010/The Introjucer.vcxproj.filters
+++ b/extras/Introjucer/Builds/VisualStudio2010/The Introjucer.vcxproj.filters
@@ -233,9 +233,6 @@
{61B2920C-494D-D8CB-C0C7-5DBF3D76D164}
-
- {4980B18D-FEDE-B773-F254-E3B5207D81F0}
-
{66C9B809-8739-A217-C78D-A15D6089B8E3}
@@ -1093,6 +1090,15 @@
Juce Modules\juce_gui_basics\lookandfeel
+
+ Juce Modules\juce_gui_basics\lookandfeel
+
+
+ Juce Modules\juce_gui_basics\lookandfeel
+
+
+ Juce Modules\juce_gui_basics\lookandfeel
+
Juce Modules\juce_gui_basics\filebrowser
@@ -1207,9 +1213,6 @@
Juce Modules\juce_gui_extra\documents
-
- Juce Modules\juce_gui_extra\lookandfeel
-
Juce Modules\juce_gui_extra\misc
@@ -2493,6 +2496,15 @@
Juce Modules\juce_gui_basics\lookandfeel
+
+ Juce Modules\juce_gui_basics\lookandfeel
+
+
+ Juce Modules\juce_gui_basics\lookandfeel
+
+
+ Juce Modules\juce_gui_basics\lookandfeel
+
Juce Modules\juce_gui_basics\filebrowser
@@ -2592,9 +2604,6 @@
Juce Modules\juce_gui_extra\embedding
-
- Juce Modules\juce_gui_extra\lookandfeel
-
Juce Modules\juce_gui_extra\misc
diff --git a/extras/Introjucer/Builds/VisualStudio2012/The Introjucer.vcxproj b/extras/Introjucer/Builds/VisualStudio2012/The Introjucer.vcxproj
index 25896d0e2e..b8a80948bd 100644
--- a/extras/Introjucer/Builds/VisualStudio2012/The Introjucer.vcxproj
+++ b/extras/Introjucer/Builds/VisualStudio2012/The Introjucer.vcxproj
@@ -870,6 +870,15 @@
true
+
+ true
+
+
+ true
+
+
+ true
+
true
@@ -963,9 +972,6 @@
true
-
- true
-
true
@@ -1419,6 +1425,9 @@
+
+
+
@@ -1452,7 +1461,6 @@
-
diff --git a/extras/Introjucer/Builds/VisualStudio2012/The Introjucer.vcxproj.filters b/extras/Introjucer/Builds/VisualStudio2012/The Introjucer.vcxproj.filters
index d4db0c4d5f..3e0cecea4f 100644
--- a/extras/Introjucer/Builds/VisualStudio2012/The Introjucer.vcxproj.filters
+++ b/extras/Introjucer/Builds/VisualStudio2012/The Introjucer.vcxproj.filters
@@ -233,9 +233,6 @@
{61B2920C-494D-D8CB-C0C7-5DBF3D76D164}
-
- {4980B18D-FEDE-B773-F254-E3B5207D81F0}
-
{66C9B809-8739-A217-C78D-A15D6089B8E3}
@@ -1093,6 +1090,15 @@
Juce Modules\juce_gui_basics\lookandfeel
+
+ Juce Modules\juce_gui_basics\lookandfeel
+
+
+ Juce Modules\juce_gui_basics\lookandfeel
+
+
+ Juce Modules\juce_gui_basics\lookandfeel
+
Juce Modules\juce_gui_basics\filebrowser
@@ -1207,9 +1213,6 @@
Juce Modules\juce_gui_extra\documents
-
- Juce Modules\juce_gui_extra\lookandfeel
-
Juce Modules\juce_gui_extra\misc
@@ -2493,6 +2496,15 @@
Juce Modules\juce_gui_basics\lookandfeel
+
+ Juce Modules\juce_gui_basics\lookandfeel
+
+
+ Juce Modules\juce_gui_basics\lookandfeel
+
+
+ Juce Modules\juce_gui_basics\lookandfeel
+
Juce Modules\juce_gui_basics\filebrowser
@@ -2592,9 +2604,6 @@
Juce Modules\juce_gui_extra\embedding
-
- Juce Modules\juce_gui_extra\lookandfeel
-
Juce Modules\juce_gui_extra\misc
diff --git a/extras/Introjucer/Source/Application/jucer_AppearanceSettings.cpp b/extras/Introjucer/Source/Application/jucer_AppearanceSettings.cpp
index 1830a135cb..5a13a30689 100644
--- a/extras/Introjucer/Source/Application/jucer_AppearanceSettings.cpp
+++ b/extras/Introjucer/Source/Application/jucer_AppearanceSettings.cpp
@@ -209,8 +209,7 @@ void AppearanceSettings::applyToLookAndFeel (LookAndFeel& lf) const
}
}
- lf.setColour (ScrollBar::thumbColourId,
- IntrojucerLookAndFeel::getScrollbarColourForBackground (lf.findColour (mainBackgroundColourId)));
+ lf.setColour (ScrollBar::thumbColourId, lf.findColour (mainBackgroundColourId).contrasting().withAlpha (0.13f));
}
void AppearanceSettings::applyToCodeEditor (CodeEditorComponent& editor) const
@@ -236,8 +235,9 @@ void AppearanceSettings::applyToCodeEditor (CodeEditorComponent& editor) const
}
}
- editor.setColour (ScrollBar::thumbColourId,
- IntrojucerLookAndFeel::getScrollbarColourForBackground (editor.findColour (CodeEditorComponent::backgroundColourId)));
+ editor.setColour (ScrollBar::thumbColourId, editor.findColour (CodeEditorComponent::backgroundColourId)
+ .contrasting()
+ .withAlpha (0.13f));
}
Font AppearanceSettings::getCodeFont() const
@@ -530,44 +530,11 @@ void AppearanceSettings::showEditorWindow (ScopedPointer& ownerPointe
IntrojucerLookAndFeel::IntrojucerLookAndFeel()
{
setColour (mainBackgroundColourId, Colour::greyLevel (0.8f));
- setColour (TreeView::selectedItemBackgroundColourId, Colour (0x401111ee));
- setColour (TextButton::buttonColourId, Colour (0xffeeeeff));
-
- setColour (ScrollBar::thumbColourId,
- getScrollbarColourForBackground (findColour (mainBackgroundColourId)));
}
-Colour IntrojucerLookAndFeel::getScrollbarColourForBackground (Colour background)
-{
- return background.contrasting().withAlpha (0.13f);
-}
+int IntrojucerLookAndFeel::getTabButtonBestWidth (TabBarButton&, int) { return 120; }
-Rectangle IntrojucerLookAndFeel::getPropertyComponentContentPosition (PropertyComponent& component)
-{
- if (component.findParentComponentOfClass() != nullptr)
- return component.getLocalBounds().reduced (1).removeFromRight (component.getWidth() / 2);
-
- return LookAndFeel::getPropertyComponentContentPosition (component);
-}
-
-int IntrojucerLookAndFeel::getTabButtonOverlap (int /*tabDepth*/) { return -1; }
-int IntrojucerLookAndFeel::getTabButtonSpaceAroundImage() { return 1; }
-int IntrojucerLookAndFeel::getTabButtonBestWidth (TabBarButton&, int /*tabDepth*/) { return 120; }
-
-static void createTabTextLayout (const TabBarButton& button, const Rectangle& textArea,
- const Colour colour, TextLayout& textLayout)
-{
- Font font (textArea.getHeight() * 0.5f);
- font.setUnderline (button.hasKeyboardFocus (false));
-
- AttributedString s;
- s.setJustification (Justification::centred);
- s.append (button.getButtonText().trim(), font, colour);
-
- textLayout.createLayout (s, (float) textArea.getWidth());
-}
-
-Colour IntrojucerLookAndFeel::getTabBackgroundColour (TabBarButton& button)
+static Colour getTabBackgroundColour (TabBarButton& button)
{
const Colour bkg (button.findColour (mainBackgroundColourId).contrasting (0.15f));
@@ -594,60 +561,11 @@ void IntrojucerLookAndFeel::drawTabButton (TabBarButton& button, Graphics& g, bo
const Colour col (bkg.contrasting().withMultipliedAlpha (alpha));
TextLayout textLayout;
- createTabTextLayout (button, button.getTextArea(), col, textLayout);
+ LookAndFeel_V3::createTabTextLayout (button, (float) activeArea.getWidth(), (float) activeArea.getHeight(), col, textLayout);
textLayout.draw (g, button.getTextArea().toFloat());
}
-Rectangle IntrojucerLookAndFeel::getTabButtonExtraComponentBounds (const TabBarButton& button, Rectangle& textArea, Component& comp)
-{
- TextLayout textLayout;
- createTabTextLayout (button, textArea, Colours::black, textLayout);
- const int textWidth = (int) textLayout.getWidth();
- const int extraSpace = jmax (0, textArea.getWidth() - (textWidth + comp.getWidth())) / 2;
-
- textArea.removeFromRight (extraSpace);
- textArea.removeFromLeft (extraSpace);
- return textArea.removeFromRight (comp.getWidth());
-}
-
-void IntrojucerLookAndFeel::drawStretchableLayoutResizerBar (Graphics& g, int /*w*/, int /*h*/, bool /*isVerticalBar*/, bool isMouseOver, bool isMouseDragging)
-{
- if (isMouseOver || isMouseDragging)
- g.fillAll (Colours::yellow.withAlpha (0.4f));
-}
-
-void IntrojucerLookAndFeel::drawScrollbar (Graphics& g, ScrollBar& scrollbar, int x, int y, int width, int height,
- bool isScrollbarVertical, int thumbStartPosition, int thumbSize,
- bool isMouseOver, bool isMouseDown)
-{
- Path thumbPath;
-
- if (thumbSize > 0)
- {
- const float thumbIndent = (isScrollbarVertical ? width : height) * 0.25f;
- const float thumbIndentx2 = thumbIndent * 2.0f;
-
- if (isScrollbarVertical)
- thumbPath.addRoundedRectangle (x + thumbIndent, thumbStartPosition + thumbIndent,
- width - thumbIndentx2, thumbSize - thumbIndentx2, (width - thumbIndentx2) * 0.5f);
- else
- thumbPath.addRoundedRectangle (thumbStartPosition + thumbIndent, y + thumbIndent,
- thumbSize - thumbIndentx2, height - thumbIndentx2, (height - thumbIndentx2) * 0.5f);
- }
-
- Colour thumbCol (scrollbar.findColour (ScrollBar::thumbColourId, true));
-
- if (isMouseOver || isMouseDown)
- thumbCol = thumbCol.withMultipliedAlpha (2.0f);
-
- g.setColour (thumbCol);
- g.fillPath (thumbPath);
-
- g.setColour (thumbCol.contrasting ((isMouseOver || isMouseDown) ? 0.2f : 0.1f));
- g.strokePath (thumbPath, PathStrokeType (1.0f));
-}
-
static Range getBrightnessRange (const Image& im)
{
float minB = 1.0f, maxB = 0;
@@ -705,97 +623,3 @@ void IntrojucerLookAndFeel::fillWithBackgroundTexture (Component& c, Graphics& g
{
dynamic_cast (c.getLookAndFeel()).fillWithBackgroundTexture (g);
}
-
-void IntrojucerLookAndFeel::drawConcertinaPanelHeader (Graphics& g, const Rectangle& area,
- bool isMouseOver, bool /*isMouseDown*/,
- ConcertinaPanel&, Component& panel)
-{
- const Colour bkg (findColour (mainBackgroundColourId));
-
- g.setGradientFill (ColourGradient (Colours::white.withAlpha (isMouseOver ? 0.4f : 0.2f), 0, (float) area.getY(),
- Colours::darkgrey.withAlpha (0.2f), 0, (float) area.getBottom(), false));
-
- g.fillAll();
- g.setColour (bkg.contrasting().withAlpha (0.04f));
- g.fillRect (area.withHeight (1));
- g.fillRect (area.withTop (area.getBottom() - 1));
-
- g.setColour (bkg.contrasting());
- g.setFont (Font (area.getHeight() * 0.6f).boldened());
- g.drawFittedText (panel.getName(), 4, 0, area.getWidth() - 6, area.getHeight(), Justification::centredLeft, 1);
-}
-
-void IntrojucerLookAndFeel::drawButtonBackground (Graphics& g,
- Button& button,
- const Colour& backgroundColour,
- bool isMouseOverButton,
- bool isButtonDown)
-{
- const bool flatOnLeft = button.isConnectedOnLeft();
- const bool flatOnRight = button.isConnectedOnRight();
- const bool flatOnTop = button.isConnectedOnTop();
- const bool flatOnBottom = button.isConnectedOnBottom();
-
- const float width = (float) button.getWidth();
- const float height = (float) button.getHeight();
-
- const float x = 0.5f;
- const float y = 0.5f;
- const float w = width - 1.0f;
- const float h = height - 1.0f;
- const float cornerSize = 4.0f;
-
- Colour baseColour (backgroundColour.withMultipliedSaturation (button.hasKeyboardFocus (true)
- ? 1.3f : 0.9f)
- .withMultipliedAlpha (button.isEnabled() ? 0.9f : 0.5f));
-
- if (isButtonDown) baseColour = baseColour.contrasting (0.2f);
- else if (isMouseOverButton) baseColour = baseColour.contrasting (0.1f);
-
- const float mainBrightness = baseColour.getBrightness();
- const float mainAlpha = baseColour.getFloatAlpha();
-
- Path outline;
- outline.addRoundedRectangle (x, y, w, h, cornerSize, cornerSize,
- ! (flatOnLeft || flatOnTop),
- ! (flatOnRight || flatOnTop),
- ! (flatOnLeft || flatOnBottom),
- ! (flatOnRight || flatOnBottom));
-
- g.setGradientFill (ColourGradient (baseColour.brighter (0.2f), 0.0f, 0.0f,
- baseColour.darker (0.25f), 0.0f, height, false));
- g.fillPath (outline);
-
- g.setColour (Colours::white.withAlpha (0.4f * mainAlpha * mainBrightness * mainBrightness));
- g.strokePath (outline, PathStrokeType (1.0f), AffineTransform::translation (0.0f, 1.0f)
- .scaled (1.0f, (h - 1.6f) / h));
-
- g.setColour (Colours::black.withAlpha (0.4f * mainAlpha));
- g.strokePath (outline, PathStrokeType (1.0f));
-}
-
-void IntrojucerLookAndFeel::drawTableHeaderBackground (Graphics& g, TableHeaderComponent& header)
-{
- Rectangle r (header.getLocalBounds());
-
- g.setColour (Colours::black.withAlpha (0.5f));
- g.fillRect (r.removeFromBottom (1));
-
- g.setColour (Colours::white.withAlpha (0.6f));
- g.fillRect (r);
-
- g.setColour (Colours::black.withAlpha (0.5f));
-
- for (int i = header.getNumColumns (true); --i >= 0;)
- g.fillRect (header.getColumnPosition (i).removeFromRight (1));
-}
-
-void IntrojucerLookAndFeel::drawTreeviewPlusMinusBox (Graphics& g, const Rectangle& area,
- Colour backgroundColour, bool isOpen, bool isMouseOver)
-{
- Path p;
- p.addTriangle (0.0f, 0.0f, 1.0f, isOpen ? 0.0f : 0.5f, isOpen ? 0.5f : 0.0f, 1.0f);
-
- g.setColour (backgroundColour.contrasting().withAlpha (isMouseOver ? 0.5f : 0.3f));
- g.fillPath (p, p.getTransformToScaleToFit (area.reduced (area.getHeight() / 8), true));
-}
diff --git a/extras/Introjucer/Source/Application/jucer_AppearanceSettings.h b/extras/Introjucer/Source/Application/jucer_AppearanceSettings.h
index eb657a68f8..3d4ad83e3c 100644
--- a/extras/Introjucer/Source/Application/jucer_AppearanceSettings.h
+++ b/extras/Introjucer/Source/Application/jucer_AppearanceSettings.h
@@ -78,7 +78,7 @@ private:
};
//==============================================================================
-class IntrojucerLookAndFeel : public LookAndFeel
+class IntrojucerLookAndFeel : public LookAndFeel_V3
{
public:
IntrojucerLookAndFeel();
@@ -86,35 +86,10 @@ public:
void fillWithBackgroundTexture (Graphics&);
static void fillWithBackgroundTexture (Component&, Graphics&);
- int getTabButtonOverlap (int tabDepth) override;
- int getTabButtonSpaceAroundImage() override;
- int getTabButtonBestWidth (TabBarButton&, int tabDepth) override;
- static Colour getTabBackgroundColour (TabBarButton&);
void drawTabButton (TabBarButton& button, Graphics&, bool isMouseOver, bool isMouseDown) override;
-
- Rectangle getTabButtonExtraComponentBounds (const TabBarButton&, Rectangle& textArea, Component&) override;
void drawTabAreaBehindFrontButton (TabbedButtonBar&, Graphics&, int, int) override {}
- void drawStretchableLayoutResizerBar (Graphics&, int w, int h, bool isVerticalBar, bool isMouseOver, bool isMouseDragging) override;
- Rectangle getPropertyComponentContentPosition (PropertyComponent&) override;
-
- bool areScrollbarButtonsVisible() override { return false; }
-
- void drawScrollbar (Graphics&, ScrollBar&, int x, int y, int width, int height, bool isScrollbarVertical,
- int thumbStartPosition, int thumbSize, bool isMouseOver, bool isMouseDown) override;
-
- void drawConcertinaPanelHeader (Graphics&, const Rectangle& area, bool isMouseOver, bool isMouseDown,
- ConcertinaPanel&, Component&) override;
-
- void drawButtonBackground (Graphics&, Button&, const Colour& backgroundColour,
- bool isMouseOverButton, bool isButtonDown) override;
-
- void drawTreeviewPlusMinusBox (Graphics&, const Rectangle& area,
- Colour backgroundColour, bool isOpen, bool isMouseOver) override;
-
- void drawTableHeaderBackground (Graphics&, TableHeaderComponent&) override;
-
- static Colour getScrollbarColourForBackground (Colour background);
+ int getTabButtonBestWidth (TabBarButton&, int tabDepth) override;
private:
Image backgroundTexture;
diff --git a/extras/Introjucer/Source/ComponentEditor/ui/jucer_EditingPanelBase.h b/extras/Introjucer/Source/ComponentEditor/ui/jucer_EditingPanelBase.h
index b46d96d250..2e721e9e0f 100644
--- a/extras/Introjucer/Source/ComponentEditor/ui/jucer_EditingPanelBase.h
+++ b/extras/Introjucer/Source/ComponentEditor/ui/jucer_EditingPanelBase.h
@@ -67,7 +67,7 @@ public:
protected:
JucerDocument& document;
- LookAndFeel lookAndFeel;
+ LookAndFeel_V2 lookAndFeel;
Viewport* viewport;
MagnifierComponent* magnifier;
diff --git a/extras/Introjucer/Source/ComponentEditor/ui/jucer_TestComponent.h b/extras/Introjucer/Source/ComponentEditor/ui/jucer_TestComponent.h
index 51dc9eb448..96bbe098a9 100644
--- a/extras/Introjucer/Source/ComponentEditor/ui/jucer_TestComponent.h
+++ b/extras/Introjucer/Source/ComponentEditor/ui/jucer_TestComponent.h
@@ -69,7 +69,7 @@ private:
ScopedPointer loadedDocument;
String filename, constructorParams;
Time lastModificationTime;
- LookAndFeel lookAndFeel;
+ LookAndFeel_V2 lookAndFeel;
const bool alwaysFillBackground;
void updateContents();
diff --git a/extras/JuceDemo/Builds/CodeBlocks/Juce Demo.cbp b/extras/JuceDemo/Builds/CodeBlocks/Juce Demo.cbp
index 5bc21e754d..223c8fac14 100644
--- a/extras/JuceDemo/Builds/CodeBlocks/Juce Demo.cbp
+++ b/extras/JuceDemo/Builds/CodeBlocks/Juce Demo.cbp
@@ -2913,6 +2913,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -3201,14 +3225,6 @@
-
-
-
-
-
-
-
-
diff --git a/extras/JuceDemo/Builds/MacOSX/Juce Demo.xcodeproj/project.pbxproj b/extras/JuceDemo/Builds/MacOSX/Juce Demo.xcodeproj/project.pbxproj
index a945ff704a..ba6150a27a 100644
--- a/extras/JuceDemo/Builds/MacOSX/Juce Demo.xcodeproj/project.pbxproj
+++ b/extras/JuceDemo/Builds/MacOSX/Juce Demo.xcodeproj/project.pbxproj
@@ -157,6 +157,7 @@
1B3C2797B04E0FC6699DFDF0 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_android_Windowing.cpp"; path = "../../../../modules/juce_gui_basics/native/juce_android_Windowing.cpp"; sourceTree = "SOURCE_ROOT"; };
1BDF3CAE40B1FDD559BC3DD3 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_InterprocessConnection.h"; path = "../../../../modules/juce_events/interprocess/juce_InterprocessConnection.h"; sourceTree = "SOURCE_ROOT"; };
1C36F82D875B81C26A5752AF = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_AudioPluginFormat.cpp"; path = "../../../../modules/juce_audio_processors/format/juce_AudioPluginFormat.cpp"; sourceTree = "SOURCE_ROOT"; };
+ 1CC471FC753878B5DCC08E1A = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_LookAndFeel_V3.h"; path = "../../../../modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V3.h"; sourceTree = "SOURCE_ROOT"; };
1CCB7B18759F7CEBB065C31E = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AppleRemote.h"; path = "../../../../modules/juce_gui_extra/misc/juce_AppleRemote.h"; sourceTree = "SOURCE_ROOT"; };
1D0DD674EEEF98B1E1B8D8D8 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_FileListComponent.cpp"; path = "../../../../modules/juce_gui_basics/filebrowser/juce_FileListComponent.cpp"; sourceTree = "SOURCE_ROOT"; };
1D3DA514A7B46A2A32A32060 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_MidiKeyboardComponent.cpp"; path = "../../../../modules/juce_audio_utils/gui/juce_MidiKeyboardComponent.cpp"; sourceTree = "SOURCE_ROOT"; };
@@ -203,6 +204,7 @@
2820D74789660269902DB93A = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Uuid.cpp"; path = "../../../../modules/juce_core/misc/juce_Uuid.cpp"; sourceTree = "SOURCE_ROOT"; };
282C1DA3A161FEF2AD6F94A6 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_CodeTokeniser.h"; path = "../../../../modules/juce_gui_extra/code_editor/juce_CodeTokeniser.h"; sourceTree = "SOURCE_ROOT"; };
285D320DF8A2D10C5990334A = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_mac_SystemTrayIcon.cpp"; path = "../../../../modules/juce_gui_extra/native/juce_mac_SystemTrayIcon.cpp"; sourceTree = "SOURCE_ROOT"; };
+ 294B94430FBB9DBE99FCF93C = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_LookAndFeel_V2.cpp"; path = "../../../../modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp"; sourceTree = "SOURCE_ROOT"; };
2954678FE7AB78F318FBD4F7 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FileInputStream.h"; path = "../../../../modules/juce_core/files/juce_FileInputStream.h"; sourceTree = "SOURCE_ROOT"; };
295A470694011EBCA802822B = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_OpenGLGraphicsContext.cpp"; path = "../../../../modules/juce_opengl/opengl/juce_OpenGLGraphicsContext.cpp"; sourceTree = "SOURCE_ROOT"; };
2968B26144E09D6A6659E739 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_DirectShowComponent.h"; path = "../../../../modules/juce_video/playback/juce_DirectShowComponent.h"; sourceTree = "SOURCE_ROOT"; };
@@ -454,6 +456,7 @@
683535B25CE57F64EC61EFD1 = { isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; };
687E1D120E47EEFEEB73A4BF = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_DrawableText.cpp"; path = "../../../../modules/juce_gui_basics/drawables/juce_DrawableText.cpp"; sourceTree = "SOURCE_ROOT"; };
690BE5039AADEF787D6E13D9 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = AudioDemoTabComponent.cpp; path = ../../Source/demos/AudioDemoTabComponent.cpp; sourceTree = "SOURCE_ROOT"; };
+ 69B37AE6A1496C705CA20B14 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_LookAndFeel_V2.h"; path = "../../../../modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.h"; sourceTree = "SOURCE_ROOT"; };
6A4819E134CD45BD043C3219 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Socket.cpp"; path = "../../../../modules/juce_core/network/juce_Socket.cpp"; sourceTree = "SOURCE_ROOT"; };
6A7463E25E5C0C70C01B5054 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_TextDiff.cpp"; path = "../../../../modules/juce_core/text/juce_TextDiff.cpp"; sourceTree = "SOURCE_ROOT"; };
6A9868E67963F63A4819A56B = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ConcertinaPanel.cpp"; path = "../../../../modules/juce_gui_basics/layout/juce_ConcertinaPanel.cpp"; sourceTree = "SOURCE_ROOT"; };
@@ -532,7 +535,6 @@
7F580113B80A85759A406E81 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_linux_Files.cpp"; path = "../../../../modules/juce_core/native/juce_linux_Files.cpp"; sourceTree = "SOURCE_ROOT"; };
7F65B8E1571AA346AA2F2FE8 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ReverbAudioSource.cpp"; path = "../../../../modules/juce_audio_basics/sources/juce_ReverbAudioSource.cpp"; sourceTree = "SOURCE_ROOT"; };
7FC1A0B1663AC9262104D715 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_KeyListener.h"; path = "../../../../modules/juce_gui_basics/keyboard/juce_KeyListener.h"; sourceTree = "SOURCE_ROOT"; };
- 8042D0D2B38EBD19652CBA55 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_OldSchoolLookAndFeel.cpp"; path = "../../../../modules/juce_gui_extra/lookandfeel/juce_OldSchoolLookAndFeel.cpp"; sourceTree = "SOURCE_ROOT"; };
805B94425CD56EA78E0A705B = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AudioDemoPlaybackPage.h; path = ../../Source/demos/AudioDemoPlaybackPage.h; sourceTree = "SOURCE_ROOT"; };
80945993EC383052DA7BB92D = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_OpenGLRenderer.h"; path = "../../../../modules/juce_opengl/opengl/juce_OpenGLRenderer.h"; sourceTree = "SOURCE_ROOT"; };
80E7D8D4E601BCC20054475E = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ActionBroadcaster.h"; path = "../../../../modules/juce_events/broadcasters/juce_ActionBroadcaster.h"; sourceTree = "SOURCE_ROOT"; };
@@ -565,7 +567,6 @@
890F3D7DA5BC01DACF8E5431 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_events.mm"; path = "../../../../modules/juce_events/juce_events.mm"; sourceTree = "SOURCE_ROOT"; };
8939B318C3AF6793C72D8A9E = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ArrayAllocationBase.h"; path = "../../../../modules/juce_core/containers/juce_ArrayAllocationBase.h"; sourceTree = "SOURCE_ROOT"; };
893D867B3AB93E4D96AF060E = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ProgressBar.h"; path = "../../../../modules/juce_gui_basics/widgets/juce_ProgressBar.h"; sourceTree = "SOURCE_ROOT"; };
- 896140063D12A19D1DCBF3DF = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_OldSchoolLookAndFeel.h"; path = "../../../../modules/juce_gui_extra/lookandfeel/juce_OldSchoolLookAndFeel.h"; sourceTree = "SOURCE_ROOT"; };
897420C9C4D80F1AE5F80637 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Label.cpp"; path = "../../../../modules/juce_gui_basics/widgets/juce_Label.cpp"; sourceTree = "SOURCE_ROOT"; };
89ABB9AFCDB73A409754BE48 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_StringPairArray.h"; path = "../../../../modules/juce_core/text/juce_StringPairArray.h"; sourceTree = "SOURCE_ROOT"; };
89F519023C03C9908F761BAE = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FileBrowserListener.h"; path = "../../../../modules/juce_gui_basics/filebrowser/juce_FileBrowserListener.h"; sourceTree = "SOURCE_ROOT"; };
@@ -779,6 +780,7 @@
C5FF20572B734C4EE8F204B6 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_SHA256.cpp"; path = "../../../../modules/juce_cryptography/hashing/juce_SHA256.cpp"; sourceTree = "SOURCE_ROOT"; };
C66E08F5118F529FC623733E = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_CallbackMessage.h"; path = "../../../../modules/juce_events/messages/juce_CallbackMessage.h"; sourceTree = "SOURCE_ROOT"; };
C6DF852AEB35D096094E7C05 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_IPAddress.cpp"; path = "../../../../modules/juce_core/network/juce_IPAddress.cpp"; sourceTree = "SOURCE_ROOT"; };
+ C73EBA3CE1E3B72AF5B106A2 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_LookAndFeel_V3.cpp"; path = "../../../../modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V3.cpp"; sourceTree = "SOURCE_ROOT"; };
C766591C3E8CB978D6026F56 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_InterProcessLock.h"; path = "../../../../modules/juce_core/threads/juce_InterProcessLock.h"; sourceTree = "SOURCE_ROOT"; };
C7835B9A7DA88BE84F1366E6 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Expression.h"; path = "../../../../modules/juce_core/maths/juce_Expression.h"; sourceTree = "SOURCE_ROOT"; };
C7DAB2D405C907CDA83C2924 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_AudioProcessorEditor.cpp"; path = "../../../../modules/juce_audio_processors/processors/juce_AudioProcessorEditor.cpp"; sourceTree = "SOURCE_ROOT"; };
@@ -836,6 +838,7 @@
D5DE603FFC184C590E2A6678 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AudioCDBurner.h"; path = "../../../../modules/juce_audio_devices/audio_cd/juce_AudioCDBurner.h"; sourceTree = "SOURCE_ROOT"; };
D6C9614D1C6493DBEE370646 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_FileBasedDocument.cpp"; path = "../../../../modules/juce_gui_extra/documents/juce_FileBasedDocument.cpp"; sourceTree = "SOURCE_ROOT"; };
D7239D5B984E07808E2DB28C = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_OpenGLHelpers.cpp"; path = "../../../../modules/juce_opengl/opengl/juce_OpenGLHelpers.cpp"; sourceTree = "SOURCE_ROOT"; };
+ D866C4735BF1EF0CA24FC1FB = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Draggable3DOrientation.h"; path = "../../../../modules/juce_opengl/opengl/juce_Draggable3DOrientation.h"; sourceTree = "SOURCE_ROOT"; };
D8AFC87A918360FFC9D96BE5 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Atomic.h"; path = "../../../../modules/juce_core/memory/juce_Atomic.h"; sourceTree = "SOURCE_ROOT"; };
DA0D464BE6E90C3668AD7C73 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_mac_FileChooser.mm"; path = "../../../../modules/juce_gui_basics/native/juce_mac_FileChooser.mm"; sourceTree = "SOURCE_ROOT"; };
DEB23C98FEC261260F63B6A4 = { isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
@@ -850,7 +853,6 @@
D602AE751C3C12A6458FCCD5 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ResizableBorderComponent.h"; path = "../../../../modules/juce_gui_basics/layout/juce_ResizableBorderComponent.h"; sourceTree = "SOURCE_ROOT"; };
D7E6E92AA32B7D51489FD256 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ComponentBoundsConstrainer.h"; path = "../../../../modules/juce_gui_basics/layout/juce_ComponentBoundsConstrainer.h"; sourceTree = "SOURCE_ROOT"; };
D8081154AA3072D2F2C4B625 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_posix_SharedCode.h"; path = "../../../../modules/juce_core/native/juce_posix_SharedCode.h"; sourceTree = "SOURCE_ROOT"; };
- D866C4735BF1EF0CA24FC1FB = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Draggable3DOrientation.h"; path = "../../../../modules/juce_opengl/opengl/juce_Draggable3DOrientation.h"; sourceTree = "SOURCE_ROOT"; };
D9282DF6556197822D2BD5D4 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_PropertySet.cpp"; path = "../../../../modules/juce_core/containers/juce_PropertySet.cpp"; sourceTree = "SOURCE_ROOT"; };
D9AB5165697DB60BA305F414 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_android_OpenSL.cpp"; path = "../../../../modules/juce_audio_devices/native/juce_android_OpenSL.cpp"; sourceTree = "SOURCE_ROOT"; };
DA2FCB30EE2A41085FF93B9B = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_Files.cpp"; path = "../../../../modules/juce_core/native/juce_win32_Files.cpp"; sourceTree = "SOURCE_ROOT"; };
@@ -869,6 +871,7 @@
DFEAB699C98B89FF0B85F557 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_DirectWriteTypeLayout.cpp"; path = "../../../../modules/juce_graphics/native/juce_win32_DirectWriteTypeLayout.cpp"; sourceTree = "SOURCE_ROOT"; };
DFF6BF0BB64714A494A25E93 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_RSAKey.h"; path = "../../../../modules/juce_cryptography/encryption/juce_RSAKey.h"; sourceTree = "SOURCE_ROOT"; };
E15F577E82B2E12597447472 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ApplicationBase.h"; path = "../../../../modules/juce_events/messages/juce_ApplicationBase.h"; sourceTree = "SOURCE_ROOT"; };
+ E197A55A32B999BDE0A6050F = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_LookAndFeel_V1.cpp"; path = "../../../../modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V1.cpp"; sourceTree = "SOURCE_ROOT"; };
E26E3AC933F70B56B7B83EFA = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_MACAddress.cpp"; path = "../../../../modules/juce_core/network/juce_MACAddress.cpp"; sourceTree = "SOURCE_ROOT"; };
E2732267CD7C0C3BDB17456A = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_BooleanPropertyComponent.h"; path = "../../../../modules/juce_gui_basics/properties/juce_BooleanPropertyComponent.h"; sourceTree = "SOURCE_ROOT"; };
E274BFB25D87D93EDBC23114 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_OggVorbisAudioFormat.h"; path = "../../../../modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.h"; sourceTree = "SOURCE_ROOT"; };
@@ -879,6 +882,7 @@
E46977801F19277F4D3B324B = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_OpenGLImage.cpp"; path = "../../../../modules/juce_opengl/opengl/juce_OpenGLImage.cpp"; sourceTree = "SOURCE_ROOT"; };
E48615F1F7D8213F6DC24FC9 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ThreadPool.h"; path = "../../../../modules/juce_core/threads/juce_ThreadPool.h"; sourceTree = "SOURCE_ROOT"; };
E48E2824CED9933934127522 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_BasicNativeHeaders.h"; path = "../../../../modules/juce_core/native/juce_BasicNativeHeaders.h"; sourceTree = "SOURCE_ROOT"; };
+ E58737860E51CD5AD55065B3 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_LookAndFeel_V1.h"; path = "../../../../modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V1.h"; sourceTree = "SOURCE_ROOT"; };
E5DC4602843749A071B17576 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Slider.h"; path = "../../../../modules/juce_gui_basics/widgets/juce_Slider.h"; sourceTree = "SOURCE_ROOT"; };
E6B13A51A01032961340735D = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_StringPairArray.cpp"; path = "../../../../modules/juce_core/text/juce_StringPairArray.cpp"; sourceTree = "SOURCE_ROOT"; };
E6C582E67DC0C4D0CCA18166 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ShapeButton.h"; path = "../../../../modules/juce_gui_basics/buttons/juce_ShapeButton.h"; sourceTree = "SOURCE_ROOT"; };
@@ -1819,7 +1823,13 @@
03AB3157D77979CDD2601A86 ); name = properties; sourceTree = ""; };
E4A2262D5F17C9E13403F764 = { isa = PBXGroup; children = (
2F7FE4AA919A66D5EFF65A86,
- 329BD0A0243005D36A444135 ); name = lookandfeel; sourceTree = ""; };
+ 329BD0A0243005D36A444135,
+ E197A55A32B999BDE0A6050F,
+ E58737860E51CD5AD55065B3,
+ 294B94430FBB9DBE99FCF93C,
+ 69B37AE6A1496C705CA20B14,
+ C73EBA3CE1E3B72AF5B106A2,
+ 1CC471FC753878B5DCC08E1A ); name = lookandfeel; sourceTree = ""; };
D529A26C2B113F5DC6DD3571 = { isa = PBXGroup; children = (
5725CB557A7D55CA59E18324,
EC180AD91D1B068D7A8F33BB,
@@ -1918,10 +1928,7 @@
2E7A4C5E41B3BEBC444B5935,
1E868017015269856168EBA1,
D226630AEE6B273B6B1ED622 ); name = embedding; sourceTree = ""; };
- AD533544879D32FDC9647970 = { isa = PBXGroup; children = (
- 8042D0D2B38EBD19652CBA55,
- 896140063D12A19D1DCBF3DF ); name = lookandfeel; sourceTree = ""; };
- E2081DA359B95C05D825E9DB = { isa = PBXGroup; children = (
+ 44437C78DBA92D80635C45E4 = { isa = PBXGroup; children = (
1CCB7B18759F7CEBB065C31E,
0E74D38CAF5F8C914132F4D5,
61941C6E24D2D04F51F59134,
@@ -1938,7 +1945,7 @@
61E83A490FBB38A8D7613146,
476F1E00A832948D22B468C1,
9D042E1CAB03CFCD4B937951 ); name = misc; sourceTree = ""; };
- 6478E04ACFBEA2CBBBE97006 = { isa = PBXGroup; children = (
+ FCF227B0C1009561F3892A3B = { isa = PBXGroup; children = (
3D5DB29BE2D59A93B5516273,
2E02355C7790F4B6EA0CC56E,
DF590CD70352A30FA3BD9835,
@@ -1955,9 +1962,8 @@
0738039F7E5D430630032154,
640482925394FB311FDAB984,
1E1530112868032A2C02F4A4,
- AD533544879D32FDC9647970,
- E2081DA359B95C05D825E9DB,
- 6478E04ACFBEA2CBBBE97006,
+ 44437C78DBA92D80635C45E4,
+ FCF227B0C1009561F3892A3B,
5E12C726C5DBB9C81963FAB5,
A97EC32975392744C62684F9 ); name = "juce_gui_extra"; sourceTree = ""; };
EB8917291F41B7345B13B53E = { isa = PBXGroup; children = (
diff --git a/extras/JuceDemo/Builds/VisualStudio2005/Juce Demo.vcproj b/extras/JuceDemo/Builds/VisualStudio2005/Juce Demo.vcproj
index e5ae0f8653..bf4770ed07 100644
--- a/extras/JuceDemo/Builds/VisualStudio2005/Juce Demo.vcproj
+++ b/extras/JuceDemo/Builds/VisualStudio2005/Juce Demo.vcproj
@@ -3835,6 +3835,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -4214,19 +4247,6 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/extras/JuceDemo/Builds/VisualStudio2008/Juce Demo.vcproj b/extras/JuceDemo/Builds/VisualStudio2008/Juce Demo.vcproj
index c5e3150846..bd3314cdf7 100644
--- a/extras/JuceDemo/Builds/VisualStudio2008/Juce Demo.vcproj
+++ b/extras/JuceDemo/Builds/VisualStudio2008/Juce Demo.vcproj
@@ -3835,6 +3835,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -4214,19 +4247,6 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/extras/JuceDemo/Builds/VisualStudio2010/Juce Demo.vcxproj b/extras/JuceDemo/Builds/VisualStudio2010/Juce Demo.vcxproj
index cb270d4a6e..0e8fc74e9b 100644
--- a/extras/JuceDemo/Builds/VisualStudio2010/Juce Demo.vcxproj
+++ b/extras/JuceDemo/Builds/VisualStudio2010/Juce Demo.vcxproj
@@ -1046,6 +1046,15 @@
true
+
+ true
+
+
+ true
+
+
+ true
+
true
@@ -1139,9 +1148,6 @@
true
-
- true
-
true
@@ -1610,6 +1616,9 @@
+
+
+
@@ -1643,7 +1652,6 @@
-
diff --git a/extras/JuceDemo/Builds/VisualStudio2010/Juce Demo.vcxproj.filters b/extras/JuceDemo/Builds/VisualStudio2010/Juce Demo.vcxproj.filters
index e2088cee85..41c9fefc2c 100644
--- a/extras/JuceDemo/Builds/VisualStudio2010/Juce Demo.vcxproj.filters
+++ b/extras/JuceDemo/Builds/VisualStudio2010/Juce Demo.vcxproj.filters
@@ -275,9 +275,6 @@
{61B2920C-494D-D8CB-C0C7-5DBF3D76D164}
-
- {4980B18D-FEDE-B773-F254-E3B5207D81F0}
-
{66C9B809-8739-A217-C78D-A15D6089B8E3}
@@ -1309,6 +1306,15 @@
Juce Modules\juce_gui_basics\lookandfeel
+
+ Juce Modules\juce_gui_basics\lookandfeel
+
+
+ Juce Modules\juce_gui_basics\lookandfeel
+
+
+ Juce Modules\juce_gui_basics\lookandfeel
+
Juce Modules\juce_gui_basics\filebrowser
@@ -1423,9 +1429,6 @@
Juce Modules\juce_gui_extra\documents
-
- Juce Modules\juce_gui_extra\lookandfeel
-
Juce Modules\juce_gui_extra\misc
@@ -2688,6 +2691,15 @@
Juce Modules\juce_gui_basics\lookandfeel
+
+ Juce Modules\juce_gui_basics\lookandfeel
+
+
+ Juce Modules\juce_gui_basics\lookandfeel
+
+
+ Juce Modules\juce_gui_basics\lookandfeel
+
Juce Modules\juce_gui_basics\filebrowser
@@ -2787,9 +2799,6 @@
Juce Modules\juce_gui_extra\embedding
-
- Juce Modules\juce_gui_extra\lookandfeel
-
Juce Modules\juce_gui_extra\misc
diff --git a/extras/JuceDemo/Builds/VisualStudio2012/Juce Demo.vcxproj b/extras/JuceDemo/Builds/VisualStudio2012/Juce Demo.vcxproj
index 023770b363..ad7a506a8b 100644
--- a/extras/JuceDemo/Builds/VisualStudio2012/Juce Demo.vcxproj
+++ b/extras/JuceDemo/Builds/VisualStudio2012/Juce Demo.vcxproj
@@ -1052,6 +1052,15 @@
true
+
+ true
+
+
+ true
+
+
+ true
+
true
@@ -1145,9 +1154,6 @@
true
-
- true
-
true
@@ -1616,6 +1622,9 @@
+
+
+
@@ -1649,7 +1658,6 @@
-
diff --git a/extras/JuceDemo/Builds/VisualStudio2012/Juce Demo.vcxproj.filters b/extras/JuceDemo/Builds/VisualStudio2012/Juce Demo.vcxproj.filters
index e2088cee85..41c9fefc2c 100644
--- a/extras/JuceDemo/Builds/VisualStudio2012/Juce Demo.vcxproj.filters
+++ b/extras/JuceDemo/Builds/VisualStudio2012/Juce Demo.vcxproj.filters
@@ -275,9 +275,6 @@
{61B2920C-494D-D8CB-C0C7-5DBF3D76D164}
-
- {4980B18D-FEDE-B773-F254-E3B5207D81F0}
-
{66C9B809-8739-A217-C78D-A15D6089B8E3}
@@ -1309,6 +1306,15 @@
Juce Modules\juce_gui_basics\lookandfeel
+
+ Juce Modules\juce_gui_basics\lookandfeel
+
+
+ Juce Modules\juce_gui_basics\lookandfeel
+
+
+ Juce Modules\juce_gui_basics\lookandfeel
+
Juce Modules\juce_gui_basics\filebrowser
@@ -1423,9 +1429,6 @@
Juce Modules\juce_gui_extra\documents
-
- Juce Modules\juce_gui_extra\lookandfeel
-
Juce Modules\juce_gui_extra\misc
@@ -2688,6 +2691,15 @@
Juce Modules\juce_gui_basics\lookandfeel
+
+ Juce Modules\juce_gui_basics\lookandfeel
+
+
+ Juce Modules\juce_gui_basics\lookandfeel
+
+
+ Juce Modules\juce_gui_basics\lookandfeel
+
Juce Modules\juce_gui_basics\filebrowser
@@ -2787,9 +2799,6 @@
Juce Modules\juce_gui_extra\embedding
-
- Juce Modules\juce_gui_extra\lookandfeel
-
Juce Modules\juce_gui_extra\misc
diff --git a/extras/JuceDemo/Builds/iOS/Juce Demo.xcodeproj/project.pbxproj b/extras/JuceDemo/Builds/iOS/Juce Demo.xcodeproj/project.pbxproj
index 30add27f50..d2145fefdc 100644
--- a/extras/JuceDemo/Builds/iOS/Juce Demo.xcodeproj/project.pbxproj
+++ b/extras/JuceDemo/Builds/iOS/Juce Demo.xcodeproj/project.pbxproj
@@ -149,6 +149,7 @@
1B3C2797B04E0FC6699DFDF0 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_android_Windowing.cpp"; path = "../../../../modules/juce_gui_basics/native/juce_android_Windowing.cpp"; sourceTree = "SOURCE_ROOT"; };
1BDF3CAE40B1FDD559BC3DD3 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_InterprocessConnection.h"; path = "../../../../modules/juce_events/interprocess/juce_InterprocessConnection.h"; sourceTree = "SOURCE_ROOT"; };
1C36F82D875B81C26A5752AF = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_AudioPluginFormat.cpp"; path = "../../../../modules/juce_audio_processors/format/juce_AudioPluginFormat.cpp"; sourceTree = "SOURCE_ROOT"; };
+ 1CC471FC753878B5DCC08E1A = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_LookAndFeel_V3.h"; path = "../../../../modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V3.h"; sourceTree = "SOURCE_ROOT"; };
1CCB7B18759F7CEBB065C31E = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AppleRemote.h"; path = "../../../../modules/juce_gui_extra/misc/juce_AppleRemote.h"; sourceTree = "SOURCE_ROOT"; };
1D0DD674EEEF98B1E1B8D8D8 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_FileListComponent.cpp"; path = "../../../../modules/juce_gui_basics/filebrowser/juce_FileListComponent.cpp"; sourceTree = "SOURCE_ROOT"; };
1D3DA514A7B46A2A32A32060 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_MidiKeyboardComponent.cpp"; path = "../../../../modules/juce_audio_utils/gui/juce_MidiKeyboardComponent.cpp"; sourceTree = "SOURCE_ROOT"; };
@@ -196,6 +197,7 @@
2820D74789660269902DB93A = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Uuid.cpp"; path = "../../../../modules/juce_core/misc/juce_Uuid.cpp"; sourceTree = "SOURCE_ROOT"; };
282C1DA3A161FEF2AD6F94A6 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_CodeTokeniser.h"; path = "../../../../modules/juce_gui_extra/code_editor/juce_CodeTokeniser.h"; sourceTree = "SOURCE_ROOT"; };
285D320DF8A2D10C5990334A = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_mac_SystemTrayIcon.cpp"; path = "../../../../modules/juce_gui_extra/native/juce_mac_SystemTrayIcon.cpp"; sourceTree = "SOURCE_ROOT"; };
+ 294B94430FBB9DBE99FCF93C = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_LookAndFeel_V2.cpp"; path = "../../../../modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp"; sourceTree = "SOURCE_ROOT"; };
2954678FE7AB78F318FBD4F7 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FileInputStream.h"; path = "../../../../modules/juce_core/files/juce_FileInputStream.h"; sourceTree = "SOURCE_ROOT"; };
295A470694011EBCA802822B = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_OpenGLGraphicsContext.cpp"; path = "../../../../modules/juce_opengl/opengl/juce_OpenGLGraphicsContext.cpp"; sourceTree = "SOURCE_ROOT"; };
2968B26144E09D6A6659E739 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_DirectShowComponent.h"; path = "../../../../modules/juce_video/playback/juce_DirectShowComponent.h"; sourceTree = "SOURCE_ROOT"; };
@@ -445,6 +447,7 @@
67F14D1D1869540E4B9540B5 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ToolbarButton.h"; path = "../../../../modules/juce_gui_basics/buttons/juce_ToolbarButton.h"; sourceTree = "SOURCE_ROOT"; };
687E1D120E47EEFEEB73A4BF = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_DrawableText.cpp"; path = "../../../../modules/juce_gui_basics/drawables/juce_DrawableText.cpp"; sourceTree = "SOURCE_ROOT"; };
690BE5039AADEF787D6E13D9 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = AudioDemoTabComponent.cpp; path = ../../Source/demos/AudioDemoTabComponent.cpp; sourceTree = "SOURCE_ROOT"; };
+ 69B37AE6A1496C705CA20B14 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_LookAndFeel_V2.h"; path = "../../../../modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.h"; sourceTree = "SOURCE_ROOT"; };
6A4819E134CD45BD043C3219 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Socket.cpp"; path = "../../../../modules/juce_core/network/juce_Socket.cpp"; sourceTree = "SOURCE_ROOT"; };
6A7463E25E5C0C70C01B5054 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_TextDiff.cpp"; path = "../../../../modules/juce_core/text/juce_TextDiff.cpp"; sourceTree = "SOURCE_ROOT"; };
6A9868E67963F63A4819A56B = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ConcertinaPanel.cpp"; path = "../../../../modules/juce_gui_basics/layout/juce_ConcertinaPanel.cpp"; sourceTree = "SOURCE_ROOT"; };
@@ -525,7 +528,6 @@
7F580113B80A85759A406E81 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_linux_Files.cpp"; path = "../../../../modules/juce_core/native/juce_linux_Files.cpp"; sourceTree = "SOURCE_ROOT"; };
7F65B8E1571AA346AA2F2FE8 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ReverbAudioSource.cpp"; path = "../../../../modules/juce_audio_basics/sources/juce_ReverbAudioSource.cpp"; sourceTree = "SOURCE_ROOT"; };
7FC1A0B1663AC9262104D715 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_KeyListener.h"; path = "../../../../modules/juce_gui_basics/keyboard/juce_KeyListener.h"; sourceTree = "SOURCE_ROOT"; };
- 8042D0D2B38EBD19652CBA55 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_OldSchoolLookAndFeel.cpp"; path = "../../../../modules/juce_gui_extra/lookandfeel/juce_OldSchoolLookAndFeel.cpp"; sourceTree = "SOURCE_ROOT"; };
805B94425CD56EA78E0A705B = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AudioDemoPlaybackPage.h; path = ../../Source/demos/AudioDemoPlaybackPage.h; sourceTree = "SOURCE_ROOT"; };
80945993EC383052DA7BB92D = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_OpenGLRenderer.h"; path = "../../../../modules/juce_opengl/opengl/juce_OpenGLRenderer.h"; sourceTree = "SOURCE_ROOT"; };
80E7D8D4E601BCC20054475E = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ActionBroadcaster.h"; path = "../../../../modules/juce_events/broadcasters/juce_ActionBroadcaster.h"; sourceTree = "SOURCE_ROOT"; };
@@ -558,7 +560,6 @@
890F3D7DA5BC01DACF8E5431 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_events.mm"; path = "../../../../modules/juce_events/juce_events.mm"; sourceTree = "SOURCE_ROOT"; };
8939B318C3AF6793C72D8A9E = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ArrayAllocationBase.h"; path = "../../../../modules/juce_core/containers/juce_ArrayAllocationBase.h"; sourceTree = "SOURCE_ROOT"; };
893D867B3AB93E4D96AF060E = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ProgressBar.h"; path = "../../../../modules/juce_gui_basics/widgets/juce_ProgressBar.h"; sourceTree = "SOURCE_ROOT"; };
- 896140063D12A19D1DCBF3DF = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_OldSchoolLookAndFeel.h"; path = "../../../../modules/juce_gui_extra/lookandfeel/juce_OldSchoolLookAndFeel.h"; sourceTree = "SOURCE_ROOT"; };
897420C9C4D80F1AE5F80637 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Label.cpp"; path = "../../../../modules/juce_gui_basics/widgets/juce_Label.cpp"; sourceTree = "SOURCE_ROOT"; };
89ABB9AFCDB73A409754BE48 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_StringPairArray.h"; path = "../../../../modules/juce_core/text/juce_StringPairArray.h"; sourceTree = "SOURCE_ROOT"; };
89F519023C03C9908F761BAE = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FileBrowserListener.h"; path = "../../../../modules/juce_gui_basics/filebrowser/juce_FileBrowserListener.h"; sourceTree = "SOURCE_ROOT"; };
@@ -770,6 +771,7 @@
C5FF20572B734C4EE8F204B6 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_SHA256.cpp"; path = "../../../../modules/juce_cryptography/hashing/juce_SHA256.cpp"; sourceTree = "SOURCE_ROOT"; };
C66E08F5118F529FC623733E = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_CallbackMessage.h"; path = "../../../../modules/juce_events/messages/juce_CallbackMessage.h"; sourceTree = "SOURCE_ROOT"; };
C6DF852AEB35D096094E7C05 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_IPAddress.cpp"; path = "../../../../modules/juce_core/network/juce_IPAddress.cpp"; sourceTree = "SOURCE_ROOT"; };
+ C73EBA3CE1E3B72AF5B106A2 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_LookAndFeel_V3.cpp"; path = "../../../../modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V3.cpp"; sourceTree = "SOURCE_ROOT"; };
C766591C3E8CB978D6026F56 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_InterProcessLock.h"; path = "../../../../modules/juce_core/threads/juce_InterProcessLock.h"; sourceTree = "SOURCE_ROOT"; };
C7835B9A7DA88BE84F1366E6 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Expression.h"; path = "../../../../modules/juce_core/maths/juce_Expression.h"; sourceTree = "SOURCE_ROOT"; };
C7DAB2D405C907CDA83C2924 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_AudioProcessorEditor.cpp"; path = "../../../../modules/juce_audio_processors/processors/juce_AudioProcessorEditor.cpp"; sourceTree = "SOURCE_ROOT"; };
@@ -850,6 +852,7 @@
DF590CD70352A30FA3BD9835 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_linux_SystemTrayIcon.cpp"; path = "../../../../modules/juce_gui_extra/native/juce_linux_SystemTrayIcon.cpp"; sourceTree = "SOURCE_ROOT"; };
DFF6BF0BB64714A494A25E93 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_RSAKey.h"; path = "../../../../modules/juce_cryptography/encryption/juce_RSAKey.h"; sourceTree = "SOURCE_ROOT"; };
E0AE248F52C70AA1DEA1A5A1 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_MidiOutput.h"; path = "../../../../modules/juce_audio_devices/midi_io/juce_MidiOutput.h"; sourceTree = "SOURCE_ROOT"; };
+ E197A55A32B999BDE0A6050F = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_LookAndFeel_V1.cpp"; path = "../../../../modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V1.cpp"; sourceTree = "SOURCE_ROOT"; };
E249D6583995E0E6D0B3EADF = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AudioSourcePlayer.h"; path = "../../../../modules/juce_audio_devices/sources/juce_AudioSourcePlayer.h"; sourceTree = "SOURCE_ROOT"; };
E26E3AC933F70B56B7B83EFA = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_MACAddress.cpp"; path = "../../../../modules/juce_core/network/juce_MACAddress.cpp"; sourceTree = "SOURCE_ROOT"; };
E274BFB25D87D93EDBC23114 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_OggVorbisAudioFormat.h"; path = "../../../../modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.h"; sourceTree = "SOURCE_ROOT"; };
@@ -871,6 +874,7 @@
E453E312D607E60FAA6D1BF0 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_MultiDocumentPanel.cpp"; path = "../../../../modules/juce_gui_basics/layout/juce_MultiDocumentPanel.cpp"; sourceTree = "SOURCE_ROOT"; };
E46977801F19277F4D3B324B = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_OpenGLImage.cpp"; path = "../../../../modules/juce_opengl/opengl/juce_OpenGLImage.cpp"; sourceTree = "SOURCE_ROOT"; };
E48E2824CED9933934127522 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_BasicNativeHeaders.h"; path = "../../../../modules/juce_core/native/juce_BasicNativeHeaders.h"; sourceTree = "SOURCE_ROOT"; };
+ E58737860E51CD5AD55065B3 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_LookAndFeel_V1.h"; path = "../../../../modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V1.h"; sourceTree = "SOURCE_ROOT"; };
E5DC4602843749A071B17576 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Slider.h"; path = "../../../../modules/juce_gui_basics/widgets/juce_Slider.h"; sourceTree = "SOURCE_ROOT"; };
E6B13A51A01032961340735D = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_StringPairArray.cpp"; path = "../../../../modules/juce_core/text/juce_StringPairArray.cpp"; sourceTree = "SOURCE_ROOT"; };
E6C582E67DC0C4D0CCA18166 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ShapeButton.h"; path = "../../../../modules/juce_gui_basics/buttons/juce_ShapeButton.h"; sourceTree = "SOURCE_ROOT"; };
@@ -1809,7 +1813,13 @@
03AB3157D77979CDD2601A86 ); name = properties; sourceTree = ""; };
E4A2262D5F17C9E13403F764 = { isa = PBXGroup; children = (
2F7FE4AA919A66D5EFF65A86,
- 329BD0A0243005D36A444135 ); name = lookandfeel; sourceTree = ""; };
+ 329BD0A0243005D36A444135,
+ E197A55A32B999BDE0A6050F,
+ E58737860E51CD5AD55065B3,
+ 294B94430FBB9DBE99FCF93C,
+ 69B37AE6A1496C705CA20B14,
+ C73EBA3CE1E3B72AF5B106A2,
+ 1CC471FC753878B5DCC08E1A ); name = lookandfeel; sourceTree = ""; };
D529A26C2B113F5DC6DD3571 = { isa = PBXGroup; children = (
5725CB557A7D55CA59E18324,
EC180AD91D1B068D7A8F33BB,
@@ -1908,10 +1918,7 @@
2E7A4C5E41B3BEBC444B5935,
1E868017015269856168EBA1,
D226630AEE6B273B6B1ED622 ); name = embedding; sourceTree = ""; };
- AD533544879D32FDC9647970 = { isa = PBXGroup; children = (
- 8042D0D2B38EBD19652CBA55,
- 896140063D12A19D1DCBF3DF ); name = lookandfeel; sourceTree = ""; };
- E2081DA359B95C05D825E9DB = { isa = PBXGroup; children = (
+ 44437C78DBA92D80635C45E4 = { isa = PBXGroup; children = (
1CCB7B18759F7CEBB065C31E,
0E74D38CAF5F8C914132F4D5,
61941C6E24D2D04F51F59134,
@@ -1928,7 +1935,7 @@
61E83A490FBB38A8D7613146,
476F1E00A832948D22B468C1,
9D042E1CAB03CFCD4B937951 ); name = misc; sourceTree = ""; };
- 6478E04ACFBEA2CBBBE97006 = { isa = PBXGroup; children = (
+ FCF227B0C1009561F3892A3B = { isa = PBXGroup; children = (
3D5DB29BE2D59A93B5516273,
2E02355C7790F4B6EA0CC56E,
DF590CD70352A30FA3BD9835,
@@ -1945,9 +1952,8 @@
0738039F7E5D430630032154,
640482925394FB311FDAB984,
1E1530112868032A2C02F4A4,
- AD533544879D32FDC9647970,
- E2081DA359B95C05D825E9DB,
- 6478E04ACFBEA2CBBBE97006,
+ 44437C78DBA92D80635C45E4,
+ FCF227B0C1009561F3892A3B,
5E12C726C5DBB9C81963FAB5,
A97EC32975392744C62684F9 ); name = "juce_gui_extra"; sourceTree = ""; };
EB8917291F41B7345B13B53E = { isa = PBXGroup; children = (
diff --git a/extras/JuceDemo/Source/MainDemoWindow.cpp b/extras/JuceDemo/Source/MainDemoWindow.cpp
index 3122edb593..98638f3ecd 100644
--- a/extras/JuceDemo/Source/MainDemoWindow.cpp
+++ b/extras/JuceDemo/Source/MainDemoWindow.cpp
@@ -104,8 +104,9 @@ public:
}
else if (menuIndex == 1)
{
- menu.addCommandItem (commandManager, setDefaultLookAndFeel);
- menu.addCommandItem (commandManager, setOldSchoolLookAndFeel);
+ menu.addCommandItem (commandManager, useLookAndFeelV1);
+ menu.addCommandItem (commandManager, useLookAndFeelV2);
+ menu.addCommandItem (commandManager, useLookAndFeelV3);
menu.addSeparator();
menu.addCommandItem (commandManager, useNativeTitleBar);
@@ -200,8 +201,9 @@ public:
showWebBrowser,
showCodeEditor,
showInterprocessComms,
- setDefaultLookAndFeel,
- setOldSchoolLookAndFeel,
+ useLookAndFeelV1,
+ useLookAndFeelV2,
+ useLookAndFeelV3,
useNativeTitleBar
#if JUCE_MAC
, useNativeMenus
@@ -329,14 +331,19 @@ public:
result.setTicked (currentDemoId == showInterprocessComms);
break;
- case setDefaultLookAndFeel:
- result.setInfo ("Use default look-and-feel", String::empty, generalCategory, 0);
- result.setTicked (dynamic_cast (&getLookAndFeel()) == 0);
+ case useLookAndFeelV1:
+ result.setInfo ("Use LookAndFeel_V1", String::empty, generalCategory, 0);
+ result.setTicked (typeid (LookAndFeel_V1) == typeid (getLookAndFeel()));
break;
- case setOldSchoolLookAndFeel:
- result.setInfo ("Use the old, original juce look-and-feel", String::empty, generalCategory, 0);
- result.setTicked (dynamic_cast (&getLookAndFeel()) != 0);
+ case useLookAndFeelV2:
+ result.setInfo ("Use LookAndFeel_V2", String::empty, generalCategory, 0);
+ result.setTicked (typeid (LookAndFeel_V2) == typeid (getLookAndFeel()));
+ break;
+
+ case useLookAndFeelV3:
+ result.setInfo ("Use LookAndFeel_V3", String::empty, generalCategory, 0);
+ result.setTicked (typeid (LookAndFeel_V3) == typeid (getLookAndFeel()));
break;
case useNativeTitleBar:
@@ -458,13 +465,9 @@ public:
currentDemoId = showInterprocessComms;
break;
- case setDefaultLookAndFeel:
- LookAndFeel::setDefaultLookAndFeel (nullptr);
- break;
-
- case setOldSchoolLookAndFeel:
- LookAndFeel::setDefaultLookAndFeel (&oldLookAndFeel);
- break;
+ case useLookAndFeelV1: LookAndFeel::setDefaultLookAndFeel (&lookAndFeelV1); break;
+ case useLookAndFeelV2: LookAndFeel::setDefaultLookAndFeel (&lookAndFeelV2); break;
+ case useLookAndFeelV3: LookAndFeel::setDefaultLookAndFeel (&lookAndFeelV3); break;
case useNativeTitleBar:
mainWindow.setUsingNativeTitleBar (! mainWindow.isUsingNativeTitleBar());
@@ -510,7 +513,9 @@ public:
private:
//==============================================================================
MainDemoWindow& mainWindow;
- OldSchoolLookAndFeel oldLookAndFeel;
+ LookAndFeel_V1 lookAndFeelV1;
+ LookAndFeel_V2 lookAndFeelV2;
+ LookAndFeel_V3 lookAndFeelV3;
ScopedPointer currentDemo;
int currentDemoId;
@@ -553,11 +558,12 @@ private:
showCodeEditor = 0x2013,
showDirectShow = 0x2014,
- setDefaultLookAndFeel = 0x200b,
- setOldSchoolLookAndFeel = 0x200c,
- useNativeTitleBar = 0x200d,
- useNativeMenus = 0x200e,
- goToKioskMode = 0x200f
+ useLookAndFeelV1 = 0x2020,
+ useLookAndFeelV2 = 0x2021,
+ useLookAndFeelV3 = 0x2022,
+ useNativeTitleBar = 0x2023,
+ useNativeMenus = 0x2024,
+ goToKioskMode = 0x2025
};
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ContentComp)
diff --git a/extras/audio plugin demo/Builds/MacOSX/JuceDemoPlugin.xcodeproj/project.pbxproj b/extras/audio plugin demo/Builds/MacOSX/JuceDemoPlugin.xcodeproj/project.pbxproj
index 50262b7865..0ea3687426 100644
--- a/extras/audio plugin demo/Builds/MacOSX/JuceDemoPlugin.xcodeproj/project.pbxproj
+++ b/extras/audio plugin demo/Builds/MacOSX/JuceDemoPlugin.xcodeproj/project.pbxproj
@@ -138,6 +138,7 @@
103FA4C6C505052C818A4829 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AUTimestampGenerator.h; path = Extras/CoreAudio/AudioUnits/AUPublic/Utility/AUTimestampGenerator.h; sourceTree = "DEVELOPER_DIR"; };
104CC5F094E0B3D1D3055D04 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AudioUnitPluginFormat.h"; path = "../../../../modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.h"; sourceTree = "SOURCE_ROOT"; };
10A49DD74F3FB9E69FC989B9 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_JPEGLoader.cpp"; path = "../../../../modules/juce_graphics/image_formats/juce_JPEGLoader.cpp"; sourceTree = "SOURCE_ROOT"; };
+ 10C46E275C321A3974729DA6 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_LookAndFeel_V2.cpp"; path = "../../../../modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp"; sourceTree = "SOURCE_ROOT"; };
1127215528CC4A4A504078BF = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_RenderingHelpers.h"; path = "../../../../modules/juce_graphics/native/juce_RenderingHelpers.h"; sourceTree = "SOURCE_ROOT"; };
115FCA1C09C15AD7EB4AC87C = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_BufferedInputStream.cpp"; path = "../../../../modules/juce_core/streams/juce_BufferedInputStream.cpp"; sourceTree = "SOURCE_ROOT"; };
121FB46FF3426D00B9776611 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ChoicePropertyComponent.h"; path = "../../../../modules/juce_gui_basics/properties/juce_ChoicePropertyComponent.h"; sourceTree = "SOURCE_ROOT"; };
@@ -152,6 +153,7 @@
14A221649E68BA8FD0EADAE7 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_SplashScreen.h"; path = "../../../../modules/juce_gui_extra/misc/juce_SplashScreen.h"; sourceTree = "SOURCE_ROOT"; };
1519F1DAEF1445EEBC1D75DD = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_PropertyComponent.cpp"; path = "../../../../modules/juce_gui_basics/properties/juce_PropertyComponent.cpp"; sourceTree = "SOURCE_ROOT"; };
1588973F0A055D4CF5D44823 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Sampler.h"; path = "../../../../modules/juce_audio_formats/sampler/juce_Sampler.h"; sourceTree = "SOURCE_ROOT"; };
+ 158EE06B4B48E5480FAAB795 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_LookAndFeel_V3.h"; path = "../../../../modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V3.h"; sourceTree = "SOURCE_ROOT"; };
15A4CCD9171AC94932E836D2 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_DropShadowEffect.h"; path = "../../../../modules/juce_graphics/effects/juce_DropShadowEffect.h"; sourceTree = "SOURCE_ROOT"; };
15C711BB78FE9CF9CD9569E8 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FileDragAndDropTarget.h"; path = "../../../../modules/juce_gui_basics/mouse/juce_FileDragAndDropTarget.h"; sourceTree = "SOURCE_ROOT"; };
16628E0BBD62134897747ED4 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_DrawableImage.h"; path = "../../../../modules/juce_gui_basics/drawables/juce_DrawableImage.h"; sourceTree = "SOURCE_ROOT"; };
@@ -168,7 +170,6 @@
19D63B88BE3B2620D7EB8489 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_audio_processors.h"; path = "../../../../modules/juce_audio_processors/juce_audio_processors.h"; sourceTree = "SOURCE_ROOT"; };
19F3E1F0B144D48016FDF6C0 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_NamedValueSet.cpp"; path = "../../../../modules/juce_core/containers/juce_NamedValueSet.cpp"; sourceTree = "SOURCE_ROOT"; };
19FE75EF12C18CF52D11D37E = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_mac_NSViewComponent.mm"; path = "../../../../modules/juce_gui_extra/native/juce_mac_NSViewComponent.mm"; sourceTree = "SOURCE_ROOT"; };
- 1A487CF48178F86FFF3E0EE9 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_OldSchoolLookAndFeel.cpp"; path = "../../../../modules/juce_gui_extra/lookandfeel/juce_OldSchoolLookAndFeel.cpp"; sourceTree = "SOURCE_ROOT"; };
1A842FCA201F57BF276F5F19 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_CoreAudioFormat.h"; path = "../../../../modules/juce_audio_formats/codecs/juce_CoreAudioFormat.h"; sourceTree = "SOURCE_ROOT"; };
1AA472D8429FFDFBE7CD01BD = { isa = PBXFileReference; lastKnownFileType = file; name = "juce_module_info"; path = "../../../../modules/juce_audio_basics/juce_module_info"; sourceTree = "SOURCE_ROOT"; };
1B2CE3B669D290A88A797C1A = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_NativeMessageBox.h"; path = "../../../../modules/juce_gui_basics/windows/juce_NativeMessageBox.h"; sourceTree = "SOURCE_ROOT"; };
@@ -189,7 +190,6 @@
1E496F7BF3B3C59E5ECACCDE = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_VST_Wrapper.cpp"; path = "../../../../modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp"; sourceTree = "SOURCE_ROOT"; };
1E4CD6428BE6C12C54575EC2 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_StretchableObjectResizer.cpp"; path = "../../../../modules/juce_gui_basics/layout/juce_StretchableObjectResizer.cpp"; sourceTree = "SOURCE_ROOT"; };
1EC0F9F4EC617BA4C2217C2C = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_AsyncUpdater.cpp"; path = "../../../../modules/juce_events/broadcasters/juce_AsyncUpdater.cpp"; sourceTree = "SOURCE_ROOT"; };
- 1EFE70BA92D9C9771384F6EB = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_OldSchoolLookAndFeel.h"; path = "../../../../modules/juce_gui_extra/lookandfeel/juce_OldSchoolLookAndFeel.h"; sourceTree = "SOURCE_ROOT"; };
1F60FF59922FECB5CD789D48 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_PNGLoader.cpp"; path = "../../../../modules/juce_graphics/image_formats/juce_PNGLoader.cpp"; sourceTree = "SOURCE_ROOT"; };
1FBFF2D9043296E1E09DE156 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_BigInteger.cpp"; path = "../../../../modules/juce_core/maths/juce_BigInteger.cpp"; sourceTree = "SOURCE_ROOT"; };
201F62BBDF90DC3F1C9684C3 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_FileOutputStream.cpp"; path = "../../../../modules/juce_core/files/juce_FileOutputStream.cpp"; sourceTree = "SOURCE_ROOT"; };
@@ -225,6 +225,7 @@
2AA92DC1171DAF0BA4BB0E63 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_audio_formats.h"; path = "../../../../modules/juce_audio_formats/juce_audio_formats.h"; sourceTree = "SOURCE_ROOT"; };
2B2D54521D69CF4407471A56 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = AUBase.cpp; path = Extras/CoreAudio/AudioUnits/AUPublic/AUBase/AUBase.cpp; sourceTree = "DEVELOPER_DIR"; };
2BEBB7EB22A689648A381ECA = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_TabbedComponent.cpp"; path = "../../../../modules/juce_gui_basics/layout/juce_TabbedComponent.cpp"; sourceTree = "SOURCE_ROOT"; };
+ 2CAFB89BC62E47429CC04AEA = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_LookAndFeel_V1.cpp"; path = "../../../../modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V1.cpp"; sourceTree = "SOURCE_ROOT"; };
2D4B766DA1C66FA2857D80F7 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_RTAS_DigiCode3.cpp"; path = "../../../../modules/juce_audio_plugin_client/RTAS/juce_RTAS_DigiCode3.cpp"; sourceTree = "SOURCE_ROOT"; };
2D799F4BCA83847DEACB505D = { isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Info.plist; sourceTree = "SOURCE_ROOT"; };
2E19A0C6793FD28085F7A256 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = AUMIDIBase.cpp; path = Extras/CoreAudio/AudioUnits/AUPublic/OtherBases/AUMIDIBase.cpp; sourceTree = "DEVELOPER_DIR"; };
@@ -347,12 +348,14 @@
4F54F099B1373706B52E5774 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_PluginDescription.cpp"; path = "../../../../modules/juce_audio_processors/processors/juce_PluginDescription.cpp"; sourceTree = "SOURCE_ROOT"; };
4F790401362D3F12680B726E = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Slider.cpp"; path = "../../../../modules/juce_gui_basics/widgets/juce_Slider.cpp"; sourceTree = "SOURCE_ROOT"; };
4FB58D47EA973CA9529AF6A9 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_TemporaryFile.cpp"; path = "../../../../modules/juce_core/files/juce_TemporaryFile.cpp"; sourceTree = "SOURCE_ROOT"; };
+ 4FCB6E7A042E17CEC055BE75 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_LookAndFeel_V1.h"; path = "../../../../modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V1.h"; sourceTree = "SOURCE_ROOT"; };
4FD86B7C71BEC7627C40B694 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ChannelRemappingAudioSource.h"; path = "../../../../modules/juce_audio_basics/sources/juce_ChannelRemappingAudioSource.h"; sourceTree = "SOURCE_ROOT"; };
4FF264791CA989D4CFD083F3 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_KeyPressMappingSet.cpp"; path = "../../../../modules/juce_gui_basics/commands/juce_KeyPressMappingSet.cpp"; sourceTree = "SOURCE_ROOT"; };
50832A0FAB3B736F1AD5E693 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AnimatedPosition.h"; path = "../../../../modules/juce_gui_basics/layout/juce_AnimatedPosition.h"; sourceTree = "SOURCE_ROOT"; };
508D1DF2D93C6F05EE75EDE8 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_DrawableRectangle.h"; path = "../../../../modules/juce_gui_basics/drawables/juce_DrawableRectangle.h"; sourceTree = "SOURCE_ROOT"; };
50F1E35F917489F92521D617 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ResizableCornerComponent.cpp"; path = "../../../../modules/juce_gui_basics/layout/juce_ResizableCornerComponent.cpp"; sourceTree = "SOURCE_ROOT"; };
513637A8BE7D94200DCBD1F2 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_LowLevelGraphicsContext.h"; path = "../../../../modules/juce_graphics/contexts/juce_LowLevelGraphicsContext.h"; sourceTree = "SOURCE_ROOT"; };
+ 513BA2176B24BC61831B58FD = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_LookAndFeel_V2.h"; path = "../../../../modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.h"; sourceTree = "SOURCE_ROOT"; };
519C6BF83160A6B581905C58 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AUOutputElement.h; path = Extras/CoreAudio/AudioUnits/AUPublic/AUBase/AUOutputElement.h; sourceTree = "DEVELOPER_DIR"; };
522D22FEB38D52304F01508D = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_TooltipClient.h"; path = "../../../../modules/juce_gui_basics/mouse/juce_TooltipClient.h"; sourceTree = "SOURCE_ROOT"; };
525EF648F69C3D42DA9B06E3 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_mac_AudioCDBurner.mm"; path = "../../../../modules/juce_audio_devices/native/juce_mac_AudioCDBurner.mm"; sourceTree = "SOURCE_ROOT"; };
@@ -943,6 +946,7 @@
FE0B9D0C5E9B31DF6B7E3616 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_RelativeRectangle.cpp"; path = "../../../../modules/juce_gui_basics/positioning/juce_RelativeRectangle.cpp"; sourceTree = "SOURCE_ROOT"; };
FE3BB21C1A01E682BE4157F8 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_WildcardFileFilter.h"; path = "../../../../modules/juce_gui_basics/filebrowser/juce_WildcardFileFilter.h"; sourceTree = "SOURCE_ROOT"; };
FE7BF03E997B68345D812C18 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ComponentDragger.h"; path = "../../../../modules/juce_gui_basics/mouse/juce_ComponentDragger.h"; sourceTree = "SOURCE_ROOT"; };
+ FEDF58985DBA59E34FC99B20 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_LookAndFeel_V3.cpp"; path = "../../../../modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V3.cpp"; sourceTree = "SOURCE_ROOT"; };
FF25FC2D49382DCBDB76BC48 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_SystemTrayIconComponent.h"; path = "../../../../modules/juce_gui_extra/misc/juce_SystemTrayIconComponent.h"; sourceTree = "SOURCE_ROOT"; };
FF443F140558EBF4EE8819F9 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_CodeEditorComponent.cpp"; path = "../../../../modules/juce_gui_extra/code_editor/juce_CodeEditorComponent.cpp"; sourceTree = "SOURCE_ROOT"; };
FFB44C10D77D4B9DCA431C69 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FileSearchPath.h"; path = "../../../../modules/juce_core/files/juce_FileSearchPath.h"; sourceTree = "SOURCE_ROOT"; };
@@ -1782,7 +1786,13 @@
470E16E41C4A2F1ADADAFE52 ); name = properties; sourceTree = ""; };
01B04245386FBFD1BAA2EB47 = { isa = PBXGroup; children = (
E0EE8480E1438F1521ABC0DB,
- DFF33C1951C79E101D905003 ); name = lookandfeel; sourceTree = ""; };
+ DFF33C1951C79E101D905003,
+ 2CAFB89BC62E47429CC04AEA,
+ 4FCB6E7A042E17CEC055BE75,
+ 10C46E275C321A3974729DA6,
+ 513BA2176B24BC61831B58FD,
+ FEDF58985DBA59E34FC99B20,
+ 158EE06B4B48E5480FAAB795 ); name = lookandfeel; sourceTree = ""; };
16B033C5A8508A526D64FD94 = { isa = PBXGroup; children = (
538BF18F9D29A2A60EF6A6CE,
29917AAA580F21BF2798D071,
@@ -1881,10 +1891,7 @@
A11F51909BE2463C28099C0B,
BCB54D2E4C0C3357DACFD29B,
FABC846A7451773CA5FEDA13 ); name = embedding; sourceTree = ""; };
- 35BF6F4F89C85C16173ACB32 = { isa = PBXGroup; children = (
- 1A487CF48178F86FFF3E0EE9,
- 1EFE70BA92D9C9771384F6EB ); name = lookandfeel; sourceTree = ""; };
- 15F185E0F6AB1F1B887AEB5D = { isa = PBXGroup; children = (
+ A4D5C22EAEECE5134B247F54 = { isa = PBXGroup; children = (
7CAABF65B56BE6A4529B2513,
A31CE7177BF947DB60F72D94,
598E9C9D95393B4E4699CF0B,
@@ -1901,7 +1908,7 @@
81766EF7DB6CE1CB01017097,
FF25FC2D49382DCBDB76BC48,
C4BC9568B31F3E7EC4C3C7E6 ); name = misc; sourceTree = ""; };
- 236EF0A98CB51A9FDF1CE5E8 = { isa = PBXGroup; children = (
+ B544D64863CF5CC0B4E0980E = { isa = PBXGroup; children = (
F80CC5FB6425D6B5DD1BBC59,
219FBFE9990AA2ACA2F15FC1,
C2C92FCE31284C0292F55427,
@@ -1918,9 +1925,8 @@
B2B055337E596E2DAA7D427C,
F430D956469E7E4528571CD8,
303B6B606A73D0F37EB9C4F0,
- 35BF6F4F89C85C16173ACB32,
- 15F185E0F6AB1F1B887AEB5D,
- 236EF0A98CB51A9FDF1CE5E8,
+ A4D5C22EAEECE5134B247F54,
+ B544D64863CF5CC0B4E0980E,
91B2EAD28E322C2F365FF975,
7997E4EB2706B00B44880412 ); name = "juce_gui_extra"; sourceTree = ""; };
C6C3D10F6A56842C3125D633 = { isa = PBXGroup; children = (
diff --git a/extras/audio plugin demo/Builds/VisualStudio2005/JuceDemoPlugin.vcproj b/extras/audio plugin demo/Builds/VisualStudio2005/JuceDemoPlugin.vcproj
index 999eeb256e..d4ceeae5a6 100644
--- a/extras/audio plugin demo/Builds/VisualStudio2005/JuceDemoPlugin.vcproj
+++ b/extras/audio plugin demo/Builds/VisualStudio2005/JuceDemoPlugin.vcproj
@@ -3715,6 +3715,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -4094,19 +4127,6 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/extras/audio plugin demo/Builds/VisualStudio2008/JuceDemoPlugin.vcproj b/extras/audio plugin demo/Builds/VisualStudio2008/JuceDemoPlugin.vcproj
index 606abedfaa..54045ff118 100644
--- a/extras/audio plugin demo/Builds/VisualStudio2008/JuceDemoPlugin.vcproj
+++ b/extras/audio plugin demo/Builds/VisualStudio2008/JuceDemoPlugin.vcproj
@@ -3715,6 +3715,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -4094,19 +4127,6 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/extras/audio plugin host/Builds/MacOSX/Plugin Host.xcodeproj/project.pbxproj b/extras/audio plugin host/Builds/MacOSX/Plugin Host.xcodeproj/project.pbxproj
index 086e787bf8..d5b6ff73dd 100644
--- a/extras/audio plugin host/Builds/MacOSX/Plugin Host.xcodeproj/project.pbxproj
+++ b/extras/audio plugin host/Builds/MacOSX/Plugin Host.xcodeproj/project.pbxproj
@@ -83,6 +83,7 @@
0AFC098702827D38DA03BB73 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_TextInputTarget.h"; path = "../../../../modules/juce_gui_basics/keyboard/juce_TextInputTarget.h"; sourceTree = "SOURCE_ROOT"; };
0B05D046FF5FA8809CF40CFF = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ComponentBoundsConstrainer.cpp"; path = "../../../../modules/juce_gui_basics/layout/juce_ComponentBoundsConstrainer.cpp"; sourceTree = "SOURCE_ROOT"; };
0B26889F06B1E816BC12D40D = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_linux_Windowing.cpp"; path = "../../../../modules/juce_gui_basics/native/juce_linux_Windowing.cpp"; sourceTree = "SOURCE_ROOT"; };
+ 0B36A9CD1921659BA8DA8577 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_LookAndFeel_V3.h"; path = "../../../../modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V3.h"; sourceTree = "SOURCE_ROOT"; };
0B7FC2052DC952A2080D9535 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_DrawableButton.cpp"; path = "../../../../modules/juce_gui_basics/buttons/juce_DrawableButton.cpp"; sourceTree = "SOURCE_ROOT"; };
0BD19EFE55728A56EB3EE5C5 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Value.h"; path = "../../../../modules/juce_data_structures/values/juce_Value.h"; sourceTree = "SOURCE_ROOT"; };
0C339E5B52835F87ABD2BF95 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Thread.cpp"; path = "../../../../modules/juce_core/threads/juce_Thread.cpp"; sourceTree = "SOURCE_ROOT"; };
@@ -143,7 +144,6 @@
1B6A039FE3A63210FC1936D2 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_audio_formats.h"; path = "../../../../modules/juce_audio_formats/juce_audio_formats.h"; sourceTree = "SOURCE_ROOT"; };
1C1943E3582BA78117F881B3 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_mac_QuickTimeMovieComponent.mm"; path = "../../../../modules/juce_video/native/juce_mac_QuickTimeMovieComponent.mm"; sourceTree = "SOURCE_ROOT"; };
1C4E46D37FD0A75012D27F18 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_DrawableRectangle.cpp"; path = "../../../../modules/juce_gui_basics/drawables/juce_DrawableRectangle.cpp"; sourceTree = "SOURCE_ROOT"; };
- 1C730D0CE68930D4154AA73F = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_OldSchoolLookAndFeel.cpp"; path = "../../../../modules/juce_gui_extra/lookandfeel/juce_OldSchoolLookAndFeel.cpp"; sourceTree = "SOURCE_ROOT"; };
1C9A92B8262F5780FB04EEE9 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_DirectoryContentsList.h"; path = "../../../../modules/juce_gui_basics/filebrowser/juce_DirectoryContentsList.h"; sourceTree = "SOURCE_ROOT"; };
1CBCE7A7D4723D88F4A7CEB2 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_InterprocessConnection.h"; path = "../../../../modules/juce_events/interprocess/juce_InterprocessConnection.h"; sourceTree = "SOURCE_ROOT"; };
1D031D6259B6620760ACD1A1 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Application.h"; path = "../../../../modules/juce_gui_basics/application/juce_Application.h"; sourceTree = "SOURCE_ROOT"; };
@@ -160,6 +160,7 @@
1FDCB594D94782C879005BF7 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_mac_CarbonViewWrapperComponent.h"; path = "../../../../modules/juce_gui_extra/native/juce_mac_CarbonViewWrapperComponent.h"; sourceTree = "SOURCE_ROOT"; };
207C876A93611B390835E9AE = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_AbstractFifo.cpp"; path = "../../../../modules/juce_core/containers/juce_AbstractFifo.cpp"; sourceTree = "SOURCE_ROOT"; };
211E522AB68EFF013607E737 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_AudioDeviceSelectorComponent.cpp"; path = "../../../../modules/juce_audio_utils/gui/juce_AudioDeviceSelectorComponent.cpp"; sourceTree = "SOURCE_ROOT"; };
+ 2133298538ECFED56C3EBC9B = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_LookAndFeel_V1.cpp"; path = "../../../../modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V1.cpp"; sourceTree = "SOURCE_ROOT"; };
215B120156B822291476B0A1 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FileInputStream.h"; path = "../../../../modules/juce_core/files/juce_FileInputStream.h"; sourceTree = "SOURCE_ROOT"; };
21706F4B9B65E7715A598F27 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_SystemStats.cpp"; path = "../../../../modules/juce_core/system/juce_SystemStats.cpp"; sourceTree = "SOURCE_ROOT"; };
2176F72FC750E8376E696CAF = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_OptionalScopedPointer.h"; path = "../../../../modules/juce_core/memory/juce_OptionalScopedPointer.h"; sourceTree = "SOURCE_ROOT"; };
@@ -507,6 +508,7 @@
8A2CC00AD83204B6A448BD0C = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_FilenameComponent.cpp"; path = "../../../../modules/juce_gui_basics/filebrowser/juce_FilenameComponent.cpp"; sourceTree = "SOURCE_ROOT"; };
8A4FF1BDC954581622F65942 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_CallOutBox.h"; path = "../../../../modules/juce_gui_basics/windows/juce_CallOutBox.h"; sourceTree = "SOURCE_ROOT"; };
8ABD0FB2EC361F77759F54D5 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_PropertySet.cpp"; path = "../../../../modules/juce_core/containers/juce_PropertySet.cpp"; sourceTree = "SOURCE_ROOT"; };
+ 8B3064F8C6E1E56B249CA6C9 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_LookAndFeel_V2.h"; path = "../../../../modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.h"; sourceTree = "SOURCE_ROOT"; };
8B9FDF0245BB8A4AA9996C3C = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Synthesiser.h"; path = "../../../../modules/juce_audio_basics/synthesisers/juce_Synthesiser.h"; sourceTree = "SOURCE_ROOT"; };
8BA1AF085755958342C9213A = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_OpenGLPixelFormat.h"; path = "../../../../modules/juce_opengl/opengl/juce_OpenGLPixelFormat.h"; sourceTree = "SOURCE_ROOT"; };
8BD050801C810B95634B6326 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_OwnedArray.h"; path = "../../../../modules/juce_core/containers/juce_OwnedArray.h"; sourceTree = "SOURCE_ROOT"; };
@@ -761,7 +763,6 @@
D41EA1E6002DE5DEB9A07CAA = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ComponentPeer.h"; path = "../../../../modules/juce_gui_basics/windows/juce_ComponentPeer.h"; sourceTree = "SOURCE_ROOT"; };
D4DA13E7A12FB69C072D0FA7 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ShapeButton.cpp"; path = "../../../../modules/juce_gui_basics/buttons/juce_ShapeButton.cpp"; sourceTree = "SOURCE_ROOT"; };
D4EBC17BDB7F88CCBC76730B = { isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
- D579AF76963B677C425CBF00 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_OldSchoolLookAndFeel.h"; path = "../../../../modules/juce_gui_extra/lookandfeel/juce_OldSchoolLookAndFeel.h"; sourceTree = "SOURCE_ROOT"; };
D5952905FC386C19D0818398 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_JPEGLoader.cpp"; path = "../../../../modules/juce_graphics/image_formats/juce_JPEGLoader.cpp"; sourceTree = "SOURCE_ROOT"; };
D5C074653417ED69A2B570AC = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_audio_processors.mm"; path = "../../../../modules/juce_audio_processors/juce_audio_processors.mm"; sourceTree = "SOURCE_ROOT"; };
D7433453EBB3700D2805FF42 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_XmlDocument.h"; path = "../../../../modules/juce_core/xml/juce_XmlDocument.h"; sourceTree = "SOURCE_ROOT"; };
@@ -772,6 +773,7 @@
D8A3F086596562E081EB0F39 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AudioFormatManager.h"; path = "../../../../modules/juce_audio_formats/format/juce_AudioFormatManager.h"; sourceTree = "SOURCE_ROOT"; };
D8B7DCDFD32613B13AC54008 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_LookAndFeel.cpp"; path = "../../../../modules/juce_gui_basics/lookandfeel/juce_LookAndFeel.cpp"; sourceTree = "SOURCE_ROOT"; };
D8C28108DE7AD0208D790606 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ProgressBar.cpp"; path = "../../../../modules/juce_gui_basics/widgets/juce_ProgressBar.cpp"; sourceTree = "SOURCE_ROOT"; };
+ D8E9881F48E0A32121A9E84B = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_LookAndFeel_V2.cpp"; path = "../../../../modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp"; sourceTree = "SOURCE_ROOT"; };
D92D579F2458F2426E5F828A = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ScopedWriteLock.h"; path = "../../../../modules/juce_core/threads/juce_ScopedWriteLock.h"; sourceTree = "SOURCE_ROOT"; };
D950776EDF9260DB0278C132 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_SliderPropertyComponent.cpp"; path = "../../../../modules/juce_gui_basics/properties/juce_SliderPropertyComponent.cpp"; sourceTree = "SOURCE_ROOT"; };
D9857957A36A3081186D53FC = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_android_CameraDevice.cpp"; path = "../../../../modules/juce_video/native/juce_android_CameraDevice.cpp"; sourceTree = "SOURCE_ROOT"; };
@@ -853,6 +855,7 @@
EADDAF5C98DBB22E5EC52A3E = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Path.h"; path = "../../../../modules/juce_graphics/geometry/juce_Path.h"; sourceTree = "SOURCE_ROOT"; };
EB0AAC967E485ED8F3397E4F = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ColourSelector.cpp"; path = "../../../../modules/juce_gui_extra/misc/juce_ColourSelector.cpp"; sourceTree = "SOURCE_ROOT"; };
EB483815A529FAF11907FC6F = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_RecentlyOpenedFilesList.cpp"; path = "../../../../modules/juce_gui_extra/misc/juce_RecentlyOpenedFilesList.cpp"; sourceTree = "SOURCE_ROOT"; };
+ EB7A04549EB9E1B5BF31647D = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_LookAndFeel_V1.h"; path = "../../../../modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V1.h"; sourceTree = "SOURCE_ROOT"; };
EC8A477FEDA0FEDA62A7E0C9 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_LowLevelGraphicsSoftwareRenderer.cpp"; path = "../../../../modules/juce_graphics/contexts/juce_LowLevelGraphicsSoftwareRenderer.cpp"; sourceTree = "SOURCE_ROOT"; };
ECF521248AFFE80858112E0B = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ScrollBar.h"; path = "../../../../modules/juce_gui_basics/layout/juce_ScrollBar.h"; sourceTree = "SOURCE_ROOT"; };
ED1CF17303ACA9101DBF7D18 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_PositionableAudioSource.h"; path = "../../../../modules/juce_audio_basics/sources/juce_PositionableAudioSource.h"; sourceTree = "SOURCE_ROOT"; };
@@ -879,6 +882,7 @@
F50F348D6727D72B32538B18 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ContainerDeletePolicy.h"; path = "../../../../modules/juce_core/memory/juce_ContainerDeletePolicy.h"; sourceTree = "SOURCE_ROOT"; };
F52176A07E24A5CC91D03A9F = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_android_GraphicsContext.cpp"; path = "../../../../modules/juce_graphics/native/juce_android_GraphicsContext.cpp"; sourceTree = "SOURCE_ROOT"; };
F52AF269A66132FFEC566C7B = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_DirectShowComponent.h"; path = "../../../../modules/juce_video/playback/juce_DirectShowComponent.h"; sourceTree = "SOURCE_ROOT"; };
+ F62FDD92B106245BB2C740F9 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_LookAndFeel_V3.cpp"; path = "../../../../modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V3.cpp"; sourceTree = "SOURCE_ROOT"; };
F641B60F8AE931E3B660A842 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_SortedSet.h"; path = "../../../../modules/juce_core/containers/juce_SortedSet.h"; sourceTree = "SOURCE_ROOT"; };
F66DF7F30ADE40EEEE6E15B7 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_linux_WebBrowserComponent.cpp"; path = "../../../../modules/juce_gui_extra/native/juce_linux_WebBrowserComponent.cpp"; sourceTree = "SOURCE_ROOT"; };
F69282947987DE2626D23C52 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_cryptography.mm"; path = "../../../../modules/juce_cryptography/juce_cryptography.mm"; sourceTree = "SOURCE_ROOT"; };
@@ -1740,7 +1744,13 @@
9647232A743A0C7BFE819385 ); name = properties; sourceTree = ""; };
5C692DFEB89A20508FD122F4 = { isa = PBXGroup; children = (
D8B7DCDFD32613B13AC54008,
- 3CACA414AFB108D5D97D2905 ); name = lookandfeel; sourceTree = ""; };
+ 3CACA414AFB108D5D97D2905,
+ 2133298538ECFED56C3EBC9B,
+ EB7A04549EB9E1B5BF31647D,
+ D8E9881F48E0A32121A9E84B,
+ 8B3064F8C6E1E56B249CA6C9,
+ F62FDD92B106245BB2C740F9,
+ 0B36A9CD1921659BA8DA8577 ); name = lookandfeel; sourceTree = ""; };
160B7FAD218C3AA1166C3343 = { isa = PBXGroup; children = (
51E8F7D6F96EA20F374FD4E9,
518475EC1518D59F4BBB64C6,
@@ -1839,10 +1849,7 @@
AE77174CBCCD8ED980D37836,
382380170B8E1B0FF39435F4,
5085F1038F87BFFE07A491C4 ); name = embedding; sourceTree = ""; };
- ABFFEBE376F32596B10BE82F = { isa = PBXGroup; children = (
- 1C730D0CE68930D4154AA73F,
- D579AF76963B677C425CBF00 ); name = lookandfeel; sourceTree = ""; };
- E08ABD60E36AA9DE7B659993 = { isa = PBXGroup; children = (
+ 4700EB1C9B14BBA22B871A1E = { isa = PBXGroup; children = (
A30AE6BCB8C3947B097DA340,
B87839FF32E9244397D28862,
043393B6262698FFD549A24A,
@@ -1859,7 +1866,7 @@
3E6CE883D9CE0661C39F5BAB,
813F42FA0CDB76C5150A482E,
AD84F6A526784CB531FB2455 ); name = misc; sourceTree = ""; };
- 7BC1B7739872AA97A43D31FE = { isa = PBXGroup; children = (
+ D06FFD6E422879ABC06B5933 = { isa = PBXGroup; children = (
CF299925A6A365E288DC206E,
940A181A1BAC2FA88FB5A3B3,
DF614EDBEA2D76889E002465,
@@ -1876,9 +1883,8 @@
822BE1CCF036C0154376D9CC,
1585F98304BC113EA3FBA591,
E3D8BED92AD41057CAEB051F,
- ABFFEBE376F32596B10BE82F,
- E08ABD60E36AA9DE7B659993,
- 7BC1B7739872AA97A43D31FE,
+ 4700EB1C9B14BBA22B871A1E,
+ D06FFD6E422879ABC06B5933,
016748F561B0B5046F24DDA0,
923E4322525FD5CCAA5F911B ); name = "juce_gui_extra"; sourceTree = ""; };
E23F6FDE88C4164420DC07F6 = { isa = PBXGroup; children = (
diff --git a/extras/audio plugin host/Builds/VisualStudio2010/Plugin Host.vcxproj b/extras/audio plugin host/Builds/VisualStudio2010/Plugin Host.vcxproj
index 1daa715b53..e836cc22d1 100644
--- a/extras/audio plugin host/Builds/VisualStudio2010/Plugin Host.vcxproj
+++ b/extras/audio plugin host/Builds/VisualStudio2010/Plugin Host.vcxproj
@@ -1029,6 +1029,15 @@
true
+
+ true
+
+
+ true
+
+
+ true
+
true
@@ -1122,9 +1131,6 @@
true
-
- true
-
true
@@ -1587,6 +1593,9 @@
+
+
+
@@ -1620,7 +1629,6 @@
-
diff --git a/extras/audio plugin host/Builds/VisualStudio2010/Plugin Host.vcxproj.filters b/extras/audio plugin host/Builds/VisualStudio2010/Plugin Host.vcxproj.filters
index 102aa56993..ef5fab1c3d 100644
--- a/extras/audio plugin host/Builds/VisualStudio2010/Plugin Host.vcxproj.filters
+++ b/extras/audio plugin host/Builds/VisualStudio2010/Plugin Host.vcxproj.filters
@@ -269,9 +269,6 @@
{61B2920C-494D-D8CB-C0C7-5DBF3D76D164}
-
- {4980B18D-FEDE-B773-F254-E3B5207D81F0}
-
{66C9B809-8739-A217-C78D-A15D6089B8E3}
@@ -1252,6 +1249,15 @@
Juce Modules\juce_gui_basics\lookandfeel
+
+ Juce Modules\juce_gui_basics\lookandfeel
+
+
+ Juce Modules\juce_gui_basics\lookandfeel
+
+
+ Juce Modules\juce_gui_basics\lookandfeel
+
Juce Modules\juce_gui_basics\filebrowser
@@ -1366,9 +1372,6 @@
Juce Modules\juce_gui_extra\documents
-
- Juce Modules\juce_gui_extra\lookandfeel
-
Juce Modules\juce_gui_extra\misc
@@ -2613,6 +2616,15 @@
Juce Modules\juce_gui_basics\lookandfeel
+
+ Juce Modules\juce_gui_basics\lookandfeel
+
+
+ Juce Modules\juce_gui_basics\lookandfeel
+
+
+ Juce Modules\juce_gui_basics\lookandfeel
+
Juce Modules\juce_gui_basics\filebrowser
@@ -2712,9 +2724,6 @@
Juce Modules\juce_gui_extra\embedding
-
- Juce Modules\juce_gui_extra\lookandfeel
-
Juce Modules\juce_gui_extra\misc
diff --git a/extras/example projects/Builds/MacOSX/HelloWorld.xcodeproj/project.pbxproj b/extras/example projects/Builds/MacOSX/HelloWorld.xcodeproj/project.pbxproj
index 32257c3b90..08e0a8fc5b 100644
--- a/extras/example projects/Builds/MacOSX/HelloWorld.xcodeproj/project.pbxproj
+++ b/extras/example projects/Builds/MacOSX/HelloWorld.xcodeproj/project.pbxproj
@@ -204,6 +204,7 @@
47BB119E08A7A1A468564B9D = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_linux_Windowing.cpp"; path = "../../../../modules/juce_gui_basics/native/juce_linux_Windowing.cpp"; sourceTree = "SOURCE_ROOT"; };
47D12441679F0062EB7C96AF = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_BasicNativeHeaders.h"; path = "../../../../modules/juce_core/native/juce_BasicNativeHeaders.h"; sourceTree = "SOURCE_ROOT"; };
48D212A6051005FB7A4BC338 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ImageFileFormat.cpp"; path = "../../../../modules/juce_graphics/images/juce_ImageFileFormat.cpp"; sourceTree = "SOURCE_ROOT"; };
+ 492FBEED85D887CC01080068 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_LookAndFeel_V2.h"; path = "../../../../modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.h"; sourceTree = "SOURCE_ROOT"; };
495652C9E6B06C891281D040 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_PreferencesPanel.h"; path = "../../../../modules/juce_gui_extra/misc/juce_PreferencesPanel.h"; sourceTree = "SOURCE_ROOT"; };
4961AA10B3563523AE1B0BFE = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FileChooserDialogBox.h"; path = "../../../../modules/juce_gui_basics/filebrowser/juce_FileChooserDialogBox.h"; sourceTree = "SOURCE_ROOT"; };
498778ED99DF1BA68A6E3A18 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_XmlDocument.cpp"; path = "../../../../modules/juce_core/xml/juce_XmlDocument.cpp"; sourceTree = "SOURCE_ROOT"; };
@@ -211,12 +212,12 @@
4A20547D0C763ABB1DE5A9C4 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Slider.h"; path = "../../../../modules/juce_gui_basics/widgets/juce_Slider.h"; sourceTree = "SOURCE_ROOT"; };
4A5ED88CC2ED6ADD8A5B102A = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Result.h"; path = "../../../../modules/juce_core/misc/juce_Result.h"; sourceTree = "SOURCE_ROOT"; };
4A8C64BB96FB93919DDF2166 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_ios_MessageManager.mm"; path = "../../../../modules/juce_events/native/juce_ios_MessageManager.mm"; sourceTree = "SOURCE_ROOT"; };
+ 4AA6BD2A3FDFADDCB0322F9C = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_LookAndFeel_V3.cpp"; path = "../../../../modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V3.cpp"; sourceTree = "SOURCE_ROOT"; };
4C34CB4DC542D86A193C055A = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_RenderingHelpers.h"; path = "../../../../modules/juce_graphics/native/juce_RenderingHelpers.h"; sourceTree = "SOURCE_ROOT"; };
4CC331BEE18B3EC4BADF38CE = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Colours.h"; path = "../../../../modules/juce_graphics/colour/juce_Colours.h"; sourceTree = "SOURCE_ROOT"; };
4D44E9AD19469774ED8245B2 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_CodeEditorComponent.cpp"; path = "../../../../modules/juce_gui_extra/code_editor/juce_CodeEditorComponent.cpp"; sourceTree = "SOURCE_ROOT"; };
4D6C90354134741F7F295412 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_DirectoryContentsDisplayComponent.cpp"; path = "../../../../modules/juce_gui_basics/filebrowser/juce_DirectoryContentsDisplayComponent.cpp"; sourceTree = "SOURCE_ROOT"; };
4DD07E53E4ABDE534D34981E = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_HyperlinkButton.h"; path = "../../../../modules/juce_gui_basics/buttons/juce_HyperlinkButton.h"; sourceTree = "SOURCE_ROOT"; };
- 4E070ED86B9A6F220123EBEB = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_OldSchoolLookAndFeel.h"; path = "../../../../modules/juce_gui_extra/lookandfeel/juce_OldSchoolLookAndFeel.h"; sourceTree = "SOURCE_ROOT"; };
4E1058572E25FD04B7D60700 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_ios_Windowing.mm"; path = "../../../../modules/juce_gui_basics/native/juce_ios_Windowing.mm"; sourceTree = "SOURCE_ROOT"; };
4E2E741BA1779C70049641D0 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Image.cpp"; path = "../../../../modules/juce_graphics/images/juce_Image.cpp"; sourceTree = "SOURCE_ROOT"; };
4FF67CE1DFACAFF545D8E9AA = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_GraphicsContext.cpp"; path = "../../../../modules/juce_graphics/contexts/juce_GraphicsContext.cpp"; sourceTree = "SOURCE_ROOT"; };
@@ -311,6 +312,7 @@
71D7F3CED9D84ECF00E3C7DF = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_DrawableShape.cpp"; path = "../../../../modules/juce_gui_basics/drawables/juce_DrawableShape.cpp"; sourceTree = "SOURCE_ROOT"; };
71D8C3F48801BEF5DB86B619 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ModalComponentManager.h"; path = "../../../../modules/juce_gui_basics/components/juce_ModalComponentManager.h"; sourceTree = "SOURCE_ROOT"; };
71EA769D5757AB3B16E5E6E6 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_InterprocessConnectionServer.cpp"; path = "../../../../modules/juce_events/interprocess/juce_InterprocessConnectionServer.cpp"; sourceTree = "SOURCE_ROOT"; };
+ 7224FBF6C8769342A0E3AC71 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_LookAndFeel_V3.h"; path = "../../../../modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V3.h"; sourceTree = "SOURCE_ROOT"; };
732EB7C9CF8E817B7239DBA1 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_TreeView.h"; path = "../../../../modules/juce_gui_basics/widgets/juce_TreeView.h"; sourceTree = "SOURCE_ROOT"; };
7402FA767F4FD9CCD3DD1578 = { isa = PBXFileReference; lastKnownFileType = file; name = "juce_module_info"; path = "../../../../modules/juce_graphics/juce_module_info"; sourceTree = "SOURCE_ROOT"; };
744475CFFBA91FDA03DDF659 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_CPlusPlusCodeTokeniserFunctions.h"; path = "../../../../modules/juce_gui_extra/code_editor/juce_CPlusPlusCodeTokeniserFunctions.h"; sourceTree = "SOURCE_ROOT"; };
@@ -320,7 +322,6 @@
755B3410E5F1D6CD7CA350E0 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ComboBox.cpp"; path = "../../../../modules/juce_gui_basics/widgets/juce_ComboBox.cpp"; sourceTree = "SOURCE_ROOT"; };
774896BADE9613608E2A1EFE = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_DragAndDropTarget.h"; path = "../../../../modules/juce_gui_basics/mouse/juce_DragAndDropTarget.h"; sourceTree = "SOURCE_ROOT"; };
786ABCE38FCC63E58ED44C5B = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_android_Threads.cpp"; path = "../../../../modules/juce_core/native/juce_android_Threads.cpp"; sourceTree = "SOURCE_ROOT"; };
- 789AF76E97BF2BA51A082381 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_OldSchoolLookAndFeel.cpp"; path = "../../../../modules/juce_gui_extra/lookandfeel/juce_OldSchoolLookAndFeel.cpp"; sourceTree = "SOURCE_ROOT"; };
793CDD14387F49E8757B9042 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ValueTree.cpp"; path = "../../../../modules/juce_data_structures/values/juce_ValueTree.cpp"; sourceTree = "SOURCE_ROOT"; };
79A4F1CF3FB5D20104693598 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_WindowsRegistry.h"; path = "../../../../modules/juce_core/misc/juce_WindowsRegistry.h"; sourceTree = "SOURCE_ROOT"; };
7A6E2A815D9AE276CF064A24 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_SystemTrayIconComponent.cpp"; path = "../../../../modules/juce_gui_extra/misc/juce_SystemTrayIconComponent.cpp"; sourceTree = "SOURCE_ROOT"; };
@@ -336,6 +337,7 @@
7D41725B59E3415350C8E035 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FileBrowserListener.h"; path = "../../../../modules/juce_gui_basics/filebrowser/juce_FileBrowserListener.h"; sourceTree = "SOURCE_ROOT"; };
7D87E3CB6613ADCE674B00BE = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_android_Files.cpp"; path = "../../../../modules/juce_core/native/juce_android_Files.cpp"; sourceTree = "SOURCE_ROOT"; };
7E6FE81AB4D5B08FF0F4E8AF = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_InputSource.h"; path = "../../../../modules/juce_core/streams/juce_InputSource.h"; sourceTree = "SOURCE_ROOT"; };
+ 7E8133ED13638E1D0C6F849F = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_LookAndFeel_V1.cpp"; path = "../../../../modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V1.cpp"; sourceTree = "SOURCE_ROOT"; };
7E9061B22520E892C910ECC9 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_FilenameComponent.cpp"; path = "../../../../modules/juce_gui_basics/filebrowser/juce_FilenameComponent.cpp"; sourceTree = "SOURCE_ROOT"; };
7EBAA8C6B6447AC1707EA1A7 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_win32_HiddenMessageWindow.h"; path = "../../../../modules/juce_events/native/juce_win32_HiddenMessageWindow.h"; sourceTree = "SOURCE_ROOT"; };
7EE080AF681F1D927DF35B95 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_RectanglePlacement.cpp"; path = "../../../../modules/juce_graphics/placement/juce_RectanglePlacement.cpp"; sourceTree = "SOURCE_ROOT"; };
@@ -405,6 +407,7 @@
9F3BAC34BBE550826A0C2B4D = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_SVGParser.cpp"; path = "../../../../modules/juce_gui_basics/drawables/juce_SVGParser.cpp"; sourceTree = "SOURCE_ROOT"; };
9F994395393E0BFB8A320B04 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_mac_Files.mm"; path = "../../../../modules/juce_core/native/juce_mac_Files.mm"; sourceTree = "SOURCE_ROOT"; };
9FBFACCA56589CDCC3D78F0E = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ThreadPool.cpp"; path = "../../../../modules/juce_core/threads/juce_ThreadPool.cpp"; sourceTree = "SOURCE_ROOT"; };
+ A0816F5D3CB1D0509C714252 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_LookAndFeel_V1.h"; path = "../../../../modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V1.h"; sourceTree = "SOURCE_ROOT"; };
A1637DEBD3438ACB0D7F48E0 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Colour.cpp"; path = "../../../../modules/juce_graphics/colour/juce_Colour.cpp"; sourceTree = "SOURCE_ROOT"; };
A16B3D0EA58919EDAEB08792 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_MouseEvent.cpp"; path = "../../../../modules/juce_gui_basics/mouse/juce_MouseEvent.cpp"; sourceTree = "SOURCE_ROOT"; };
A16DA9030A96B26C6BF52FDC = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_DropShadowEffect.h"; path = "../../../../modules/juce_graphics/effects/juce_DropShadowEffect.h"; sourceTree = "SOURCE_ROOT"; };
@@ -511,6 +514,7 @@
C511170BCB0784C896826010 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Label.cpp"; path = "../../../../modules/juce_gui_basics/widgets/juce_Label.cpp"; sourceTree = "SOURCE_ROOT"; };
C5401AF900EB8056416C1294 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ContainerDeletePolicy.h"; path = "../../../../modules/juce_core/memory/juce_ContainerDeletePolicy.h"; sourceTree = "SOURCE_ROOT"; };
C546B9AC32E553D5969B2537 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Initialisation.h"; path = "../../../../modules/juce_events/messages/juce_Initialisation.h"; sourceTree = "SOURCE_ROOT"; };
+ C56DB2DC67E1DBA6C29044CD = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_LookAndFeel_V2.cpp"; path = "../../../../modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp"; sourceTree = "SOURCE_ROOT"; };
C626FA20C4D021076A4B943E = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_mac_MainMenu.mm"; path = "../../../../modules/juce_gui_basics/native/juce_mac_MainMenu.mm"; sourceTree = "SOURCE_ROOT"; };
C6313E766ECDCE48435BA5A0 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AnimatedPositionBehaviours.h"; path = "../../../../modules/juce_gui_basics/layout/juce_AnimatedPositionBehaviours.h"; sourceTree = "SOURCE_ROOT"; };
C63DB03ADC0A6E3C45DD88C9 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Image.h"; path = "../../../../modules/juce_graphics/images/juce_Image.h"; sourceTree = "SOURCE_ROOT"; };
@@ -1250,7 +1254,13 @@
5BFC164CB4F8BC4FD839EDC8 ); name = properties; sourceTree = ""; };
0497AE7C3FF9222448CEC17B = { isa = PBXGroup; children = (
9D0323FECB030B06FBD0F627,
- 01A853C55CAE8341C207A758 ); name = lookandfeel; sourceTree = ""; };
+ 01A853C55CAE8341C207A758,
+ 7E8133ED13638E1D0C6F849F,
+ A0816F5D3CB1D0509C714252,
+ C56DB2DC67E1DBA6C29044CD,
+ 492FBEED85D887CC01080068,
+ 4AA6BD2A3FDFADDCB0322F9C,
+ 7224FBF6C8769342A0E3AC71 ); name = lookandfeel; sourceTree = ""; };
B0DA666A72BF97CE5C6452EA = { isa = PBXGroup; children = (
4D6C90354134741F7F295412,
D06CEB2AEDFB98E1406E06F7,
@@ -1349,10 +1359,7 @@
6C632E34FD1B617525987657,
02C0DD7DC29B27B39D5FF154,
DD10783090721EFE21E4FAA5 ); name = embedding; sourceTree = ""; };
- A959C42FC6A939D354E54F51 = { isa = PBXGroup; children = (
- 789AF76E97BF2BA51A082381,
- 4E070ED86B9A6F220123EBEB ); name = lookandfeel; sourceTree = ""; };
- 5FAF2B3A5F0D2749C8433FBF = { isa = PBXGroup; children = (
+ F4FF39023AE719A2C1FDFCF6 = { isa = PBXGroup; children = (
74AB579ADDC7C355C5704A16,
CB713D4A63E08276975B7639,
5E2CB1D4DC6ED933AA81C43A,
@@ -1369,7 +1376,7 @@
7A6E2A815D9AE276CF064A24,
8C439BE182790867BCC9ADFC,
1F4C7ECC97B4C80BD98F32C1 ); name = misc; sourceTree = ""; };
- 37FA23CC7AC1F16EB87F4DF8 = { isa = PBXGroup; children = (
+ E145BB5F87254EDB7C912760 = { isa = PBXGroup; children = (
118B13BE32C7FDCE82BDC495,
939EC86DADE3927918AA327C,
8FA331691E39F5D8FB0DCDF8,
@@ -1386,9 +1393,8 @@
E40525D81D015389B0388510,
7A7F0DF75E9B01FE9A9470B2,
5339003A04D05F6E3F333436,
- A959C42FC6A939D354E54F51,
- 5FAF2B3A5F0D2749C8433FBF,
- 37FA23CC7AC1F16EB87F4DF8,
+ F4FF39023AE719A2C1FDFCF6,
+ E145BB5F87254EDB7C912760,
8FBE4F804ECCBADAA37592F0,
C001B0F67BB17E32A3BC8F92 ); name = "juce_gui_extra"; sourceTree = ""; };
C37CC96B89E62143A0E75336 = { isa = PBXGroup; children = (
diff --git a/extras/example projects/Builds/VisualStudio2005/HelloWorld.vcproj b/extras/example projects/Builds/VisualStudio2005/HelloWorld.vcproj
index ba136389dc..dc165194e5 100644
--- a/extras/example projects/Builds/VisualStudio2005/HelloWorld.vcproj
+++ b/extras/example projects/Builds/VisualStudio2005/HelloWorld.vcproj
@@ -2741,6 +2741,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -3120,19 +3153,6 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/extras/example projects/Builds/VisualStudio2008/HelloWorld.vcproj b/extras/example projects/Builds/VisualStudio2008/HelloWorld.vcproj
index 58232ba3de..8c8efed119 100644
--- a/extras/example projects/Builds/VisualStudio2008/HelloWorld.vcproj
+++ b/extras/example projects/Builds/VisualStudio2008/HelloWorld.vcproj
@@ -2741,6 +2741,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -3120,19 +3153,6 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/extras/example projects/Builds/iOS/HelloWorld.xcodeproj/project.pbxproj b/extras/example projects/Builds/iOS/HelloWorld.xcodeproj/project.pbxproj
index 0776f0fab9..6f9b996d00 100644
--- a/extras/example projects/Builds/iOS/HelloWorld.xcodeproj/project.pbxproj
+++ b/extras/example projects/Builds/iOS/HelloWorld.xcodeproj/project.pbxproj
@@ -202,6 +202,7 @@
47BB119E08A7A1A468564B9D = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_linux_Windowing.cpp"; path = "../../../../modules/juce_gui_basics/native/juce_linux_Windowing.cpp"; sourceTree = "SOURCE_ROOT"; };
47D12441679F0062EB7C96AF = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_BasicNativeHeaders.h"; path = "../../../../modules/juce_core/native/juce_BasicNativeHeaders.h"; sourceTree = "SOURCE_ROOT"; };
48D212A6051005FB7A4BC338 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ImageFileFormat.cpp"; path = "../../../../modules/juce_graphics/images/juce_ImageFileFormat.cpp"; sourceTree = "SOURCE_ROOT"; };
+ 492FBEED85D887CC01080068 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_LookAndFeel_V2.h"; path = "../../../../modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.h"; sourceTree = "SOURCE_ROOT"; };
495652C9E6B06C891281D040 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_PreferencesPanel.h"; path = "../../../../modules/juce_gui_extra/misc/juce_PreferencesPanel.h"; sourceTree = "SOURCE_ROOT"; };
4961AA10B3563523AE1B0BFE = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FileChooserDialogBox.h"; path = "../../../../modules/juce_gui_basics/filebrowser/juce_FileChooserDialogBox.h"; sourceTree = "SOURCE_ROOT"; };
498778ED99DF1BA68A6E3A18 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_XmlDocument.cpp"; path = "../../../../modules/juce_core/xml/juce_XmlDocument.cpp"; sourceTree = "SOURCE_ROOT"; };
@@ -209,12 +210,12 @@
4A20547D0C763ABB1DE5A9C4 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Slider.h"; path = "../../../../modules/juce_gui_basics/widgets/juce_Slider.h"; sourceTree = "SOURCE_ROOT"; };
4A5ED88CC2ED6ADD8A5B102A = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Result.h"; path = "../../../../modules/juce_core/misc/juce_Result.h"; sourceTree = "SOURCE_ROOT"; };
4A8C64BB96FB93919DDF2166 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_ios_MessageManager.mm"; path = "../../../../modules/juce_events/native/juce_ios_MessageManager.mm"; sourceTree = "SOURCE_ROOT"; };
+ 4AA6BD2A3FDFADDCB0322F9C = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_LookAndFeel_V3.cpp"; path = "../../../../modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V3.cpp"; sourceTree = "SOURCE_ROOT"; };
4C34CB4DC542D86A193C055A = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_RenderingHelpers.h"; path = "../../../../modules/juce_graphics/native/juce_RenderingHelpers.h"; sourceTree = "SOURCE_ROOT"; };
4CC331BEE18B3EC4BADF38CE = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Colours.h"; path = "../../../../modules/juce_graphics/colour/juce_Colours.h"; sourceTree = "SOURCE_ROOT"; };
4D44E9AD19469774ED8245B2 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_CodeEditorComponent.cpp"; path = "../../../../modules/juce_gui_extra/code_editor/juce_CodeEditorComponent.cpp"; sourceTree = "SOURCE_ROOT"; };
4D6C90354134741F7F295412 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_DirectoryContentsDisplayComponent.cpp"; path = "../../../../modules/juce_gui_basics/filebrowser/juce_DirectoryContentsDisplayComponent.cpp"; sourceTree = "SOURCE_ROOT"; };
4DD07E53E4ABDE534D34981E = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_HyperlinkButton.h"; path = "../../../../modules/juce_gui_basics/buttons/juce_HyperlinkButton.h"; sourceTree = "SOURCE_ROOT"; };
- 4E070ED86B9A6F220123EBEB = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_OldSchoolLookAndFeel.h"; path = "../../../../modules/juce_gui_extra/lookandfeel/juce_OldSchoolLookAndFeel.h"; sourceTree = "SOURCE_ROOT"; };
4E1058572E25FD04B7D60700 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_ios_Windowing.mm"; path = "../../../../modules/juce_gui_basics/native/juce_ios_Windowing.mm"; sourceTree = "SOURCE_ROOT"; };
4E2E741BA1779C70049641D0 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Image.cpp"; path = "../../../../modules/juce_graphics/images/juce_Image.cpp"; sourceTree = "SOURCE_ROOT"; };
4FF67CE1DFACAFF545D8E9AA = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_GraphicsContext.cpp"; path = "../../../../modules/juce_graphics/contexts/juce_GraphicsContext.cpp"; sourceTree = "SOURCE_ROOT"; };
@@ -308,6 +309,7 @@
71D7F3CED9D84ECF00E3C7DF = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_DrawableShape.cpp"; path = "../../../../modules/juce_gui_basics/drawables/juce_DrawableShape.cpp"; sourceTree = "SOURCE_ROOT"; };
71D8C3F48801BEF5DB86B619 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ModalComponentManager.h"; path = "../../../../modules/juce_gui_basics/components/juce_ModalComponentManager.h"; sourceTree = "SOURCE_ROOT"; };
71EA769D5757AB3B16E5E6E6 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_InterprocessConnectionServer.cpp"; path = "../../../../modules/juce_events/interprocess/juce_InterprocessConnectionServer.cpp"; sourceTree = "SOURCE_ROOT"; };
+ 7224FBF6C8769342A0E3AC71 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_LookAndFeel_V3.h"; path = "../../../../modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V3.h"; sourceTree = "SOURCE_ROOT"; };
732EB7C9CF8E817B7239DBA1 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_TreeView.h"; path = "../../../../modules/juce_gui_basics/widgets/juce_TreeView.h"; sourceTree = "SOURCE_ROOT"; };
7402FA767F4FD9CCD3DD1578 = { isa = PBXFileReference; lastKnownFileType = file; name = "juce_module_info"; path = "../../../../modules/juce_graphics/juce_module_info"; sourceTree = "SOURCE_ROOT"; };
744475CFFBA91FDA03DDF659 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_CPlusPlusCodeTokeniserFunctions.h"; path = "../../../../modules/juce_gui_extra/code_editor/juce_CPlusPlusCodeTokeniserFunctions.h"; sourceTree = "SOURCE_ROOT"; };
@@ -317,7 +319,6 @@
755B3410E5F1D6CD7CA350E0 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ComboBox.cpp"; path = "../../../../modules/juce_gui_basics/widgets/juce_ComboBox.cpp"; sourceTree = "SOURCE_ROOT"; };
774896BADE9613608E2A1EFE = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_DragAndDropTarget.h"; path = "../../../../modules/juce_gui_basics/mouse/juce_DragAndDropTarget.h"; sourceTree = "SOURCE_ROOT"; };
786ABCE38FCC63E58ED44C5B = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_android_Threads.cpp"; path = "../../../../modules/juce_core/native/juce_android_Threads.cpp"; sourceTree = "SOURCE_ROOT"; };
- 789AF76E97BF2BA51A082381 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_OldSchoolLookAndFeel.cpp"; path = "../../../../modules/juce_gui_extra/lookandfeel/juce_OldSchoolLookAndFeel.cpp"; sourceTree = "SOURCE_ROOT"; };
793CDD14387F49E8757B9042 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ValueTree.cpp"; path = "../../../../modules/juce_data_structures/values/juce_ValueTree.cpp"; sourceTree = "SOURCE_ROOT"; };
79A4F1CF3FB5D20104693598 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_WindowsRegistry.h"; path = "../../../../modules/juce_core/misc/juce_WindowsRegistry.h"; sourceTree = "SOURCE_ROOT"; };
7A6E2A815D9AE276CF064A24 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_SystemTrayIconComponent.cpp"; path = "../../../../modules/juce_gui_extra/misc/juce_SystemTrayIconComponent.cpp"; sourceTree = "SOURCE_ROOT"; };
@@ -333,6 +334,7 @@
7D41725B59E3415350C8E035 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FileBrowserListener.h"; path = "../../../../modules/juce_gui_basics/filebrowser/juce_FileBrowserListener.h"; sourceTree = "SOURCE_ROOT"; };
7D87E3CB6613ADCE674B00BE = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_android_Files.cpp"; path = "../../../../modules/juce_core/native/juce_android_Files.cpp"; sourceTree = "SOURCE_ROOT"; };
7E6FE81AB4D5B08FF0F4E8AF = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_InputSource.h"; path = "../../../../modules/juce_core/streams/juce_InputSource.h"; sourceTree = "SOURCE_ROOT"; };
+ 7E8133ED13638E1D0C6F849F = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_LookAndFeel_V1.cpp"; path = "../../../../modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V1.cpp"; sourceTree = "SOURCE_ROOT"; };
7E9061B22520E892C910ECC9 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_FilenameComponent.cpp"; path = "../../../../modules/juce_gui_basics/filebrowser/juce_FilenameComponent.cpp"; sourceTree = "SOURCE_ROOT"; };
7EBAA8C6B6447AC1707EA1A7 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_win32_HiddenMessageWindow.h"; path = "../../../../modules/juce_events/native/juce_win32_HiddenMessageWindow.h"; sourceTree = "SOURCE_ROOT"; };
7EE080AF681F1D927DF35B95 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_RectanglePlacement.cpp"; path = "../../../../modules/juce_graphics/placement/juce_RectanglePlacement.cpp"; sourceTree = "SOURCE_ROOT"; };
@@ -402,6 +404,7 @@
9F3BAC34BBE550826A0C2B4D = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_SVGParser.cpp"; path = "../../../../modules/juce_gui_basics/drawables/juce_SVGParser.cpp"; sourceTree = "SOURCE_ROOT"; };
9F994395393E0BFB8A320B04 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_mac_Files.mm"; path = "../../../../modules/juce_core/native/juce_mac_Files.mm"; sourceTree = "SOURCE_ROOT"; };
9FBFACCA56589CDCC3D78F0E = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ThreadPool.cpp"; path = "../../../../modules/juce_core/threads/juce_ThreadPool.cpp"; sourceTree = "SOURCE_ROOT"; };
+ A0816F5D3CB1D0509C714252 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_LookAndFeel_V1.h"; path = "../../../../modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V1.h"; sourceTree = "SOURCE_ROOT"; };
A1637DEBD3438ACB0D7F48E0 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Colour.cpp"; path = "../../../../modules/juce_graphics/colour/juce_Colour.cpp"; sourceTree = "SOURCE_ROOT"; };
A16B3D0EA58919EDAEB08792 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_MouseEvent.cpp"; path = "../../../../modules/juce_gui_basics/mouse/juce_MouseEvent.cpp"; sourceTree = "SOURCE_ROOT"; };
A16DA9030A96B26C6BF52FDC = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_DropShadowEffect.h"; path = "../../../../modules/juce_graphics/effects/juce_DropShadowEffect.h"; sourceTree = "SOURCE_ROOT"; };
@@ -508,6 +511,7 @@
C511170BCB0784C896826010 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Label.cpp"; path = "../../../../modules/juce_gui_basics/widgets/juce_Label.cpp"; sourceTree = "SOURCE_ROOT"; };
C5401AF900EB8056416C1294 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ContainerDeletePolicy.h"; path = "../../../../modules/juce_core/memory/juce_ContainerDeletePolicy.h"; sourceTree = "SOURCE_ROOT"; };
C546B9AC32E553D5969B2537 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Initialisation.h"; path = "../../../../modules/juce_events/messages/juce_Initialisation.h"; sourceTree = "SOURCE_ROOT"; };
+ C56DB2DC67E1DBA6C29044CD = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_LookAndFeel_V2.cpp"; path = "../../../../modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp"; sourceTree = "SOURCE_ROOT"; };
C626FA20C4D021076A4B943E = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_mac_MainMenu.mm"; path = "../../../../modules/juce_gui_basics/native/juce_mac_MainMenu.mm"; sourceTree = "SOURCE_ROOT"; };
C6313E766ECDCE48435BA5A0 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AnimatedPositionBehaviours.h"; path = "../../../../modules/juce_gui_basics/layout/juce_AnimatedPositionBehaviours.h"; sourceTree = "SOURCE_ROOT"; };
C63DB03ADC0A6E3C45DD88C9 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Image.h"; path = "../../../../modules/juce_graphics/images/juce_Image.h"; sourceTree = "SOURCE_ROOT"; };
@@ -1248,7 +1252,13 @@
5BFC164CB4F8BC4FD839EDC8 ); name = properties; sourceTree = ""; };
0497AE7C3FF9222448CEC17B = { isa = PBXGroup; children = (
9D0323FECB030B06FBD0F627,
- 01A853C55CAE8341C207A758 ); name = lookandfeel; sourceTree = ""; };
+ 01A853C55CAE8341C207A758,
+ 7E8133ED13638E1D0C6F849F,
+ A0816F5D3CB1D0509C714252,
+ C56DB2DC67E1DBA6C29044CD,
+ 492FBEED85D887CC01080068,
+ 4AA6BD2A3FDFADDCB0322F9C,
+ 7224FBF6C8769342A0E3AC71 ); name = lookandfeel; sourceTree = ""; };
B0DA666A72BF97CE5C6452EA = { isa = PBXGroup; children = (
4D6C90354134741F7F295412,
D06CEB2AEDFB98E1406E06F7,
@@ -1347,10 +1357,7 @@
6C632E34FD1B617525987657,
02C0DD7DC29B27B39D5FF154,
DD10783090721EFE21E4FAA5 ); name = embedding; sourceTree = ""; };
- A959C42FC6A939D354E54F51 = { isa = PBXGroup; children = (
- 789AF76E97BF2BA51A082381,
- 4E070ED86B9A6F220123EBEB ); name = lookandfeel; sourceTree = ""; };
- 5FAF2B3A5F0D2749C8433FBF = { isa = PBXGroup; children = (
+ F4FF39023AE719A2C1FDFCF6 = { isa = PBXGroup; children = (
74AB579ADDC7C355C5704A16,
CB713D4A63E08276975B7639,
5E2CB1D4DC6ED933AA81C43A,
@@ -1367,7 +1374,7 @@
7A6E2A815D9AE276CF064A24,
8C439BE182790867BCC9ADFC,
1F4C7ECC97B4C80BD98F32C1 ); name = misc; sourceTree = ""; };
- 37FA23CC7AC1F16EB87F4DF8 = { isa = PBXGroup; children = (
+ E145BB5F87254EDB7C912760 = { isa = PBXGroup; children = (
118B13BE32C7FDCE82BDC495,
939EC86DADE3927918AA327C,
8FA331691E39F5D8FB0DCDF8,
@@ -1384,9 +1391,8 @@
E40525D81D015389B0388510,
7A7F0DF75E9B01FE9A9470B2,
5339003A04D05F6E3F333436,
- A959C42FC6A939D354E54F51,
- 5FAF2B3A5F0D2749C8433FBF,
- 37FA23CC7AC1F16EB87F4DF8,
+ F4FF39023AE719A2C1FDFCF6,
+ E145BB5F87254EDB7C912760,
8FBE4F804ECCBADAA37592F0,
C001B0F67BB17E32A3BC8F92 ); name = "juce_gui_extra"; sourceTree = ""; };
C37CC96B89E62143A0E75336 = { isa = PBXGroup; children = (
diff --git a/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp
index 455921dbe1..140e1e0030 100644
--- a/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp
+++ b/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp
@@ -380,7 +380,7 @@ public:
samplesToWrite = const_cast (channels.getData());
}
- return FLAC__stream_encoder_process (encoder, (const FLAC__int32**) samplesToWrite, (size_t) numSamples) != 0;
+ return FLAC__stream_encoder_process (encoder, (const FLAC__int32**) samplesToWrite, (unsigned) numSamples) != 0;
}
bool writeData (const void* const data, const int size) const
diff --git a/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp
index 97a9c86a46..f319901845 100644
--- a/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp
+++ b/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp
@@ -186,7 +186,7 @@ public:
{
float** dataIn = nullptr;
- const int samps = OggVorbisNamespace::ov_read_float (&ovFile, &dataIn, numToRead, &bitStream);
+ const long samps = OggVorbisNamespace::ov_read_float (&ovFile, &dataIn, numToRead, &bitStream);
if (samps <= 0)
break;
diff --git a/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp
index 8b1cf24611..e0cc66c792 100644
--- a/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp
+++ b/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp
@@ -1675,8 +1675,8 @@ private:
void setHostTimeFrameRate (long frameRateIndex, double frameRate, double currentTime) noexcept
{
vstHostTime.flags |= kVstSmpteValid;
- vstHostTime.smpteFrameRate = frameRateIndex;
- vstHostTime.smpteOffset = (long) (currentTime * 80.0 * frameRate + 0.5);
+ vstHostTime.smpteFrameRate = (VstInt32) frameRateIndex;
+ vstHostTime.smpteOffset = (VstInt32) (currentTime * 80.0 * frameRate + 0.5);
}
bool restoreProgramSettings (const fxProgram* const prog)
diff --git a/modules/juce_core/native/juce_mac_Network.mm b/modules/juce_core/native/juce_mac_Network.mm
index b042d0571b..75c9ce19a2 100644
--- a/modules/juce_core/native/juce_mac_Network.mm
+++ b/modules/juce_core/native/juce_mac_Network.mm
@@ -220,7 +220,7 @@ public:
initialised = true;
}
- void didSendBodyData (int /*totalBytesWritten*/, int /*totalBytesExpected*/)
+ void didSendBodyData (NSInteger /*totalBytesWritten*/, NSInteger /*totalBytesExpected*/)
{
}
diff --git a/modules/juce_core/xml/juce_XmlElement.h b/modules/juce_core/xml/juce_XmlElement.h
index 3f9bfb9e22..8fc3800d2c 100644
--- a/modules/juce_core/xml/juce_XmlElement.h
+++ b/modules/juce_core/xml/juce_XmlElement.h
@@ -519,12 +519,12 @@ public:
make sure the object that you pass in will not be deleted by anything else,
and make sure it's not already the child of another element.
- @param newChildNode the element to add
+ @param newChildElement the element to add
@param indexToInsertAt the index at which to insert the new element - if this is
below zero, it will be added to the end of the list
@see addChildElement, insertChildElement
*/
- void insertChildElement (XmlElement* newChildNode,
+ void insertChildElement (XmlElement* newChildElement,
int indexToInsertAt) noexcept;
/** Inserts an element at the beginning of this element's list of children.
@@ -537,7 +537,6 @@ public:
is an O(1) operation, but addChildElement() is an O(N) operation - so if
you're adding large number of elements, you may prefer to do so in reverse order!
- @param newChildNode the element to add
@see addChildElement, insertChildElement
*/
void prependChildElement (XmlElement* newChildElement) noexcept;
diff --git a/modules/juce_graphics/native/juce_mac_Fonts.mm b/modules/juce_graphics/native/juce_mac_Fonts.mm
index 4c482432a1..aa1851a131 100644
--- a/modules/juce_graphics/native/juce_mac_Fonts.mm
+++ b/modules/juce_graphics/native/juce_mac_Fonts.mm
@@ -340,7 +340,7 @@ namespace CoreTextTypeLayout
CFArrayRef lines = CTFrameGetLines (frame);
const CFIndex numLines = CFArrayGetCount (lines);
- glyphLayout.ensureStorageAllocated (numLines);
+ glyphLayout.ensureStorageAllocated ((int) numLines);
for (CFIndex i = 0; i < numLines; ++i)
{
diff --git a/modules/juce_gui_basics/buttons/juce_Button.h b/modules/juce_gui_basics/buttons/juce_Button.h
index 2daf940b4e..0516915b33 100644
--- a/modules/juce_gui_basics/buttons/juce_Button.h
+++ b/modules/juce_gui_basics/buttons/juce_Button.h
@@ -355,6 +355,33 @@ public:
// This method's parameters have changed - see the new version.
JUCE_DEPRECATED (void setToggleState (bool, bool));
+ //==============================================================================
+ /** This abstract base class is implemented by LookAndFeel classes to provide
+ button-drawing functionality.
+ */
+ struct JUCE_API LookAndFeelMethods
+ {
+ virtual ~LookAndFeelMethods() {}
+
+ virtual void drawButtonBackground (Graphics&, Button& button, const Colour& backgroundColour,
+ bool isMouseOverButton, bool isButtonDown) = 0;
+
+ virtual Font getTextButtonFont (TextButton& button) = 0;
+
+ /** Draws the text for a TextButton. */
+ virtual void drawButtonText (Graphics&, TextButton&, bool isMouseOverButton, bool isButtonDown) = 0;
+
+ /** Draws the contents of a standard ToggleButton. */
+ virtual void drawToggleButton (Graphics&, ToggleButton&, bool isMouseOverButton, bool isButtonDown) = 0;
+
+ virtual void changeToggleButtonWidthToFitText (ToggleButton&) = 0;
+
+ virtual void drawTickBox (Graphics&, Component&, float x, float y, float w, float h,
+ bool ticked, bool isEnabled, bool isMouseOverButton, bool isButtonDown) = 0;
+
+ virtual void drawDrawableButton (Graphics&, DrawableButton&, bool isMouseOverButton, bool isButtonDown) = 0;
+ };
+
protected:
//==============================================================================
/** This method is called when the button has been clicked.
diff --git a/modules/juce_gui_basics/buttons/juce_ImageButton.h b/modules/juce_gui_basics/buttons/juce_ImageButton.h
index dd39e62094..64db59df26 100644
--- a/modules/juce_gui_basics/buttons/juce_ImageButton.h
+++ b/modules/juce_gui_basics/buttons/juce_ImageButton.h
@@ -124,6 +124,17 @@ public:
*/
Image getDownImage() const;
+ //==============================================================================
+ /** This abstract base class is implemented by LookAndFeel classes. */
+ struct JUCE_API LookAndFeelMethods
+ {
+ virtual ~LookAndFeelMethods() {}
+
+ virtual void drawImageButton (Graphics&, Image*,
+ int imageX, int imageY, int imageW, int imageH,
+ const Colour& overlayColour, float imageOpacity, ImageButton&) = 0;
+ };
+
protected:
//==============================================================================
/** @internal */
diff --git a/modules/juce_gui_basics/components/juce_Desktop.cpp b/modules/juce_gui_basics/components/juce_Desktop.cpp
index 0faaeb4a8f..5deb49089f 100644
--- a/modules/juce_gui_basics/components/juce_Desktop.cpp
+++ b/modules/juce_gui_basics/components/juce_Desktop.cpp
@@ -89,7 +89,7 @@ LookAndFeel& Desktop::getDefaultLookAndFeel() noexcept
if (currentLookAndFeel == nullptr)
{
if (defaultLookAndFeel == nullptr)
- defaultLookAndFeel = new LookAndFeel();
+ defaultLookAndFeel = new LookAndFeel_V2();
currentLookAndFeel = defaultLookAndFeel;
}
diff --git a/modules/juce_gui_basics/filebrowser/juce_FileBrowserComponent.h b/modules/juce_gui_basics/filebrowser/juce_FileBrowserComponent.h
index ef78e4eb8f..a1151ef02f 100644
--- a/modules/juce_gui_basics/filebrowser/juce_FileBrowserComponent.h
+++ b/modules/juce_gui_basics/filebrowser/juce_FileBrowserComponent.h
@@ -177,6 +177,42 @@ public:
*/
static void getDefaultRoots (StringArray& rootNames, StringArray& rootPaths);
+ //==============================================================================
+ /** This abstract base class is implemented by LookAndFeel classes to provide
+ various file-browser layout and drawing methods.
+ */
+ struct JUCE_API LookAndFeelMethods
+ {
+ virtual ~LookAndFeelMethods() {}
+
+ // These return a pointer to an internally cached drawable - make sure you don't keep
+ // a copy of this pointer anywhere, as it may become invalid in the future.
+ virtual const Drawable* getDefaultFolderImage() = 0;
+ virtual const Drawable* getDefaultDocumentFileImage() = 0;
+
+ virtual AttributedString createFileChooserHeaderText (const String& title,
+ const String& instructions) = 0;
+
+ virtual void drawFileBrowserRow (Graphics&, int width, int height,
+ const String& filename,
+ Image* optionalIcon,
+ const String& fileSizeDescription,
+ const String& fileTimeDescription,
+ bool isDirectory,
+ bool isItemSelected,
+ int itemIndex,
+ DirectoryContentsDisplayComponent&) = 0;
+
+ virtual Button* createFileBrowserGoUpButton() = 0;
+
+ virtual void layoutFileBrowserComponent (FileBrowserComponent& browserComp,
+ DirectoryContentsDisplayComponent* fileListComponent,
+ FilePreviewComponent* previewComp,
+ ComboBox* currentPathBox,
+ TextEditor* filenameBox,
+ Button* goUpButton) = 0;
+ };
+
//==============================================================================
/** @internal */
void resized() override;
diff --git a/modules/juce_gui_basics/filebrowser/juce_FilenameComponent.h b/modules/juce_gui_basics/filebrowser/juce_FilenameComponent.h
index 83b6ae0d41..4456c11e9e 100644
--- a/modules/juce_gui_basics/filebrowser/juce_FilenameComponent.h
+++ b/modules/juce_gui_basics/filebrowser/juce_FilenameComponent.h
@@ -180,6 +180,16 @@ public:
/** Gives the component a tooltip. */
void setTooltip (const String& newTooltip) override;
+ //==============================================================================
+ /** This abstract base class is implemented by LookAndFeel classes. */
+ struct JUCE_API LookAndFeelMethods
+ {
+ virtual ~LookAndFeelMethods() {}
+
+ virtual Button* createFilenameComponentBrowseButton (const String& text) = 0;
+ virtual void layoutFilenameComponent (FilenameComponent&, ComboBox* filenameBox, Button* browseButton) = 0;
+ };
+
//==============================================================================
/** @internal */
void paintOverChildren (Graphics&) override;
diff --git a/modules/juce_gui_basics/juce_gui_basics.cpp b/modules/juce_gui_basics/juce_gui_basics.cpp
index c168c679bc..b18b41ccd3 100644
--- a/modules/juce_gui_basics/juce_gui_basics.cpp
+++ b/modules/juce_gui_basics/juce_gui_basics.cpp
@@ -198,6 +198,9 @@ extern bool juce_areThereAnyAlwaysOnTopWindows();
#include "layout/juce_TabbedComponent.cpp"
#include "layout/juce_Viewport.cpp"
#include "lookandfeel/juce_LookAndFeel.cpp"
+#include "lookandfeel/juce_LookAndFeel_V2.cpp"
+#include "lookandfeel/juce_LookAndFeel_V1.cpp"
+#include "lookandfeel/juce_LookAndFeel_V3.cpp"
#include "menus/juce_MenuBarComponent.cpp"
#include "menus/juce_MenuBarModel.cpp"
#include "menus/juce_PopupMenu.cpp"
diff --git a/modules/juce_gui_basics/juce_gui_basics.h b/modules/juce_gui_basics/juce_gui_basics.h
index 6272a79c38..6b20f14161 100644
--- a/modules/juce_gui_basics/juce_gui_basics.h
+++ b/modules/juce_gui_basics/juce_gui_basics.h
@@ -113,6 +113,7 @@ class CaretComponent;
class BubbleComponent;
class KeyPressMappingSet;
class ApplicationCommandManagerListener;
+class DrawableButton;
#include "mouse/juce_MouseCursor.h"
#include "mouse/juce_MouseListener.h"
@@ -215,7 +216,6 @@ class ApplicationCommandManagerListener;
#include "windows/juce_ThreadWithProgressWindow.h"
#include "windows/juce_TooltipWindow.h"
#include "layout/juce_MultiDocumentPanel.h"
-#include "lookandfeel/juce_LookAndFeel.h"
#include "filebrowser/juce_FileFilter.h"
#include "filebrowser/juce_WildcardFileFilter.h"
#include "filebrowser/juce_FileBrowserListener.h"
@@ -239,6 +239,10 @@ class ApplicationCommandManagerListener;
#include "properties/juce_TextPropertyComponent.h"
#include "application/juce_Application.h"
#include "misc/juce_BubbleComponent.h"
+#include "lookandfeel/juce_LookAndFeel.h"
+#include "lookandfeel/juce_LookAndFeel_V2.h"
+#include "lookandfeel/juce_LookAndFeel_V1.h"
+#include "lookandfeel/juce_LookAndFeel_V3.h"
}
diff --git a/modules/juce_gui_basics/layout/juce_ConcertinaPanel.h b/modules/juce_gui_basics/layout/juce_ConcertinaPanel.h
index 919e72d92f..b340a8bb8b 100644
--- a/modules/juce_gui_basics/layout/juce_ConcertinaPanel.h
+++ b/modules/juce_gui_basics/layout/juce_ConcertinaPanel.h
@@ -93,6 +93,16 @@ public:
/** Sets the height of the header section for one of the panels. */
void setPanelHeaderSize (Component* panelComponent, int headerSize);
+ //==============================================================================
+ /** This abstract base class is implemented by LookAndFeel classes. */
+ struct JUCE_API LookAndFeelMethods
+ {
+ virtual ~LookAndFeelMethods() {}
+
+ virtual void drawConcertinaPanelHeader (Graphics&, const Rectangle& area,
+ bool isMouseOver, bool isMouseDown, ConcertinaPanel&, Component&) = 0;
+ };
+
private:
void resized() override;
diff --git a/modules/juce_gui_basics/layout/juce_GroupComponent.cpp b/modules/juce_gui_basics/layout/juce_GroupComponent.cpp
index 867d87080c..5932487347 100644
--- a/modules/juce_gui_basics/layout/juce_GroupComponent.cpp
+++ b/modules/juce_gui_basics/layout/juce_GroupComponent.cpp
@@ -31,11 +31,8 @@ GroupComponent::GroupComponent (const String& name,
setInterceptsMouseClicks (false, true);
}
-GroupComponent::~GroupComponent()
-{
-}
+GroupComponent::~GroupComponent() {}
-//==============================================================================
void GroupComponent::setText (const String& newText)
{
if (text != newText)
@@ -50,7 +47,6 @@ String GroupComponent::getText() const
return text;
}
-//==============================================================================
void GroupComponent::setTextLabelPosition (Justification newJustification)
{
if (justification != newJustification)
@@ -62,18 +58,9 @@ void GroupComponent::setTextLabelPosition (Justification newJustification)
void GroupComponent::paint (Graphics& g)
{
- getLookAndFeel()
- .drawGroupComponentOutline (g, getWidth(), getHeight(),
- text, justification,
- *this);
+ getLookAndFeel().drawGroupComponentOutline (g, getWidth(), getHeight(),
+ text, justification, *this);
}
-void GroupComponent::enablementChanged()
-{
- repaint();
-}
-
-void GroupComponent::colourChanged()
-{
- repaint();
-}
+void GroupComponent::enablementChanged() { repaint(); }
+void GroupComponent::colourChanged() { repaint(); }
diff --git a/modules/juce_gui_basics/layout/juce_GroupComponent.h b/modules/juce_gui_basics/layout/juce_GroupComponent.h
index 066c00501b..6f111e0469 100644
--- a/modules/juce_gui_basics/layout/juce_GroupComponent.h
+++ b/modules/juce_gui_basics/layout/juce_GroupComponent.h
@@ -82,6 +82,16 @@ public:
textColourId = 0x1005410 /**< The colour to use to draw the text label. */
};
+ //==============================================================================
+ /** This abstract base class is implemented by LookAndFeel classes. */
+ struct JUCE_API LookAndFeelMethods
+ {
+ virtual ~LookAndFeelMethods() {}
+
+ virtual void drawGroupComponentOutline (Graphics&, int w, int h, const String& text,
+ const Justification&, GroupComponent&) = 0;
+ };
+
//==============================================================================
/** @internal */
void paint (Graphics&) override;
diff --git a/modules/juce_gui_basics/layout/juce_ScrollBar.h b/modules/juce_gui_basics/layout/juce_ScrollBar.h
index 1a73e35e8b..2731af030d 100644
--- a/modules/juce_gui_basics/layout/juce_ScrollBar.h
+++ b/modules/juce_gui_basics/layout/juce_ScrollBar.h
@@ -292,6 +292,73 @@ public:
/** Deregisters a previously-registered listener. */
void removeListener (Listener* listener);
+ //==============================================================================
+ /** This abstract base class is implemented by LookAndFeel classes to provide
+ scrollbar-drawing functionality.
+ */
+ struct JUCE_API LookAndFeelMethods
+ {
+ virtual ~LookAndFeelMethods() {}
+
+ virtual bool areScrollbarButtonsVisible() = 0;
+
+ /** Draws one of the buttons on a scrollbar.
+
+ @param g the context to draw into
+ @param scrollbar the bar itself
+ @param width the width of the button
+ @param height the height of the button
+ @param buttonDirection the direction of the button, where 0 = up, 1 = right, 2 = down, 3 = left
+ @param isScrollbarVertical true if it's a vertical bar, false if horizontal
+ @param isMouseOverButton whether the mouse is currently over the button (also true if it's held down)
+ @param isButtonDown whether the mouse button's held down
+ */
+ virtual void drawScrollbarButton (Graphics& g,
+ ScrollBar& scrollbar,
+ int width, int height,
+ int buttonDirection,
+ bool isScrollbarVertical,
+ bool isMouseOverButton,
+ bool isButtonDown) = 0;
+
+ /** Draws the thumb area of a scrollbar.
+
+ @param g the context to draw into
+ @param scrollbar the bar itself
+ @param x the x position of the left edge of the thumb area to draw in
+ @param y the y position of the top edge of the thumb area to draw in
+ @param width the width of the thumb area to draw in
+ @param height the height of the thumb area to draw in
+ @param isScrollbarVertical true if it's a vertical bar, false if horizontal
+ @param thumbStartPosition for vertical bars, the y coordinate of the top of the
+ thumb, or its x position for horizontal bars
+ @param thumbSize for vertical bars, the height of the thumb, or its width for
+ horizontal bars. This may be 0 if the thumb shouldn't be drawn.
+ @param isMouseOver whether the mouse is over the thumb area, also true if the mouse is
+ currently dragging the thumb
+ @param isMouseDown whether the mouse is currently dragging the scrollbar
+ */
+ virtual void drawScrollbar (Graphics& g, ScrollBar& scrollbar,
+ int x, int y, int width, int height,
+ bool isScrollbarVertical,
+ int thumbStartPosition,
+ int thumbSize,
+ bool isMouseOver,
+ bool isMouseDown) = 0;
+
+ /** Returns the component effect to use for a scrollbar */
+ virtual ImageEffectFilter* getScrollbarEffect() = 0;
+
+ /** Returns the minimum length in pixels to use for a scrollbar thumb. */
+ virtual int getMinimumScrollbarThumbSize (ScrollBar&) = 0;
+
+ /** Returns the default thickness to use for a scrollbar. */
+ virtual int getDefaultScrollbarWidth() = 0;
+
+ /** Returns the length in pixels to use for a scrollbar button. */
+ virtual int getScrollbarButtonSize (ScrollBar&) = 0;
+ };
+
//==============================================================================
/** @internal */
bool keyPressed (const KeyPress&) override;
diff --git a/modules/juce_gui_basics/layout/juce_StretchableLayoutResizerBar.h b/modules/juce_gui_basics/layout/juce_StretchableLayoutResizerBar.h
index 926dd195b5..f1aae0c81f 100644
--- a/modules/juce_gui_basics/layout/juce_StretchableLayoutResizerBar.h
+++ b/modules/juce_gui_basics/layout/juce_StretchableLayoutResizerBar.h
@@ -72,6 +72,16 @@ public:
*/
virtual void hasBeenMoved();
+ //==============================================================================
+ /** This abstract base class is implemented by LookAndFeel classes. */
+ struct JUCE_API LookAndFeelMethods
+ {
+ virtual ~LookAndFeelMethods() {}
+
+ virtual void drawStretchableLayoutResizerBar (Graphics&, int w, int h,
+ bool isVerticalBar, bool isMouseOver, bool isMouseDragging) = 0;
+ };
+
//==============================================================================
/** @internal */
void paint (Graphics&) override;
diff --git a/modules/juce_gui_basics/layout/juce_TabbedButtonBar.h b/modules/juce_gui_basics/layout/juce_TabbedButtonBar.h
index 9638dfbe21..042b02ecfb 100644
--- a/modules/juce_gui_basics/layout/juce_TabbedButtonBar.h
+++ b/modules/juce_gui_basics/layout/juce_TabbedButtonBar.h
@@ -293,6 +293,30 @@ public:
colour. */
};
+ //==============================================================================
+ /** This abstract base class is implemented by LookAndFeel classes to provide
+ window drawing functionality.
+ */
+ struct JUCE_API LookAndFeelMethods
+ {
+ virtual ~LookAndFeelMethods() {}
+
+ virtual int getTabButtonSpaceAroundImage() = 0;
+ virtual int getTabButtonOverlap (int tabDepth) = 0;
+ virtual int getTabButtonBestWidth (TabBarButton&, int tabDepth) = 0;
+ virtual Rectangle getTabButtonExtraComponentBounds (const TabBarButton&, Rectangle& textArea, Component& extraComp) = 0;
+
+ virtual void drawTabButton (TabBarButton&, Graphics&, bool isMouseOver, bool isMouseDown) = 0;
+ virtual void drawTabButtonText (TabBarButton&, Graphics&, bool isMouseOver, bool isMouseDown) = 0;
+ virtual void drawTabbedButtonBarBackground (TabbedButtonBar&, Graphics&) = 0;
+ virtual void drawTabAreaBehindFrontButton (TabbedButtonBar&, Graphics&, int w, int h) = 0;
+
+ virtual void createTabButtonShape (TabBarButton&, Path& path, bool isMouseOver, bool isMouseDown) = 0;
+ virtual void fillTabButtonShape (TabBarButton&, Graphics&, const Path& path, bool isMouseOver, bool isMouseDown) = 0;
+
+ virtual Button* createTabBarExtrasButton() = 0;
+ };
+
//==============================================================================
/** @internal */
void paint (Graphics&) override;
diff --git a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel.cpp b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel.cpp
index 4082b10259..bf20986d74 100644
--- a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel.cpp
+++ b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel.cpp
@@ -22,43 +22,12 @@
==============================================================================
*/
-namespace LookAndFeelHelpers
+//==============================================================================
+static Typeface::Ptr getTypefaceForFontFromLookAndFeel (const Font& font)
{
- static Colour createBaseColour (Colour buttonColour,
- bool hasKeyboardFocus,
- bool isMouseOverButton,
- bool isButtonDown) noexcept
- {
- const float sat = hasKeyboardFocus ? 1.3f : 0.9f;
- const Colour baseColour (buttonColour.withMultipliedSaturation (sat));
-
- if (isButtonDown) return baseColour.contrasting (0.2f);
- if (isMouseOverButton) return baseColour.contrasting (0.1f);
-
- return baseColour;
- }
-
- static TextLayout layoutTooltipText (const String& text, Colour colour) noexcept
- {
- const float tooltipFontSize = 13.0f;
- const int maxToolTipWidth = 400;
-
- AttributedString s;
- s.setJustification (Justification::centred);
- s.append (text, Font (tooltipFontSize, Font::bold), colour);
-
- TextLayout tl;
- tl.createLayoutWithBalancedLineLengths (s, (float) maxToolTipWidth);
- return tl;
- }
-
- static Typeface::Ptr getTypefaceForFontFromLookAndFeel (const Font& font)
- {
- return LookAndFeel::getDefaultLookAndFeel().getTypefaceForFont (font);
- }
+ return LookAndFeel::getDefaultLookAndFeel().getTypefaceForFont (font);
}
-//==============================================================================
typedef Typeface::Ptr (*GetTypefaceForFont) (const Font&);
extern GetTypefaceForFont juce_getTypefaceForFont;
@@ -213,7 +182,7 @@ LookAndFeel::LookAndFeel()
for (int i = 0; i < numElementsInArray (standardColours); i += 2)
setColour ((int) standardColours [i], Colour ((uint32) standardColours [i + 1]));
- juce_getTypefaceForFont = LookAndFeelHelpers::getTypefaceForFontFromLookAndFeel;
+ juce_getTypefaceForFont = getTypefaceForFontFromLookAndFeel;
}
LookAndFeel::~LookAndFeel()
@@ -306,305 +275,6 @@ LowLevelGraphicsContext* LookAndFeel::createGraphicsContext (const Image& imageT
}
//==============================================================================
-void LookAndFeel::drawButtonBackground (Graphics& g,
- Button& button,
- const Colour& backgroundColour,
- bool isMouseOverButton,
- bool isButtonDown)
-{
- const int width = button.getWidth();
- const int height = button.getHeight();
-
- const float outlineThickness = button.isEnabled() ? ((isButtonDown || isMouseOverButton) ? 1.2f : 0.7f) : 0.4f;
- const float halfThickness = outlineThickness * 0.5f;
-
- const float indentL = button.isConnectedOnLeft() ? 0.1f : halfThickness;
- const float indentR = button.isConnectedOnRight() ? 0.1f : halfThickness;
- const float indentT = button.isConnectedOnTop() ? 0.1f : halfThickness;
- const float indentB = button.isConnectedOnBottom() ? 0.1f : halfThickness;
-
- const Colour baseColour (LookAndFeelHelpers::createBaseColour (backgroundColour,
- button.hasKeyboardFocus (true),
- isMouseOverButton, isButtonDown)
- .withMultipliedAlpha (button.isEnabled() ? 1.0f : 0.5f));
-
- drawGlassLozenge (g,
- indentL,
- indentT,
- width - indentL - indentR,
- height - indentT - indentB,
- baseColour, outlineThickness, -1.0f,
- button.isConnectedOnLeft(),
- button.isConnectedOnRight(),
- button.isConnectedOnTop(),
- button.isConnectedOnBottom());
-}
-
-Font LookAndFeel::getTextButtonFont (TextButton& button)
-{
- return button.getFont();
-}
-
-void LookAndFeel::drawButtonText (Graphics& g, TextButton& button,
- bool /*isMouseOverButton*/, bool /*isButtonDown*/)
-{
- Font font (getTextButtonFont (button));
- g.setFont (font);
- g.setColour (button.findColour (button.getToggleState() ? TextButton::textColourOnId
- : TextButton::textColourOffId)
- .withMultipliedAlpha (button.isEnabled() ? 1.0f : 0.5f));
-
- const int yIndent = jmin (4, button.proportionOfHeight (0.3f));
- const int cornerSize = jmin (button.getHeight(), button.getWidth()) / 2;
-
- const int fontHeight = roundToInt (font.getHeight() * 0.6f);
- const int leftIndent = jmin (fontHeight, 2 + cornerSize / (button.isConnectedOnLeft() ? 4 : 2));
- const int rightIndent = jmin (fontHeight, 2 + cornerSize / (button.isConnectedOnRight() ? 4 : 2));
-
- g.drawFittedText (button.getButtonText(),
- leftIndent,
- yIndent,
- button.getWidth() - leftIndent - rightIndent,
- button.getHeight() - yIndent * 2,
- Justification::centred, 2);
-}
-
-void LookAndFeel::drawTickBox (Graphics& g,
- Component& component,
- float x, float y, float w, float h,
- const bool ticked,
- const bool isEnabled,
- const bool isMouseOverButton,
- const bool isButtonDown)
-{
- const float boxSize = w * 0.7f;
-
- drawGlassSphere (g, x, y + (h - boxSize) * 0.5f, boxSize,
- LookAndFeelHelpers::createBaseColour (component.findColour (TextButton::buttonColourId)
- .withMultipliedAlpha (isEnabled ? 1.0f : 0.5f),
- true, isMouseOverButton, isButtonDown),
- isEnabled ? ((isButtonDown || isMouseOverButton) ? 1.1f : 0.5f) : 0.3f);
-
- if (ticked)
- {
- Path tick;
- tick.startNewSubPath (1.5f, 3.0f);
- tick.lineTo (3.0f, 6.0f);
- tick.lineTo (6.0f, 0.0f);
-
- g.setColour (isEnabled ? Colours::black : Colours::grey);
-
- const AffineTransform trans (AffineTransform::scale (w / 9.0f, h / 9.0f)
- .translated (x, y));
-
- g.strokePath (tick, PathStrokeType (2.5f), trans);
- }
-}
-
-void LookAndFeel::drawToggleButton (Graphics& g,
- ToggleButton& button,
- bool isMouseOverButton,
- bool isButtonDown)
-{
- if (button.hasKeyboardFocus (true))
- {
- g.setColour (button.findColour (TextEditor::focusedOutlineColourId));
- g.drawRect (0, 0, button.getWidth(), button.getHeight());
- }
-
- float fontSize = jmin (15.0f, button.getHeight() * 0.75f);
- const float tickWidth = fontSize * 1.1f;
-
- drawTickBox (g, button, 4.0f, (button.getHeight() - tickWidth) * 0.5f,
- tickWidth, tickWidth,
- button.getToggleState(),
- button.isEnabled(),
- isMouseOverButton,
- isButtonDown);
-
- g.setColour (button.findColour (ToggleButton::textColourId));
- g.setFont (fontSize);
-
- if (! button.isEnabled())
- g.setOpacity (0.5f);
-
- const int textX = (int) tickWidth + 5;
-
- g.drawFittedText (button.getButtonText(),
- textX, 0,
- button.getWidth() - textX - 2, button.getHeight(),
- Justification::centredLeft, 10);
-}
-
-void LookAndFeel::changeToggleButtonWidthToFitText (ToggleButton& button)
-{
- Font font (jmin (15.0f, button.getHeight() * 0.6f));
-
- const int tickWidth = jmin (24, button.getHeight());
-
- button.setSize (font.getStringWidth (button.getButtonText()) + tickWidth + 8,
- button.getHeight());
-}
-
-void LookAndFeel::drawDrawableButton (Graphics& g, DrawableButton& button,
- bool /*isMouseOverButton*/, bool /*isButtonDown*/)
-{
- bool toggleState = button.getToggleState();
-
- g.fillAll (button.findColour (toggleState ? DrawableButton::backgroundOnColourId
- : DrawableButton::backgroundColourId));
-
- const int textH = (button.getStyle() == DrawableButton::ImageAboveTextLabel)
- ? jmin (16, button.proportionOfHeight (0.25f))
- : 0;
-
- if (textH > 0)
- {
- g.setFont ((float) textH);
-
- g.setColour (button.findColour (toggleState ? DrawableButton::textColourOnId
- : DrawableButton::textColourId)
- .withMultipliedAlpha (button.isEnabled() ? 1.0f : 0.4f));
-
- g.drawFittedText (button.getButtonText(),
- 2, button.getHeight() - textH - 1,
- button.getWidth() - 4, textH,
- Justification::centred, 1);
- }
-}
-
-//==============================================================================
-AlertWindow* LookAndFeel::createAlertWindow (const String& title,
- const String& message,
- const String& button1,
- const String& button2,
- const String& button3,
- AlertWindow::AlertIconType iconType,
- int numButtons,
- Component* associatedComponent)
-{
- AlertWindow* aw = new AlertWindow (title, message, iconType, associatedComponent);
-
- if (numButtons == 1)
- {
- aw->addButton (button1, 0,
- KeyPress (KeyPress::escapeKey),
- KeyPress (KeyPress::returnKey));
- }
- else
- {
- const KeyPress button1ShortCut ((int) CharacterFunctions::toLowerCase (button1[0]), 0, 0);
- KeyPress button2ShortCut ((int) CharacterFunctions::toLowerCase (button2[0]), 0, 0);
- if (button1ShortCut == button2ShortCut)
- button2ShortCut = KeyPress();
-
- if (numButtons == 2)
- {
- aw->addButton (button1, 1, KeyPress (KeyPress::returnKey), button1ShortCut);
- aw->addButton (button2, 0, KeyPress (KeyPress::escapeKey), button2ShortCut);
- }
- else if (numButtons == 3)
- {
- aw->addButton (button1, 1, button1ShortCut);
- aw->addButton (button2, 2, button2ShortCut);
- aw->addButton (button3, 0, KeyPress (KeyPress::escapeKey));
- }
- }
-
- return aw;
-}
-
-void LookAndFeel::drawAlertBox (Graphics& g,
- AlertWindow& alert,
- const Rectangle& textArea,
- TextLayout& textLayout)
-{
- g.fillAll (alert.findColour (AlertWindow::backgroundColourId));
-
- int iconSpaceUsed = 0;
-
- const int iconWidth = 80;
- int iconSize = jmin (iconWidth + 50, alert.getHeight() + 20);
-
- if (alert.containsAnyExtraComponents() || alert.getNumButtons() > 2)
- iconSize = jmin (iconSize, textArea.getHeight() + 50);
-
- const Rectangle iconRect (iconSize / -10, iconSize / -10,
- iconSize, iconSize);
-
- if (alert.getAlertType() != AlertWindow::NoIcon)
- {
- Path icon;
- uint32 colour;
- char character;
-
- if (alert.getAlertType() == AlertWindow::WarningIcon)
- {
- colour = 0x55ff5555;
- character = '!';
-
- icon.addTriangle (iconRect.getX() + iconRect.getWidth() * 0.5f, (float) iconRect.getY(),
- (float) iconRect.getRight(), (float) iconRect.getBottom(),
- (float) iconRect.getX(), (float) iconRect.getBottom());
-
- icon = icon.createPathWithRoundedCorners (5.0f);
- }
- else
- {
- colour = alert.getAlertType() == AlertWindow::InfoIcon ? (uint32) 0x605555ff : (uint32) 0x40b69900;
- character = alert.getAlertType() == AlertWindow::InfoIcon ? 'i' : '?';
-
- icon.addEllipse ((float) iconRect.getX(), (float) iconRect.getY(),
- (float) iconRect.getWidth(), (float) iconRect.getHeight());
- }
-
- GlyphArrangement ga;
- ga.addFittedText (Font (iconRect.getHeight() * 0.9f, Font::bold),
- String::charToString ((juce_wchar) (uint8) character),
- (float) iconRect.getX(), (float) iconRect.getY(),
- (float) iconRect.getWidth(), (float) iconRect.getHeight(),
- Justification::centred, false);
- ga.createPath (icon);
-
- icon.setUsingNonZeroWinding (false);
- g.setColour (Colour (colour));
- g.fillPath (icon);
-
- iconSpaceUsed = iconWidth;
- }
-
- g.setColour (alert.findColour (AlertWindow::textColourId));
-
- textLayout.draw (g, Rectangle (textArea.getX() + iconSpaceUsed,
- textArea.getY(),
- textArea.getWidth() - iconSpaceUsed,
- textArea.getHeight()).toFloat());
-
- g.setColour (alert.findColour (AlertWindow::outlineColourId));
- g.drawRect (0, 0, alert.getWidth(), alert.getHeight());
-}
-
-int LookAndFeel::getAlertBoxWindowFlags()
-{
- return ComponentPeer::windowAppearsOnTaskbar
- | ComponentPeer::windowHasDropShadow;
-}
-
-int LookAndFeel::getAlertWindowButtonHeight()
-{
- return 28;
-}
-
-Font LookAndFeel::getAlertWindowMessageFont()
-{
- return Font (15.0f);
-}
-
-Font LookAndFeel::getAlertWindowFont()
-{
- return Font (12.0f);
-}
-
void LookAndFeel::setUsingNativeAlertWindows (bool shouldUseNativeAlerts)
{
useNativeAlertWindows = shouldUseNativeAlerts;
@@ -618,2444 +288,3 @@ bool LookAndFeel::isUsingNativeAlertWindows()
return useNativeAlertWindows;
#endif
}
-
-//==============================================================================
-void LookAndFeel::drawProgressBar (Graphics& g, ProgressBar& progressBar,
- int width, int height,
- double progress, const String& textToShow)
-{
- const Colour background (progressBar.findColour (ProgressBar::backgroundColourId));
- const Colour foreground (progressBar.findColour (ProgressBar::foregroundColourId));
-
- g.fillAll (background);
-
- if (progress >= 0.0f && progress < 1.0f)
- {
- drawGlassLozenge (g, 1.0f, 1.0f,
- (float) jlimit (0.0, width - 2.0, progress * (width - 2.0)),
- (float) (height - 2),
- foreground,
- 0.5f, 0.0f,
- true, true, true, true);
- }
- else
- {
- // spinning bar..
- g.setColour (foreground);
-
- const int stripeWidth = height * 2;
- const int position = (int) (Time::getMillisecondCounter() / 15) % stripeWidth;
-
- Path p;
-
- for (float x = (float) (- position); x < width + stripeWidth; x += stripeWidth)
- p.addQuadrilateral (x, 0.0f,
- x + stripeWidth * 0.5f, 0.0f,
- x, (float) height,
- x - stripeWidth * 0.5f, (float) height);
-
- Image im (Image::ARGB, width, height, true);
-
- {
- Graphics g2 (im);
- drawGlassLozenge (g2, 1.0f, 1.0f,
- (float) (width - 2),
- (float) (height - 2),
- foreground,
- 0.5f, 0.0f,
- true, true, true, true);
- }
-
- g.setTiledImageFill (im, 0, 0, 0.85f);
- g.fillPath (p);
- }
-
- if (textToShow.isNotEmpty())
- {
- g.setColour (Colour::contrasting (background, foreground));
- g.setFont (height * 0.6f);
-
- g.drawText (textToShow, 0, 0, width, height, Justification::centred, false);
- }
-}
-
-void LookAndFeel::drawSpinningWaitAnimation (Graphics& g, const Colour& colour, int x, int y, int w, int h)
-{
- const float radius = jmin (w, h) * 0.4f;
- const float thickness = radius * 0.15f;
- Path p;
- p.addRoundedRectangle (radius * 0.4f, thickness * -0.5f,
- radius * 0.6f, thickness,
- thickness * 0.5f);
-
- const float cx = x + w * 0.5f;
- const float cy = y + h * 0.5f;
-
- const uint32 animationIndex = (Time::getMillisecondCounter() / (1000 / 10)) % 12;
-
- for (uint32 i = 0; i < 12; ++i)
- {
- const uint32 n = (i + 12 - animationIndex) % 12;
- g.setColour (colour.withMultipliedAlpha ((n + 1) / 12.0f));
-
- g.fillPath (p, AffineTransform::rotation (i * (float_Pi / 6.0f))
- .translated (cx, cy));
- }
-}
-
-bool LookAndFeel::areScrollbarButtonsVisible()
-{
- return true;
-}
-
-void LookAndFeel::drawScrollbarButton (Graphics& g,
- ScrollBar& scrollbar,
- int width, int height,
- int buttonDirection,
- bool /*isScrollbarVertical*/,
- bool /*isMouseOverButton*/,
- bool isButtonDown)
-{
- Path p;
-
- if (buttonDirection == 0)
- p.addTriangle (width * 0.5f, height * 0.2f,
- width * 0.1f, height * 0.7f,
- width * 0.9f, height * 0.7f);
- else if (buttonDirection == 1)
- p.addTriangle (width * 0.8f, height * 0.5f,
- width * 0.3f, height * 0.1f,
- width * 0.3f, height * 0.9f);
- else if (buttonDirection == 2)
- p.addTriangle (width * 0.5f, height * 0.8f,
- width * 0.1f, height * 0.3f,
- width * 0.9f, height * 0.3f);
- else if (buttonDirection == 3)
- p.addTriangle (width * 0.2f, height * 0.5f,
- width * 0.7f, height * 0.1f,
- width * 0.7f, height * 0.9f);
-
- if (isButtonDown)
- g.setColour (scrollbar.findColour (ScrollBar::thumbColourId).contrasting (0.2f));
- else
- g.setColour (scrollbar.findColour (ScrollBar::thumbColourId));
-
- g.fillPath (p);
-
- g.setColour (Colour (0x80000000));
- g.strokePath (p, PathStrokeType (0.5f));
-}
-
-void LookAndFeel::drawScrollbar (Graphics& g,
- ScrollBar& scrollbar,
- int x, int y,
- int width, int height,
- bool isScrollbarVertical,
- int thumbStartPosition,
- int thumbSize,
- bool /*isMouseOver*/,
- bool /*isMouseDown*/)
-{
- g.fillAll (scrollbar.findColour (ScrollBar::backgroundColourId));
-
- Path slotPath, thumbPath;
-
- const float slotIndent = jmin (width, height) > 15 ? 1.0f : 0.0f;
- const float slotIndentx2 = slotIndent * 2.0f;
- const float thumbIndent = slotIndent + 1.0f;
- const float thumbIndentx2 = thumbIndent * 2.0f;
-
- float gx1 = 0.0f, gy1 = 0.0f, gx2 = 0.0f, gy2 = 0.0f;
-
- if (isScrollbarVertical)
- {
- slotPath.addRoundedRectangle (x + slotIndent,
- y + slotIndent,
- width - slotIndentx2,
- height - slotIndentx2,
- (width - slotIndentx2) * 0.5f);
-
- if (thumbSize > 0)
- thumbPath.addRoundedRectangle (x + thumbIndent,
- thumbStartPosition + thumbIndent,
- width - thumbIndentx2,
- thumbSize - thumbIndentx2,
- (width - thumbIndentx2) * 0.5f);
- gx1 = (float) x;
- gx2 = x + width * 0.7f;
- }
- else
- {
- slotPath.addRoundedRectangle (x + slotIndent,
- y + slotIndent,
- width - slotIndentx2,
- height - slotIndentx2,
- (height - slotIndentx2) * 0.5f);
-
- if (thumbSize > 0)
- thumbPath.addRoundedRectangle (thumbStartPosition + thumbIndent,
- y + thumbIndent,
- thumbSize - thumbIndentx2,
- height - thumbIndentx2,
- (height - thumbIndentx2) * 0.5f);
- gy1 = (float) y;
- gy2 = y + height * 0.7f;
- }
-
- const Colour thumbColour (scrollbar.findColour (ScrollBar::thumbColourId));
- Colour trackColour1, trackColour2;
-
- if (scrollbar.isColourSpecified (ScrollBar::trackColourId)
- || isColourSpecified (ScrollBar::trackColourId))
- {
- trackColour1 = trackColour2 = scrollbar.findColour (ScrollBar::trackColourId);
- }
- else
- {
- trackColour1 = thumbColour.overlaidWith (Colour (0x44000000));
- trackColour2 = thumbColour.overlaidWith (Colour (0x19000000));
- }
-
- g.setGradientFill (ColourGradient (trackColour1, gx1, gy1,
- trackColour2, gx2, gy2, false));
- g.fillPath (slotPath);
-
- if (isScrollbarVertical)
- {
- gx1 = x + width * 0.6f;
- gx2 = (float) x + width;
- }
- else
- {
- gy1 = y + height * 0.6f;
- gy2 = (float) y + height;
- }
-
- g.setGradientFill (ColourGradient (Colours::transparentBlack,gx1, gy1,
- Colour (0x19000000), gx2, gy2, false));
- g.fillPath (slotPath);
-
- g.setColour (thumbColour);
- g.fillPath (thumbPath);
-
- g.setGradientFill (ColourGradient (Colour (0x10000000), gx1, gy1,
- Colours::transparentBlack, gx2, gy2, false));
-
- g.saveState();
-
- if (isScrollbarVertical)
- g.reduceClipRegion (x + width / 2, y, width, height);
- else
- g.reduceClipRegion (x, y + height / 2, width, height);
-
- g.fillPath (thumbPath);
- g.restoreState();
-
- g.setColour (Colour (0x4c000000));
- g.strokePath (thumbPath, PathStrokeType (0.4f));
-}
-
-ImageEffectFilter* LookAndFeel::getScrollbarEffect()
-{
- return nullptr;
-}
-
-int LookAndFeel::getMinimumScrollbarThumbSize (ScrollBar& scrollbar)
-{
- return jmin (scrollbar.getWidth(), scrollbar.getHeight()) * 2;
-}
-
-int LookAndFeel::getDefaultScrollbarWidth()
-{
- return 18;
-}
-
-int LookAndFeel::getScrollbarButtonSize (ScrollBar& scrollbar)
-{
- return 2 + (scrollbar.isVertical() ? scrollbar.getWidth()
- : scrollbar.getHeight());
-}
-
-//==============================================================================
-Path LookAndFeel::getTickShape (const float height)
-{
- static const unsigned char tickShapeData[] =
- {
- 109,0,224,168,68,0,0,119,67,108,0,224,172,68,0,128,146,67,113,0,192,148,68,0,0,219,67,0,96,110,68,0,224,56,68,113,0,64,51,68,0,32,130,68,0,64,20,68,0,224,
- 162,68,108,0,128,3,68,0,128,168,68,113,0,128,221,67,0,192,175,68,0,0,207,67,0,32,179,68,113,0,0,201,67,0,224,173,68,0,0,181,67,0,224,161,68,108,0,128,168,67,
- 0,128,154,68,113,0,128,141,67,0,192,138,68,0,128,108,67,0,64,131,68,113,0,0,62,67,0,128,119,68,0,0,5,67,0,128,114,68,113,0,0,102,67,0,192,88,68,0,128,155,
- 67,0,192,88,68,113,0,0,190,67,0,192,88,68,0,128,232,67,0,224,131,68,108,0,128,246,67,0,192,139,68,113,0,64,33,68,0,128,87,68,0,0,93,68,0,224,26,68,113,0,
- 96,140,68,0,128,188,67,0,224,168,68,0,0,119,67,99,101
- };
-
- Path p;
- p.loadPathFromData (tickShapeData, sizeof (tickShapeData));
- p.scaleToFit (0, 0, height * 2.0f, height, true);
- return p;
-}
-
-Path LookAndFeel::getCrossShape (const float height)
-{
- static const unsigned char crossShapeData[] =
- {
- 109,0,0,17,68,0,96,145,68,108,0,192,13,68,0,192,147,68,113,0,0,213,67,0,64,174,68,0,0,168,67,0,64,174,68,113,0,0,104,67,0,64,174,68,0,0,5,67,0,64,
- 153,68,113,0,0,18,67,0,64,153,68,0,0,24,67,0,64,153,68,113,0,0,135,67,0,64,153,68,0,128,207,67,0,224,130,68,108,0,0,220,67,0,0,126,68,108,0,0,204,67,
- 0,128,117,68,113,0,0,138,67,0,64,82,68,0,0,138,67,0,192,57,68,113,0,0,138,67,0,192,37,68,0,128,210,67,0,64,10,68,113,0,128,220,67,0,64,45,68,0,0,8,
- 68,0,128,78,68,108,0,192,14,68,0,0,87,68,108,0,64,20,68,0,0,80,68,113,0,192,57,68,0,0,32,68,0,128,88,68,0,0,32,68,113,0,64,112,68,0,0,32,68,0,
- 128,124,68,0,64,68,68,113,0,0,121,68,0,192,67,68,0,128,119,68,0,192,67,68,113,0,192,108,68,0,192,67,68,0,32,89,68,0,96,82,68,113,0,128,69,68,0,0,97,68,
- 0,0,56,68,0,64,115,68,108,0,64,49,68,0,128,124,68,108,0,192,55,68,0,96,129,68,113,0,0,92,68,0,224,146,68,0,192,129,68,0,224,146,68,113,0,64,110,68,0,64,
- 168,68,0,64,87,68,0,64,168,68,113,0,128,66,68,0,64,168,68,0,64,27,68,0,32,150,68,99,101
- };
-
- Path p;
- p.loadPathFromData (crossShapeData, sizeof (crossShapeData));
- p.scaleToFit (0, 0, height * 2.0f, height, true);
- return p;
-}
-
-//==============================================================================
-void LookAndFeel::drawTreeviewPlusMinusBox (Graphics& g, const Rectangle& area,
- Colour /*backgroundColour*/, bool isOpen, bool /*isMouseOver*/)
-{
- const int boxSize = roundToInt (jmin (16.0f, area.getWidth(), area.getHeight()) * 0.7f) | 1;
-
- const int x = ((int) area.getWidth() - boxSize) / 2 + (int) area.getX();
- const int y = ((int) area.getHeight() - boxSize) / 2 + (int) area.getY();
- const int w = boxSize;
- const int h = boxSize;
-
- g.setColour (Colour (0xe5ffffff));
- g.fillRect (x, y, w, h);
-
- g.setColour (Colour (0x80000000));
- g.drawRect (x, y, w, h);
-
- const float size = boxSize / 2 + 1.0f;
- const float centre = (float) (boxSize / 2);
-
- g.fillRect (x + (w - size) * 0.5f, y + centre, size, 1.0f);
-
- if (! isOpen)
- g.fillRect (x + centre, y + (h - size) * 0.5f, 1.0f, size);
-}
-
-//==============================================================================
-void LookAndFeel::drawBubble (Graphics& g, BubbleComponent& comp,
- const Point& tip, const Rectangle& body)
-{
- Path p;
- p.addBubble (body, body.getUnion (Rectangle (tip.x, tip.y, 1.0f, 1.0f)),
- tip, 5.0f, jmin (15.0f, body.getWidth() * 0.2f, body.getHeight() * 0.2f));
-
- g.setColour (comp.findColour (BubbleComponent::backgroundColourId));
- g.fillPath (p);
-
- g.setColour (comp.findColour (BubbleComponent::outlineColourId));
- g.strokePath (p, PathStrokeType (1.33f));
-}
-
-
-//==============================================================================
-Font LookAndFeel::getPopupMenuFont()
-{
- return Font (17.0f);
-}
-
-void LookAndFeel::getIdealPopupMenuItemSize (const String& text,
- const bool isSeparator,
- int standardMenuItemHeight,
- int& idealWidth,
- int& idealHeight)
-{
- if (isSeparator)
- {
- idealWidth = 50;
- idealHeight = standardMenuItemHeight > 0 ? standardMenuItemHeight / 2 : 10;
- }
- else
- {
- Font font (getPopupMenuFont());
-
- if (standardMenuItemHeight > 0 && font.getHeight() > standardMenuItemHeight / 1.3f)
- font.setHeight (standardMenuItemHeight / 1.3f);
-
- idealHeight = standardMenuItemHeight > 0 ? standardMenuItemHeight : roundToInt (font.getHeight() * 1.3f);
- idealWidth = font.getStringWidth (text) + idealHeight * 2;
- }
-}
-
-void LookAndFeel::drawPopupMenuBackground (Graphics& g, int width, int height)
-{
- const Colour background (findColour (PopupMenu::backgroundColourId));
-
- g.fillAll (background);
- g.setColour (background.overlaidWith (Colour (0x2badd8e6)));
-
- for (int i = 0; i < height; i += 3)
- g.fillRect (0, i, width, 1);
-
-#if ! JUCE_MAC
- g.setColour (findColour (PopupMenu::textColourId).withAlpha (0.6f));
- g.drawRect (0, 0, width, height);
-#endif
-}
-
-void LookAndFeel::drawPopupMenuUpDownArrow (Graphics& g,
- int width, int height,
- bool isScrollUpArrow)
-{
- const Colour background (findColour (PopupMenu::backgroundColourId));
-
- g.setGradientFill (ColourGradient (background, 0.0f, height * 0.5f,
- background.withAlpha (0.0f),
- 0.0f, isScrollUpArrow ? ((float) height) : 0.0f,
- false));
-
- g.fillRect (1, 1, width - 2, height - 2);
-
- const float hw = width * 0.5f;
- const float arrowW = height * 0.3f;
- const float y1 = height * (isScrollUpArrow ? 0.6f : 0.3f);
- const float y2 = height * (isScrollUpArrow ? 0.3f : 0.6f);
-
- Path p;
- p.addTriangle (hw - arrowW, y1,
- hw + arrowW, y1,
- hw, y2);
-
- g.setColour (findColour (PopupMenu::textColourId).withAlpha (0.5f));
- g.fillPath (p);
-}
-
-void LookAndFeel::drawPopupMenuItem (Graphics& g,
- int width, int height,
- const bool isSeparator,
- const bool isActive,
- const bool isHighlighted,
- const bool isTicked,
- const bool hasSubMenu,
- const String& text,
- const String& shortcutKeyText,
- Image* image,
- const Colour* const textColourToUse)
-{
- const float halfH = height * 0.5f;
-
- if (isSeparator)
- {
- const float separatorIndent = 5.5f;
-
- g.setColour (Colour (0x33000000));
- g.drawLine (separatorIndent, halfH, width - separatorIndent, halfH);
-
- g.setColour (Colour (0x66ffffff));
- g.drawLine (separatorIndent, halfH + 1.0f, width - separatorIndent, halfH + 1.0f);
- }
- else
- {
- Colour textColour (findColour (PopupMenu::textColourId));
-
- if (textColourToUse != nullptr)
- textColour = *textColourToUse;
-
- if (isHighlighted)
- {
- g.setColour (findColour (PopupMenu::highlightedBackgroundColourId));
- g.fillRect (1, 1, width - 2, height - 2);
-
- g.setColour (findColour (PopupMenu::highlightedTextColourId));
- }
- else
- {
- g.setColour (textColour);
- }
-
- if (! isActive)
- g.setOpacity (0.3f);
-
- Font font (getPopupMenuFont());
-
- if (font.getHeight() > height / 1.3f)
- font.setHeight (height / 1.3f);
-
- g.setFont (font);
-
- const int leftBorder = (height * 5) / 4;
- const int rightBorder = 4;
-
- if (image != nullptr)
- {
- g.drawImageWithin (*image,
- 2, 1, leftBorder - 4, height - 2,
- RectanglePlacement::centred | RectanglePlacement::onlyReduceInSize, false);
- }
- else if (isTicked)
- {
- const Path tick (getTickShape (1.0f));
- const float th = font.getAscent();
- const float ty = halfH - th * 0.5f;
-
- g.fillPath (tick, tick.getTransformToScaleToFit (2.0f, ty, (float) (leftBorder - 4),
- th, true));
- }
-
- g.drawFittedText (text,
- leftBorder, 0, width - (leftBorder + rightBorder), height,
- Justification::centredLeft, 1);
-
- if (shortcutKeyText.isNotEmpty())
- {
- Font f2 (font);
- f2.setHeight (f2.getHeight() * 0.75f);
- f2.setHorizontalScale (0.95f);
- g.setFont (f2);
-
- g.drawText (shortcutKeyText,
- leftBorder, 0, width - (leftBorder + rightBorder + 4), height,
- Justification::centredRight,
- true);
- }
-
- if (hasSubMenu)
- {
- const float arrowH = 0.6f * getPopupMenuFont().getAscent();
- const float x = width - height * 0.6f;
-
- Path p;
- p.addTriangle (x, halfH - arrowH * 0.5f,
- x, halfH + arrowH * 0.5f,
- x + arrowH * 0.6f, halfH);
-
- g.fillPath (p);
- }
- }
-}
-
-//==============================================================================
-int LookAndFeel::getMenuWindowFlags()
-{
- return ComponentPeer::windowHasDropShadow;
-}
-
-void LookAndFeel::drawMenuBarBackground (Graphics& g, int width, int height,
- bool, MenuBarComponent& menuBar)
-{
- const Colour baseColour (LookAndFeelHelpers::createBaseColour (menuBar.findColour (PopupMenu::backgroundColourId), false, false, false));
-
- if (menuBar.isEnabled())
- {
- drawShinyButtonShape (g,
- -4.0f, 0.0f,
- width + 8.0f, (float) height,
- 0.0f,
- baseColour,
- 0.4f,
- true, true, true, true);
- }
- else
- {
- g.fillAll (baseColour);
- }
-}
-
-Font LookAndFeel::getMenuBarFont (MenuBarComponent& menuBar, int /*itemIndex*/, const String& /*itemText*/)
-{
- return Font (menuBar.getHeight() * 0.7f);
-}
-
-int LookAndFeel::getMenuBarItemWidth (MenuBarComponent& menuBar, int itemIndex, const String& itemText)
-{
- return getMenuBarFont (menuBar, itemIndex, itemText)
- .getStringWidth (itemText) + menuBar.getHeight();
-}
-
-void LookAndFeel::drawMenuBarItem (Graphics& g,
- int width, int height,
- int itemIndex,
- const String& itemText,
- bool isMouseOverItem,
- bool isMenuOpen,
- bool /*isMouseOverBar*/,
- MenuBarComponent& menuBar)
-{
- if (! menuBar.isEnabled())
- {
- g.setColour (menuBar.findColour (PopupMenu::textColourId)
- .withMultipliedAlpha (0.5f));
- }
- else if (isMenuOpen || isMouseOverItem)
- {
- g.fillAll (menuBar.findColour (PopupMenu::highlightedBackgroundColourId));
- g.setColour (menuBar.findColour (PopupMenu::highlightedTextColourId));
- }
- else
- {
- g.setColour (menuBar.findColour (PopupMenu::textColourId));
- }
-
- g.setFont (getMenuBarFont (menuBar, itemIndex, itemText));
- g.drawFittedText (itemText, 0, 0, width, height, Justification::centred, 1);
-}
-
-//==============================================================================
-void LookAndFeel::fillTextEditorBackground (Graphics& g, int /*width*/, int /*height*/,
- TextEditor& textEditor)
-{
- g.fillAll (textEditor.findColour (TextEditor::backgroundColourId));
-}
-
-void LookAndFeel::drawTextEditorOutline (Graphics& g, int width, int height, TextEditor& textEditor)
-{
- if (textEditor.isEnabled())
- {
- if (textEditor.hasKeyboardFocus (true) && ! textEditor.isReadOnly())
- {
- const int border = 2;
-
- g.setColour (textEditor.findColour (TextEditor::focusedOutlineColourId));
- g.drawRect (0, 0, width, height, border);
-
- g.setOpacity (1.0f);
- const Colour shadowColour (textEditor.findColour (TextEditor::shadowColourId).withMultipliedAlpha (0.75f));
- drawBevel (g, 0, 0, width, height + 2, border + 2, shadowColour, shadowColour);
- }
- else
- {
- g.setColour (textEditor.findColour (TextEditor::outlineColourId));
- g.drawRect (0, 0, width, height);
-
- g.setOpacity (1.0f);
- const Colour shadowColour (textEditor.findColour (TextEditor::shadowColourId));
- drawBevel (g, 0, 0, width, height + 2, 3, shadowColour, shadowColour);
- }
- }
-}
-
-CaretComponent* LookAndFeel::createCaretComponent (Component* keyFocusOwner)
-{
- return new CaretComponent (keyFocusOwner);
-}
-
-//==============================================================================
-void LookAndFeel::drawComboBox (Graphics& g, int width, int height,
- const bool isButtonDown,
- int buttonX, int buttonY,
- int buttonW, int buttonH,
- ComboBox& box)
-{
- g.fillAll (box.findColour (ComboBox::backgroundColourId));
-
- if (box.isEnabled() && box.hasKeyboardFocus (false))
- {
- g.setColour (box.findColour (ComboBox::buttonColourId));
- g.drawRect (0, 0, width, height, 2);
- }
- else
- {
- g.setColour (box.findColour (ComboBox::outlineColourId));
- g.drawRect (0, 0, width, height);
- }
-
- const float outlineThickness = box.isEnabled() ? (isButtonDown ? 1.2f : 0.5f) : 0.3f;
-
- const Colour baseColour (LookAndFeelHelpers::createBaseColour (box.findColour (ComboBox::buttonColourId),
- box.hasKeyboardFocus (true),
- false, isButtonDown)
- .withMultipliedAlpha (box.isEnabled() ? 1.0f : 0.5f));
-
- drawGlassLozenge (g,
- buttonX + outlineThickness, buttonY + outlineThickness,
- buttonW - outlineThickness * 2.0f, buttonH - outlineThickness * 2.0f,
- baseColour, outlineThickness, -1.0f,
- true, true, true, true);
-
- if (box.isEnabled())
- {
- const float arrowX = 0.3f;
- const float arrowH = 0.2f;
-
- Path p;
- p.addTriangle (buttonX + buttonW * 0.5f, buttonY + buttonH * (0.45f - arrowH),
- buttonX + buttonW * (1.0f - arrowX), buttonY + buttonH * 0.45f,
- buttonX + buttonW * arrowX, buttonY + buttonH * 0.45f);
-
- p.addTriangle (buttonX + buttonW * 0.5f, buttonY + buttonH * (0.55f + arrowH),
- buttonX + buttonW * (1.0f - arrowX), buttonY + buttonH * 0.55f,
- buttonX + buttonW * arrowX, buttonY + buttonH * 0.55f);
-
- g.setColour (box.findColour (ComboBox::arrowColourId));
- g.fillPath (p);
- }
-}
-
-Font LookAndFeel::getComboBoxFont (ComboBox& box)
-{
- return Font (jmin (15.0f, box.getHeight() * 0.85f));
-}
-
-Label* LookAndFeel::createComboBoxTextBox (ComboBox&)
-{
- return new Label (String::empty, String::empty);
-}
-
-void LookAndFeel::positionComboBoxText (ComboBox& box, Label& label)
-{
- label.setBounds (1, 1,
- box.getWidth() + 3 - box.getHeight(),
- box.getHeight() - 2);
-
- label.setFont (getComboBoxFont (box));
-}
-
-//==============================================================================
-Font LookAndFeel::getLabelFont (Label& label)
-{
- return label.getFont();
-}
-
-void LookAndFeel::drawLabel (Graphics& g, Label& label)
-{
- g.fillAll (label.findColour (Label::backgroundColourId));
-
- if (! label.isBeingEdited())
- {
- const float alpha = label.isEnabled() ? 1.0f : 0.5f;
- const Font font (getLabelFont (label));
-
- g.setColour (label.findColour (Label::textColourId).withMultipliedAlpha (alpha));
- g.setFont (font);
- g.drawFittedText (label.getText(),
- label.getHorizontalBorderSize(),
- label.getVerticalBorderSize(),
- label.getWidth() - 2 * label.getHorizontalBorderSize(),
- label.getHeight() - 2 * label.getVerticalBorderSize(),
- label.getJustificationType(),
- jmax (1, (int) (label.getHeight() / font.getHeight())),
- label.getMinimumHorizontalScale());
-
- g.setColour (label.findColour (Label::outlineColourId).withMultipliedAlpha (alpha));
- }
- else if (label.isEnabled())
- {
- g.setColour (label.findColour (Label::outlineColourId));
- }
-
- g.drawRect (label.getLocalBounds());
-}
-
-//==============================================================================
-void LookAndFeel::drawLinearSliderBackground (Graphics& g,
- int x, int y,
- int width, int height,
- float /*sliderPos*/,
- float /*minSliderPos*/,
- float /*maxSliderPos*/,
- const Slider::SliderStyle /*style*/,
- Slider& slider)
-{
- const float sliderRadius = (float) (getSliderThumbRadius (slider) - 2);
-
- const Colour trackColour (slider.findColour (Slider::trackColourId));
- const Colour gradCol1 (trackColour.overlaidWith (Colours::black.withAlpha (slider.isEnabled() ? 0.25f : 0.13f)));
- const Colour gradCol2 (trackColour.overlaidWith (Colour (0x14000000)));
- Path indent;
-
- if (slider.isHorizontal())
- {
- const float iy = y + height * 0.5f - sliderRadius * 0.5f;
- const float ih = sliderRadius;
-
- g.setGradientFill (ColourGradient (gradCol1, 0.0f, iy,
- gradCol2, 0.0f, iy + ih, false));
-
- indent.addRoundedRectangle (x - sliderRadius * 0.5f, iy,
- width + sliderRadius, ih,
- 5.0f);
- }
- else
- {
- const float ix = x + width * 0.5f - sliderRadius * 0.5f;
- const float iw = sliderRadius;
-
- g.setGradientFill (ColourGradient (gradCol1, ix, 0.0f,
- gradCol2, ix + iw, 0.0f, false));
-
- indent.addRoundedRectangle (ix, y - sliderRadius * 0.5f,
- iw, height + sliderRadius,
- 5.0f);
- }
-
- g.fillPath (indent);
-
- g.setColour (Colour (0x4c000000));
- g.strokePath (indent, PathStrokeType (0.5f));
-}
-
-void LookAndFeel::drawLinearSliderThumb (Graphics& g,
- int x, int y,
- int width, int height,
- float sliderPos,
- float minSliderPos,
- float maxSliderPos,
- const Slider::SliderStyle style,
- Slider& slider)
-{
- const float sliderRadius = (float) (getSliderThumbRadius (slider) - 2);
-
- Colour knobColour (LookAndFeelHelpers::createBaseColour (slider.findColour (Slider::thumbColourId),
- slider.hasKeyboardFocus (false) && slider.isEnabled(),
- slider.isMouseOverOrDragging() && slider.isEnabled(),
- slider.isMouseButtonDown() && slider.isEnabled()));
-
- const float outlineThickness = slider.isEnabled() ? 0.8f : 0.3f;
-
- if (style == Slider::LinearHorizontal || style == Slider::LinearVertical)
- {
- float kx, ky;
-
- if (style == Slider::LinearVertical)
- {
- kx = x + width * 0.5f;
- ky = sliderPos;
- }
- else
- {
- kx = sliderPos;
- ky = y + height * 0.5f;
- }
-
- drawGlassSphere (g,
- kx - sliderRadius,
- ky - sliderRadius,
- sliderRadius * 2.0f,
- knobColour, outlineThickness);
- }
- else
- {
- if (style == Slider::ThreeValueVertical)
- {
- drawGlassSphere (g, x + width * 0.5f - sliderRadius,
- sliderPos - sliderRadius,
- sliderRadius * 2.0f,
- knobColour, outlineThickness);
- }
- else if (style == Slider::ThreeValueHorizontal)
- {
- drawGlassSphere (g,sliderPos - sliderRadius,
- y + height * 0.5f - sliderRadius,
- sliderRadius * 2.0f,
- knobColour, outlineThickness);
- }
-
- if (style == Slider::TwoValueVertical || style == Slider::ThreeValueVertical)
- {
- const float sr = jmin (sliderRadius, width * 0.4f);
-
- drawGlassPointer (g, jmax (0.0f, x + width * 0.5f - sliderRadius * 2.0f),
- minSliderPos - sliderRadius,
- sliderRadius * 2.0f, knobColour, outlineThickness, 1);
-
- drawGlassPointer (g, jmin (x + width - sliderRadius * 2.0f, x + width * 0.5f), maxSliderPos - sr,
- sliderRadius * 2.0f, knobColour, outlineThickness, 3);
- }
- else if (style == Slider::TwoValueHorizontal || style == Slider::ThreeValueHorizontal)
- {
- const float sr = jmin (sliderRadius, height * 0.4f);
-
- drawGlassPointer (g, minSliderPos - sr,
- jmax (0.0f, y + height * 0.5f - sliderRadius * 2.0f),
- sliderRadius * 2.0f, knobColour, outlineThickness, 2);
-
- drawGlassPointer (g, maxSliderPos - sliderRadius,
- jmin (y + height - sliderRadius * 2.0f, y + height * 0.5f),
- sliderRadius * 2.0f, knobColour, outlineThickness, 4);
- }
- }
-}
-
-void LookAndFeel::drawLinearSlider (Graphics& g,
- int x, int y,
- int width, int height,
- float sliderPos,
- float minSliderPos,
- float maxSliderPos,
- const Slider::SliderStyle style,
- Slider& slider)
-{
- g.fillAll (slider.findColour (Slider::backgroundColourId));
-
- if (style == Slider::LinearBar || style == Slider::LinearBarVertical)
- {
- const bool isMouseOver = slider.isMouseOverOrDragging() && slider.isEnabled();
-
- Colour baseColour (LookAndFeelHelpers::createBaseColour (slider.findColour (Slider::thumbColourId)
- .withMultipliedSaturation (slider.isEnabled() ? 1.0f : 0.5f),
- false, isMouseOver,
- isMouseOver || slider.isMouseButtonDown()));
-
- drawShinyButtonShape (g,
- (float) x,
- style == Slider::LinearBarVertical ? sliderPos
- : (float) y,
- style == Slider::LinearBarVertical ? (float) width
- : (sliderPos - x),
- style == Slider::LinearBarVertical ? (height - sliderPos)
- : (float) height, 0.0f,
- baseColour,
- slider.isEnabled() ? 0.9f : 0.3f,
- true, true, true, true);
- }
- else
- {
- drawLinearSliderBackground (g, x, y, width, height, sliderPos, minSliderPos, maxSliderPos, style, slider);
- drawLinearSliderThumb (g, x, y, width, height, sliderPos, minSliderPos, maxSliderPos, style, slider);
- }
-}
-
-int LookAndFeel::getSliderThumbRadius (Slider& slider)
-{
- return jmin (7,
- slider.getHeight() / 2,
- slider.getWidth() / 2) + 2;
-}
-
-void LookAndFeel::drawRotarySlider (Graphics& g,
- int x, int y,
- int width, int height,
- float sliderPos,
- const float rotaryStartAngle,
- const float rotaryEndAngle,
- Slider& slider)
-{
- const float radius = jmin (width / 2, height / 2) - 2.0f;
- const float centreX = x + width * 0.5f;
- const float centreY = y + height * 0.5f;
- const float rx = centreX - radius;
- const float ry = centreY - radius;
- const float rw = radius * 2.0f;
- const float angle = rotaryStartAngle + sliderPos * (rotaryEndAngle - rotaryStartAngle);
- const bool isMouseOver = slider.isMouseOverOrDragging() && slider.isEnabled();
-
- if (radius > 12.0f)
- {
- if (slider.isEnabled())
- g.setColour (slider.findColour (Slider::rotarySliderFillColourId).withAlpha (isMouseOver ? 1.0f : 0.7f));
- else
- g.setColour (Colour (0x80808080));
-
- const float thickness = 0.7f;
-
- {
- Path filledArc;
- filledArc.addPieSegment (rx, ry, rw, rw, rotaryStartAngle, angle, thickness);
- g.fillPath (filledArc);
- }
-
- if (thickness > 0)
- {
- const float innerRadius = radius * 0.2f;
- Path p;
- p.addTriangle (-innerRadius, 0.0f,
- 0.0f, -radius * thickness * 1.1f,
- innerRadius, 0.0f);
-
- p.addEllipse (-innerRadius, -innerRadius, innerRadius * 2.0f, innerRadius * 2.0f);
-
- g.fillPath (p, AffineTransform::rotation (angle).translated (centreX, centreY));
- }
-
- if (slider.isEnabled())
- g.setColour (slider.findColour (Slider::rotarySliderOutlineColourId));
- else
- g.setColour (Colour (0x80808080));
-
- Path outlineArc;
- outlineArc.addPieSegment (rx, ry, rw, rw, rotaryStartAngle, rotaryEndAngle, thickness);
- outlineArc.closeSubPath();
-
- g.strokePath (outlineArc, PathStrokeType (slider.isEnabled() ? (isMouseOver ? 2.0f : 1.2f) : 0.3f));
- }
- else
- {
- if (slider.isEnabled())
- g.setColour (slider.findColour (Slider::rotarySliderFillColourId).withAlpha (isMouseOver ? 1.0f : 0.7f));
- else
- g.setColour (Colour (0x80808080));
-
- Path p;
- p.addEllipse (-0.4f * rw, -0.4f * rw, rw * 0.8f, rw * 0.8f);
- PathStrokeType (rw * 0.1f).createStrokedPath (p, p);
-
- p.addLineSegment (Line (0.0f, 0.0f, 0.0f, -radius), rw * 0.2f);
-
- g.fillPath (p, AffineTransform::rotation (angle).translated (centreX, centreY));
- }
-}
-
-Button* LookAndFeel::createSliderButton (const bool isIncrement)
-{
- return new TextButton (isIncrement ? "+" : "-", String::empty);
-}
-
-class LookAndFeel::SliderLabelComp : public Label
-{
-public:
- SliderLabelComp() : Label (String::empty, String::empty) {}
-
- void mouseWheelMove (const MouseEvent&, const MouseWheelDetails&) {}
-};
-
-Label* LookAndFeel::createSliderTextBox (Slider& slider)
-{
- Label* const l = new SliderLabelComp();
-
- l->setJustificationType (Justification::centred);
-
- l->setColour (Label::textColourId, slider.findColour (Slider::textBoxTextColourId));
-
- l->setColour (Label::backgroundColourId,
- (slider.getSliderStyle() == Slider::LinearBar || slider.getSliderStyle() == Slider::LinearBarVertical)
- ? Colours::transparentBlack
- : slider.findColour (Slider::textBoxBackgroundColourId));
- l->setColour (Label::outlineColourId, slider.findColour (Slider::textBoxOutlineColourId));
-
- l->setColour (TextEditor::textColourId, slider.findColour (Slider::textBoxTextColourId));
-
- l->setColour (TextEditor::backgroundColourId,
- slider.findColour (Slider::textBoxBackgroundColourId)
- .withAlpha ((slider.getSliderStyle() == Slider::LinearBar || slider.getSliderStyle() == Slider::LinearBarVertical)
- ? 0.7f : 1.0f));
-
- l->setColour (TextEditor::outlineColourId, slider.findColour (Slider::textBoxOutlineColourId));
-
- return l;
-}
-
-ImageEffectFilter* LookAndFeel::getSliderEffect()
-{
- return nullptr;
-}
-
-Font LookAndFeel::getSliderPopupFont()
-{
- return Font (15.0f, Font::bold);
-}
-
-int LookAndFeel::getSliderPopupPlacement()
-{
- return BubbleComponent::above
- | BubbleComponent::below
- | BubbleComponent::left
- | BubbleComponent::right;
-}
-
-//==============================================================================
-void LookAndFeel::getTooltipSize (const String& tipText, int& width, int& height)
-{
- const TextLayout tl (LookAndFeelHelpers::layoutTooltipText (tipText, Colours::black));
-
- width = (int) (tl.getWidth() + 14.0f);
- height = (int) (tl.getHeight() + 6.0f);
-}
-
-void LookAndFeel::drawTooltip (Graphics& g, const String& text, int width, int height)
-{
- g.fillAll (findColour (TooltipWindow::backgroundColourId));
-
- #if ! JUCE_MAC // The mac windows already have a non-optional 1 pix outline, so don't double it here..
- g.setColour (findColour (TooltipWindow::outlineColourId));
- g.drawRect (0, 0, width, height, 1);
- #endif
-
- LookAndFeelHelpers::layoutTooltipText (text, findColour (TooltipWindow::textColourId))
- .draw (g, Rectangle ((float) width, (float) height));
-}
-
-//==============================================================================
-Button* LookAndFeel::createFilenameComponentBrowseButton (const String& text)
-{
- return new TextButton (text, TRANS("click to browse for a different file"));
-}
-
-void LookAndFeel::layoutFilenameComponent (FilenameComponent& filenameComp,
- ComboBox* filenameBox,
- Button* browseButton)
-{
- browseButton->setSize (80, filenameComp.getHeight());
-
- if (TextButton* const tb = dynamic_cast (browseButton))
- tb->changeWidthToFitText();
-
- browseButton->setTopRightPosition (filenameComp.getWidth(), 0);
-
- filenameBox->setBounds (0, 0, browseButton->getX(), filenameComp.getHeight());
-}
-
-//==============================================================================
-void LookAndFeel::drawConcertinaPanelHeader (Graphics& g, const Rectangle& area,
- bool isMouseOver, bool /*isMouseDown*/,
- ConcertinaPanel&, Component& panel)
-{
- g.fillAll (Colours::grey.withAlpha (isMouseOver ? 0.9f : 0.7f));
- g.setColour (Colours::black.withAlpha (0.5f));
- g.drawRect (area);
-
- g.setColour (Colours::white);
- g.setFont (Font (area.getHeight() * 0.7f).boldened());
- g.drawFittedText (panel.getName(), 4, 0, area.getWidth() - 6, area.getHeight(), Justification::centredLeft, 1);
-}
-
-//==============================================================================
-void LookAndFeel::drawImageButton (Graphics& g, Image* image,
- int imageX, int imageY, int imageW, int imageH,
- const Colour& overlayColour,
- float imageOpacity,
- ImageButton& button)
-{
- if (! button.isEnabled())
- imageOpacity *= 0.3f;
-
- AffineTransform t = RectanglePlacement (RectanglePlacement::stretchToFit)
- .getTransformToFit (image->getBounds().toFloat(),
- Rectangle (imageX, imageY, imageW, imageH).toFloat());
-
- if (! overlayColour.isOpaque())
- {
- g.setOpacity (imageOpacity);
- g.drawImageTransformed (*image, t, false);
- }
-
- if (! overlayColour.isTransparent())
- {
- g.setColour (overlayColour);
- g.drawImageTransformed (*image, t, true);
- }
-}
-
-//==============================================================================
-void LookAndFeel::drawCornerResizer (Graphics& g,
- int w, int h,
- bool /*isMouseOver*/,
- bool /*isMouseDragging*/)
-{
- const float lineThickness = jmin (w, h) * 0.075f;
-
- for (float i = 0.0f; i < 1.0f; i += 0.3f)
- {
- g.setColour (Colours::lightgrey);
-
- g.drawLine (w * i,
- h + 1.0f,
- w + 1.0f,
- h * i,
- lineThickness);
-
- g.setColour (Colours::darkgrey);
-
- g.drawLine (w * i + lineThickness,
- h + 1.0f,
- w + 1.0f,
- h * i + lineThickness,
- lineThickness);
- }
-}
-
-void LookAndFeel::drawResizableFrame (Graphics& g, int w, int h, const BorderSize& border)
-{
- if (! border.isEmpty())
- {
- const Rectangle fullSize (0, 0, w, h);
- const Rectangle centreArea (border.subtractedFrom (fullSize));
-
- g.saveState();
-
- g.excludeClipRegion (centreArea);
-
- g.setColour (Colour (0x50000000));
- g.drawRect (fullSize);
-
- g.setColour (Colour (0x19000000));
- g.drawRect (centreArea.expanded (1, 1));
-
- g.restoreState();
- }
-}
-
-//==============================================================================
-void LookAndFeel::fillResizableWindowBackground (Graphics& g, int /*w*/, int /*h*/,
- const BorderSize& /*border*/, ResizableWindow& window)
-{
- g.fillAll (window.getBackgroundColour());
-}
-
-void LookAndFeel::drawResizableWindowBorder (Graphics&, int /*w*/, int /*h*/,
- const BorderSize& /*border*/, ResizableWindow&)
-{
-}
-
-void LookAndFeel::drawDocumentWindowTitleBar (DocumentWindow& window,
- Graphics& g, int w, int h,
- int titleSpaceX, int titleSpaceW,
- const Image* icon,
- bool drawTitleTextOnLeft)
-{
- const bool isActive = window.isActiveWindow();
-
- g.setGradientFill (ColourGradient (window.getBackgroundColour(),
- 0.0f, 0.0f,
- window.getBackgroundColour().contrasting (isActive ? 0.15f : 0.05f),
- 0.0f, (float) h, false));
- g.fillAll();
-
- Font font (h * 0.65f, Font::bold);
- g.setFont (font);
-
- int textW = font.getStringWidth (window.getName());
- int iconW = 0;
- int iconH = 0;
-
- if (icon != nullptr)
- {
- iconH = (int) font.getHeight();
- iconW = icon->getWidth() * iconH / icon->getHeight() + 4;
- }
-
- textW = jmin (titleSpaceW, textW + iconW);
- int textX = drawTitleTextOnLeft ? titleSpaceX
- : jmax (titleSpaceX, (w - textW) / 2);
-
- if (textX + textW > titleSpaceX + titleSpaceW)
- textX = titleSpaceX + titleSpaceW - textW;
-
- if (icon != nullptr)
- {
- g.setOpacity (isActive ? 1.0f : 0.6f);
- g.drawImageWithin (*icon, textX, (h - iconH) / 2, iconW, iconH,
- RectanglePlacement::centred, false);
- textX += iconW;
- textW -= iconW;
- }
-
- if (window.isColourSpecified (DocumentWindow::textColourId) || isColourSpecified (DocumentWindow::textColourId))
- g.setColour (window.findColour (DocumentWindow::textColourId));
- else
- g.setColour (window.getBackgroundColour().contrasting (isActive ? 0.7f : 0.4f));
-
- g.drawText (window.getName(), textX, 0, textW, h, Justification::centredLeft, true);
-}
-
-//==============================================================================
-class LookAndFeel::GlassWindowButton : public Button
-{
-public:
- GlassWindowButton (const String& name, Colour col,
- const Path& normalShape_,
- const Path& toggledShape_) noexcept
- : Button (name),
- colour (col),
- normalShape (normalShape_),
- toggledShape (toggledShape_)
- {
- }
-
- //==============================================================================
- void paintButton (Graphics& g, bool isMouseOverButton, bool isButtonDown) override
- {
- float alpha = isMouseOverButton ? (isButtonDown ? 1.0f : 0.8f) : 0.55f;
-
- if (! isEnabled())
- alpha *= 0.5f;
-
- float x = 0, y = 0, diam;
-
- if (getWidth() < getHeight())
- {
- diam = (float) getWidth();
- y = (getHeight() - getWidth()) * 0.5f;
- }
- else
- {
- diam = (float) getHeight();
- y = (getWidth() - getHeight()) * 0.5f;
- }
-
- x += diam * 0.05f;
- y += diam * 0.05f;
- diam *= 0.9f;
-
- g.setGradientFill (ColourGradient (Colour::greyLevel (0.9f).withAlpha (alpha), 0, y + diam,
- Colour::greyLevel (0.6f).withAlpha (alpha), 0, y, false));
- g.fillEllipse (x, y, diam, diam);
-
- x += 2.0f;
- y += 2.0f;
- diam -= 4.0f;
-
- LookAndFeel::drawGlassSphere (g, x, y, diam, colour.withAlpha (alpha), 1.0f);
-
- Path& p = getToggleState() ? toggledShape : normalShape;
-
- const AffineTransform t (p.getTransformToScaleToFit (x + diam * 0.3f, y + diam * 0.3f,
- diam * 0.4f, diam * 0.4f, true));
-
- g.setColour (Colours::black.withAlpha (alpha * 0.6f));
- g.fillPath (p, t);
- }
-
-private:
- Colour colour;
- Path normalShape, toggledShape;
-
- JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (GlassWindowButton)
-};
-
-Button* LookAndFeel::createDocumentWindowButton (int buttonType)
-{
- Path shape;
- const float crossThickness = 0.25f;
-
- if (buttonType == DocumentWindow::closeButton)
- {
- shape.addLineSegment (Line (0.0f, 0.0f, 1.0f, 1.0f), crossThickness * 1.4f);
- shape.addLineSegment (Line (1.0f, 0.0f, 0.0f, 1.0f), crossThickness * 1.4f);
-
- return new GlassWindowButton ("close", Colour (0xffdd1100), shape, shape);
- }
-
- if (buttonType == DocumentWindow::minimiseButton)
- {
- shape.addLineSegment (Line (0.0f, 0.5f, 1.0f, 0.5f), crossThickness);
-
- return new GlassWindowButton ("minimise", Colour (0xffaa8811), shape, shape);
- }
-
- if (buttonType == DocumentWindow::maximiseButton)
- {
- shape.addLineSegment (Line (0.5f, 0.0f, 0.5f, 1.0f), crossThickness);
- shape.addLineSegment (Line (0.0f, 0.5f, 1.0f, 0.5f), crossThickness);
-
- Path fullscreenShape;
- fullscreenShape.startNewSubPath (45.0f, 100.0f);
- fullscreenShape.lineTo (0.0f, 100.0f);
- fullscreenShape.lineTo (0.0f, 0.0f);
- fullscreenShape.lineTo (100.0f, 0.0f);
- fullscreenShape.lineTo (100.0f, 45.0f);
- fullscreenShape.addRectangle (45.0f, 45.0f, 100.0f, 100.0f);
- PathStrokeType (30.0f).createStrokedPath (fullscreenShape, fullscreenShape);
-
- return new GlassWindowButton ("maximise", Colour (0xff119911), shape, fullscreenShape);
- }
-
- jassertfalse;
- return nullptr;
-}
-
-void LookAndFeel::positionDocumentWindowButtons (DocumentWindow&,
- int titleBarX,
- int titleBarY,
- int titleBarW,
- int titleBarH,
- Button* minimiseButton,
- Button* maximiseButton,
- Button* closeButton,
- bool positionTitleBarButtonsOnLeft)
-{
- const int buttonW = titleBarH - titleBarH / 8;
-
- int x = positionTitleBarButtonsOnLeft ? titleBarX + 4
- : titleBarX + titleBarW - buttonW - buttonW / 4;
-
- if (closeButton != nullptr)
- {
- closeButton->setBounds (x, titleBarY, buttonW, titleBarH);
- x += positionTitleBarButtonsOnLeft ? buttonW : -(buttonW + buttonW / 4);
- }
-
- if (positionTitleBarButtonsOnLeft)
- std::swap (minimiseButton, maximiseButton);
-
- if (maximiseButton != nullptr)
- {
- maximiseButton->setBounds (x, titleBarY, buttonW, titleBarH);
- x += positionTitleBarButtonsOnLeft ? buttonW : -buttonW;
- }
-
- if (minimiseButton != nullptr)
- minimiseButton->setBounds (x, titleBarY, buttonW, titleBarH);
-}
-
-int LookAndFeel::getDefaultMenuBarHeight()
-{
- return 24;
-}
-
-//==============================================================================
-DropShadower* LookAndFeel::createDropShadowerForComponent (Component*)
-{
- return new DropShadower (DropShadow (Colours::black.withAlpha (0.4f), 10, Point (0, 2)));
-}
-
-//==============================================================================
-void LookAndFeel::drawStretchableLayoutResizerBar (Graphics& g,
- int w, int h,
- bool /*isVerticalBar*/,
- bool isMouseOver,
- bool isMouseDragging)
-{
- float alpha = 0.5f;
-
- if (isMouseOver || isMouseDragging)
- {
- g.fillAll (Colour (0x190000ff));
- alpha = 1.0f;
- }
-
- const float cx = w * 0.5f;
- const float cy = h * 0.5f;
- const float cr = jmin (w, h) * 0.4f;
-
- g.setGradientFill (ColourGradient (Colours::white.withAlpha (alpha), cx + cr * 0.1f, cy + cr,
- Colours::black.withAlpha (alpha), cx, cy - cr * 4.0f,
- true));
-
- g.fillEllipse (cx - cr, cy - cr, cr * 2.0f, cr * 2.0f);
-}
-
-//==============================================================================
-void LookAndFeel::drawGroupComponentOutline (Graphics& g, int width, int height,
- const String& text,
- const Justification& position,
- GroupComponent& group)
-{
- const float textH = 15.0f;
- const float indent = 3.0f;
- const float textEdgeGap = 4.0f;
- float cs = 5.0f;
-
- Font f (textH);
-
- Path p;
- float x = indent;
- float y = f.getAscent() - 3.0f;
- float w = jmax (0.0f, width - x * 2.0f);
- float h = jmax (0.0f, height - y - indent);
- cs = jmin (cs, w * 0.5f, h * 0.5f);
- const float cs2 = 2.0f * cs;
-
- float textW = text.isEmpty() ? 0 : jlimit (0.0f, jmax (0.0f, w - cs2 - textEdgeGap * 2), f.getStringWidth (text) + textEdgeGap * 2.0f);
- float textX = cs + textEdgeGap;
-
- if (position.testFlags (Justification::horizontallyCentred))
- textX = cs + (w - cs2 - textW) * 0.5f;
- else if (position.testFlags (Justification::right))
- textX = w - cs - textW - textEdgeGap;
-
- p.startNewSubPath (x + textX + textW, y);
- p.lineTo (x + w - cs, y);
-
- p.addArc (x + w - cs2, y, cs2, cs2, 0, float_Pi * 0.5f);
- p.lineTo (x + w, y + h - cs);
-
- p.addArc (x + w - cs2, y + h - cs2, cs2, cs2, float_Pi * 0.5f, float_Pi);
- p.lineTo (x + cs, y + h);
-
- p.addArc (x, y + h - cs2, cs2, cs2, float_Pi, float_Pi * 1.5f);
- p.lineTo (x, y + cs);
-
- p.addArc (x, y, cs2, cs2, float_Pi * 1.5f, float_Pi * 2.0f);
- p.lineTo (x + textX, y);
-
- const float alpha = group.isEnabled() ? 1.0f : 0.5f;
-
- g.setColour (group.findColour (GroupComponent::outlineColourId)
- .withMultipliedAlpha (alpha));
-
- g.strokePath (p, PathStrokeType (2.0f));
-
- g.setColour (group.findColour (GroupComponent::textColourId)
- .withMultipliedAlpha (alpha));
- g.setFont (f);
- g.drawText (text,
- roundToInt (x + textX), 0,
- roundToInt (textW),
- roundToInt (textH),
- Justification::centred, true);
-}
-
-//==============================================================================
-int LookAndFeel::getTabButtonOverlap (int tabDepth)
-{
- return 1 + tabDepth / 3;
-}
-
-int LookAndFeel::getTabButtonSpaceAroundImage()
-{
- return 4;
-}
-
-int LookAndFeel::getTabButtonBestWidth (TabBarButton& button, int tabDepth)
-{
- int width = Font (tabDepth * 0.6f).getStringWidth (button.getButtonText().trim())
- + getTabButtonOverlap (tabDepth) * 2;
-
- if (Component* const extraComponent = button.getExtraComponent())
- width += button.getTabbedButtonBar().isVertical() ? extraComponent->getHeight()
- : extraComponent->getWidth();
-
- return jlimit (tabDepth * 2, tabDepth * 8, width);
-}
-
-Rectangle LookAndFeel::getTabButtonExtraComponentBounds (const TabBarButton& button, Rectangle& textArea, Component& comp)
-{
- Rectangle extraComp;
-
- const TabbedButtonBar::Orientation orientation = button.getTabbedButtonBar().getOrientation();
-
- if (button.getExtraComponentPlacement() == TabBarButton::beforeText)
- {
- switch (orientation)
- {
- case TabbedButtonBar::TabsAtBottom:
- case TabbedButtonBar::TabsAtTop: extraComp = textArea.removeFromLeft (comp.getWidth()); break;
- case TabbedButtonBar::TabsAtLeft: extraComp = textArea.removeFromBottom (comp.getHeight()); break;
- case TabbedButtonBar::TabsAtRight: extraComp = textArea.removeFromTop (comp.getHeight()); break;
- default: jassertfalse; break;
- }
- }
- else
- {
- switch (orientation)
- {
- case TabbedButtonBar::TabsAtBottom:
- case TabbedButtonBar::TabsAtTop: extraComp = textArea.removeFromRight (comp.getWidth()); break;
- case TabbedButtonBar::TabsAtLeft: extraComp = textArea.removeFromTop (comp.getHeight()); break;
- case TabbedButtonBar::TabsAtRight: extraComp = textArea.removeFromBottom (comp.getHeight()); break;
- default: jassertfalse; break;
- }
- }
-
- return extraComp;
-}
-
-void LookAndFeel::createTabButtonShape (TabBarButton& button, Path& p, bool /*isMouseOver*/, bool /*isMouseDown*/)
-{
- const Rectangle activeArea (button.getActiveArea());
- const float w = (float) activeArea.getWidth();
- const float h = (float) activeArea.getHeight();
-
- float length = w;
- float depth = h;
-
- if (button.getTabbedButtonBar().isVertical())
- std::swap (length, depth);
-
- const float indent = (float) getTabButtonOverlap ((int) depth);
- const float overhang = 4.0f;
-
- switch (button.getTabbedButtonBar().getOrientation())
- {
- case TabbedButtonBar::TabsAtLeft:
- p.startNewSubPath (w, 0.0f);
- p.lineTo (0.0f, indent);
- p.lineTo (0.0f, h - indent);
- p.lineTo (w, h);
- p.lineTo (w + overhang, h + overhang);
- p.lineTo (w + overhang, -overhang);
- break;
-
- case TabbedButtonBar::TabsAtRight:
- p.startNewSubPath (0.0f, 0.0f);
- p.lineTo (w, indent);
- p.lineTo (w, h - indent);
- p.lineTo (0.0f, h);
- p.lineTo (-overhang, h + overhang);
- p.lineTo (-overhang, -overhang);
- break;
-
- case TabbedButtonBar::TabsAtBottom:
- p.startNewSubPath (0.0f, 0.0f);
- p.lineTo (indent, h);
- p.lineTo (w - indent, h);
- p.lineTo (w, 0.0f);
- p.lineTo (w + overhang, -overhang);
- p.lineTo (-overhang, -overhang);
- break;
-
- default:
- p.startNewSubPath (0.0f, h);
- p.lineTo (indent, 0.0f);
- p.lineTo (w - indent, 0.0f);
- p.lineTo (w, h);
- p.lineTo (w + overhang, h + overhang);
- p.lineTo (-overhang, h + overhang);
- break;
- }
-
- p.closeSubPath();
-
- p = p.createPathWithRoundedCorners (3.0f);
-}
-
-void LookAndFeel::fillTabButtonShape (TabBarButton& button, Graphics& g, const Path& path, bool /*isMouseOver*/, bool /*isMouseDown*/)
-{
- const Colour tabBackground (button.getTabBackgroundColour());
- const bool isFrontTab = button.isFrontTab();
-
- g.setColour (isFrontTab ? tabBackground
- : tabBackground.withMultipliedAlpha (0.9f));
-
- g.fillPath (path);
-
- g.setColour (button.findColour (isFrontTab ? TabbedButtonBar::frontOutlineColourId
- : TabbedButtonBar::tabOutlineColourId, false)
- .withMultipliedAlpha (button.isEnabled() ? 1.0f : 0.5f));
-
- g.strokePath (path, PathStrokeType (isFrontTab ? 1.0f : 0.5f));
-}
-
-void LookAndFeel::drawTabButtonText (TabBarButton& button, Graphics& g, bool isMouseOver, bool isMouseDown)
-{
- const Rectangle area (button.getTextArea().toFloat());
-
- float length = area.getWidth();
- float depth = area.getHeight();
-
- if (button.getTabbedButtonBar().isVertical())
- std::swap (length, depth);
-
- Font font (depth * 0.6f);
- font.setUnderline (button.hasKeyboardFocus (false));
-
- AffineTransform t;
-
- switch (button.getTabbedButtonBar().getOrientation())
- {
- case TabbedButtonBar::TabsAtLeft: t = t.rotated (float_Pi * -0.5f).translated (area.getX(), area.getBottom()); break;
- case TabbedButtonBar::TabsAtRight: t = t.rotated (float_Pi * 0.5f).translated (area.getRight(), area.getY()); break;
- case TabbedButtonBar::TabsAtTop:
- case TabbedButtonBar::TabsAtBottom: t = t.translated (area.getX(), area.getY()); break;
- default: jassertfalse; break;
- }
-
- Colour col;
-
- if (button.isFrontTab() && (button.isColourSpecified (TabbedButtonBar::frontTextColourId)
- || isColourSpecified (TabbedButtonBar::frontTextColourId)))
- col = findColour (TabbedButtonBar::frontTextColourId);
- else if (button.isColourSpecified (TabbedButtonBar::tabTextColourId)
- || isColourSpecified (TabbedButtonBar::tabTextColourId))
- col = findColour (TabbedButtonBar::tabTextColourId);
- else
- col = button.getTabBackgroundColour().contrasting();
-
- const float alpha = button.isEnabled() ? ((isMouseOver || isMouseDown) ? 1.0f : 0.8f) : 0.3f;
-
- g.setColour (col.withMultipliedAlpha (alpha));
- g.setFont (font);
- g.addTransform (t);
-
- g.drawFittedText (button.getButtonText().trim(),
- 0, 0, (int) length, (int) depth,
- Justification::centred,
- jmax (1, ((int) depth) / 12));
-}
-
-void LookAndFeel::drawTabButton (TabBarButton& button, Graphics& g, bool isMouseOver, bool isMouseDown)
-{
- Path tabShape;
- createTabButtonShape (button, tabShape, isMouseOver, isMouseDown);
-
- const Rectangle activeArea (button.getActiveArea());
- tabShape.applyTransform (AffineTransform::translation ((float) activeArea.getX(),
- (float) activeArea.getY()));
-
- DropShadow (Colours::black.withAlpha (0.5f), 2, Point (0, 1)).drawForPath (g, tabShape);
-
- fillTabButtonShape (button, g, tabShape, isMouseOver, isMouseDown);
- drawTabButtonText (button, g, isMouseOver, isMouseDown);
-}
-
-void LookAndFeel::drawTabbedButtonBarBackground (TabbedButtonBar&, Graphics&) {}
-
-void LookAndFeel::drawTabAreaBehindFrontButton (TabbedButtonBar& bar, Graphics& g, const int w, const int h)
-{
- const float shadowSize = 0.2f;
-
- Rectangle shadowRect, line;
- ColourGradient gradient (Colours::black.withAlpha (bar.isEnabled() ? 0.3f : 0.15f), 0, 0,
- Colours::transparentBlack, 0, 0, false);
-
- switch (bar.getOrientation())
- {
- case TabbedButtonBar::TabsAtLeft:
- gradient.point1.x = (float) w;
- gradient.point2.x = w * (1.0f - shadowSize);
- shadowRect.setBounds ((int) gradient.point2.x, 0, w - (int) gradient.point2.x, h);
- line.setBounds (w - 1, 0, 1, h);
- break;
-
- case TabbedButtonBar::TabsAtRight:
- gradient.point2.x = w * shadowSize;
- shadowRect.setBounds (0, 0, (int) gradient.point2.x, h);
- line.setBounds (0, 0, 1, h);
- break;
-
- case TabbedButtonBar::TabsAtTop:
- gradient.point1.y = (float) h;
- gradient.point2.y = h * (1.0f - shadowSize);
- shadowRect.setBounds (0, (int) gradient.point2.y, w, h - (int) gradient.point2.y);
- line.setBounds (0, h - 1, w, 1);
- break;
-
- case TabbedButtonBar::TabsAtBottom:
- gradient.point2.y = h * shadowSize;
- shadowRect.setBounds (0, 0, w, (int) gradient.point2.y);
- line.setBounds (0, 0, w, 1);
- break;
-
- default: break;
- }
-
- g.setGradientFill (gradient);
- g.fillRect (shadowRect.expanded (2, 2));
-
- g.setColour (Colour (0x80000000));
- g.fillRect (line);
-}
-
-Button* LookAndFeel::createTabBarExtrasButton()
-{
- const float thickness = 7.0f;
- const float indent = 22.0f;
-
- Path p;
- p.addEllipse (-10.0f, -10.0f, 120.0f, 120.0f);
-
- DrawablePath ellipse;
- ellipse.setPath (p);
- ellipse.setFill (Colour (0x99ffffff));
-
- p.clear();
- p.addEllipse (0.0f, 0.0f, 100.0f, 100.0f);
- p.addRectangle (indent, 50.0f - thickness, 100.0f - indent * 2.0f, thickness * 2.0f);
- p.addRectangle (50.0f - thickness, indent, thickness * 2.0f, 50.0f - indent - thickness);
- p.addRectangle (50.0f - thickness, 50.0f + thickness, thickness * 2.0f, 50.0f - indent - thickness);
- p.setUsingNonZeroWinding (false);
-
- DrawablePath dp;
- dp.setPath (p);
- dp.setFill (Colour (0x59000000));
-
- DrawableComposite normalImage;
- normalImage.addAndMakeVisible (ellipse.createCopy());
- normalImage.addAndMakeVisible (dp.createCopy());
-
- dp.setFill (Colour (0xcc000000));
-
- DrawableComposite overImage;
- overImage.addAndMakeVisible (ellipse.createCopy());
- overImage.addAndMakeVisible (dp.createCopy());
-
- DrawableButton* db = new DrawableButton ("tabs", DrawableButton::ImageFitted);
- db->setImages (&normalImage, &overImage, nullptr);
- return db;
-}
-
-
-//==============================================================================
-void LookAndFeel::drawTableHeaderBackground (Graphics& g, TableHeaderComponent& header)
-{
- g.fillAll (Colours::white);
-
- Rectangle area (header.getLocalBounds());
- area.removeFromTop (area.getHeight() / 2);
-
- g.setGradientFill (ColourGradient (Colour (0xffe8ebf9), 0.0f, (float) area.getY(),
- Colour (0xfff6f8f9), 0.0f, (float) area.getBottom(),
- false));
- g.fillRect (area);
-
- g.setColour (Colour (0x33000000));
- g.fillRect (area.removeFromBottom (1));
-
- for (int i = header.getNumColumns (true); --i >= 0;)
- g.fillRect (header.getColumnPosition (i).removeFromRight (1));
-}
-
-void LookAndFeel::drawTableHeaderColumn (Graphics& g, const String& columnName, int /*columnId*/,
- int width, int height,
- bool isMouseOver, bool isMouseDown,
- int columnFlags)
-{
- if (isMouseDown)
- g.fillAll (Colour (0x8899aadd));
- else if (isMouseOver)
- g.fillAll (Colour (0x5599aadd));
-
- Rectangle area (width, height);
- area.reduce (4, 0);
-
- if ((columnFlags & (TableHeaderComponent::sortedForwards | TableHeaderComponent::sortedBackwards)) != 0)
- {
- Path sortArrow;
- sortArrow.addTriangle (0.0f, 0.0f,
- 0.5f, (columnFlags & TableHeaderComponent::sortedForwards) != 0 ? -0.8f : 0.8f,
- 1.0f, 0.0f);
-
- g.setColour (Colour (0x99000000));
- g.fillPath (sortArrow, RectanglePlacement (RectanglePlacement::centred)
- .getTransformToFit (sortArrow.getBounds(),
- area.removeFromRight (height / 2).reduced (2).toFloat()));
- }
-
- g.setColour (Colours::black);
- g.setFont (Font (height * 0.5f, Font::bold));
- g.drawFittedText (columnName, area, Justification::centredLeft, 1);
-}
-
-//==============================================================================
-void LookAndFeel::drawLasso (Graphics& g, Component& lassoComp)
-{
- const int outlineThickness = 1;
-
- g.fillAll (lassoComp.findColour (0x1000440 /*lassoFillColourId*/));
-
- g.setColour (lassoComp.findColour (0x1000441 /*lassoOutlineColourId*/));
- g.drawRect (lassoComp.getLocalBounds(), outlineThickness);
-}
-
-//==============================================================================
-void LookAndFeel::paintToolbarBackground (Graphics& g, int w, int h, Toolbar& toolbar)
-{
- const Colour background (toolbar.findColour (Toolbar::backgroundColourId));
-
- g.setGradientFill (ColourGradient (background, 0.0f, 0.0f,
- background.darker (0.1f),
- toolbar.isVertical() ? w - 1.0f : 0.0f,
- toolbar.isVertical() ? 0.0f : h - 1.0f,
- false));
- g.fillAll();
-}
-
-Button* LookAndFeel::createToolbarMissingItemsButton (Toolbar& /*toolbar*/)
-{
- return createTabBarExtrasButton();
-}
-
-void LookAndFeel::paintToolbarButtonBackground (Graphics& g, int /*width*/, int /*height*/,
- bool isMouseOver, bool isMouseDown,
- ToolbarItemComponent& component)
-{
- if (isMouseDown)
- g.fillAll (component.findColour (Toolbar::buttonMouseDownBackgroundColourId, true));
- else if (isMouseOver)
- g.fillAll (component.findColour (Toolbar::buttonMouseOverBackgroundColourId, true));
-}
-
-void LookAndFeel::paintToolbarButtonLabel (Graphics& g, int x, int y, int width, int height,
- const String& text, ToolbarItemComponent& component)
-{
- g.setColour (component.findColour (Toolbar::labelTextColourId, true)
- .withAlpha (component.isEnabled() ? 1.0f : 0.25f));
-
- const float fontHeight = jmin (14.0f, height * 0.85f);
- g.setFont (fontHeight);
-
- g.drawFittedText (text,
- x, y, width, height,
- Justification::centred,
- jmax (1, height / (int) fontHeight));
-}
-
-//==============================================================================
-void LookAndFeel::drawPropertyPanelSectionHeader (Graphics& g, const String& name,
- bool isOpen, int width, int height)
-{
- const int buttonSize = (height * 3) / 4;
- const int buttonIndent = (height - buttonSize) / 2;
-
- drawTreeviewPlusMinusBox (g, buttonIndent, buttonIndent, buttonSize, buttonSize, isOpen, false);
-
- const int textX = buttonIndent * 2 + buttonSize + 2;
-
- g.setColour (Colours::black);
- g.setFont (Font (height * 0.7f, Font::bold));
- g.drawText (name, textX, 0, width - textX - 4, height, Justification::centredLeft, true);
-}
-
-void LookAndFeel::drawPropertyComponentBackground (Graphics& g, int width, int height,
- PropertyComponent&)
-{
- g.setColour (Colour (0x66ffffff));
- g.fillRect (0, 0, width, height - 1);
-}
-
-void LookAndFeel::drawPropertyComponentLabel (Graphics& g, int, int height,
- PropertyComponent& component)
-{
- g.setColour (Colours::black);
-
- if (! component.isEnabled())
- g.setOpacity (0.6f);
-
- g.setFont (jmin (height, 24) * 0.65f);
-
- const Rectangle r (getPropertyComponentContentPosition (component));
-
- g.drawFittedText (component.getName(),
- 3, r.getY(), r.getX() - 5, r.getHeight(),
- Justification::centredLeft, 2);
-}
-
-Rectangle LookAndFeel::getPropertyComponentContentPosition (PropertyComponent& component)
-{
- const int textW = jmin (200, component.getWidth() / 3);
- return Rectangle (textW, 1, component.getWidth() - textW - 1, component.getHeight() - 3);
-}
-
-//==============================================================================
-void LookAndFeel::drawCallOutBoxBackground (CallOutBox& box, Graphics& g,
- const Path& path, Image& cachedImage)
-{
- if (cachedImage.isNull())
- {
- cachedImage = Image (Image::ARGB, box.getWidth(), box.getHeight(), true);
- Graphics g2 (cachedImage);
-
- DropShadow (Colours::black.withAlpha (0.7f), 8, Point (0, 2)).drawForPath (g2, path);
- }
-
- g.setColour (Colours::black);
- g.drawImageAt (cachedImage, 0, 0);
-
- g.setColour (Colour::greyLevel (0.23f).withAlpha (0.9f));
- g.fillPath (path);
-
- g.setColour (Colours::white.withAlpha (0.8f));
- g.strokePath (path, PathStrokeType (2.0f));
-}
-
-
-//==============================================================================
-AttributedString LookAndFeel::createFileChooserHeaderText (const String& title,
- const String& instructions)
-{
- AttributedString s;
- s.setJustification (Justification::centred);
-
- const Colour colour (findColour (FileChooserDialogBox::titleTextColourId));
- s.append (title + "\n\n", Font (17.0f, Font::bold), colour);
- s.append (instructions, Font (14.0f), colour);
-
- return s;
-}
-
-void LookAndFeel::drawFileBrowserRow (Graphics& g, int width, int height,
- const String& filename, Image* icon,
- const String& fileSizeDescription,
- const String& fileTimeDescription,
- const bool isDirectory,
- const bool isItemSelected,
- const int /*itemIndex*/,
- DirectoryContentsDisplayComponent& dcc)
-{
- Component* const fileListComp = dynamic_cast (&dcc);
-
- if (isItemSelected)
- g.fillAll (fileListComp != nullptr ? fileListComp->findColour (DirectoryContentsDisplayComponent::highlightColourId)
- : findColour (DirectoryContentsDisplayComponent::highlightColourId));
-
- const int x = 32;
- g.setColour (Colours::black);
-
- if (icon != nullptr && icon->isValid())
- {
- g.drawImageWithin (*icon, 2, 2, x - 4, height - 4,
- RectanglePlacement::centred | RectanglePlacement::onlyReduceInSize,
- false);
- }
- else
- {
- if (const Drawable* d = isDirectory ? getDefaultFolderImage()
- : getDefaultDocumentFileImage())
- d->drawWithin (g, Rectangle (2.0f, 2.0f, x - 4.0f, height - 4.0f),
- RectanglePlacement::centred | RectanglePlacement::onlyReduceInSize, 1.0f);
- }
-
- g.setColour (fileListComp != nullptr ? fileListComp->findColour (DirectoryContentsDisplayComponent::textColourId)
- : findColour (DirectoryContentsDisplayComponent::textColourId));
- g.setFont (height * 0.7f);
-
- if (width > 450 && ! isDirectory)
- {
- const int sizeX = roundToInt (width * 0.7f);
- const int dateX = roundToInt (width * 0.8f);
-
- g.drawFittedText (filename,
- x, 0, sizeX - x, height,
- Justification::centredLeft, 1);
-
- g.setFont (height * 0.5f);
- g.setColour (Colours::darkgrey);
-
- if (! isDirectory)
- {
- g.drawFittedText (fileSizeDescription,
- sizeX, 0, dateX - sizeX - 8, height,
- Justification::centredRight, 1);
-
- g.drawFittedText (fileTimeDescription,
- dateX, 0, width - 8 - dateX, height,
- Justification::centredRight, 1);
- }
- }
- else
- {
- g.drawFittedText (filename,
- x, 0, width - x, height,
- Justification::centredLeft, 1);
-
- }
-}
-
-Button* LookAndFeel::createFileBrowserGoUpButton()
-{
- DrawableButton* goUpButton = new DrawableButton ("up", DrawableButton::ImageOnButtonBackground);
-
- Path arrowPath;
- arrowPath.addArrow (Line (50.0f, 100.0f, 50.0f, 0.0f), 40.0f, 100.0f, 50.0f);
-
- DrawablePath arrowImage;
- arrowImage.setFill (Colours::black.withAlpha (0.4f));
- arrowImage.setPath (arrowPath);
-
- goUpButton->setImages (&arrowImage);
-
- return goUpButton;
-}
-
-void LookAndFeel::layoutFileBrowserComponent (FileBrowserComponent& browserComp,
- DirectoryContentsDisplayComponent* fileListComponent,
- FilePreviewComponent* previewComp,
- ComboBox* currentPathBox,
- TextEditor* filenameBox,
- Button* goUpButton)
-{
- const int x = 8;
- int w = browserComp.getWidth() - x - x;
-
- if (previewComp != nullptr)
- {
- const int previewWidth = w / 3;
- previewComp->setBounds (x + w - previewWidth, 0, previewWidth, browserComp.getHeight());
-
- w -= previewWidth + 4;
- }
-
- int y = 4;
-
- const int controlsHeight = 22;
- const int bottomSectionHeight = controlsHeight + 8;
- const int upButtonWidth = 50;
-
- currentPathBox->setBounds (x, y, w - upButtonWidth - 6, controlsHeight);
- goUpButton->setBounds (x + w - upButtonWidth, y, upButtonWidth, controlsHeight);
-
- y += controlsHeight + 4;
-
- if (Component* const listAsComp = dynamic_cast (fileListComponent))
- {
- listAsComp->setBounds (x, y, w, browserComp.getHeight() - y - bottomSectionHeight);
- y = listAsComp->getBottom() + 4;
- }
-
- filenameBox->setBounds (x + 50, y, w - 50, controlsHeight);
-}
-
-// Pulls a drawable out of compressed valuetree data..
-Drawable* LookAndFeel::loadDrawableFromData (const void* data, size_t numBytes)
-{
- MemoryInputStream m (data, numBytes, false);
- GZIPDecompressorInputStream gz (m);
- ValueTree drawable (ValueTree::readFromStream (gz));
- return Drawable::createFromValueTree (drawable.getChild (0), nullptr);
-}
-
-const Drawable* LookAndFeel::getDefaultFolderImage()
-{
- if (folderImage == nullptr)
- {
- static const unsigned char drawableData[] =
- { 120,218,197,86,77,111,27,55,16,229,182,161,237,6,61,39,233,77,63,192,38,56,195,225,215,209,105,210,2,141,13,20,201,193,109,111,178,181,178,183,145,181,130,180,110,145,127,159,199,93,73,137,87,53,218,91,109,192,160,151,179,156,55,111,222,188,229,155,247,
- 231,87,231,175,47,222,170,234,155,229,244,190,86,213,115,253,102,61,253,123,122,189,168,85,51,83,213,119,250,238,221,47,231,151,175,223,169,170,250,121,221,62,172,84,245,172,60,63,209,243,118,49,171,215,170,107,87,23,245,188,83,213,145,182,167,19,91,
- 254,127,223,220,222,117,37,68,82,40,143,174,219,174,107,239,135,168,147,18,37,108,85,245,237,46,207,70,33,249,175,211,238,78,85,186,28,253,76,175,73,109,186,117,251,177,190,106,102,229,241,247,58,24,103,203,15,101,245,103,219,44,187,15,221,39,0,172,142,
- 245,125,211,1,196,205,116,181,125,114,164,175,31,186,78,45,219,229,31,245,186,189,106,150,179,102,121,139,100,154,240,231,167,102,177,64,72,247,105,213,23,122,187,158,206,154,122,217,169,85,57,18,1,47,53,101,107,18,135,204,167,147,192,201,216,20,114,
- 244,195,62,171,234,7,125,198,100,136,216,145,149,211,9,57,103,40,249,72,219,8,167,170,87,250,140,162,199,123,226,3,34,82,202,134,131,13,172,74,170,233,162,0,177,234,166,93,180,15,235,141,170,206,180,157,204,231,150,156,159,207,39,195,50,214,88,18,150,
- 245,205,124,250,104,169,212,135,158,19,144,53,20,112,172,55,237,2,132,13,199,149,130,230,115,145,112,147,147,82,61,157,32,238,178,253,11,145,213,138,10,52,138,38,103,111,99,164,211,137,139,198,35,177,35,167,212,143,15,215,205,13,160,109,163,172,225,152,
- 16,232,17,149,140,103,144,158,146,90,113,217,12,6,197,167,236,3,54,5,181,101,73,54,138,90,245,165,227,120,18,252,150,77,15,242,188,228,204,81,169,139,102,249,5,68,192,145,14,244,112,1,145,29,94,137,96,235,49,136,151,58,246,32,88,192,161,88,176,76,226,
- 36,247,24,176,7,232,62,16,83,42,155,201,160,30,222,65,72,98,82,76,33,198,254,197,96,124,10,150,243,8,130,48,228,36,94,124,6,4,43,38,0,142,205,99,30,4,221,13,33,230,220,71,177,65,49,142,243,150,7,1,51,20,2,5,96,96,84,225,56,217,188,3,33,46,24,228,112,
- 69,69,12,68,228,108,242,99,16,165,118,208,28,51,200,98,87,42,74,62,209,24,4,206,48,22,153,125,132,220,196,56,15,234,99,216,130,0,141,38,74,162,130,48,35,163,141,94,196,245,32,94,104,7,154,132,209,40,108,162,165,232,153,165,17,4,138,201,176,135,58,49,
- 165,130,122,108,114,54,28,240,64,17,89,188,79,177,116,149,10,4,246,91,30,94,104,112,96,226,144,131,144,142,98,78,177,7,128,81,242,224,140,36,249,80,208,145,196,12,202,15,16,60,161,200,69,187,169,213,86,198,123,87,224,255,199,21,94,105,134,72,40,177,245,
- 14,182,32,232,54,196,231,100,111,11,189,168,201,39,177,84,102,38,139,177,168,74,210,87,174,64,20,138,160,67,111,10,4,98,196,97,60,158,118,133,25,111,173,224,171,37,97,185,119,133,221,242,63,184,194,140,71,174,240,252,145,43,72,32,147,146,147,4,104,104,
- 117,134,10,18,12,107,212,40,72,148,57,6,71,69,135,222,248,16,160,168,3,169,144,55,201,69,41,147,137,134,99,50,97,8,178,85,43,217,140,201,151,192,152,10,242,190,24,11,59,183,29,25,42,115,236,98,14,229,252,32,80,66,0,162,17,136,72,6,67,5,45,242,224,10,
- 193,102,71,50,6,17,129,212,18,115,105,150,80,169,45,123,222,141,76,178,70,32,55,24,90,217,132,71,73,200,57,238,204,3,136,49,144,185,55,183,190,20,137,52,246,47,113,232,158,69,35,49,145,208,129,193,56,178,77,135,230,145,113,22,140,69,74,20,146,2,120,218,
- 155,135,48,32,10,89,30,156,165,204,254,222,193,160,12,19,49,6,210,59,11,70,62,4,31,15,64,196,2,157,98,33,58,1,104,32,152,50,31,128,64,148,183,197,108,209,89,107,240,41,75,36,123,16,208,108,180,44,236,250,182,227,27,20,137,118,76,60,165,137,221,92,94,
- 78,215,31,235,245,230,183,242,229,30,214,251,251,195,145,94,148,15,253,170,221,52,93,211,46,7,109,171,81,208,177,94,247,119,132,47,81,186,92,22,246,7,255,254,15,7,107,141,171,197,191,156,123,162,135,187,198,227,131,113,219,80,159,1,4,239,223,231,0,0 };
-
- folderImage = loadDrawableFromData (drawableData, sizeof (drawableData));
- }
-
- return folderImage;
-}
-
-const Drawable* LookAndFeel::getDefaultDocumentFileImage()
-{
- if (documentImage == nullptr)
- {
- static const unsigned char drawableData[] =
- { 120,218,213,88,77,115,219,54,16,37,147,208,246,228,214,75,155,246,164,123,29,12,176,216,197,199,49,105,218,94,156,153,78,114,72,219,155,108,75,137,26,89,212,200,116,59,233,175,239,3,105,201,164,68,50,158,166,233,76,196,11,69,60,173,128,197,123,139,183,
- 124,241,234,217,155,103,207,207,126,204,242,7,171,233,213,44,203,31,23,47,54,211,191,166,231,203,89,182,184,204,242,147,226,195,165,219,252,125,150,229,249,207,155,242,102,157,229,143,210,227,199,197,101,121,113,115,53,91,85,89,85,174,207,102,243,42,
- 203,143,10,125,58,209,233,251,171,197,219,119,85,250,173,97,151,30,157,151,85,85,94,53,168,147,132,50,226,179,252,225,246,143,174,179,44,63,254,101,90,189,203,242,34,5,127,84,172,77,118,93,109,202,247,179,55,139,203,244,248,97,161,179,63,202,197,170,
- 122,93,125,192,196,242,227,226,106,81,205,54,217,197,116,125,251,228,168,56,191,169,170,108,85,174,126,159,109,202,55,139,213,229,98,245,182,249,97,254,240,167,197,114,137,5,86,31,214,245,111,175,203,37,254,230,162,92,150,55,155,180,148,249,237,39,203,
- 94,215,127,58,10,213,245,39,203,234,249,102,249,87,47,203,63,129,204,49,227,252,73,225,149,145,104,131,245,254,116,34,202,82,164,16,153,179,236,108,177,234,7,49,41,237,130,144,167,17,144,15,42,104,239,93,12,35,32,99,68,9,187,24,125,7,244,77,23,36,164,
- 40,56,226,61,12,107,229,130,215,100,105,24,227,89,17,246,211,105,55,140,49,218,43,207,100,245,72,28,195,70,17,230,201,118,8,243,164,139,233,95,88,23,52,152,162,54,104,48,217,237,105,15,111,91,107,253,131,160,118,34,239,69,128,54,232,135,101,121,61,203,
- 110,169,181,147,2,253,159,82,48,180,229,247,167,74,193,41,141,188,35,93,241,116,18,148,113,214,120,207,113,47,19,109,16,51,182,153,193,5,59,2,10,90,69,114,218,135,48,2,50,198,43,171,189,152,81,144,88,108,85,136,78,246,64,54,42,163,35,69,30,3,121,82,38,
- 98,81,98,70,64,70,139,34,111,163,167,49,144,13,202,138,179,58,220,23,52,180,186,54,104,48,79,109,208,96,198,219,19,31,220,187,118,10,6,65,237,100,222,139,5,109,80,191,30,236,151,162,135,147,142,30,68,105,182,58,6,22,84,43,229,124,148,116,97,145,55,231,
- 139,11,76,228,16,37,14,48,205,145,77,134,34,176,55,152,182,200,57,99,93,204,144,145,253,65,97,229,132,72,104,63,62,71,21,140,54,186,41,226,59,84,19,63,130,15,222,235,224,185,59,104,27,226,68,101,153,241,227,177,248,29,20,136,26,8,252,178,183,241,219,
- 131,137,160,209,107,109,92,79,124,16,211,184,104,93,77,130,110,124,2,65,172,67,201,60,157,88,163,2,91,99,92,216,198,55,78,69,75,190,150,119,84,98,200,71,150,109,124,36,204,227,52,8,33,229,223,68,167,173,167,131,248,137,212,226,141,19,233,160,154,248,
- 144,142,195,140,137,185,59,104,15,247,119,40,126,23,69,81,200,242,110,254,123,20,49,94,112,110,245,199,111,241,167,87,36,252,101,138,132,149,22,22,38,65,134,29,182,139,24,230,192,31,144,184,133,130,72,44,131,210,142,111,147,216,30,76,123,30,113,206,242,
- 150,196,157,65,129,130,76,180,194,61,34,225,160,5,228,233,160,118,34,137,26,202,115,212,29,108,72,134,243,223,90,114,226,199,226,119,80,6,245,152,197,122,217,146,184,53,24,140,210,30,21,59,80,79,124,182,202,71,207,218,112,159,72,80,53,140,109,68,2,191,
- 227,217,210,78,36,94,137,88,231,82,157,8,176,61,0,122,191,19,137,3,255,13,39,183,228,20,193,151,144,119,166,79,36,40,253,156,138,72,11,181,19,137,14,46,176,217,27,180,135,251,219,31,255,235,61,148,165,96,72,122,118,23,229,81,52,135,24,250,163,183,216,
- 211,43,17,217,151,136,253,116,137,28,53,188,127,92,188,221,76,47,23,169,59,90,167,144,141,239,197,86,104,141,189,60,157,80,84,142,140,4,31,154,241,122,105,132,41,107,13,201,39,86,120,24,82,114,206,198,6,96,27,227,172,36,232,168,201,36,219,24,113,62,163,
- 154,101,233,143,166,203,102,26,141,206,174,179,252,89,161,39,243,249,197,121,186,38,233,246,146,211,53,1,123,56,194,231,122,143,103,179,217,60,204,167,19,147,110,41,93,173,219,123,72,89,248,35,173,16,220,50,179,111,60,181,24,88,103,156,235,7,78,248,14,
- 4,119,78,162,93,60,112,35,109,16,124,126,12,17,71,67,24,1,165,142,1,181,215,248,56,6,66,235,193,137,167,61,22,30,5,3,27,101,71,64,169,25,112,216,2,63,22,169,110,43,18,200,140,129,208,160,88,44,220,208,125,65,67,171,107,131,6,243,212,6,13,102,188,61,241,
- 225,189,107,165,96,16,212,78,230,189,88,208,6,245,235,214,237,235,150,62,167,110,155,106,170,53,133,192,117,193,20,84,78,74,174,98,39,92,156,8,112,21,46,80,106,12,209,207,225,228,16,113,59,225,126,87,60,133,25,209,34,36,2,99,242,52,197,48,30,75,244,247,
- 212,238,246,182,173,221,185,78,215,127,167,221,162,163,221,250,152,217,146,196,222,145,100,223,235,105,108,28,250,149,212,74,224,86,2,213,118,110,119,204,224,144,208,38,214,131,200,14,214,223,120,189,230,53,1,193,70,133,154,131,56,223,16,229,48,188,14,
- 201,205,213,121,71,233,68,89,15,124,103,37,53,26,11,118,176,127,169,88,166,158,219,178,117,173,83,108,75,95,55,68,186,193,53,246,146,206,127,6,63,53,78,58,228,204,155,224,113,74,91,232,221,195,240,105,215,34,29,138,64,128,183,8,130,233,71,173,56,54,101,
- 99,75,186,111,65,58,28,229,145,82,19,152,12,99,180,81,130,131,75,234,229,220,247,53,231,154,79,205,185,185,155,199,249,172,38,85,253,204,76,68,95,92,204,207,255,221,75,178,227,14,187,224,224,97,202,172,173,219,12,167,130,133,9,54,135,245,92,176,29,134,
- 165,110,139,141,18,16,223,29,188,183,65,207,144,106,144,151,143,128,224,176,168,110,140,32,62,56,110,219,195,54,235,20,68,209,216,34,232,21,6,41,234,157,39,211,201,107,160,230,66,225,56,153,9,101,21,37,237,150,204,14,115,208,22,221,54,216,230,33,116,
- 14,65,14,44,19,8,236,73,71,246,182,110,125,224,75,132,195,214,247,163,36,51,252,84,76,124,37,212,100,88,62,183,179,76,67,217,218,242,244,229,116,243,126,182,185,254,21,105,126,208,220,239,94,229,30,21,203,244,202,117,93,94,47,170,69,185,106,246,60,219,
- 3,29,23,155,250,109,237,29,170,72,175,109,119,129,127,235,9,92,20,85,185,254,72,220,147,162,121,235,219,13,44,144,225,63,241,244,165,51,0,0 };
-
- documentImage = loadDrawableFromData (drawableData, sizeof (drawableData));
- }
-
- return documentImage;
-}
-
-//==============================================================================
-void LookAndFeel::drawLevelMeter (Graphics& g, int width, int height, float level)
-{
- g.setColour (Colours::white.withAlpha (0.7f));
- g.fillRoundedRectangle (0.0f, 0.0f, (float) width, (float) height, 3.0f);
- g.setColour (Colours::black.withAlpha (0.2f));
- g.drawRoundedRectangle (1.0f, 1.0f, width - 2.0f, height - 2.0f, 3.0f, 1.0f);
-
- const int totalBlocks = 7;
- const int numBlocks = roundToInt (totalBlocks * level);
- const float w = (width - 6.0f) / (float) totalBlocks;
-
- for (int i = 0; i < totalBlocks; ++i)
- {
- if (i >= numBlocks)
- g.setColour (Colours::lightblue.withAlpha (0.6f));
- else
- g.setColour (i < totalBlocks - 1 ? Colours::blue.withAlpha (0.5f)
- : Colours::red);
-
- g.fillRoundedRectangle (3.0f + i * w + w * 0.1f, 3.0f, w * 0.8f, height - 6.0f, w * 0.4f);
- }
-}
-
-//==============================================================================
-void LookAndFeel::drawKeymapChangeButton (Graphics& g, int width, int height, Button& button, const String& keyDescription)
-{
- const Colour textColour (button.findColour (0x100ad01 /*KeyMappingEditorComponent::textColourId*/, true));
-
- if (keyDescription.isNotEmpty())
- {
- if (button.isEnabled())
- {
- const float alpha = button.isDown() ? 0.3f : (button.isOver() ? 0.15f : 0.08f);
- g.fillAll (textColour.withAlpha (alpha));
-
- g.setOpacity (0.3f);
- drawBevel (g, 0, 0, width, height, 2);
- }
-
- g.setColour (textColour);
- g.setFont (height * 0.6f);
- g.drawFittedText (keyDescription,
- 3, 0, width - 6, height,
- Justification::centred, 1);
- }
- else
- {
- const float thickness = 7.0f;
- const float indent = 22.0f;
-
- Path p;
- p.addEllipse (0.0f, 0.0f, 100.0f, 100.0f);
- p.addRectangle (indent, 50.0f - thickness, 100.0f - indent * 2.0f, thickness * 2.0f);
- p.addRectangle (50.0f - thickness, indent, thickness * 2.0f, 50.0f - indent - thickness);
- p.addRectangle (50.0f - thickness, 50.0f + thickness, thickness * 2.0f, 50.0f - indent - thickness);
- p.setUsingNonZeroWinding (false);
-
- g.setColour (textColour.withAlpha (button.isDown() ? 0.7f : (button.isOver() ? 0.5f : 0.3f)));
- g.fillPath (p, p.getTransformToScaleToFit (2.0f, 2.0f, width - 4.0f, height - 4.0f, true));
- }
-
- if (button.hasKeyboardFocus (false))
- {
- g.setColour (textColour.withAlpha (0.4f));
- g.drawRect (0, 0, width, height);
- }
-}
-
-//==============================================================================
-void LookAndFeel::drawBevel (Graphics& g, const int x, const int y, const int width, const int height,
- const int bevelThickness, const Colour& topLeftColour, const Colour& bottomRightColour,
- const bool useGradient, const bool sharpEdgeOnOutside)
-{
- if (g.clipRegionIntersects (Rectangle (x, y, width, height)))
- {
- LowLevelGraphicsContext& context = g.getInternalContext();
- context.saveState();
-
- for (int i = bevelThickness; --i >= 0;)
- {
- const float op = useGradient ? (sharpEdgeOnOutside ? bevelThickness - i : i) / (float) bevelThickness
- : 1.0f;
-
- context.setFill (topLeftColour.withMultipliedAlpha (op));
- context.fillRect (Rectangle (x + i, y + i, width - i * 2, 1), false);
- context.setFill (topLeftColour.withMultipliedAlpha (op * 0.75f));
- context.fillRect (Rectangle (x + i, y + i + 1, 1, height - i * 2 - 2), false);
- context.setFill (bottomRightColour.withMultipliedAlpha (op));
- context.fillRect (Rectangle (x + i, y + height - i - 1, width - i * 2, 1), false);
- context.setFill (bottomRightColour.withMultipliedAlpha (op * 0.75f));
- context.fillRect (Rectangle (x + width - i - 1, y + i + 1, 1, height - i * 2 - 2), false);
- }
-
- context.restoreState();
- }
-}
-
-//==============================================================================
-void LookAndFeel::drawShinyButtonShape (Graphics& g,
- float x, float y, float w, float h,
- float maxCornerSize,
- const Colour& baseColour,
- const float strokeWidth,
- const bool flatOnLeft,
- const bool flatOnRight,
- const bool flatOnTop,
- const bool flatOnBottom) noexcept
-{
- if (w <= strokeWidth * 1.1f || h <= strokeWidth * 1.1f)
- return;
-
- const float cs = jmin (maxCornerSize, w * 0.5f, h * 0.5f);
-
- Path outline;
- outline.addRoundedRectangle (x, y, w, h, cs, cs,
- ! (flatOnLeft || flatOnTop),
- ! (flatOnRight || flatOnTop),
- ! (flatOnLeft || flatOnBottom),
- ! (flatOnRight || flatOnBottom));
-
- ColourGradient cg (baseColour, 0.0f, y,
- baseColour.overlaidWith (Colour (0x070000ff)), 0.0f, y + h,
- false);
-
- cg.addColour (0.5, baseColour.overlaidWith (Colour (0x33ffffff)));
- cg.addColour (0.51, baseColour.overlaidWith (Colour (0x110000ff)));
-
- g.setGradientFill (cg);
- g.fillPath (outline);
-
- g.setColour (Colour (0x80000000));
- g.strokePath (outline, PathStrokeType (strokeWidth));
-}
-
-//==============================================================================
-void LookAndFeel::drawGlassSphere (Graphics& g,
- const float x, const float y,
- const float diameter,
- const Colour& colour,
- const float outlineThickness) noexcept
-{
- if (diameter <= outlineThickness)
- return;
-
- Path p;
- p.addEllipse (x, y, diameter, diameter);
-
- {
- ColourGradient cg (Colours::white.overlaidWith (colour.withMultipliedAlpha (0.3f)), 0, y,
- Colours::white.overlaidWith (colour.withMultipliedAlpha (0.3f)), 0, y + diameter, false);
-
- cg.addColour (0.4, Colours::white.overlaidWith (colour));
-
- g.setGradientFill (cg);
- g.fillPath (p);
- }
-
- g.setGradientFill (ColourGradient (Colours::white, 0, y + diameter * 0.06f,
- Colours::transparentWhite, 0, y + diameter * 0.3f, false));
- g.fillEllipse (x + diameter * 0.2f, y + diameter * 0.05f, diameter * 0.6f, diameter * 0.4f);
-
- ColourGradient cg (Colours::transparentBlack,
- x + diameter * 0.5f, y + diameter * 0.5f,
- Colours::black.withAlpha (0.5f * outlineThickness * colour.getFloatAlpha()),
- x, y + diameter * 0.5f, true);
-
- cg.addColour (0.7, Colours::transparentBlack);
- cg.addColour (0.8, Colours::black.withAlpha (0.1f * outlineThickness));
-
- g.setGradientFill (cg);
- g.fillPath (p);
-
- g.setColour (Colours::black.withAlpha (0.5f * colour.getFloatAlpha()));
- g.drawEllipse (x, y, diameter, diameter, outlineThickness);
-}
-
-//==============================================================================
-void LookAndFeel::drawGlassPointer (Graphics& g,
- const float x, const float y,
- const float diameter,
- const Colour& colour, const float outlineThickness,
- const int direction) noexcept
-{
- if (diameter <= outlineThickness)
- return;
-
- Path p;
- p.startNewSubPath (x + diameter * 0.5f, y);
- p.lineTo (x + diameter, y + diameter * 0.6f);
- p.lineTo (x + diameter, y + diameter);
- p.lineTo (x, y + diameter);
- p.lineTo (x, y + diameter * 0.6f);
- p.closeSubPath();
-
- p.applyTransform (AffineTransform::rotation (direction * (float_Pi * 0.5f), x + diameter * 0.5f, y + diameter * 0.5f));
-
- {
- ColourGradient cg (Colours::white.overlaidWith (colour.withMultipliedAlpha (0.3f)), 0, y,
- Colours::white.overlaidWith (colour.withMultipliedAlpha (0.3f)), 0, y + diameter, false);
-
- cg.addColour (0.4, Colours::white.overlaidWith (colour));
-
- g.setGradientFill (cg);
- g.fillPath (p);
- }
-
- ColourGradient cg (Colours::transparentBlack,
- x + diameter * 0.5f, y + diameter * 0.5f,
- Colours::black.withAlpha (0.5f * outlineThickness * colour.getFloatAlpha()),
- x - diameter * 0.2f, y + diameter * 0.5f, true);
-
- cg.addColour (0.5, Colours::transparentBlack);
- cg.addColour (0.7, Colours::black.withAlpha (0.07f * outlineThickness));
-
- g.setGradientFill (cg);
- g.fillPath (p);
-
- g.setColour (Colours::black.withAlpha (0.5f * colour.getFloatAlpha()));
- g.strokePath (p, PathStrokeType (outlineThickness));
-}
-
-//==============================================================================
-void LookAndFeel::drawGlassLozenge (Graphics& g,
- const float x, const float y,
- const float width, const float height,
- const Colour& colour,
- const float outlineThickness,
- const float cornerSize,
- const bool flatOnLeft,
- const bool flatOnRight,
- const bool flatOnTop,
- const bool flatOnBottom) noexcept
-{
- if (width <= outlineThickness || height <= outlineThickness)
- return;
-
- const int intX = (int) x;
- const int intY = (int) y;
- const int intW = (int) width;
- const int intH = (int) height;
-
- const float cs = cornerSize < 0 ? jmin (width * 0.5f, height * 0.5f) : cornerSize;
- const float edgeBlurRadius = height * 0.75f + (height - cs * 2.0f);
- const int intEdge = (int) edgeBlurRadius;
-
- Path outline;
- outline.addRoundedRectangle (x, y, width, height, cs, cs,
- ! (flatOnLeft || flatOnTop),
- ! (flatOnRight || flatOnTop),
- ! (flatOnLeft || flatOnBottom),
- ! (flatOnRight || flatOnBottom));
-
- {
- ColourGradient cg (colour.darker (0.2f), 0, y,
- colour.darker (0.2f), 0, y + height, false);
-
- cg.addColour (0.03, colour.withMultipliedAlpha (0.3f));
- cg.addColour (0.4, colour);
- cg.addColour (0.97, colour.withMultipliedAlpha (0.3f));
-
- g.setGradientFill (cg);
- g.fillPath (outline);
- }
-
- ColourGradient cg (Colours::transparentBlack, x + edgeBlurRadius, y + height * 0.5f,
- colour.darker (0.2f), x, y + height * 0.5f, true);
-
- cg.addColour (jlimit (0.0, 1.0, 1.0 - (cs * 0.5f) / edgeBlurRadius), Colours::transparentBlack);
- cg.addColour (jlimit (0.0, 1.0, 1.0 - (cs * 0.25f) / edgeBlurRadius), colour.darker (0.2f).withMultipliedAlpha (0.3f));
-
- if (! (flatOnLeft || flatOnTop || flatOnBottom))
- {
- g.saveState();
- g.setGradientFill (cg);
- g.reduceClipRegion (intX, intY, intEdge, intH);
- g.fillPath (outline);
- g.restoreState();
- }
-
- if (! (flatOnRight || flatOnTop || flatOnBottom))
- {
- cg.point1.setX (x + width - edgeBlurRadius);
- cg.point2.setX (x + width);
-
- g.saveState();
- g.setGradientFill (cg);
- g.reduceClipRegion (intX + intW - intEdge, intY, 2 + intEdge, intH);
- g.fillPath (outline);
- g.restoreState();
- }
-
- {
- const float leftIndent = flatOnTop || flatOnLeft ? 0.0f : cs * 0.4f;
- const float rightIndent = flatOnTop || flatOnRight ? 0.0f : cs * 0.4f;
-
- Path highlight;
- highlight.addRoundedRectangle (x + leftIndent,
- y + cs * 0.1f,
- width - (leftIndent + rightIndent),
- height * 0.4f,
- cs * 0.4f,
- cs * 0.4f,
- ! (flatOnLeft || flatOnTop),
- ! (flatOnRight || flatOnTop),
- ! (flatOnLeft || flatOnBottom),
- ! (flatOnRight || flatOnBottom));
-
- g.setGradientFill (ColourGradient (colour.brighter (10.0f), 0, y + height * 0.06f,
- Colours::transparentWhite, 0, y + height * 0.4f, false));
- g.fillPath (highlight);
- }
-
- g.setColour (colour.darker().withMultipliedAlpha (1.5f));
- g.strokePath (outline, PathStrokeType (outlineThickness));
-}
diff --git a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel.h b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel.h
index f415bc63c1..ef5c416ccb 100644
--- a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel.h
+++ b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel.h
@@ -25,14 +25,80 @@
#ifndef JUCE_LOOKANDFEEL_H_INCLUDED
#define JUCE_LOOKANDFEEL_H_INCLUDED
+//==============================================================================
+/** This class is used to hold a few look and feel base classes which are associated
+ with classes that may not be present because they're from modules other than
+ juce_gui_basics.
+*/
+struct JUCE_API ExtraLookAndFeelBaseClasses
+{
+ //==============================================================================
+ /** This abstract base class is implemented by LookAndFeel classes. */
+ struct JUCE_API LassoComponentMethods
+ {
+ virtual ~LassoComponentMethods() {}
+
+ virtual void drawLasso (Graphics&, Component& lassoComp) = 0;
+ };
+
+ //==============================================================================
+ /** This abstract base class is implemented by LookAndFeel classes. */
+ struct JUCE_API KeyMappingEditorComponentMethods
+ {
+ virtual ~KeyMappingEditorComponentMethods() {}
+
+ virtual void drawKeymapChangeButton (Graphics&, int width, int height, Button&, const String& keyDescription) = 0;
+ };
+
+ //==============================================================================
+ /** This abstract base class is implemented by LookAndFeel classes. */
+ struct JUCE_API AudioDeviceSelectorComponentMethods
+ {
+ virtual ~AudioDeviceSelectorComponentMethods() {}
+
+ virtual void drawLevelMeter (Graphics&, int width, int height, float level) = 0;
+ };
+};
+
//==============================================================================
/**
LookAndFeel objects define the appearance of all the JUCE widgets, and subclasses
can be used to apply different 'skins' to the application.
+ This class is an abstract base-class - for actual look-and-feels that you can
+ instantiate, see LookAndFeel_V1, LookAndFeel_V2 and LookAndFeel_V3.
+
+ @see LookAndFeel_V1, LookAndFeel_V2, LookAndFeel_V3
*/
-class JUCE_API LookAndFeel
+class JUCE_API LookAndFeel : public ScrollBar::LookAndFeelMethods,
+ public Button::LookAndFeelMethods,
+ public ImageButton::LookAndFeelMethods,
+ public TextEditor::LookAndFeelMethods,
+ public FileBrowserComponent::LookAndFeelMethods,
+ public TreeView::LookAndFeelMethods,
+ public BubbleComponent::LookAndFeelMethods,
+ public AlertWindow::LookAndFeelMethods,
+ public PopupMenu::LookAndFeelMethods,
+ public ComboBox::LookAndFeelMethods,
+ public Label::LookAndFeelMethods,
+ public Slider::LookAndFeelMethods,
+ public ResizableWindow::LookAndFeelMethods,
+ public DocumentWindow::LookAndFeelMethods,
+ public TooltipWindow::LookAndFeelMethods,
+ public TabbedButtonBar::LookAndFeelMethods,
+ public PropertyComponent::LookAndFeelMethods,
+ public FilenameComponent::LookAndFeelMethods,
+ public GroupComponent::LookAndFeelMethods,
+ public TableHeaderComponent::LookAndFeelMethods,
+ public CallOutBox::LookAndFeelMethods,
+ public Toolbar::LookAndFeelMethods,
+ public ConcertinaPanel::LookAndFeelMethods,
+ public ProgressBar::LookAndFeelMethods,
+ public StretchableLayoutResizerBar::LookAndFeelMethods,
+ public ExtraLookAndFeelBaseClasses::KeyMappingEditorComponentMethods,
+ public ExtraLookAndFeelBaseClasses::AudioDeviceSelectorComponentMethods,
+ public ExtraLookAndFeelBaseClasses::LassoComponentMethods
{
public:
//==============================================================================
@@ -60,7 +126,6 @@ public:
*/
static void setDefaultLookAndFeel (LookAndFeel* newDefaultLookAndFeel) noexcept;
-
//==============================================================================
/** Looks for a colour that has been registered with the given colour ID number.
@@ -82,9 +147,7 @@ public:
Colour findColour (int colourId) const noexcept;
/** Registers a colour to be used for a particular purpose.
-
For more details, see the comments for findColour().
-
@see findColour, Component::findColour, Component::setColour
*/
void setColour (int colourId, Colour colour) noexcept;
@@ -94,9 +157,12 @@ public:
*/
bool isColourSpecified (int colourId) const noexcept;
-
//==============================================================================
- virtual Typeface::Ptr getTypefaceForFont (const Font& font);
+ /** Returns the typeface that should be used for a given font.
+ The default implementation just does what you'd expect it to, but you can override
+ this if you want to intercept fonts and use your own custom typeface object.
+ */
+ virtual Typeface::Ptr getTypefaceForFont (const Font&);
/** Allows you to change the default sans-serif font.
@@ -110,510 +176,38 @@ public:
/** Override this to get the chance to swap a component's mouse cursor for a
customised one.
*/
- virtual MouseCursor getMouseCursorFor (Component& component);
+ virtual MouseCursor getMouseCursorFor (Component&);
//==============================================================================
- // Creates a new graphics context object.
+ /** Creates a new graphics context object. */
virtual LowLevelGraphicsContext* createGraphicsContext (const Image& imageToRenderOn,
const Point& origin,
const RectangleList& initialClip);
- //==============================================================================
- /** Draws the lozenge-shaped background for a standard button. */
- virtual void drawButtonBackground (Graphics&,
- Button& button,
- const Colour& backgroundColour,
- bool isMouseOverButton,
- bool isButtonDown);
-
- virtual Font getTextButtonFont (TextButton& button);
-
- /** Draws the text for a TextButton. */
- virtual void drawButtonText (Graphics&,
- TextButton& button,
- bool isMouseOverButton,
- bool isButtonDown);
-
- /** Draws the contents of a standard ToggleButton. */
- virtual void drawToggleButton (Graphics&,
- ToggleButton& button,
- bool isMouseOverButton,
- bool isButtonDown);
-
- virtual void changeToggleButtonWidthToFitText (ToggleButton& button);
-
- virtual void drawTickBox (Graphics&,
- Component& component,
- float x, float y, float w, float h,
- bool ticked,
- bool isEnabled,
- bool isMouseOverButton,
- bool isButtonDown);
-
- virtual void drawDrawableButton (Graphics&,
- DrawableButton& button,
- bool isMouseOverButton,
- bool isButtonDown);
-
- //==============================================================================
- // AlertWindow handling..
-
- virtual AlertWindow* createAlertWindow (const String& title,
- const String& message,
- const String& button1,
- const String& button2,
- const String& button3,
- AlertWindow::AlertIconType iconType,
- int numButtons,
- Component* associatedComponent);
-
- virtual void drawAlertBox (Graphics&,
- AlertWindow& alert,
- const Rectangle& textArea,
- TextLayout& textLayout);
-
- virtual int getAlertBoxWindowFlags();
-
- virtual int getAlertWindowButtonHeight();
-
- virtual Font getAlertWindowMessageFont();
- virtual Font getAlertWindowFont();
-
void setUsingNativeAlertWindows (bool shouldUseNativeAlerts);
bool isUsingNativeAlertWindows();
- /** Draws a progress bar.
-
- If the progress value is less than 0 or greater than 1.0, this should draw a spinning
- bar that fills the whole space (i.e. to say that the app is still busy but the progress
- isn't known). It can use the current time as a basis for playing an animation.
-
- (Used by progress bars in AlertWindow).
- */
- virtual void drawProgressBar (Graphics&, ProgressBar& progressBar,
- int width, int height,
- double progress, const String& textToShow);
-
//==============================================================================
- // Draws a small image that spins to indicate that something's happening..
- // This method should use the current time to animate itself, so just keep
- // repainting it every so often.
+ /** Draws a small image that spins to indicate that something's happening.
+ This method should use the current time to animate itself, so just keep
+ repainting it every so often.
+ */
virtual void drawSpinningWaitAnimation (Graphics&, const Colour& colour,
- int x, int y, int w, int h);
-
- //==============================================================================
- virtual bool areScrollbarButtonsVisible();
-
- /** Draws one of the buttons on a scrollbar.
-
- @param g the context to draw into
- @param scrollbar the bar itself
- @param width the width of the button
- @param height the height of the button
- @param buttonDirection the direction of the button, where 0 = up, 1 = right, 2 = down, 3 = left
- @param isScrollbarVertical true if it's a vertical bar, false if horizontal
- @param isMouseOverButton whether the mouse is currently over the button (also true if it's held down)
- @param isButtonDown whether the mouse button's held down
- */
- virtual void drawScrollbarButton (Graphics& g,
- ScrollBar& scrollbar,
- int width, int height,
- int buttonDirection,
- bool isScrollbarVertical,
- bool isMouseOverButton,
- bool isButtonDown);
-
- /** Draws the thumb area of a scrollbar.
-
- @param g the context to draw into
- @param scrollbar the bar itself
- @param x the x position of the left edge of the thumb area to draw in
- @param y the y position of the top edge of the thumb area to draw in
- @param width the width of the thumb area to draw in
- @param height the height of the thumb area to draw in
- @param isScrollbarVertical true if it's a vertical bar, false if horizontal
- @param thumbStartPosition for vertical bars, the y coordinate of the top of the
- thumb, or its x position for horizontal bars
- @param thumbSize for vertical bars, the height of the thumb, or its width for
- horizontal bars. This may be 0 if the thumb shouldn't be drawn.
- @param isMouseOver whether the mouse is over the thumb area, also true if the mouse is
- currently dragging the thumb
- @param isMouseDown whether the mouse is currently dragging the scrollbar
- */
- virtual void drawScrollbar (Graphics& g,
- ScrollBar& scrollbar,
- int x, int y,
- int width, int height,
- bool isScrollbarVertical,
- int thumbStartPosition,
- int thumbSize,
- bool isMouseOver,
- bool isMouseDown);
-
- /** Returns the component effect to use for a scrollbar */
- virtual ImageEffectFilter* getScrollbarEffect();
-
- /** Returns the minimum length in pixels to use for a scrollbar thumb. */
- virtual int getMinimumScrollbarThumbSize (ScrollBar& scrollbar);
-
- /** Returns the default thickness to use for a scrollbar. */
- virtual int getDefaultScrollbarWidth();
-
- /** Returns the length in pixels to use for a scrollbar button. */
- virtual int getScrollbarButtonSize (ScrollBar& scrollbar);
+ int x, int y, int w, int h) = 0;
//==============================================================================
/** Returns a tick shape for use in yes/no boxes, etc. */
- virtual Path getTickShape (float height);
+ virtual Path getTickShape (float height) = 0;
/** Returns a cross shape for use in yes/no boxes, etc. */
- virtual Path getCrossShape (float height);
+ virtual Path getCrossShape (float height) = 0;
//==============================================================================
- /** Draws the + or - box in a treeview. */
- virtual void drawTreeviewPlusMinusBox (Graphics&, const Rectangle& area,
- Colour backgroundColour, bool isOpen, bool isMouseOver);
+ virtual DropShadower* createDropShadowerForComponent (Component*) = 0;
//==============================================================================
- virtual void fillTextEditorBackground (Graphics&, int width, int height, TextEditor& textEditor);
- virtual void drawTextEditorOutline (Graphics&, int width, int height, TextEditor& textEditor);
-
- virtual CaretComponent* createCaretComponent (Component* keyFocusOwner);
-
- //==============================================================================
- // These return a pointer to an internally cached drawable - make sure you don't keep
- // a copy of this pointer anywhere, as it may become invalid in the future.
- virtual const Drawable* getDefaultFolderImage();
- virtual const Drawable* getDefaultDocumentFileImage();
-
- virtual AttributedString createFileChooserHeaderText (const String& title,
- const String& instructions);
-
- virtual void drawFileBrowserRow (Graphics&, int width, int height,
- const String& filename, Image* icon,
- const String& fileSizeDescription,
- const String& fileTimeDescription,
- bool isDirectory,
- bool isItemSelected,
- int itemIndex,
- DirectoryContentsDisplayComponent& component);
-
- virtual Button* createFileBrowserGoUpButton();
-
- virtual void layoutFileBrowserComponent (FileBrowserComponent& browserComp,
- DirectoryContentsDisplayComponent* fileListComponent,
- FilePreviewComponent* previewComp,
- ComboBox* currentPathBox,
- TextEditor* filenameBox,
- Button* goUpButton);
-
- //==============================================================================
- virtual void drawBubble (Graphics&, BubbleComponent&,
- const Point& tip, const Rectangle& body);
-
- //==============================================================================
- virtual void drawLasso (Graphics&, Component& lassoComp);
-
- //==============================================================================
- /** Fills the background of a popup menu component. */
- virtual void drawPopupMenuBackground (Graphics&, int width, int height);
-
- /** Draws one of the items in a popup menu. */
- virtual void drawPopupMenuItem (Graphics&,
- int width, int height,
- bool isSeparator,
- bool isActive,
- bool isHighlighted,
- bool isTicked,
- bool hasSubMenu,
- const String& text,
- const String& shortcutKeyText,
- Image* image,
- const Colour* const textColour);
-
- /** Returns the size and style of font to use in popup menus. */
- virtual Font getPopupMenuFont();
-
- virtual void drawPopupMenuUpDownArrow (Graphics&,
- int width, int height,
- bool isScrollUpArrow);
-
- /** Finds the best size for an item in a popup menu. */
- virtual void getIdealPopupMenuItemSize (const String& text,
- bool isSeparator,
- int standardMenuItemHeight,
- int& idealWidth,
- int& idealHeight);
-
- virtual int getMenuWindowFlags();
-
- virtual void drawMenuBarBackground (Graphics&, int width, int height,
- bool isMouseOverBar,
- MenuBarComponent& menuBar);
-
- virtual int getMenuBarItemWidth (MenuBarComponent& menuBar, int itemIndex, const String& itemText);
-
- virtual Font getMenuBarFont (MenuBarComponent& menuBar, int itemIndex, const String& itemText);
-
- virtual void drawMenuBarItem (Graphics&,
- int width, int height,
- int itemIndex,
- const String& itemText,
- bool isMouseOverItem,
- bool isMenuOpen,
- bool isMouseOverBar,
- MenuBarComponent& menuBar);
-
- //==============================================================================
- virtual void drawComboBox (Graphics&, int width, int height,
- bool isButtonDown,
- int buttonX, int buttonY,
- int buttonW, int buttonH,
- ComboBox& box);
-
- virtual Font getComboBoxFont (ComboBox& box);
-
- virtual Label* createComboBoxTextBox (ComboBox& box);
-
- virtual void positionComboBoxText (ComboBox& box, Label& labelToPosition);
-
- //==============================================================================
- virtual void drawLabel (Graphics&, Label&);
-
- virtual Font getLabelFont (Label&);
-
- //==============================================================================
- virtual void drawLinearSlider (Graphics&,
- int x, int y,
- int width, int height,
- float sliderPos,
- float minSliderPos,
- float maxSliderPos,
- const Slider::SliderStyle style,
- Slider& slider);
-
- virtual void drawLinearSliderBackground (Graphics&,
- int x, int y,
- int width, int height,
- float sliderPos,
- float minSliderPos,
- float maxSliderPos,
- const Slider::SliderStyle style,
- Slider& slider);
-
- virtual void drawLinearSliderThumb (Graphics&,
- int x, int y,
- int width, int height,
- float sliderPos,
- float minSliderPos,
- float maxSliderPos,
- const Slider::SliderStyle style,
- Slider& slider);
-
- virtual int getSliderThumbRadius (Slider& slider);
-
- virtual void drawRotarySlider (Graphics&,
- int x, int y,
- int width, int height,
- float sliderPosProportional,
- float rotaryStartAngle,
- float rotaryEndAngle,
- Slider& slider);
-
- virtual Button* createSliderButton (bool isIncrement);
- virtual Label* createSliderTextBox (Slider& slider);
-
- virtual ImageEffectFilter* getSliderEffect();
-
- virtual Font getSliderPopupFont();
- virtual int getSliderPopupPlacement();
-
- //==============================================================================
- virtual void getTooltipSize (const String& tipText, int& width, int& height);
-
- virtual void drawTooltip (Graphics&, const String& text, int width, int height);
-
- //==============================================================================
- virtual Button* createFilenameComponentBrowseButton (const String& text);
-
- virtual void layoutFilenameComponent (FilenameComponent& filenameComp,
- ComboBox* filenameBox, Button* browseButton);
-
- //==============================================================================
- virtual void drawConcertinaPanelHeader (Graphics&, const Rectangle& area,
- bool isMouseOver, bool isMouseDown,
- ConcertinaPanel&, Component& panel);
-
- //==============================================================================
- virtual void drawCornerResizer (Graphics&,
- int w, int h,
- bool isMouseOver,
- bool isMouseDragging);
-
- virtual void drawResizableFrame (Graphics&,
- int w, int h,
- const BorderSize&);
-
- //==============================================================================
- virtual void fillResizableWindowBackground (Graphics&, int w, int h,
- const BorderSize&,
- ResizableWindow& window);
-
- virtual void drawResizableWindowBorder (Graphics&,
- int w, int h,
- const BorderSize& border,
- ResizableWindow& window);
-
- //==============================================================================
- virtual void drawDocumentWindowTitleBar (DocumentWindow& window,
- Graphics&, int w, int h,
- int titleSpaceX, int titleSpaceW,
- const Image* icon,
- bool drawTitleTextOnLeft);
-
- virtual Button* createDocumentWindowButton (int buttonType);
-
- virtual void positionDocumentWindowButtons (DocumentWindow& window,
- int titleBarX, int titleBarY,
- int titleBarW, int titleBarH,
- Button* minimiseButton,
- Button* maximiseButton,
- Button* closeButton,
- bool positionTitleBarButtonsOnLeft);
-
- virtual int getDefaultMenuBarHeight();
-
- //==============================================================================
- virtual DropShadower* createDropShadowerForComponent (Component* component);
-
- //==============================================================================
- virtual void drawStretchableLayoutResizerBar (Graphics&,
- int w, int h,
- bool isVerticalBar,
- bool isMouseOver,
- bool isMouseDragging);
-
- //==============================================================================
- virtual void drawGroupComponentOutline (Graphics&, int w, int h,
- const String& text,
- const Justification& position,
- GroupComponent& group);
-
- //==============================================================================
- virtual int getTabButtonSpaceAroundImage();
- virtual int getTabButtonOverlap (int tabDepth);
- virtual int getTabButtonBestWidth (TabBarButton&, int tabDepth);
- virtual Rectangle getTabButtonExtraComponentBounds (const TabBarButton&, Rectangle& textArea, Component& extraComp);
-
- virtual void drawTabButton (TabBarButton&, Graphics&, bool isMouseOver, bool isMouseDown);
- virtual void drawTabButtonText (TabBarButton&, Graphics&, bool isMouseOver, bool isMouseDown);
- virtual void drawTabbedButtonBarBackground (TabbedButtonBar&, Graphics&);
- virtual void drawTabAreaBehindFrontButton (TabbedButtonBar&, Graphics&, int w, int h);
-
- virtual void createTabButtonShape (TabBarButton&, Path& path, bool isMouseOver, bool isMouseDown);
- virtual void fillTabButtonShape (TabBarButton&, Graphics&, const Path& path, bool isMouseOver, bool isMouseDown);
-
- virtual Button* createTabBarExtrasButton();
-
- //==============================================================================
- virtual void drawImageButton (Graphics&, Image* image,
- int imageX, int imageY, int imageW, int imageH,
- const Colour& overlayColour,
- float imageOpacity,
- ImageButton& button);
-
- //==============================================================================
- virtual void drawTableHeaderBackground (Graphics&, TableHeaderComponent&);
-
- virtual void drawTableHeaderColumn (Graphics&, const String& columnName, int columnId,
- int width, int height,
- bool isMouseOver, bool isMouseDown,
- int columnFlags);
-
- //==============================================================================
- virtual void paintToolbarBackground (Graphics&, int width, int height, Toolbar& toolbar);
-
- virtual Button* createToolbarMissingItemsButton (Toolbar& toolbar);
-
- virtual void paintToolbarButtonBackground (Graphics&, int width, int height,
- bool isMouseOver, bool isMouseDown,
- ToolbarItemComponent& component);
-
- virtual void paintToolbarButtonLabel (Graphics&, int x, int y, int width, int height,
- const String& text, ToolbarItemComponent& component);
-
- //==============================================================================
- virtual void drawPropertyPanelSectionHeader (Graphics&, const String& name,
- bool isOpen, int width, int height);
-
- virtual void drawPropertyComponentBackground (Graphics&, int width, int height,
- PropertyComponent& component);
-
- virtual void drawPropertyComponentLabel (Graphics&, int width, int height,
- PropertyComponent& component);
-
- virtual Rectangle getPropertyComponentContentPosition (PropertyComponent& component);
-
- //==============================================================================
- virtual void drawCallOutBoxBackground (CallOutBox& box, Graphics&, const Path& path, Image& cachedImage);
-
- //==============================================================================
- virtual void drawLevelMeter (Graphics&, int width, int height, float level);
-
- virtual void drawKeymapChangeButton (Graphics&, int width, int height, Button& button, const String& keyDescription);
-
- //==============================================================================
- /** Plays the system's default 'beep' noise, to alert the user about something very important.
- */
+ /** Plays the system's default 'beep' noise, to alert the user about something very important. */
virtual void playAlertSound();
- //==============================================================================
- /** Draws a 3D raised (or indented) bevel using two colours.
-
- The bevel is drawn inside the given rectangle, and greater bevel thicknesses
- extend inwards.
-
- The top-left colour is used for the top- and left-hand edges of the
- bevel; the bottom-right colour is used for the bottom- and right-hand
- edges.
-
- If useGradient is true, then the bevel fades out to make it look more curved
- and less angular. If sharpEdgeOnOutside is true, the outside of the bevel is
- sharp, and it fades towards the centre; if sharpEdgeOnOutside is false, then
- the centre edges are sharp and it fades towards the outside.
- */
- static void drawBevel (Graphics&,
- int x, int y, int width, int height,
- int bevelThickness,
- const Colour& topLeftColour = Colours::white,
- const Colour& bottomRightColour = Colours::black,
- bool useGradient = true,
- bool sharpEdgeOnOutside = true);
-
- /** Utility function to draw a shiny, glassy circle (for round LED-type buttons). */
- static void drawGlassSphere (Graphics&,
- float x, float y,
- float diameter,
- const Colour& colour,
- float outlineThickness) noexcept;
-
- static void drawGlassPointer (Graphics&,
- float x, float y,
- float diameter,
- const Colour& colour, float outlineThickness,
- int direction) noexcept;
-
- /** Utility function to draw a shiny, glassy oblong (for text buttons). */
- static void drawGlassLozenge (Graphics&,
- float x, float y,
- float width, float height,
- const Colour& colour,
- float outlineThickness,
- float cornerSize,
- bool flatOnLeft, bool flatOnRight,
- bool flatOnTop, bool flatOnBottom) noexcept;
-
- static Drawable* loadDrawableFromData (const void* data, size_t numBytes);
-
private:
//==============================================================================
friend class WeakReference;
@@ -629,41 +223,9 @@ private:
};
SortedSet colours;
-
- // default typeface names
String defaultSans, defaultSerif, defaultFixed;
-
- ScopedPointer folderImage, documentImage;
-
bool useNativeAlertWindows;
- void drawShinyButtonShape (Graphics&,
- float x, float y, float w, float h, float maxCornerSize,
- const Colour& baseColour,
- float strokeWidth,
- bool flatOnLeft,
- bool flatOnRight,
- bool flatOnTop,
- bool flatOnBottom) noexcept;
-
- #if JUCE_CATCH_DEPRECATED_CODE_MISUSE
- // These methods have been deprecated - see their new parameter lists..
- virtual int drawFileBrowserRow (Graphics&, int, int, const String&, Image*, const String&, const String&, bool, bool, int) { return 0; }
- virtual int drawTabButton (Graphics&, int, int, const Colour&, int, const String&, Button&, TabbedButtonBar::Orientation, bool, bool, bool) { return 0; }
- virtual int createTabButtonShape (Path&, int, int, int, const String&, Button&, TabbedButtonBar::Orientation, bool, bool, bool) { return 0; }
- virtual int fillTabButtonShape (Graphics&, const Path&, const Colour&, int, const String&, Button&, TabbedButtonBar::Orientation, bool, bool, bool) { return 0; }
- virtual int drawTabAreaBehindFrontButton (Graphics&, int, int, TabbedButtonBar&, TabbedButtonBar::Orientation) { return 0; }
- virtual int drawTabButtonText (Graphics&, int, int, int, int, const Colour&, int, const String&, Button&, TabbedButtonBar::Orientation, bool, bool, bool) { return 0; }
- virtual int getTabButtonBestWidth (int, const String&, int, Button&) { return 0; }
- virtual int drawBubble (Graphics&, float, float, float, float, float, float) { return 0; }
- virtual int getFontForTextButton (TextButton&) { return 0; }
- virtual int createFileChooserHeaderText (const String&, const String&, GlyphArrangement&, int) { return 0; }
- virtual int drawTreeviewPlusMinusBox (Graphics&, int, int, int, int, bool, bool) { return 0; }
- #endif
-
- class GlassWindowButton;
- class SliderLabelComp;
-
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LookAndFeel)
};
diff --git a/modules/juce_gui_extra/lookandfeel/juce_OldSchoolLookAndFeel.cpp b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V1.cpp
similarity index 76%
rename from modules/juce_gui_extra/lookandfeel/juce_OldSchoolLookAndFeel.cpp
rename to modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V1.cpp
index 7bd7fd53f1..d93b859e36 100644
--- a/modules/juce_gui_extra/lookandfeel/juce_OldSchoolLookAndFeel.cpp
+++ b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V1.cpp
@@ -22,7 +22,7 @@
==============================================================================
*/
-OldSchoolLookAndFeel::OldSchoolLookAndFeel()
+LookAndFeel_V1::LookAndFeel_V1()
{
setColour (TextButton::buttonColourId, Colour (0xffbbbbff));
setColour (ListBox::outlineColourId, findColour (ComboBox::outlineColourId));
@@ -41,16 +41,13 @@ OldSchoolLookAndFeel::OldSchoolLookAndFeel()
scrollbarShadow.setShadowProperties (DropShadow (Colours::black.withAlpha (0.5f), 2, Point()));
}
-OldSchoolLookAndFeel::~OldSchoolLookAndFeel()
+LookAndFeel_V1::~LookAndFeel_V1()
{
}
//==============================================================================
-void OldSchoolLookAndFeel::drawButtonBackground (Graphics& g,
- Button& button,
- const Colour& backgroundColour,
- bool isMouseOverButton,
- bool isButtonDown)
+void LookAndFeel_V1::drawButtonBackground (Graphics& g, Button& button, const Colour& backgroundColour,
+ bool isMouseOverButton, bool isButtonDown)
{
const int width = button.getWidth();
const int height = button.getHeight();
@@ -84,13 +81,12 @@ void OldSchoolLookAndFeel::drawButtonBackground (Graphics& g,
g.strokePath (p, PathStrokeType ((isMouseOverButton) ? 2.0f : 1.4f));
}
-void OldSchoolLookAndFeel::drawTickBox (Graphics& g,
- Component& /*component*/,
- float x, float y, float w, float h,
- const bool ticked,
- const bool isEnabled,
- const bool /*isMouseOverButton*/,
- const bool isButtonDown)
+void LookAndFeel_V1::drawTickBox (Graphics& g, Component& /*component*/,
+ float x, float y, float w, float h,
+ const bool ticked,
+ const bool isEnabled,
+ const bool /*isMouseOverButton*/,
+ const bool isButtonDown)
{
Path box;
box.addRoundedRectangle (0.0f, 2.0f, 6.0f, 6.0f, 1.0f);
@@ -117,10 +113,7 @@ void OldSchoolLookAndFeel::drawTickBox (Graphics& g,
}
}
-void OldSchoolLookAndFeel::drawToggleButton (Graphics& g,
- ToggleButton& button,
- bool isMouseOverButton,
- bool isButtonDown)
+void LookAndFeel_V1::drawToggleButton (Graphics& g, ToggleButton& button, bool isMouseOverButton, bool isButtonDown)
{
if (button.hasKeyboardFocus (true))
{
@@ -151,13 +144,13 @@ void OldSchoolLookAndFeel::drawToggleButton (Graphics& g,
Justification::centredLeft, 10);
}
-void OldSchoolLookAndFeel::drawProgressBar (Graphics& g, ProgressBar& progressBar,
- int width, int height,
- double progress, const String& textToShow)
+void LookAndFeel_V1::drawProgressBar (Graphics& g, ProgressBar& progressBar,
+ int width, int height,
+ double progress, const String& textToShow)
{
if (progress < 0 || progress >= 1.0)
{
- LookAndFeel::drawProgressBar (g, progressBar, width, height, progress, textToShow);
+ LookAndFeel_V2::drawProgressBar (g, progressBar, width, height, progress, textToShow);
}
else
{
@@ -181,13 +174,11 @@ void OldSchoolLookAndFeel::drawProgressBar (Graphics& g, ProgressBar& progressBa
}
}
-void OldSchoolLookAndFeel::drawScrollbarButton (Graphics& g,
- ScrollBar& bar,
- int width, int height,
- int buttonDirection,
- bool isScrollbarVertical,
- bool isMouseOverButton,
- bool isButtonDown)
+void LookAndFeel_V1::drawScrollbarButton (Graphics& g, ScrollBar& bar,
+ int width, int height, int buttonDirection,
+ bool isScrollbarVertical,
+ bool isMouseOverButton,
+ bool isButtonDown)
{
if (isScrollbarVertical)
width -= 2;
@@ -226,15 +217,10 @@ void OldSchoolLookAndFeel::drawScrollbarButton (Graphics& g,
g.strokePath (p, PathStrokeType (0.5f));
}
-void OldSchoolLookAndFeel::drawScrollbar (Graphics& g,
- ScrollBar& bar,
- int x, int y,
- int width, int height,
- bool isScrollbarVertical,
- int thumbStartPosition,
- int thumbSize,
- bool isMouseOver,
- bool isMouseDown)
+void LookAndFeel_V1::drawScrollbar (Graphics& g, ScrollBar& bar,
+ int x, int y, int width, int height,
+ bool isScrollbarVertical, int thumbStartPosition, int thumbSize,
+ bool isMouseOver, bool isMouseDown)
{
g.fillAll (bar.findColour (ScrollBar::backgroundColourId));
@@ -296,14 +282,14 @@ void OldSchoolLookAndFeel::drawScrollbar (Graphics& g,
}
}
-ImageEffectFilter* OldSchoolLookAndFeel::getScrollbarEffect()
+ImageEffectFilter* LookAndFeel_V1::getScrollbarEffect()
{
return &scrollbarShadow;
}
//==============================================================================
-void OldSchoolLookAndFeel::drawPopupMenuBackground (Graphics& g, int width, int height)
+void LookAndFeel_V1::drawPopupMenuBackground (Graphics& g, int width, int height)
{
g.fillAll (findColour (PopupMenu::backgroundColourId));
@@ -311,15 +297,14 @@ void OldSchoolLookAndFeel::drawPopupMenuBackground (Graphics& g, int width, int
g.drawRect (0, 0, width, height);
}
-void OldSchoolLookAndFeel::drawMenuBarBackground (Graphics& g, int /*width*/, int /*height*/,
- bool, MenuBarComponent& menuBar)
+void LookAndFeel_V1::drawMenuBarBackground (Graphics& g, int /*width*/, int /*height*/, bool, MenuBarComponent& menuBar)
{
g.fillAll (menuBar.findColour (PopupMenu::backgroundColourId));
}
//==============================================================================
-void OldSchoolLookAndFeel::drawTextEditorOutline (Graphics& g, int width, int height, TextEditor& textEditor)
+void LookAndFeel_V1::drawTextEditorOutline (Graphics& g, int width, int height, TextEditor& textEditor)
{
if (textEditor.isEnabled())
{
@@ -329,11 +314,10 @@ void OldSchoolLookAndFeel::drawTextEditorOutline (Graphics& g, int width, int he
}
//==============================================================================
-void OldSchoolLookAndFeel::drawComboBox (Graphics& g, int width, int height,
- const bool isButtonDown,
- int buttonX, int buttonY,
- int buttonW, int buttonH,
- ComboBox& box)
+void LookAndFeel_V1::drawComboBox (Graphics& g, int width, int height,
+ const bool isButtonDown,
+ int buttonX, int buttonY, int buttonW, int buttonH,
+ ComboBox& box)
{
g.fillAll (box.findColour (ComboBox::backgroundColourId));
@@ -364,7 +348,7 @@ void OldSchoolLookAndFeel::drawComboBox (Graphics& g, int width, int height,
}
}
-Font OldSchoolLookAndFeel::getComboBoxFont (ComboBox& box)
+Font LookAndFeel_V1::getComboBoxFont (ComboBox& box)
{
Font f (jmin (15.0f, box.getHeight() * 0.85f));
f.setHorizontalScale (0.9f);
@@ -383,14 +367,11 @@ static void drawTriangle (Graphics& g, float x1, float y1, float x2, float y2, f
g.strokePath (p, PathStrokeType (0.3f));
}
-void OldSchoolLookAndFeel::drawLinearSlider (Graphics& g,
- int x, int y,
- int w, int h,
- float sliderPos,
- float minSliderPos,
- float maxSliderPos,
- const Slider::SliderStyle style,
- Slider& slider)
+void LookAndFeel_V1::drawLinearSlider (Graphics& g,
+ int x, int y, int w, int h,
+ float sliderPos, float minSliderPos, float maxSliderPos,
+ const Slider::SliderStyle style,
+ Slider& slider)
{
g.fillAll (slider.findColour (Slider::backgroundColourId));
@@ -468,7 +449,7 @@ void OldSchoolLookAndFeel::drawLinearSlider (Graphics& g,
}
}
-Button* OldSchoolLookAndFeel::createSliderButton (const bool isIncrement)
+Button* LookAndFeel_V1::createSliderButton (const bool isIncrement)
{
if (isIncrement)
return new ArrowButton ("u", 0.75f, Colours::white.withAlpha (0.8f));
@@ -476,21 +457,18 @@ Button* OldSchoolLookAndFeel::createSliderButton (const bool isIncrement)
return new ArrowButton ("d", 0.25f, Colours::white.withAlpha (0.8f));
}
-ImageEffectFilter* OldSchoolLookAndFeel::getSliderEffect()
+ImageEffectFilter* LookAndFeel_V1::getSliderEffect()
{
return &scrollbarShadow;
}
-int OldSchoolLookAndFeel::getSliderThumbRadius (Slider&)
+int LookAndFeel_V1::getSliderThumbRadius (Slider&)
{
return 8;
}
//==============================================================================
-void OldSchoolLookAndFeel::drawCornerResizer (Graphics& g,
- int w, int h,
- bool isMouseOver,
- bool isMouseDragging)
+void LookAndFeel_V1::drawCornerResizer (Graphics& g, int w, int h, bool isMouseOver, bool isMouseDragging)
{
g.setColour ((isMouseOver || isMouseDragging) ? Colours::lightgrey
: Colours::darkgrey);
@@ -508,7 +486,7 @@ void OldSchoolLookAndFeel::drawCornerResizer (Graphics& g,
}
//==============================================================================
-Button* OldSchoolLookAndFeel::createDocumentWindowButton (int buttonType)
+Button* LookAndFeel_V1::createDocumentWindowButton (int buttonType)
{
Path shape;
@@ -553,15 +531,12 @@ Button* OldSchoolLookAndFeel::createDocumentWindowButton (int buttonType)
return nullptr;
}
-void OldSchoolLookAndFeel::positionDocumentWindowButtons (DocumentWindow&,
- int titleBarX,
- int titleBarY,
- int titleBarW,
- int titleBarH,
- Button* minimiseButton,
- Button* maximiseButton,
- Button* closeButton,
- bool positionTitleBarButtonsOnLeft)
+void LookAndFeel_V1::positionDocumentWindowButtons (DocumentWindow&,
+ int titleBarX, int titleBarY, int titleBarW, int titleBarH,
+ Button* minimiseButton,
+ Button* maximiseButton,
+ Button* closeButton,
+ bool positionTitleBarButtonsOnLeft)
{
titleBarY += titleBarH / 8;
titleBarH -= titleBarH / 4;
diff --git a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V1.h b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V1.h
new file mode 100644
index 0000000000..41261d89df
--- /dev/null
+++ b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V1.h
@@ -0,0 +1,101 @@
+/*
+ ==============================================================================
+
+ This file is part of the JUCE library.
+ Copyright (c) 2013 - Raw Material Software Ltd.
+
+ Permission is granted to use this software under the terms of either:
+ a) the GPL v2 (or any later version)
+ b) the Affero GPL v3
+
+ Details of these licenses can be found 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.juce.com for more information.
+
+ ==============================================================================
+*/
+
+#ifndef JUCE_LOOKANDFEEL_V1_H_INCLUDED
+#define JUCE_LOOKANDFEEL_V1_H_INCLUDED
+
+//==============================================================================
+/**
+ The original JUCE look-and-feel, as used back from 2002 to about 2007ish.
+ @see LookAndFeel, LookAndFeel_V2, LookAndFeel_V3
+*/
+class JUCE_API LookAndFeel_V1 : public LookAndFeel_V2
+{
+public:
+ LookAndFeel_V1();
+ ~LookAndFeel_V1();
+
+ //==============================================================================
+ void drawButtonBackground (Graphics&, Button&, const Colour& backgroundColour,
+ bool isMouseOverButton, bool isButtonDown) override;
+
+ void drawToggleButton (Graphics&, ToggleButton&, bool isMouseOverButton, bool isButtonDown) override;
+
+ void drawTickBox (Graphics&, Component&, float x, float y, float w, float h,
+ bool ticked, bool isEnabled, bool isMouseOverButton, bool isButtonDown) override;
+
+ void drawProgressBar (Graphics&, ProgressBar&, int width, int height,
+ double progress, const String& textToShow) override;
+
+ //==============================================================================
+ void drawScrollbarButton (Graphics&, ScrollBar&, int width, int height,
+ int buttonDirection, bool isScrollbarVertical,
+ bool isMouseOverButton, bool isButtonDown) override;
+
+ void drawScrollbar (Graphics&, ScrollBar&, int x, int y, int width, int height,
+ bool isScrollbarVertical, int thumbStartPosition, int thumbSize,
+ bool isMouseOver, bool isMouseDown) override;
+
+ ImageEffectFilter* getScrollbarEffect() override;
+
+ //==============================================================================
+ void drawTextEditorOutline (Graphics&, int width, int height, TextEditor&) override;
+
+ //==============================================================================
+ void drawPopupMenuBackground (Graphics&, int width, int height) override;
+ void drawMenuBarBackground (Graphics&, int width, int height, bool isMouseOverBar, MenuBarComponent&) override;
+
+ //==============================================================================
+ void drawComboBox (Graphics&, int width, int height, bool isButtonDown,
+ int buttonX, int buttonY, int buttonW, int buttonH, ComboBox&) override;
+
+ Font getComboBoxFont (ComboBox&) override;
+
+ //==============================================================================
+ void drawLinearSlider (Graphics&, int x, int y, int width, int height,
+ float sliderPos, float minSliderPos, float maxSliderPos,
+ const Slider::SliderStyle, Slider&) override;
+
+ int getSliderThumbRadius (Slider&) override;
+ Button* createSliderButton (bool isIncrement) override;
+ ImageEffectFilter* getSliderEffect() override;
+
+ //==============================================================================
+ void drawCornerResizer (Graphics&, int w, int h, bool isMouseOver, bool isMouseDragging) override;
+
+ Button* createDocumentWindowButton (int buttonType) override;
+
+ void positionDocumentWindowButtons (DocumentWindow&,
+ int titleBarX, int titleBarY, int titleBarW, int titleBarH,
+ Button* minimiseButton, Button* maximiseButton, Button* closeButton,
+ bool positionTitleBarButtonsOnLeft) override;
+
+private:
+ DropShadowEffect scrollbarShadow;
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LookAndFeel_V1)
+};
+
+
+#endif // JUCE_LOOKANDFEEL_H_INCLUDED
diff --git a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp
new file mode 100644
index 0000000000..0afbea328c
--- /dev/null
+++ b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp
@@ -0,0 +1,2947 @@
+/*
+ ==============================================================================
+
+ This file is part of the JUCE library.
+ Copyright (c) 2013 - Raw Material Software Ltd.
+
+ Permission is granted to use this software under the terms of either:
+ a) the GPL v2 (or any later version)
+ b) the Affero GPL v3
+
+ Details of these licenses can be found 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.juce.com for more information.
+
+ ==============================================================================
+*/
+
+namespace LookAndFeelHelpers
+{
+ static Colour createBaseColour (Colour buttonColour,
+ bool hasKeyboardFocus,
+ bool isMouseOverButton,
+ bool isButtonDown) noexcept
+ {
+ const float sat = hasKeyboardFocus ? 1.3f : 0.9f;
+ const Colour baseColour (buttonColour.withMultipliedSaturation (sat));
+
+ if (isButtonDown) return baseColour.contrasting (0.2f);
+ if (isMouseOverButton) return baseColour.contrasting (0.1f);
+
+ return baseColour;
+ }
+
+ static TextLayout layoutTooltipText (const String& text, Colour colour) noexcept
+ {
+ const float tooltipFontSize = 13.0f;
+ const int maxToolTipWidth = 400;
+
+ AttributedString s;
+ s.setJustification (Justification::centred);
+ s.append (text, Font (tooltipFontSize, Font::bold), colour);
+
+ TextLayout tl;
+ tl.createLayoutWithBalancedLineLengths (s, (float) maxToolTipWidth);
+ return tl;
+ }
+}
+
+//==============================================================================
+LookAndFeel_V2::LookAndFeel_V2()
+{
+ // initialise the standard set of colours..
+ const uint32 textButtonColour = 0xffbbbbff;
+ const uint32 textHighlightColour = 0x401111ee;
+ const uint32 standardOutlineColour = 0xb2808080;
+
+ static const uint32 standardColours[] =
+ {
+ TextButton::buttonColourId, textButtonColour,
+ TextButton::buttonOnColourId, 0xff4444ff,
+ TextButton::textColourOnId, 0xff000000,
+ TextButton::textColourOffId, 0xff000000,
+
+ ToggleButton::textColourId, 0xff000000,
+
+ TextEditor::backgroundColourId, 0xffffffff,
+ TextEditor::textColourId, 0xff000000,
+ TextEditor::highlightColourId, textHighlightColour,
+ TextEditor::highlightedTextColourId, 0xff000000,
+ TextEditor::outlineColourId, 0x00000000,
+ TextEditor::focusedOutlineColourId, textButtonColour,
+ TextEditor::shadowColourId, 0x38000000,
+
+ CaretComponent::caretColourId, 0xff000000,
+
+ Label::backgroundColourId, 0x00000000,
+ Label::textColourId, 0xff000000,
+ Label::outlineColourId, 0x00000000,
+
+ ScrollBar::backgroundColourId, 0x00000000,
+ ScrollBar::thumbColourId, 0xffffffff,
+
+ TreeView::linesColourId, 0x4c000000,
+ TreeView::backgroundColourId, 0x00000000,
+ TreeView::dragAndDropIndicatorColourId, 0x80ff0000,
+ TreeView::selectedItemBackgroundColourId, 0x00000000,
+
+ PopupMenu::backgroundColourId, 0xffffffff,
+ PopupMenu::textColourId, 0xff000000,
+ PopupMenu::headerTextColourId, 0xff000000,
+ PopupMenu::highlightedTextColourId, 0xffffffff,
+ PopupMenu::highlightedBackgroundColourId, 0x991111aa,
+
+ ComboBox::buttonColourId, 0xffbbbbff,
+ ComboBox::outlineColourId, standardOutlineColour,
+ ComboBox::textColourId, 0xff000000,
+ ComboBox::backgroundColourId, 0xffffffff,
+ ComboBox::arrowColourId, 0x99000000,
+
+ TextPropertyComponent::backgroundColourId, 0xffffffff,
+ TextPropertyComponent::textColourId, 0xff000000,
+ TextPropertyComponent::outlineColourId, standardOutlineColour,
+
+ ListBox::backgroundColourId, 0xffffffff,
+ ListBox::outlineColourId, standardOutlineColour,
+ ListBox::textColourId, 0xff000000,
+
+ Slider::backgroundColourId, 0x00000000,
+ Slider::thumbColourId, textButtonColour,
+ Slider::trackColourId, 0x7fffffff,
+ Slider::rotarySliderFillColourId, 0x7f0000ff,
+ Slider::rotarySliderOutlineColourId, 0x66000000,
+ Slider::textBoxTextColourId, 0xff000000,
+ Slider::textBoxBackgroundColourId, 0xffffffff,
+ Slider::textBoxHighlightColourId, textHighlightColour,
+ Slider::textBoxOutlineColourId, standardOutlineColour,
+
+ ResizableWindow::backgroundColourId, 0xff777777,
+ //DocumentWindow::textColourId, 0xff000000, // (this is deliberately not set)
+
+ AlertWindow::backgroundColourId, 0xffededed,
+ AlertWindow::textColourId, 0xff000000,
+ AlertWindow::outlineColourId, 0xff666666,
+
+ ProgressBar::backgroundColourId, 0xffeeeeee,
+ ProgressBar::foregroundColourId, 0xffaaaaee,
+
+ TooltipWindow::backgroundColourId, 0xffeeeebb,
+ TooltipWindow::textColourId, 0xff000000,
+ TooltipWindow::outlineColourId, 0x4c000000,
+
+ TabbedComponent::backgroundColourId, 0x00000000,
+ TabbedComponent::outlineColourId, 0xff777777,
+ TabbedButtonBar::tabOutlineColourId, 0x80000000,
+ TabbedButtonBar::frontOutlineColourId, 0x90000000,
+
+ Toolbar::backgroundColourId, 0xfff6f8f9,
+ Toolbar::separatorColourId, 0x4c000000,
+ Toolbar::buttonMouseOverBackgroundColourId, 0x4c0000ff,
+ Toolbar::buttonMouseDownBackgroundColourId, 0x800000ff,
+ Toolbar::labelTextColourId, 0xff000000,
+ Toolbar::editingModeOutlineColourId, 0xffff0000,
+
+ DrawableButton::textColourId, 0xff000000,
+ DrawableButton::textColourOnId, 0xff000000,
+ DrawableButton::backgroundColourId, 0x00000000,
+ DrawableButton::backgroundOnColourId, 0xaabbbbff,
+
+ HyperlinkButton::textColourId, 0xcc1111ee,
+
+ GroupComponent::outlineColourId, 0x66000000,
+ GroupComponent::textColourId, 0xff000000,
+
+ BubbleComponent::backgroundColourId, 0xeeeeeebb,
+ BubbleComponent::outlineColourId, 0x77000000,
+
+ DirectoryContentsDisplayComponent::highlightColourId, textHighlightColour,
+ DirectoryContentsDisplayComponent::textColourId, 0xff000000,
+
+ 0x1000440, /*LassoComponent::lassoFillColourId*/ 0x66dddddd,
+ 0x1000441, /*LassoComponent::lassoOutlineColourId*/ 0x99111111,
+
+ 0x1005000, /*MidiKeyboardComponent::whiteNoteColourId*/ 0xffffffff,
+ 0x1005001, /*MidiKeyboardComponent::blackNoteColourId*/ 0xff000000,
+ 0x1005002, /*MidiKeyboardComponent::keySeparatorLineColourId*/ 0x66000000,
+ 0x1005003, /*MidiKeyboardComponent::mouseOverKeyOverlayColourId*/ 0x80ffff00,
+ 0x1005004, /*MidiKeyboardComponent::keyDownOverlayColourId*/ 0xffb6b600,
+ 0x1005005, /*MidiKeyboardComponent::textLabelColourId*/ 0xff000000,
+ 0x1005006, /*MidiKeyboardComponent::upDownButtonBackgroundColourId*/ 0xffd3d3d3,
+ 0x1005007, /*MidiKeyboardComponent::upDownButtonArrowColourId*/ 0xff000000,
+
+ 0x1004500, /*CodeEditorComponent::backgroundColourId*/ 0xffffffff,
+ 0x1004502, /*CodeEditorComponent::highlightColourId*/ textHighlightColour,
+ 0x1004503, /*CodeEditorComponent::defaultTextColourId*/ 0xff000000,
+ 0x1004504, /*CodeEditorComponent::lineNumberBackgroundId*/ 0x44999999,
+ 0x1004505, /*CodeEditorComponent::lineNumberTextId*/ 0x44000000,
+
+ 0x1007000, /*ColourSelector::backgroundColourId*/ 0xffe5e5e5,
+ 0x1007001, /*ColourSelector::labelTextColourId*/ 0xff000000,
+
+ 0x100ad00, /*KeyMappingEditorComponent::backgroundColourId*/ 0x00000000,
+ 0x100ad01, /*KeyMappingEditorComponent::textColourId*/ 0xff000000,
+
+ FileSearchPathListComponent::backgroundColourId, 0xffffffff,
+
+ FileChooserDialogBox::titleTextColourId, 0xff000000,
+ };
+
+ for (int i = 0; i < numElementsInArray (standardColours); i += 2)
+ setColour ((int) standardColours [i], Colour ((uint32) standardColours [i + 1]));
+}
+
+LookAndFeel_V2::~LookAndFeel_V2() {}
+
+//==============================================================================
+void LookAndFeel_V2::drawButtonBackground (Graphics& g,
+ Button& button,
+ const Colour& backgroundColour,
+ bool isMouseOverButton,
+ bool isButtonDown)
+{
+ const int width = button.getWidth();
+ const int height = button.getHeight();
+
+ const float outlineThickness = button.isEnabled() ? ((isButtonDown || isMouseOverButton) ? 1.2f : 0.7f) : 0.4f;
+ const float halfThickness = outlineThickness * 0.5f;
+
+ const float indentL = button.isConnectedOnLeft() ? 0.1f : halfThickness;
+ const float indentR = button.isConnectedOnRight() ? 0.1f : halfThickness;
+ const float indentT = button.isConnectedOnTop() ? 0.1f : halfThickness;
+ const float indentB = button.isConnectedOnBottom() ? 0.1f : halfThickness;
+
+ const Colour baseColour (LookAndFeelHelpers::createBaseColour (backgroundColour,
+ button.hasKeyboardFocus (true),
+ isMouseOverButton, isButtonDown)
+ .withMultipliedAlpha (button.isEnabled() ? 1.0f : 0.5f));
+
+ drawGlassLozenge (g,
+ indentL,
+ indentT,
+ width - indentL - indentR,
+ height - indentT - indentB,
+ baseColour, outlineThickness, -1.0f,
+ button.isConnectedOnLeft(),
+ button.isConnectedOnRight(),
+ button.isConnectedOnTop(),
+ button.isConnectedOnBottom());
+}
+
+Font LookAndFeel_V2::getTextButtonFont (TextButton& button)
+{
+ return button.getFont();
+}
+
+void LookAndFeel_V2::drawButtonText (Graphics& g, TextButton& button, bool /*isMouseOverButton*/, bool /*isButtonDown*/)
+{
+ Font font (getTextButtonFont (button));
+ g.setFont (font);
+ g.setColour (button.findColour (button.getToggleState() ? TextButton::textColourOnId
+ : TextButton::textColourOffId)
+ .withMultipliedAlpha (button.isEnabled() ? 1.0f : 0.5f));
+
+ const int yIndent = jmin (4, button.proportionOfHeight (0.3f));
+ const int cornerSize = jmin (button.getHeight(), button.getWidth()) / 2;
+
+ const int fontHeight = roundToInt (font.getHeight() * 0.6f);
+ const int leftIndent = jmin (fontHeight, 2 + cornerSize / (button.isConnectedOnLeft() ? 4 : 2));
+ const int rightIndent = jmin (fontHeight, 2 + cornerSize / (button.isConnectedOnRight() ? 4 : 2));
+
+ g.drawFittedText (button.getButtonText(),
+ leftIndent,
+ yIndent,
+ button.getWidth() - leftIndent - rightIndent,
+ button.getHeight() - yIndent * 2,
+ Justification::centred, 2);
+}
+
+void LookAndFeel_V2::drawTickBox (Graphics& g, Component& component,
+ float x, float y, float w, float h,
+ const bool ticked,
+ const bool isEnabled,
+ const bool isMouseOverButton,
+ const bool isButtonDown)
+{
+ const float boxSize = w * 0.7f;
+
+ drawGlassSphere (g, x, y + (h - boxSize) * 0.5f, boxSize,
+ LookAndFeelHelpers::createBaseColour (component.findColour (TextButton::buttonColourId)
+ .withMultipliedAlpha (isEnabled ? 1.0f : 0.5f),
+ true, isMouseOverButton, isButtonDown),
+ isEnabled ? ((isButtonDown || isMouseOverButton) ? 1.1f : 0.5f) : 0.3f);
+
+ if (ticked)
+ {
+ Path tick;
+ tick.startNewSubPath (1.5f, 3.0f);
+ tick.lineTo (3.0f, 6.0f);
+ tick.lineTo (6.0f, 0.0f);
+
+ g.setColour (isEnabled ? Colours::black : Colours::grey);
+
+ const AffineTransform trans (AffineTransform::scale (w / 9.0f, h / 9.0f)
+ .translated (x, y));
+
+ g.strokePath (tick, PathStrokeType (2.5f), trans);
+ }
+}
+
+void LookAndFeel_V2::drawToggleButton (Graphics& g, ToggleButton& button,
+ bool isMouseOverButton, bool isButtonDown)
+{
+ if (button.hasKeyboardFocus (true))
+ {
+ g.setColour (button.findColour (TextEditor::focusedOutlineColourId));
+ g.drawRect (0, 0, button.getWidth(), button.getHeight());
+ }
+
+ float fontSize = jmin (15.0f, button.getHeight() * 0.75f);
+ const float tickWidth = fontSize * 1.1f;
+
+ drawTickBox (g, button, 4.0f, (button.getHeight() - tickWidth) * 0.5f,
+ tickWidth, tickWidth,
+ button.getToggleState(),
+ button.isEnabled(),
+ isMouseOverButton,
+ isButtonDown);
+
+ g.setColour (button.findColour (ToggleButton::textColourId));
+ g.setFont (fontSize);
+
+ if (! button.isEnabled())
+ g.setOpacity (0.5f);
+
+ const int textX = (int) tickWidth + 5;
+
+ g.drawFittedText (button.getButtonText(),
+ textX, 0,
+ button.getWidth() - textX - 2, button.getHeight(),
+ Justification::centredLeft, 10);
+}
+
+void LookAndFeel_V2::changeToggleButtonWidthToFitText (ToggleButton& button)
+{
+ Font font (jmin (15.0f, button.getHeight() * 0.6f));
+
+ const int tickWidth = jmin (24, button.getHeight());
+
+ button.setSize (font.getStringWidth (button.getButtonText()) + tickWidth + 8,
+ button.getHeight());
+}
+
+void LookAndFeel_V2::drawDrawableButton (Graphics& g, DrawableButton& button,
+ bool /*isMouseOverButton*/, bool /*isButtonDown*/)
+{
+ bool toggleState = button.getToggleState();
+
+ g.fillAll (button.findColour (toggleState ? DrawableButton::backgroundOnColourId
+ : DrawableButton::backgroundColourId));
+
+ const int textH = (button.getStyle() == DrawableButton::ImageAboveTextLabel)
+ ? jmin (16, button.proportionOfHeight (0.25f))
+ : 0;
+
+ if (textH > 0)
+ {
+ g.setFont ((float) textH);
+
+ g.setColour (button.findColour (toggleState ? DrawableButton::textColourOnId
+ : DrawableButton::textColourId)
+ .withMultipliedAlpha (button.isEnabled() ? 1.0f : 0.4f));
+
+ g.drawFittedText (button.getButtonText(),
+ 2, button.getHeight() - textH - 1,
+ button.getWidth() - 4, textH,
+ Justification::centred, 1);
+ }
+}
+
+//==============================================================================
+AlertWindow* LookAndFeel_V2::createAlertWindow (const String& title,
+ const String& message,
+ const String& button1,
+ const String& button2,
+ const String& button3,
+ AlertWindow::AlertIconType iconType,
+ int numButtons,
+ Component* associatedComponent)
+{
+ AlertWindow* aw = new AlertWindow (title, message, iconType, associatedComponent);
+
+ if (numButtons == 1)
+ {
+ aw->addButton (button1, 0,
+ KeyPress (KeyPress::escapeKey),
+ KeyPress (KeyPress::returnKey));
+ }
+ else
+ {
+ const KeyPress button1ShortCut ((int) CharacterFunctions::toLowerCase (button1[0]), 0, 0);
+ KeyPress button2ShortCut ((int) CharacterFunctions::toLowerCase (button2[0]), 0, 0);
+ if (button1ShortCut == button2ShortCut)
+ button2ShortCut = KeyPress();
+
+ if (numButtons == 2)
+ {
+ aw->addButton (button1, 1, KeyPress (KeyPress::returnKey), button1ShortCut);
+ aw->addButton (button2, 0, KeyPress (KeyPress::escapeKey), button2ShortCut);
+ }
+ else if (numButtons == 3)
+ {
+ aw->addButton (button1, 1, button1ShortCut);
+ aw->addButton (button2, 2, button2ShortCut);
+ aw->addButton (button3, 0, KeyPress (KeyPress::escapeKey));
+ }
+ }
+
+ return aw;
+}
+
+void LookAndFeel_V2::drawAlertBox (Graphics& g,
+ AlertWindow& alert,
+ const Rectangle& textArea,
+ TextLayout& textLayout)
+{
+ g.fillAll (alert.findColour (AlertWindow::backgroundColourId));
+
+ int iconSpaceUsed = 0;
+
+ const int iconWidth = 80;
+ int iconSize = jmin (iconWidth + 50, alert.getHeight() + 20);
+
+ if (alert.containsAnyExtraComponents() || alert.getNumButtons() > 2)
+ iconSize = jmin (iconSize, textArea.getHeight() + 50);
+
+ const Rectangle iconRect (iconSize / -10, iconSize / -10,
+ iconSize, iconSize);
+
+ if (alert.getAlertType() != AlertWindow::NoIcon)
+ {
+ Path icon;
+ uint32 colour;
+ char character;
+
+ if (alert.getAlertType() == AlertWindow::WarningIcon)
+ {
+ colour = 0x55ff5555;
+ character = '!';
+
+ icon.addTriangle (iconRect.getX() + iconRect.getWidth() * 0.5f, (float) iconRect.getY(),
+ (float) iconRect.getRight(), (float) iconRect.getBottom(),
+ (float) iconRect.getX(), (float) iconRect.getBottom());
+
+ icon = icon.createPathWithRoundedCorners (5.0f);
+ }
+ else
+ {
+ colour = alert.getAlertType() == AlertWindow::InfoIcon ? (uint32) 0x605555ff : (uint32) 0x40b69900;
+ character = alert.getAlertType() == AlertWindow::InfoIcon ? 'i' : '?';
+
+ icon.addEllipse ((float) iconRect.getX(), (float) iconRect.getY(),
+ (float) iconRect.getWidth(), (float) iconRect.getHeight());
+ }
+
+ GlyphArrangement ga;
+ ga.addFittedText (Font (iconRect.getHeight() * 0.9f, Font::bold),
+ String::charToString ((juce_wchar) (uint8) character),
+ (float) iconRect.getX(), (float) iconRect.getY(),
+ (float) iconRect.getWidth(), (float) iconRect.getHeight(),
+ Justification::centred, false);
+ ga.createPath (icon);
+
+ icon.setUsingNonZeroWinding (false);
+ g.setColour (Colour (colour));
+ g.fillPath (icon);
+
+ iconSpaceUsed = iconWidth;
+ }
+
+ g.setColour (alert.findColour (AlertWindow::textColourId));
+
+ textLayout.draw (g, Rectangle (textArea.getX() + iconSpaceUsed,
+ textArea.getY(),
+ textArea.getWidth() - iconSpaceUsed,
+ textArea.getHeight()).toFloat());
+
+ g.setColour (alert.findColour (AlertWindow::outlineColourId));
+ g.drawRect (0, 0, alert.getWidth(), alert.getHeight());
+}
+
+int LookAndFeel_V2::getAlertBoxWindowFlags()
+{
+ return ComponentPeer::windowAppearsOnTaskbar
+ | ComponentPeer::windowHasDropShadow;
+}
+
+int LookAndFeel_V2::getAlertWindowButtonHeight()
+{
+ return 28;
+}
+
+Font LookAndFeel_V2::getAlertWindowMessageFont()
+{
+ return Font (15.0f);
+}
+
+Font LookAndFeel_V2::getAlertWindowFont()
+{
+ return Font (12.0f);
+}
+
+//==============================================================================
+void LookAndFeel_V2::drawProgressBar (Graphics& g, ProgressBar& progressBar,
+ int width, int height,
+ double progress, const String& textToShow)
+{
+ const Colour background (progressBar.findColour (ProgressBar::backgroundColourId));
+ const Colour foreground (progressBar.findColour (ProgressBar::foregroundColourId));
+
+ g.fillAll (background);
+
+ if (progress >= 0.0f && progress < 1.0f)
+ {
+ drawGlassLozenge (g, 1.0f, 1.0f,
+ (float) jlimit (0.0, width - 2.0, progress * (width - 2.0)),
+ (float) (height - 2),
+ foreground,
+ 0.5f, 0.0f,
+ true, true, true, true);
+ }
+ else
+ {
+ // spinning bar..
+ g.setColour (foreground);
+
+ const int stripeWidth = height * 2;
+ const int position = (int) (Time::getMillisecondCounter() / 15) % stripeWidth;
+
+ Path p;
+
+ for (float x = (float) (- position); x < width + stripeWidth; x += stripeWidth)
+ p.addQuadrilateral (x, 0.0f,
+ x + stripeWidth * 0.5f, 0.0f,
+ x, (float) height,
+ x - stripeWidth * 0.5f, (float) height);
+
+ Image im (Image::ARGB, width, height, true);
+
+ {
+ Graphics g2 (im);
+ drawGlassLozenge (g2, 1.0f, 1.0f,
+ (float) (width - 2),
+ (float) (height - 2),
+ foreground,
+ 0.5f, 0.0f,
+ true, true, true, true);
+ }
+
+ g.setTiledImageFill (im, 0, 0, 0.85f);
+ g.fillPath (p);
+ }
+
+ if (textToShow.isNotEmpty())
+ {
+ g.setColour (Colour::contrasting (background, foreground));
+ g.setFont (height * 0.6f);
+
+ g.drawText (textToShow, 0, 0, width, height, Justification::centred, false);
+ }
+}
+
+void LookAndFeel_V2::drawSpinningWaitAnimation (Graphics& g, const Colour& colour, int x, int y, int w, int h)
+{
+ const float radius = jmin (w, h) * 0.4f;
+ const float thickness = radius * 0.15f;
+ Path p;
+ p.addRoundedRectangle (radius * 0.4f, thickness * -0.5f,
+ radius * 0.6f, thickness,
+ thickness * 0.5f);
+
+ const float cx = x + w * 0.5f;
+ const float cy = y + h * 0.5f;
+
+ const uint32 animationIndex = (Time::getMillisecondCounter() / (1000 / 10)) % 12;
+
+ for (uint32 i = 0; i < 12; ++i)
+ {
+ const uint32 n = (i + 12 - animationIndex) % 12;
+ g.setColour (colour.withMultipliedAlpha ((n + 1) / 12.0f));
+
+ g.fillPath (p, AffineTransform::rotation (i * (float_Pi / 6.0f))
+ .translated (cx, cy));
+ }
+}
+
+bool LookAndFeel_V2::areScrollbarButtonsVisible()
+{
+ return true;
+}
+
+void LookAndFeel_V2::drawScrollbarButton (Graphics& g,
+ ScrollBar& scrollbar,
+ int width, int height,
+ int buttonDirection,
+ bool /*isScrollbarVertical*/,
+ bool /*isMouseOverButton*/,
+ bool isButtonDown)
+{
+ Path p;
+
+ if (buttonDirection == 0)
+ p.addTriangle (width * 0.5f, height * 0.2f,
+ width * 0.1f, height * 0.7f,
+ width * 0.9f, height * 0.7f);
+ else if (buttonDirection == 1)
+ p.addTriangle (width * 0.8f, height * 0.5f,
+ width * 0.3f, height * 0.1f,
+ width * 0.3f, height * 0.9f);
+ else if (buttonDirection == 2)
+ p.addTriangle (width * 0.5f, height * 0.8f,
+ width * 0.1f, height * 0.3f,
+ width * 0.9f, height * 0.3f);
+ else if (buttonDirection == 3)
+ p.addTriangle (width * 0.2f, height * 0.5f,
+ width * 0.7f, height * 0.1f,
+ width * 0.7f, height * 0.9f);
+
+ if (isButtonDown)
+ g.setColour (scrollbar.findColour (ScrollBar::thumbColourId).contrasting (0.2f));
+ else
+ g.setColour (scrollbar.findColour (ScrollBar::thumbColourId));
+
+ g.fillPath (p);
+
+ g.setColour (Colour (0x80000000));
+ g.strokePath (p, PathStrokeType (0.5f));
+}
+
+void LookAndFeel_V2::drawScrollbar (Graphics& g,
+ ScrollBar& scrollbar,
+ int x, int y,
+ int width, int height,
+ bool isScrollbarVertical,
+ int thumbStartPosition,
+ int thumbSize,
+ bool /*isMouseOver*/,
+ bool /*isMouseDown*/)
+{
+ g.fillAll (scrollbar.findColour (ScrollBar::backgroundColourId));
+
+ Path slotPath, thumbPath;
+
+ const float slotIndent = jmin (width, height) > 15 ? 1.0f : 0.0f;
+ const float slotIndentx2 = slotIndent * 2.0f;
+ const float thumbIndent = slotIndent + 1.0f;
+ const float thumbIndentx2 = thumbIndent * 2.0f;
+
+ float gx1 = 0.0f, gy1 = 0.0f, gx2 = 0.0f, gy2 = 0.0f;
+
+ if (isScrollbarVertical)
+ {
+ slotPath.addRoundedRectangle (x + slotIndent,
+ y + slotIndent,
+ width - slotIndentx2,
+ height - slotIndentx2,
+ (width - slotIndentx2) * 0.5f);
+
+ if (thumbSize > 0)
+ thumbPath.addRoundedRectangle (x + thumbIndent,
+ thumbStartPosition + thumbIndent,
+ width - thumbIndentx2,
+ thumbSize - thumbIndentx2,
+ (width - thumbIndentx2) * 0.5f);
+ gx1 = (float) x;
+ gx2 = x + width * 0.7f;
+ }
+ else
+ {
+ slotPath.addRoundedRectangle (x + slotIndent,
+ y + slotIndent,
+ width - slotIndentx2,
+ height - slotIndentx2,
+ (height - slotIndentx2) * 0.5f);
+
+ if (thumbSize > 0)
+ thumbPath.addRoundedRectangle (thumbStartPosition + thumbIndent,
+ y + thumbIndent,
+ thumbSize - thumbIndentx2,
+ height - thumbIndentx2,
+ (height - thumbIndentx2) * 0.5f);
+ gy1 = (float) y;
+ gy2 = y + height * 0.7f;
+ }
+
+ const Colour thumbColour (scrollbar.findColour (ScrollBar::thumbColourId));
+ Colour trackColour1, trackColour2;
+
+ if (scrollbar.isColourSpecified (ScrollBar::trackColourId)
+ || isColourSpecified (ScrollBar::trackColourId))
+ {
+ trackColour1 = trackColour2 = scrollbar.findColour (ScrollBar::trackColourId);
+ }
+ else
+ {
+ trackColour1 = thumbColour.overlaidWith (Colour (0x44000000));
+ trackColour2 = thumbColour.overlaidWith (Colour (0x19000000));
+ }
+
+ g.setGradientFill (ColourGradient (trackColour1, gx1, gy1,
+ trackColour2, gx2, gy2, false));
+ g.fillPath (slotPath);
+
+ if (isScrollbarVertical)
+ {
+ gx1 = x + width * 0.6f;
+ gx2 = (float) x + width;
+ }
+ else
+ {
+ gy1 = y + height * 0.6f;
+ gy2 = (float) y + height;
+ }
+
+ g.setGradientFill (ColourGradient (Colours::transparentBlack,gx1, gy1,
+ Colour (0x19000000), gx2, gy2, false));
+ g.fillPath (slotPath);
+
+ g.setColour (thumbColour);
+ g.fillPath (thumbPath);
+
+ g.setGradientFill (ColourGradient (Colour (0x10000000), gx1, gy1,
+ Colours::transparentBlack, gx2, gy2, false));
+
+ g.saveState();
+
+ if (isScrollbarVertical)
+ g.reduceClipRegion (x + width / 2, y, width, height);
+ else
+ g.reduceClipRegion (x, y + height / 2, width, height);
+
+ g.fillPath (thumbPath);
+ g.restoreState();
+
+ g.setColour (Colour (0x4c000000));
+ g.strokePath (thumbPath, PathStrokeType (0.4f));
+}
+
+ImageEffectFilter* LookAndFeel_V2::getScrollbarEffect()
+{
+ return nullptr;
+}
+
+int LookAndFeel_V2::getMinimumScrollbarThumbSize (ScrollBar& scrollbar)
+{
+ return jmin (scrollbar.getWidth(), scrollbar.getHeight()) * 2;
+}
+
+int LookAndFeel_V2::getDefaultScrollbarWidth()
+{
+ return 18;
+}
+
+int LookAndFeel_V2::getScrollbarButtonSize (ScrollBar& scrollbar)
+{
+ return 2 + (scrollbar.isVertical() ? scrollbar.getWidth()
+ : scrollbar.getHeight());
+}
+
+//==============================================================================
+Path LookAndFeel_V2::getTickShape (const float height)
+{
+ static const unsigned char tickShapeData[] =
+ {
+ 109,0,224,168,68,0,0,119,67,108,0,224,172,68,0,128,146,67,113,0,192,148,68,0,0,219,67,0,96,110,68,0,224,56,68,113,0,64,51,68,0,32,130,68,0,64,20,68,0,224,
+ 162,68,108,0,128,3,68,0,128,168,68,113,0,128,221,67,0,192,175,68,0,0,207,67,0,32,179,68,113,0,0,201,67,0,224,173,68,0,0,181,67,0,224,161,68,108,0,128,168,67,
+ 0,128,154,68,113,0,128,141,67,0,192,138,68,0,128,108,67,0,64,131,68,113,0,0,62,67,0,128,119,68,0,0,5,67,0,128,114,68,113,0,0,102,67,0,192,88,68,0,128,155,
+ 67,0,192,88,68,113,0,0,190,67,0,192,88,68,0,128,232,67,0,224,131,68,108,0,128,246,67,0,192,139,68,113,0,64,33,68,0,128,87,68,0,0,93,68,0,224,26,68,113,0,
+ 96,140,68,0,128,188,67,0,224,168,68,0,0,119,67,99,101
+ };
+
+ Path p;
+ p.loadPathFromData (tickShapeData, sizeof (tickShapeData));
+ p.scaleToFit (0, 0, height * 2.0f, height, true);
+ return p;
+}
+
+Path LookAndFeel_V2::getCrossShape (const float height)
+{
+ static const unsigned char crossShapeData[] =
+ {
+ 109,0,0,17,68,0,96,145,68,108,0,192,13,68,0,192,147,68,113,0,0,213,67,0,64,174,68,0,0,168,67,0,64,174,68,113,0,0,104,67,0,64,174,68,0,0,5,67,0,64,
+ 153,68,113,0,0,18,67,0,64,153,68,0,0,24,67,0,64,153,68,113,0,0,135,67,0,64,153,68,0,128,207,67,0,224,130,68,108,0,0,220,67,0,0,126,68,108,0,0,204,67,
+ 0,128,117,68,113,0,0,138,67,0,64,82,68,0,0,138,67,0,192,57,68,113,0,0,138,67,0,192,37,68,0,128,210,67,0,64,10,68,113,0,128,220,67,0,64,45,68,0,0,8,
+ 68,0,128,78,68,108,0,192,14,68,0,0,87,68,108,0,64,20,68,0,0,80,68,113,0,192,57,68,0,0,32,68,0,128,88,68,0,0,32,68,113,0,64,112,68,0,0,32,68,0,
+ 128,124,68,0,64,68,68,113,0,0,121,68,0,192,67,68,0,128,119,68,0,192,67,68,113,0,192,108,68,0,192,67,68,0,32,89,68,0,96,82,68,113,0,128,69,68,0,0,97,68,
+ 0,0,56,68,0,64,115,68,108,0,64,49,68,0,128,124,68,108,0,192,55,68,0,96,129,68,113,0,0,92,68,0,224,146,68,0,192,129,68,0,224,146,68,113,0,64,110,68,0,64,
+ 168,68,0,64,87,68,0,64,168,68,113,0,128,66,68,0,64,168,68,0,64,27,68,0,32,150,68,99,101
+ };
+
+ Path p;
+ p.loadPathFromData (crossShapeData, sizeof (crossShapeData));
+ p.scaleToFit (0, 0, height * 2.0f, height, true);
+ return p;
+}
+
+//==============================================================================
+void LookAndFeel_V2::drawTreeviewPlusMinusBox (Graphics& g, const Rectangle& area,
+ Colour /*backgroundColour*/, bool isOpen, bool /*isMouseOver*/)
+{
+ const int boxSize = roundToInt (jmin (16.0f, area.getWidth(), area.getHeight()) * 0.7f) | 1;
+
+ const int x = ((int) area.getWidth() - boxSize) / 2 + (int) area.getX();
+ const int y = ((int) area.getHeight() - boxSize) / 2 + (int) area.getY();
+ const int w = boxSize;
+ const int h = boxSize;
+
+ g.setColour (Colour (0xe5ffffff));
+ g.fillRect (x, y, w, h);
+
+ g.setColour (Colour (0x80000000));
+ g.drawRect (x, y, w, h);
+
+ const float size = boxSize / 2 + 1.0f;
+ const float centre = (float) (boxSize / 2);
+
+ g.fillRect (x + (w - size) * 0.5f, y + centre, size, 1.0f);
+
+ if (! isOpen)
+ g.fillRect (x + centre, y + (h - size) * 0.5f, 1.0f, size);
+}
+
+bool LookAndFeel_V2::areLinesDrawnForTreeView (TreeView&)
+{
+ return true;
+}
+
+int LookAndFeel_V2::getTreeViewIndentSize (TreeView&)
+{
+ return 24;
+}
+
+//==============================================================================
+void LookAndFeel_V2::drawBubble (Graphics& g, BubbleComponent& comp,
+ const Point& tip, const Rectangle& body)
+{
+ Path p;
+ p.addBubble (body, body.getUnion (Rectangle (tip.x, tip.y, 1.0f, 1.0f)),
+ tip, 5.0f, jmin (15.0f, body.getWidth() * 0.2f, body.getHeight() * 0.2f));
+
+ g.setColour (comp.findColour (BubbleComponent::backgroundColourId));
+ g.fillPath (p);
+
+ g.setColour (comp.findColour (BubbleComponent::outlineColourId));
+ g.strokePath (p, PathStrokeType (1.33f));
+}
+
+
+//==============================================================================
+Font LookAndFeel_V2::getPopupMenuFont()
+{
+ return Font (17.0f);
+}
+
+void LookAndFeel_V2::getIdealPopupMenuItemSize (const String& text,
+ const bool isSeparator,
+ int standardMenuItemHeight,
+ int& idealWidth,
+ int& idealHeight)
+{
+ if (isSeparator)
+ {
+ idealWidth = 50;
+ idealHeight = standardMenuItemHeight > 0 ? standardMenuItemHeight / 2 : 10;
+ }
+ else
+ {
+ Font font (getPopupMenuFont());
+
+ if (standardMenuItemHeight > 0 && font.getHeight() > standardMenuItemHeight / 1.3f)
+ font.setHeight (standardMenuItemHeight / 1.3f);
+
+ idealHeight = standardMenuItemHeight > 0 ? standardMenuItemHeight : roundToInt (font.getHeight() * 1.3f);
+ idealWidth = font.getStringWidth (text) + idealHeight * 2;
+ }
+}
+
+void LookAndFeel_V2::drawPopupMenuBackground (Graphics& g, int width, int height)
+{
+ const Colour background (findColour (PopupMenu::backgroundColourId));
+
+ g.fillAll (background);
+ g.setColour (background.overlaidWith (Colour (0x2badd8e6)));
+
+ for (int i = 0; i < height; i += 3)
+ g.fillRect (0, i, width, 1);
+
+#if ! JUCE_MAC
+ g.setColour (findColour (PopupMenu::textColourId).withAlpha (0.6f));
+ g.drawRect (0, 0, width, height);
+#endif
+}
+
+void LookAndFeel_V2::drawPopupMenuUpDownArrow (Graphics& g,
+ int width, int height,
+ bool isScrollUpArrow)
+{
+ const Colour background (findColour (PopupMenu::backgroundColourId));
+
+ g.setGradientFill (ColourGradient (background, 0.0f, height * 0.5f,
+ background.withAlpha (0.0f),
+ 0.0f, isScrollUpArrow ? ((float) height) : 0.0f,
+ false));
+
+ g.fillRect (1, 1, width - 2, height - 2);
+
+ const float hw = width * 0.5f;
+ const float arrowW = height * 0.3f;
+ const float y1 = height * (isScrollUpArrow ? 0.6f : 0.3f);
+ const float y2 = height * (isScrollUpArrow ? 0.3f : 0.6f);
+
+ Path p;
+ p.addTriangle (hw - arrowW, y1,
+ hw + arrowW, y1,
+ hw, y2);
+
+ g.setColour (findColour (PopupMenu::textColourId).withAlpha (0.5f));
+ g.fillPath (p);
+}
+
+void LookAndFeel_V2::drawPopupMenuItem (Graphics& g,
+ int width, int height,
+ const bool isSeparator,
+ const bool isActive,
+ const bool isHighlighted,
+ const bool isTicked,
+ const bool hasSubMenu,
+ const String& text,
+ const String& shortcutKeyText,
+ Image* image,
+ const Colour* const textColourToUse)
+{
+ const float halfH = height * 0.5f;
+
+ if (isSeparator)
+ {
+ const float separatorIndent = 5.5f;
+
+ g.setColour (Colour (0x33000000));
+ g.drawLine (separatorIndent, halfH, width - separatorIndent, halfH);
+
+ g.setColour (Colour (0x66ffffff));
+ g.drawLine (separatorIndent, halfH + 1.0f, width - separatorIndent, halfH + 1.0f);
+ }
+ else
+ {
+ Colour textColour (findColour (PopupMenu::textColourId));
+
+ if (textColourToUse != nullptr)
+ textColour = *textColourToUse;
+
+ if (isHighlighted)
+ {
+ g.setColour (findColour (PopupMenu::highlightedBackgroundColourId));
+ g.fillRect (1, 1, width - 2, height - 2);
+
+ g.setColour (findColour (PopupMenu::highlightedTextColourId));
+ }
+ else
+ {
+ g.setColour (textColour);
+ }
+
+ if (! isActive)
+ g.setOpacity (0.3f);
+
+ Font font (getPopupMenuFont());
+
+ if (font.getHeight() > height / 1.3f)
+ font.setHeight (height / 1.3f);
+
+ g.setFont (font);
+
+ const int leftBorder = (height * 5) / 4;
+ const int rightBorder = 4;
+
+ if (image != nullptr)
+ {
+ g.drawImageWithin (*image,
+ 2, 1, leftBorder - 4, height - 2,
+ RectanglePlacement::centred | RectanglePlacement::onlyReduceInSize, false);
+ }
+ else if (isTicked)
+ {
+ const Path tick (getTickShape (1.0f));
+ const float th = font.getAscent();
+ const float ty = halfH - th * 0.5f;
+
+ g.fillPath (tick, tick.getTransformToScaleToFit (2.0f, ty, (float) (leftBorder - 4),
+ th, true));
+ }
+
+ g.drawFittedText (text,
+ leftBorder, 0, width - (leftBorder + rightBorder), height,
+ Justification::centredLeft, 1);
+
+ if (shortcutKeyText.isNotEmpty())
+ {
+ Font f2 (font);
+ f2.setHeight (f2.getHeight() * 0.75f);
+ f2.setHorizontalScale (0.95f);
+ g.setFont (f2);
+
+ g.drawText (shortcutKeyText,
+ leftBorder, 0, width - (leftBorder + rightBorder + 4), height,
+ Justification::centredRight,
+ true);
+ }
+
+ if (hasSubMenu)
+ {
+ const float arrowH = 0.6f * getPopupMenuFont().getAscent();
+ const float x = width - height * 0.6f;
+
+ Path p;
+ p.addTriangle (x, halfH - arrowH * 0.5f,
+ x, halfH + arrowH * 0.5f,
+ x + arrowH * 0.6f, halfH);
+
+ g.fillPath (p);
+ }
+ }
+}
+
+//==============================================================================
+int LookAndFeel_V2::getMenuWindowFlags()
+{
+ return ComponentPeer::windowHasDropShadow;
+}
+
+void LookAndFeel_V2::drawMenuBarBackground (Graphics& g, int width, int height,
+ bool, MenuBarComponent& menuBar)
+{
+ const Colour baseColour (LookAndFeelHelpers::createBaseColour (menuBar.findColour (PopupMenu::backgroundColourId), false, false, false));
+
+ if (menuBar.isEnabled())
+ {
+ drawShinyButtonShape (g,
+ -4.0f, 0.0f,
+ width + 8.0f, (float) height,
+ 0.0f,
+ baseColour,
+ 0.4f,
+ true, true, true, true);
+ }
+ else
+ {
+ g.fillAll (baseColour);
+ }
+}
+
+Font LookAndFeel_V2::getMenuBarFont (MenuBarComponent& menuBar, int /*itemIndex*/, const String& /*itemText*/)
+{
+ return Font (menuBar.getHeight() * 0.7f);
+}
+
+int LookAndFeel_V2::getMenuBarItemWidth (MenuBarComponent& menuBar, int itemIndex, const String& itemText)
+{
+ return getMenuBarFont (menuBar, itemIndex, itemText)
+ .getStringWidth (itemText) + menuBar.getHeight();
+}
+
+void LookAndFeel_V2::drawMenuBarItem (Graphics& g,
+ int width, int height,
+ int itemIndex,
+ const String& itemText,
+ bool isMouseOverItem,
+ bool isMenuOpen,
+ bool /*isMouseOverBar*/,
+ MenuBarComponent& menuBar)
+{
+ if (! menuBar.isEnabled())
+ {
+ g.setColour (menuBar.findColour (PopupMenu::textColourId)
+ .withMultipliedAlpha (0.5f));
+ }
+ else if (isMenuOpen || isMouseOverItem)
+ {
+ g.fillAll (menuBar.findColour (PopupMenu::highlightedBackgroundColourId));
+ g.setColour (menuBar.findColour (PopupMenu::highlightedTextColourId));
+ }
+ else
+ {
+ g.setColour (menuBar.findColour (PopupMenu::textColourId));
+ }
+
+ g.setFont (getMenuBarFont (menuBar, itemIndex, itemText));
+ g.drawFittedText (itemText, 0, 0, width, height, Justification::centred, 1);
+}
+
+//==============================================================================
+void LookAndFeel_V2::fillTextEditorBackground (Graphics& g, int /*width*/, int /*height*/,
+ TextEditor& textEditor)
+{
+ g.fillAll (textEditor.findColour (TextEditor::backgroundColourId));
+}
+
+void LookAndFeel_V2::drawTextEditorOutline (Graphics& g, int width, int height, TextEditor& textEditor)
+{
+ if (textEditor.isEnabled())
+ {
+ if (textEditor.hasKeyboardFocus (true) && ! textEditor.isReadOnly())
+ {
+ const int border = 2;
+
+ g.setColour (textEditor.findColour (TextEditor::focusedOutlineColourId));
+ g.drawRect (0, 0, width, height, border);
+
+ g.setOpacity (1.0f);
+ const Colour shadowColour (textEditor.findColour (TextEditor::shadowColourId).withMultipliedAlpha (0.75f));
+ drawBevel (g, 0, 0, width, height + 2, border + 2, shadowColour, shadowColour);
+ }
+ else
+ {
+ g.setColour (textEditor.findColour (TextEditor::outlineColourId));
+ g.drawRect (0, 0, width, height);
+
+ g.setOpacity (1.0f);
+ const Colour shadowColour (textEditor.findColour (TextEditor::shadowColourId));
+ drawBevel (g, 0, 0, width, height + 2, 3, shadowColour, shadowColour);
+ }
+ }
+}
+
+CaretComponent* LookAndFeel_V2::createCaretComponent (Component* keyFocusOwner)
+{
+ return new CaretComponent (keyFocusOwner);
+}
+
+//==============================================================================
+void LookAndFeel_V2::drawComboBox (Graphics& g, int width, int height,
+ const bool isButtonDown,
+ int buttonX, int buttonY,
+ int buttonW, int buttonH,
+ ComboBox& box)
+{
+ g.fillAll (box.findColour (ComboBox::backgroundColourId));
+
+ if (box.isEnabled() && box.hasKeyboardFocus (false))
+ {
+ g.setColour (box.findColour (ComboBox::buttonColourId));
+ g.drawRect (0, 0, width, height, 2);
+ }
+ else
+ {
+ g.setColour (box.findColour (ComboBox::outlineColourId));
+ g.drawRect (0, 0, width, height);
+ }
+
+ const float outlineThickness = box.isEnabled() ? (isButtonDown ? 1.2f : 0.5f) : 0.3f;
+
+ const Colour baseColour (LookAndFeelHelpers::createBaseColour (box.findColour (ComboBox::buttonColourId),
+ box.hasKeyboardFocus (true),
+ false, isButtonDown)
+ .withMultipliedAlpha (box.isEnabled() ? 1.0f : 0.5f));
+
+ drawGlassLozenge (g,
+ buttonX + outlineThickness, buttonY + outlineThickness,
+ buttonW - outlineThickness * 2.0f, buttonH - outlineThickness * 2.0f,
+ baseColour, outlineThickness, -1.0f,
+ true, true, true, true);
+
+ if (box.isEnabled())
+ {
+ const float arrowX = 0.3f;
+ const float arrowH = 0.2f;
+
+ Path p;
+ p.addTriangle (buttonX + buttonW * 0.5f, buttonY + buttonH * (0.45f - arrowH),
+ buttonX + buttonW * (1.0f - arrowX), buttonY + buttonH * 0.45f,
+ buttonX + buttonW * arrowX, buttonY + buttonH * 0.45f);
+
+ p.addTriangle (buttonX + buttonW * 0.5f, buttonY + buttonH * (0.55f + arrowH),
+ buttonX + buttonW * (1.0f - arrowX), buttonY + buttonH * 0.55f,
+ buttonX + buttonW * arrowX, buttonY + buttonH * 0.55f);
+
+ g.setColour (box.findColour (ComboBox::arrowColourId));
+ g.fillPath (p);
+ }
+}
+
+Font LookAndFeel_V2::getComboBoxFont (ComboBox& box)
+{
+ return Font (jmin (15.0f, box.getHeight() * 0.85f));
+}
+
+Label* LookAndFeel_V2::createComboBoxTextBox (ComboBox&)
+{
+ return new Label (String::empty, String::empty);
+}
+
+void LookAndFeel_V2::positionComboBoxText (ComboBox& box, Label& label)
+{
+ label.setBounds (1, 1,
+ box.getWidth() + 3 - box.getHeight(),
+ box.getHeight() - 2);
+
+ label.setFont (getComboBoxFont (box));
+}
+
+//==============================================================================
+Font LookAndFeel_V2::getLabelFont (Label& label)
+{
+ return label.getFont();
+}
+
+void LookAndFeel_V2::drawLabel (Graphics& g, Label& label)
+{
+ g.fillAll (label.findColour (Label::backgroundColourId));
+
+ if (! label.isBeingEdited())
+ {
+ const float alpha = label.isEnabled() ? 1.0f : 0.5f;
+ const Font font (getLabelFont (label));
+
+ g.setColour (label.findColour (Label::textColourId).withMultipliedAlpha (alpha));
+ g.setFont (font);
+ g.drawFittedText (label.getText(),
+ label.getHorizontalBorderSize(),
+ label.getVerticalBorderSize(),
+ label.getWidth() - 2 * label.getHorizontalBorderSize(),
+ label.getHeight() - 2 * label.getVerticalBorderSize(),
+ label.getJustificationType(),
+ jmax (1, (int) (label.getHeight() / font.getHeight())),
+ label.getMinimumHorizontalScale());
+
+ g.setColour (label.findColour (Label::outlineColourId).withMultipliedAlpha (alpha));
+ }
+ else if (label.isEnabled())
+ {
+ g.setColour (label.findColour (Label::outlineColourId));
+ }
+
+ g.drawRect (label.getLocalBounds());
+}
+
+//==============================================================================
+void LookAndFeel_V2::drawLinearSliderBackground (Graphics& g,
+ int x, int y,
+ int width, int height,
+ float /*sliderPos*/,
+ float /*minSliderPos*/,
+ float /*maxSliderPos*/,
+ const Slider::SliderStyle /*style*/,
+ Slider& slider)
+{
+ const float sliderRadius = (float) (getSliderThumbRadius (slider) - 2);
+
+ const Colour trackColour (slider.findColour (Slider::trackColourId));
+ const Colour gradCol1 (trackColour.overlaidWith (Colours::black.withAlpha (slider.isEnabled() ? 0.25f : 0.13f)));
+ const Colour gradCol2 (trackColour.overlaidWith (Colour (0x14000000)));
+ Path indent;
+
+ if (slider.isHorizontal())
+ {
+ const float iy = y + height * 0.5f - sliderRadius * 0.5f;
+ const float ih = sliderRadius;
+
+ g.setGradientFill (ColourGradient (gradCol1, 0.0f, iy,
+ gradCol2, 0.0f, iy + ih, false));
+
+ indent.addRoundedRectangle (x - sliderRadius * 0.5f, iy,
+ width + sliderRadius, ih,
+ 5.0f);
+ }
+ else
+ {
+ const float ix = x + width * 0.5f - sliderRadius * 0.5f;
+ const float iw = sliderRadius;
+
+ g.setGradientFill (ColourGradient (gradCol1, ix, 0.0f,
+ gradCol2, ix + iw, 0.0f, false));
+
+ indent.addRoundedRectangle (ix, y - sliderRadius * 0.5f,
+ iw, height + sliderRadius,
+ 5.0f);
+ }
+
+ g.fillPath (indent);
+
+ g.setColour (Colour (0x4c000000));
+ g.strokePath (indent, PathStrokeType (0.5f));
+}
+
+void LookAndFeel_V2::drawLinearSliderThumb (Graphics& g,
+ int x, int y,
+ int width, int height,
+ float sliderPos,
+ float minSliderPos,
+ float maxSliderPos,
+ const Slider::SliderStyle style,
+ Slider& slider)
+{
+ const float sliderRadius = (float) (getSliderThumbRadius (slider) - 2);
+
+ Colour knobColour (LookAndFeelHelpers::createBaseColour (slider.findColour (Slider::thumbColourId),
+ slider.hasKeyboardFocus (false) && slider.isEnabled(),
+ slider.isMouseOverOrDragging() && slider.isEnabled(),
+ slider.isMouseButtonDown() && slider.isEnabled()));
+
+ const float outlineThickness = slider.isEnabled() ? 0.8f : 0.3f;
+
+ if (style == Slider::LinearHorizontal || style == Slider::LinearVertical)
+ {
+ float kx, ky;
+
+ if (style == Slider::LinearVertical)
+ {
+ kx = x + width * 0.5f;
+ ky = sliderPos;
+ }
+ else
+ {
+ kx = sliderPos;
+ ky = y + height * 0.5f;
+ }
+
+ drawGlassSphere (g,
+ kx - sliderRadius,
+ ky - sliderRadius,
+ sliderRadius * 2.0f,
+ knobColour, outlineThickness);
+ }
+ else
+ {
+ if (style == Slider::ThreeValueVertical)
+ {
+ drawGlassSphere (g, x + width * 0.5f - sliderRadius,
+ sliderPos - sliderRadius,
+ sliderRadius * 2.0f,
+ knobColour, outlineThickness);
+ }
+ else if (style == Slider::ThreeValueHorizontal)
+ {
+ drawGlassSphere (g,sliderPos - sliderRadius,
+ y + height * 0.5f - sliderRadius,
+ sliderRadius * 2.0f,
+ knobColour, outlineThickness);
+ }
+
+ if (style == Slider::TwoValueVertical || style == Slider::ThreeValueVertical)
+ {
+ const float sr = jmin (sliderRadius, width * 0.4f);
+
+ drawGlassPointer (g, jmax (0.0f, x + width * 0.5f - sliderRadius * 2.0f),
+ minSliderPos - sliderRadius,
+ sliderRadius * 2.0f, knobColour, outlineThickness, 1);
+
+ drawGlassPointer (g, jmin (x + width - sliderRadius * 2.0f, x + width * 0.5f), maxSliderPos - sr,
+ sliderRadius * 2.0f, knobColour, outlineThickness, 3);
+ }
+ else if (style == Slider::TwoValueHorizontal || style == Slider::ThreeValueHorizontal)
+ {
+ const float sr = jmin (sliderRadius, height * 0.4f);
+
+ drawGlassPointer (g, minSliderPos - sr,
+ jmax (0.0f, y + height * 0.5f - sliderRadius * 2.0f),
+ sliderRadius * 2.0f, knobColour, outlineThickness, 2);
+
+ drawGlassPointer (g, maxSliderPos - sliderRadius,
+ jmin (y + height - sliderRadius * 2.0f, y + height * 0.5f),
+ sliderRadius * 2.0f, knobColour, outlineThickness, 4);
+ }
+ }
+}
+
+void LookAndFeel_V2::drawLinearSlider (Graphics& g,
+ int x, int y,
+ int width, int height,
+ float sliderPos,
+ float minSliderPos,
+ float maxSliderPos,
+ const Slider::SliderStyle style,
+ Slider& slider)
+{
+ g.fillAll (slider.findColour (Slider::backgroundColourId));
+
+ if (style == Slider::LinearBar || style == Slider::LinearBarVertical)
+ {
+ const bool isMouseOver = slider.isMouseOverOrDragging() && slider.isEnabled();
+
+ Colour baseColour (LookAndFeelHelpers::createBaseColour (slider.findColour (Slider::thumbColourId)
+ .withMultipliedSaturation (slider.isEnabled() ? 1.0f : 0.5f),
+ false, isMouseOver,
+ isMouseOver || slider.isMouseButtonDown()));
+
+ drawShinyButtonShape (g,
+ (float) x,
+ style == Slider::LinearBarVertical ? sliderPos
+ : (float) y,
+ style == Slider::LinearBarVertical ? (float) width
+ : (sliderPos - x),
+ style == Slider::LinearBarVertical ? (height - sliderPos)
+ : (float) height, 0.0f,
+ baseColour,
+ slider.isEnabled() ? 0.9f : 0.3f,
+ true, true, true, true);
+ }
+ else
+ {
+ drawLinearSliderBackground (g, x, y, width, height, sliderPos, minSliderPos, maxSliderPos, style, slider);
+ drawLinearSliderThumb (g, x, y, width, height, sliderPos, minSliderPos, maxSliderPos, style, slider);
+ }
+}
+
+int LookAndFeel_V2::getSliderThumbRadius (Slider& slider)
+{
+ return jmin (7,
+ slider.getHeight() / 2,
+ slider.getWidth() / 2) + 2;
+}
+
+void LookAndFeel_V2::drawRotarySlider (Graphics& g,
+ int x, int y,
+ int width, int height,
+ float sliderPos,
+ const float rotaryStartAngle,
+ const float rotaryEndAngle,
+ Slider& slider)
+{
+ const float radius = jmin (width / 2, height / 2) - 2.0f;
+ const float centreX = x + width * 0.5f;
+ const float centreY = y + height * 0.5f;
+ const float rx = centreX - radius;
+ const float ry = centreY - radius;
+ const float rw = radius * 2.0f;
+ const float angle = rotaryStartAngle + sliderPos * (rotaryEndAngle - rotaryStartAngle);
+ const bool isMouseOver = slider.isMouseOverOrDragging() && slider.isEnabled();
+
+ if (radius > 12.0f)
+ {
+ if (slider.isEnabled())
+ g.setColour (slider.findColour (Slider::rotarySliderFillColourId).withAlpha (isMouseOver ? 1.0f : 0.7f));
+ else
+ g.setColour (Colour (0x80808080));
+
+ const float thickness = 0.7f;
+
+ {
+ Path filledArc;
+ filledArc.addPieSegment (rx, ry, rw, rw, rotaryStartAngle, angle, thickness);
+ g.fillPath (filledArc);
+ }
+
+ if (thickness > 0)
+ {
+ const float innerRadius = radius * 0.2f;
+ Path p;
+ p.addTriangle (-innerRadius, 0.0f,
+ 0.0f, -radius * thickness * 1.1f,
+ innerRadius, 0.0f);
+
+ p.addEllipse (-innerRadius, -innerRadius, innerRadius * 2.0f, innerRadius * 2.0f);
+
+ g.fillPath (p, AffineTransform::rotation (angle).translated (centreX, centreY));
+ }
+
+ if (slider.isEnabled())
+ g.setColour (slider.findColour (Slider::rotarySliderOutlineColourId));
+ else
+ g.setColour (Colour (0x80808080));
+
+ Path outlineArc;
+ outlineArc.addPieSegment (rx, ry, rw, rw, rotaryStartAngle, rotaryEndAngle, thickness);
+ outlineArc.closeSubPath();
+
+ g.strokePath (outlineArc, PathStrokeType (slider.isEnabled() ? (isMouseOver ? 2.0f : 1.2f) : 0.3f));
+ }
+ else
+ {
+ if (slider.isEnabled())
+ g.setColour (slider.findColour (Slider::rotarySliderFillColourId).withAlpha (isMouseOver ? 1.0f : 0.7f));
+ else
+ g.setColour (Colour (0x80808080));
+
+ Path p;
+ p.addEllipse (-0.4f * rw, -0.4f * rw, rw * 0.8f, rw * 0.8f);
+ PathStrokeType (rw * 0.1f).createStrokedPath (p, p);
+
+ p.addLineSegment (Line (0.0f, 0.0f, 0.0f, -radius), rw * 0.2f);
+
+ g.fillPath (p, AffineTransform::rotation (angle).translated (centreX, centreY));
+ }
+}
+
+Button* LookAndFeel_V2::createSliderButton (const bool isIncrement)
+{
+ return new TextButton (isIncrement ? "+" : "-", String::empty);
+}
+
+class LookAndFeel_V2::SliderLabelComp : public Label
+{
+public:
+ SliderLabelComp() : Label (String::empty, String::empty) {}
+
+ void mouseWheelMove (const MouseEvent&, const MouseWheelDetails&) {}
+};
+
+Label* LookAndFeel_V2::createSliderTextBox (Slider& slider)
+{
+ Label* const l = new SliderLabelComp();
+
+ l->setJustificationType (Justification::centred);
+
+ l->setColour (Label::textColourId, slider.findColour (Slider::textBoxTextColourId));
+
+ l->setColour (Label::backgroundColourId,
+ (slider.getSliderStyle() == Slider::LinearBar || slider.getSliderStyle() == Slider::LinearBarVertical)
+ ? Colours::transparentBlack
+ : slider.findColour (Slider::textBoxBackgroundColourId));
+ l->setColour (Label::outlineColourId, slider.findColour (Slider::textBoxOutlineColourId));
+
+ l->setColour (TextEditor::textColourId, slider.findColour (Slider::textBoxTextColourId));
+
+ l->setColour (TextEditor::backgroundColourId,
+ slider.findColour (Slider::textBoxBackgroundColourId)
+ .withAlpha ((slider.getSliderStyle() == Slider::LinearBar || slider.getSliderStyle() == Slider::LinearBarVertical)
+ ? 0.7f : 1.0f));
+
+ l->setColour (TextEditor::outlineColourId, slider.findColour (Slider::textBoxOutlineColourId));
+
+ return l;
+}
+
+ImageEffectFilter* LookAndFeel_V2::getSliderEffect()
+{
+ return nullptr;
+}
+
+Font LookAndFeel_V2::getSliderPopupFont()
+{
+ return Font (15.0f, Font::bold);
+}
+
+int LookAndFeel_V2::getSliderPopupPlacement()
+{
+ return BubbleComponent::above
+ | BubbleComponent::below
+ | BubbleComponent::left
+ | BubbleComponent::right;
+}
+
+//==============================================================================
+void LookAndFeel_V2::getTooltipSize (const String& tipText, int& width, int& height)
+{
+ const TextLayout tl (LookAndFeelHelpers::layoutTooltipText (tipText, Colours::black));
+
+ width = (int) (tl.getWidth() + 14.0f);
+ height = (int) (tl.getHeight() + 6.0f);
+}
+
+void LookAndFeel_V2::drawTooltip (Graphics& g, const String& text, int width, int height)
+{
+ g.fillAll (findColour (TooltipWindow::backgroundColourId));
+
+ #if ! JUCE_MAC // The mac windows already have a non-optional 1 pix outline, so don't double it here..
+ g.setColour (findColour (TooltipWindow::outlineColourId));
+ g.drawRect (0, 0, width, height, 1);
+ #endif
+
+ LookAndFeelHelpers::layoutTooltipText (text, findColour (TooltipWindow::textColourId))
+ .draw (g, Rectangle ((float) width, (float) height));
+}
+
+//==============================================================================
+Button* LookAndFeel_V2::createFilenameComponentBrowseButton (const String& text)
+{
+ return new TextButton (text, TRANS("click to browse for a different file"));
+}
+
+void LookAndFeel_V2::layoutFilenameComponent (FilenameComponent& filenameComp,
+ ComboBox* filenameBox,
+ Button* browseButton)
+{
+ browseButton->setSize (80, filenameComp.getHeight());
+
+ if (TextButton* const tb = dynamic_cast (browseButton))
+ tb->changeWidthToFitText();
+
+ browseButton->setTopRightPosition (filenameComp.getWidth(), 0);
+
+ filenameBox->setBounds (0, 0, browseButton->getX(), filenameComp.getHeight());
+}
+
+//==============================================================================
+void LookAndFeel_V2::drawConcertinaPanelHeader (Graphics& g, const Rectangle& area,
+ bool isMouseOver, bool /*isMouseDown*/,
+ ConcertinaPanel&, Component& panel)
+{
+ g.fillAll (Colours::grey.withAlpha (isMouseOver ? 0.9f : 0.7f));
+ g.setColour (Colours::black.withAlpha (0.5f));
+ g.drawRect (area);
+
+ g.setColour (Colours::white);
+ g.setFont (Font (area.getHeight() * 0.7f).boldened());
+ g.drawFittedText (panel.getName(), 4, 0, area.getWidth() - 6, area.getHeight(), Justification::centredLeft, 1);
+}
+
+//==============================================================================
+void LookAndFeel_V2::drawImageButton (Graphics& g, Image* image,
+ int imageX, int imageY, int imageW, int imageH,
+ const Colour& overlayColour,
+ float imageOpacity,
+ ImageButton& button)
+{
+ if (! button.isEnabled())
+ imageOpacity *= 0.3f;
+
+ AffineTransform t = RectanglePlacement (RectanglePlacement::stretchToFit)
+ .getTransformToFit (image->getBounds().toFloat(),
+ Rectangle (imageX, imageY, imageW, imageH).toFloat());
+
+ if (! overlayColour.isOpaque())
+ {
+ g.setOpacity (imageOpacity);
+ g.drawImageTransformed (*image, t, false);
+ }
+
+ if (! overlayColour.isTransparent())
+ {
+ g.setColour (overlayColour);
+ g.drawImageTransformed (*image, t, true);
+ }
+}
+
+//==============================================================================
+void LookAndFeel_V2::drawCornerResizer (Graphics& g,
+ int w, int h,
+ bool /*isMouseOver*/,
+ bool /*isMouseDragging*/)
+{
+ const float lineThickness = jmin (w, h) * 0.075f;
+
+ for (float i = 0.0f; i < 1.0f; i += 0.3f)
+ {
+ g.setColour (Colours::lightgrey);
+
+ g.drawLine (w * i,
+ h + 1.0f,
+ w + 1.0f,
+ h * i,
+ lineThickness);
+
+ g.setColour (Colours::darkgrey);
+
+ g.drawLine (w * i + lineThickness,
+ h + 1.0f,
+ w + 1.0f,
+ h * i + lineThickness,
+ lineThickness);
+ }
+}
+
+void LookAndFeel_V2::drawResizableFrame (Graphics& g, int w, int h, const BorderSize& border)
+{
+ if (! border.isEmpty())
+ {
+ const Rectangle fullSize (0, 0, w, h);
+ const Rectangle centreArea (border.subtractedFrom (fullSize));
+
+ g.saveState();
+
+ g.excludeClipRegion (centreArea);
+
+ g.setColour (Colour (0x50000000));
+ g.drawRect (fullSize);
+
+ g.setColour (Colour (0x19000000));
+ g.drawRect (centreArea.expanded (1, 1));
+
+ g.restoreState();
+ }
+}
+
+//==============================================================================
+void LookAndFeel_V2::fillResizableWindowBackground (Graphics& g, int /*w*/, int /*h*/,
+ const BorderSize& /*border*/, ResizableWindow& window)
+{
+ g.fillAll (window.getBackgroundColour());
+}
+
+void LookAndFeel_V2::drawResizableWindowBorder (Graphics&, int /*w*/, int /*h*/,
+ const BorderSize& /*border*/, ResizableWindow&)
+{
+}
+
+void LookAndFeel_V2::drawDocumentWindowTitleBar (DocumentWindow& window,
+ Graphics& g, int w, int h,
+ int titleSpaceX, int titleSpaceW,
+ const Image* icon,
+ bool drawTitleTextOnLeft)
+{
+ const bool isActive = window.isActiveWindow();
+
+ g.setGradientFill (ColourGradient (window.getBackgroundColour(),
+ 0.0f, 0.0f,
+ window.getBackgroundColour().contrasting (isActive ? 0.15f : 0.05f),
+ 0.0f, (float) h, false));
+ g.fillAll();
+
+ Font font (h * 0.65f, Font::bold);
+ g.setFont (font);
+
+ int textW = font.getStringWidth (window.getName());
+ int iconW = 0;
+ int iconH = 0;
+
+ if (icon != nullptr)
+ {
+ iconH = (int) font.getHeight();
+ iconW = icon->getWidth() * iconH / icon->getHeight() + 4;
+ }
+
+ textW = jmin (titleSpaceW, textW + iconW);
+ int textX = drawTitleTextOnLeft ? titleSpaceX
+ : jmax (titleSpaceX, (w - textW) / 2);
+
+ if (textX + textW > titleSpaceX + titleSpaceW)
+ textX = titleSpaceX + titleSpaceW - textW;
+
+ if (icon != nullptr)
+ {
+ g.setOpacity (isActive ? 1.0f : 0.6f);
+ g.drawImageWithin (*icon, textX, (h - iconH) / 2, iconW, iconH,
+ RectanglePlacement::centred, false);
+ textX += iconW;
+ textW -= iconW;
+ }
+
+ if (window.isColourSpecified (DocumentWindow::textColourId) || isColourSpecified (DocumentWindow::textColourId))
+ g.setColour (window.findColour (DocumentWindow::textColourId));
+ else
+ g.setColour (window.getBackgroundColour().contrasting (isActive ? 0.7f : 0.4f));
+
+ g.drawText (window.getName(), textX, 0, textW, h, Justification::centredLeft, true);
+}
+
+//==============================================================================
+class LookAndFeel_V2::GlassWindowButton : public Button
+{
+public:
+ GlassWindowButton (const String& name, Colour col,
+ const Path& normalShape_,
+ const Path& toggledShape_) noexcept
+ : Button (name),
+ colour (col),
+ normalShape (normalShape_),
+ toggledShape (toggledShape_)
+ {
+ }
+
+ //==============================================================================
+ void paintButton (Graphics& g, bool isMouseOverButton, bool isButtonDown) override
+ {
+ float alpha = isMouseOverButton ? (isButtonDown ? 1.0f : 0.8f) : 0.55f;
+
+ if (! isEnabled())
+ alpha *= 0.5f;
+
+ float x = 0, y = 0, diam;
+
+ if (getWidth() < getHeight())
+ {
+ diam = (float) getWidth();
+ y = (getHeight() - getWidth()) * 0.5f;
+ }
+ else
+ {
+ diam = (float) getHeight();
+ y = (getWidth() - getHeight()) * 0.5f;
+ }
+
+ x += diam * 0.05f;
+ y += diam * 0.05f;
+ diam *= 0.9f;
+
+ g.setGradientFill (ColourGradient (Colour::greyLevel (0.9f).withAlpha (alpha), 0, y + diam,
+ Colour::greyLevel (0.6f).withAlpha (alpha), 0, y, false));
+ g.fillEllipse (x, y, diam, diam);
+
+ x += 2.0f;
+ y += 2.0f;
+ diam -= 4.0f;
+
+ LookAndFeel_V2::drawGlassSphere (g, x, y, diam, colour.withAlpha (alpha), 1.0f);
+
+ Path& p = getToggleState() ? toggledShape : normalShape;
+
+ const AffineTransform t (p.getTransformToScaleToFit (x + diam * 0.3f, y + diam * 0.3f,
+ diam * 0.4f, diam * 0.4f, true));
+
+ g.setColour (Colours::black.withAlpha (alpha * 0.6f));
+ g.fillPath (p, t);
+ }
+
+private:
+ Colour colour;
+ Path normalShape, toggledShape;
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (GlassWindowButton)
+};
+
+Button* LookAndFeel_V2::createDocumentWindowButton (int buttonType)
+{
+ Path shape;
+ const float crossThickness = 0.25f;
+
+ if (buttonType == DocumentWindow::closeButton)
+ {
+ shape.addLineSegment (Line (0.0f, 0.0f, 1.0f, 1.0f), crossThickness * 1.4f);
+ shape.addLineSegment (Line (1.0f, 0.0f, 0.0f, 1.0f), crossThickness * 1.4f);
+
+ return new GlassWindowButton ("close", Colour (0xffdd1100), shape, shape);
+ }
+
+ if (buttonType == DocumentWindow::minimiseButton)
+ {
+ shape.addLineSegment (Line (0.0f, 0.5f, 1.0f, 0.5f), crossThickness);
+
+ return new GlassWindowButton ("minimise", Colour (0xffaa8811), shape, shape);
+ }
+
+ if (buttonType == DocumentWindow::maximiseButton)
+ {
+ shape.addLineSegment (Line (0.5f, 0.0f, 0.5f, 1.0f), crossThickness);
+ shape.addLineSegment (Line (0.0f, 0.5f, 1.0f, 0.5f), crossThickness);
+
+ Path fullscreenShape;
+ fullscreenShape.startNewSubPath (45.0f, 100.0f);
+ fullscreenShape.lineTo (0.0f, 100.0f);
+ fullscreenShape.lineTo (0.0f, 0.0f);
+ fullscreenShape.lineTo (100.0f, 0.0f);
+ fullscreenShape.lineTo (100.0f, 45.0f);
+ fullscreenShape.addRectangle (45.0f, 45.0f, 100.0f, 100.0f);
+ PathStrokeType (30.0f).createStrokedPath (fullscreenShape, fullscreenShape);
+
+ return new GlassWindowButton ("maximise", Colour (0xff119911), shape, fullscreenShape);
+ }
+
+ jassertfalse;
+ return nullptr;
+}
+
+void LookAndFeel_V2::positionDocumentWindowButtons (DocumentWindow&,
+ int titleBarX,
+ int titleBarY,
+ int titleBarW,
+ int titleBarH,
+ Button* minimiseButton,
+ Button* maximiseButton,
+ Button* closeButton,
+ bool positionTitleBarButtonsOnLeft)
+{
+ const int buttonW = titleBarH - titleBarH / 8;
+
+ int x = positionTitleBarButtonsOnLeft ? titleBarX + 4
+ : titleBarX + titleBarW - buttonW - buttonW / 4;
+
+ if (closeButton != nullptr)
+ {
+ closeButton->setBounds (x, titleBarY, buttonW, titleBarH);
+ x += positionTitleBarButtonsOnLeft ? buttonW : -(buttonW + buttonW / 4);
+ }
+
+ if (positionTitleBarButtonsOnLeft)
+ std::swap (minimiseButton, maximiseButton);
+
+ if (maximiseButton != nullptr)
+ {
+ maximiseButton->setBounds (x, titleBarY, buttonW, titleBarH);
+ x += positionTitleBarButtonsOnLeft ? buttonW : -buttonW;
+ }
+
+ if (minimiseButton != nullptr)
+ minimiseButton->setBounds (x, titleBarY, buttonW, titleBarH);
+}
+
+int LookAndFeel_V2::getDefaultMenuBarHeight()
+{
+ return 24;
+}
+
+//==============================================================================
+DropShadower* LookAndFeel_V2::createDropShadowerForComponent (Component*)
+{
+ return new DropShadower (DropShadow (Colours::black.withAlpha (0.4f), 10, Point (0, 2)));
+}
+
+//==============================================================================
+void LookAndFeel_V2::drawStretchableLayoutResizerBar (Graphics& g,
+ int w, int h,
+ bool /*isVerticalBar*/,
+ bool isMouseOver,
+ bool isMouseDragging)
+{
+ float alpha = 0.5f;
+
+ if (isMouseOver || isMouseDragging)
+ {
+ g.fillAll (Colour (0x190000ff));
+ alpha = 1.0f;
+ }
+
+ const float cx = w * 0.5f;
+ const float cy = h * 0.5f;
+ const float cr = jmin (w, h) * 0.4f;
+
+ g.setGradientFill (ColourGradient (Colours::white.withAlpha (alpha), cx + cr * 0.1f, cy + cr,
+ Colours::black.withAlpha (alpha), cx, cy - cr * 4.0f,
+ true));
+
+ g.fillEllipse (cx - cr, cy - cr, cr * 2.0f, cr * 2.0f);
+}
+
+//==============================================================================
+void LookAndFeel_V2::drawGroupComponentOutline (Graphics& g, int width, int height,
+ const String& text,
+ const Justification& position,
+ GroupComponent& group)
+{
+ const float textH = 15.0f;
+ const float indent = 3.0f;
+ const float textEdgeGap = 4.0f;
+ float cs = 5.0f;
+
+ Font f (textH);
+
+ Path p;
+ float x = indent;
+ float y = f.getAscent() - 3.0f;
+ float w = jmax (0.0f, width - x * 2.0f);
+ float h = jmax (0.0f, height - y - indent);
+ cs = jmin (cs, w * 0.5f, h * 0.5f);
+ const float cs2 = 2.0f * cs;
+
+ float textW = text.isEmpty() ? 0 : jlimit (0.0f, jmax (0.0f, w - cs2 - textEdgeGap * 2), f.getStringWidth (text) + textEdgeGap * 2.0f);
+ float textX = cs + textEdgeGap;
+
+ if (position.testFlags (Justification::horizontallyCentred))
+ textX = cs + (w - cs2 - textW) * 0.5f;
+ else if (position.testFlags (Justification::right))
+ textX = w - cs - textW - textEdgeGap;
+
+ p.startNewSubPath (x + textX + textW, y);
+ p.lineTo (x + w - cs, y);
+
+ p.addArc (x + w - cs2, y, cs2, cs2, 0, float_Pi * 0.5f);
+ p.lineTo (x + w, y + h - cs);
+
+ p.addArc (x + w - cs2, y + h - cs2, cs2, cs2, float_Pi * 0.5f, float_Pi);
+ p.lineTo (x + cs, y + h);
+
+ p.addArc (x, y + h - cs2, cs2, cs2, float_Pi, float_Pi * 1.5f);
+ p.lineTo (x, y + cs);
+
+ p.addArc (x, y, cs2, cs2, float_Pi * 1.5f, float_Pi * 2.0f);
+ p.lineTo (x + textX, y);
+
+ const float alpha = group.isEnabled() ? 1.0f : 0.5f;
+
+ g.setColour (group.findColour (GroupComponent::outlineColourId)
+ .withMultipliedAlpha (alpha));
+
+ g.strokePath (p, PathStrokeType (2.0f));
+
+ g.setColour (group.findColour (GroupComponent::textColourId)
+ .withMultipliedAlpha (alpha));
+ g.setFont (f);
+ g.drawText (text,
+ roundToInt (x + textX), 0,
+ roundToInt (textW),
+ roundToInt (textH),
+ Justification::centred, true);
+}
+
+//==============================================================================
+int LookAndFeel_V2::getTabButtonOverlap (int tabDepth)
+{
+ return 1 + tabDepth / 3;
+}
+
+int LookAndFeel_V2::getTabButtonSpaceAroundImage()
+{
+ return 4;
+}
+
+int LookAndFeel_V2::getTabButtonBestWidth (TabBarButton& button, int tabDepth)
+{
+ int width = Font (tabDepth * 0.6f).getStringWidth (button.getButtonText().trim())
+ + getTabButtonOverlap (tabDepth) * 2;
+
+ if (Component* const extraComponent = button.getExtraComponent())
+ width += button.getTabbedButtonBar().isVertical() ? extraComponent->getHeight()
+ : extraComponent->getWidth();
+
+ return jlimit (tabDepth * 2, tabDepth * 8, width);
+}
+
+Rectangle LookAndFeel_V2::getTabButtonExtraComponentBounds (const TabBarButton& button, Rectangle& textArea, Component& comp)
+{
+ Rectangle extraComp;
+
+ const TabbedButtonBar::Orientation orientation = button.getTabbedButtonBar().getOrientation();
+
+ if (button.getExtraComponentPlacement() == TabBarButton::beforeText)
+ {
+ switch (orientation)
+ {
+ case TabbedButtonBar::TabsAtBottom:
+ case TabbedButtonBar::TabsAtTop: extraComp = textArea.removeFromLeft (comp.getWidth()); break;
+ case TabbedButtonBar::TabsAtLeft: extraComp = textArea.removeFromBottom (comp.getHeight()); break;
+ case TabbedButtonBar::TabsAtRight: extraComp = textArea.removeFromTop (comp.getHeight()); break;
+ default: jassertfalse; break;
+ }
+ }
+ else
+ {
+ switch (orientation)
+ {
+ case TabbedButtonBar::TabsAtBottom:
+ case TabbedButtonBar::TabsAtTop: extraComp = textArea.removeFromRight (comp.getWidth()); break;
+ case TabbedButtonBar::TabsAtLeft: extraComp = textArea.removeFromTop (comp.getHeight()); break;
+ case TabbedButtonBar::TabsAtRight: extraComp = textArea.removeFromBottom (comp.getHeight()); break;
+ default: jassertfalse; break;
+ }
+ }
+
+ return extraComp;
+}
+
+void LookAndFeel_V2::createTabButtonShape (TabBarButton& button, Path& p, bool /*isMouseOver*/, bool /*isMouseDown*/)
+{
+ const Rectangle activeArea (button.getActiveArea());
+ const float w = (float) activeArea.getWidth();
+ const float h = (float) activeArea.getHeight();
+
+ float length = w;
+ float depth = h;
+
+ if (button.getTabbedButtonBar().isVertical())
+ std::swap (length, depth);
+
+ const float indent = (float) getTabButtonOverlap ((int) depth);
+ const float overhang = 4.0f;
+
+ switch (button.getTabbedButtonBar().getOrientation())
+ {
+ case TabbedButtonBar::TabsAtLeft:
+ p.startNewSubPath (w, 0.0f);
+ p.lineTo (0.0f, indent);
+ p.lineTo (0.0f, h - indent);
+ p.lineTo (w, h);
+ p.lineTo (w + overhang, h + overhang);
+ p.lineTo (w + overhang, -overhang);
+ break;
+
+ case TabbedButtonBar::TabsAtRight:
+ p.startNewSubPath (0.0f, 0.0f);
+ p.lineTo (w, indent);
+ p.lineTo (w, h - indent);
+ p.lineTo (0.0f, h);
+ p.lineTo (-overhang, h + overhang);
+ p.lineTo (-overhang, -overhang);
+ break;
+
+ case TabbedButtonBar::TabsAtBottom:
+ p.startNewSubPath (0.0f, 0.0f);
+ p.lineTo (indent, h);
+ p.lineTo (w - indent, h);
+ p.lineTo (w, 0.0f);
+ p.lineTo (w + overhang, -overhang);
+ p.lineTo (-overhang, -overhang);
+ break;
+
+ default:
+ p.startNewSubPath (0.0f, h);
+ p.lineTo (indent, 0.0f);
+ p.lineTo (w - indent, 0.0f);
+ p.lineTo (w, h);
+ p.lineTo (w + overhang, h + overhang);
+ p.lineTo (-overhang, h + overhang);
+ break;
+ }
+
+ p.closeSubPath();
+
+ p = p.createPathWithRoundedCorners (3.0f);
+}
+
+void LookAndFeel_V2::fillTabButtonShape (TabBarButton& button, Graphics& g, const Path& path, bool /*isMouseOver*/, bool /*isMouseDown*/)
+{
+ const Colour tabBackground (button.getTabBackgroundColour());
+ const bool isFrontTab = button.isFrontTab();
+
+ g.setColour (isFrontTab ? tabBackground
+ : tabBackground.withMultipliedAlpha (0.9f));
+
+ g.fillPath (path);
+
+ g.setColour (button.findColour (isFrontTab ? TabbedButtonBar::frontOutlineColourId
+ : TabbedButtonBar::tabOutlineColourId, false)
+ .withMultipliedAlpha (button.isEnabled() ? 1.0f : 0.5f));
+
+ g.strokePath (path, PathStrokeType (isFrontTab ? 1.0f : 0.5f));
+}
+
+void LookAndFeel_V2::drawTabButtonText (TabBarButton& button, Graphics& g, bool isMouseOver, bool isMouseDown)
+{
+ const Rectangle area (button.getTextArea().toFloat());
+
+ float length = area.getWidth();
+ float depth = area.getHeight();
+
+ if (button.getTabbedButtonBar().isVertical())
+ std::swap (length, depth);
+
+ Font font (depth * 0.6f);
+ font.setUnderline (button.hasKeyboardFocus (false));
+
+ AffineTransform t;
+
+ switch (button.getTabbedButtonBar().getOrientation())
+ {
+ case TabbedButtonBar::TabsAtLeft: t = t.rotated (float_Pi * -0.5f).translated (area.getX(), area.getBottom()); break;
+ case TabbedButtonBar::TabsAtRight: t = t.rotated (float_Pi * 0.5f).translated (area.getRight(), area.getY()); break;
+ case TabbedButtonBar::TabsAtTop:
+ case TabbedButtonBar::TabsAtBottom: t = t.translated (area.getX(), area.getY()); break;
+ default: jassertfalse; break;
+ }
+
+ Colour col;
+
+ if (button.isFrontTab() && (button.isColourSpecified (TabbedButtonBar::frontTextColourId)
+ || isColourSpecified (TabbedButtonBar::frontTextColourId)))
+ col = findColour (TabbedButtonBar::frontTextColourId);
+ else if (button.isColourSpecified (TabbedButtonBar::tabTextColourId)
+ || isColourSpecified (TabbedButtonBar::tabTextColourId))
+ col = findColour (TabbedButtonBar::tabTextColourId);
+ else
+ col = button.getTabBackgroundColour().contrasting();
+
+ const float alpha = button.isEnabled() ? ((isMouseOver || isMouseDown) ? 1.0f : 0.8f) : 0.3f;
+
+ g.setColour (col.withMultipliedAlpha (alpha));
+ g.setFont (font);
+ g.addTransform (t);
+
+ g.drawFittedText (button.getButtonText().trim(),
+ 0, 0, (int) length, (int) depth,
+ Justification::centred,
+ jmax (1, ((int) depth) / 12));
+}
+
+void LookAndFeel_V2::drawTabButton (TabBarButton& button, Graphics& g, bool isMouseOver, bool isMouseDown)
+{
+ Path tabShape;
+ createTabButtonShape (button, tabShape, isMouseOver, isMouseDown);
+
+ const Rectangle activeArea (button.getActiveArea());
+ tabShape.applyTransform (AffineTransform::translation ((float) activeArea.getX(),
+ (float) activeArea.getY()));
+
+ DropShadow (Colours::black.withAlpha (0.5f), 2, Point (0, 1)).drawForPath (g, tabShape);
+
+ fillTabButtonShape (button, g, tabShape, isMouseOver, isMouseDown);
+ drawTabButtonText (button, g, isMouseOver, isMouseDown);
+}
+
+void LookAndFeel_V2::drawTabbedButtonBarBackground (TabbedButtonBar&, Graphics&) {}
+
+void LookAndFeel_V2::drawTabAreaBehindFrontButton (TabbedButtonBar& bar, Graphics& g, const int w, const int h)
+{
+ const float shadowSize = 0.2f;
+
+ Rectangle shadowRect, line;
+ ColourGradient gradient (Colours::black.withAlpha (bar.isEnabled() ? 0.3f : 0.15f), 0, 0,
+ Colours::transparentBlack, 0, 0, false);
+
+ switch (bar.getOrientation())
+ {
+ case TabbedButtonBar::TabsAtLeft:
+ gradient.point1.x = (float) w;
+ gradient.point2.x = w * (1.0f - shadowSize);
+ shadowRect.setBounds ((int) gradient.point2.x, 0, w - (int) gradient.point2.x, h);
+ line.setBounds (w - 1, 0, 1, h);
+ break;
+
+ case TabbedButtonBar::TabsAtRight:
+ gradient.point2.x = w * shadowSize;
+ shadowRect.setBounds (0, 0, (int) gradient.point2.x, h);
+ line.setBounds (0, 0, 1, h);
+ break;
+
+ case TabbedButtonBar::TabsAtTop:
+ gradient.point1.y = (float) h;
+ gradient.point2.y = h * (1.0f - shadowSize);
+ shadowRect.setBounds (0, (int) gradient.point2.y, w, h - (int) gradient.point2.y);
+ line.setBounds (0, h - 1, w, 1);
+ break;
+
+ case TabbedButtonBar::TabsAtBottom:
+ gradient.point2.y = h * shadowSize;
+ shadowRect.setBounds (0, 0, w, (int) gradient.point2.y);
+ line.setBounds (0, 0, w, 1);
+ break;
+
+ default: break;
+ }
+
+ g.setGradientFill (gradient);
+ g.fillRect (shadowRect.expanded (2, 2));
+
+ g.setColour (Colour (0x80000000));
+ g.fillRect (line);
+}
+
+Button* LookAndFeel_V2::createTabBarExtrasButton()
+{
+ const float thickness = 7.0f;
+ const float indent = 22.0f;
+
+ Path p;
+ p.addEllipse (-10.0f, -10.0f, 120.0f, 120.0f);
+
+ DrawablePath ellipse;
+ ellipse.setPath (p);
+ ellipse.setFill (Colour (0x99ffffff));
+
+ p.clear();
+ p.addEllipse (0.0f, 0.0f, 100.0f, 100.0f);
+ p.addRectangle (indent, 50.0f - thickness, 100.0f - indent * 2.0f, thickness * 2.0f);
+ p.addRectangle (50.0f - thickness, indent, thickness * 2.0f, 50.0f - indent - thickness);
+ p.addRectangle (50.0f - thickness, 50.0f + thickness, thickness * 2.0f, 50.0f - indent - thickness);
+ p.setUsingNonZeroWinding (false);
+
+ DrawablePath dp;
+ dp.setPath (p);
+ dp.setFill (Colour (0x59000000));
+
+ DrawableComposite normalImage;
+ normalImage.addAndMakeVisible (ellipse.createCopy());
+ normalImage.addAndMakeVisible (dp.createCopy());
+
+ dp.setFill (Colour (0xcc000000));
+
+ DrawableComposite overImage;
+ overImage.addAndMakeVisible (ellipse.createCopy());
+ overImage.addAndMakeVisible (dp.createCopy());
+
+ DrawableButton* db = new DrawableButton ("tabs", DrawableButton::ImageFitted);
+ db->setImages (&normalImage, &overImage, nullptr);
+ return db;
+}
+
+
+//==============================================================================
+void LookAndFeel_V2::drawTableHeaderBackground (Graphics& g, TableHeaderComponent& header)
+{
+ g.fillAll (Colours::white);
+
+ Rectangle area (header.getLocalBounds());
+ area.removeFromTop (area.getHeight() / 2);
+
+ g.setGradientFill (ColourGradient (Colour (0xffe8ebf9), 0.0f, (float) area.getY(),
+ Colour (0xfff6f8f9), 0.0f, (float) area.getBottom(),
+ false));
+ g.fillRect (area);
+
+ g.setColour (Colour (0x33000000));
+ g.fillRect (area.removeFromBottom (1));
+
+ for (int i = header.getNumColumns (true); --i >= 0;)
+ g.fillRect (header.getColumnPosition (i).removeFromRight (1));
+}
+
+void LookAndFeel_V2::drawTableHeaderColumn (Graphics& g, const String& columnName, int /*columnId*/,
+ int width, int height,
+ bool isMouseOver, bool isMouseDown,
+ int columnFlags)
+{
+ if (isMouseDown)
+ g.fillAll (Colour (0x8899aadd));
+ else if (isMouseOver)
+ g.fillAll (Colour (0x5599aadd));
+
+ Rectangle area (width, height);
+ area.reduce (4, 0);
+
+ if ((columnFlags & (TableHeaderComponent::sortedForwards | TableHeaderComponent::sortedBackwards)) != 0)
+ {
+ Path sortArrow;
+ sortArrow.addTriangle (0.0f, 0.0f,
+ 0.5f, (columnFlags & TableHeaderComponent::sortedForwards) != 0 ? -0.8f : 0.8f,
+ 1.0f, 0.0f);
+
+ g.setColour (Colour (0x99000000));
+ g.fillPath (sortArrow, RectanglePlacement (RectanglePlacement::centred)
+ .getTransformToFit (sortArrow.getBounds(),
+ area.removeFromRight (height / 2).reduced (2).toFloat()));
+ }
+
+ g.setColour (Colours::black);
+ g.setFont (Font (height * 0.5f, Font::bold));
+ g.drawFittedText (columnName, area, Justification::centredLeft, 1);
+}
+
+//==============================================================================
+void LookAndFeel_V2::drawLasso (Graphics& g, Component& lassoComp)
+{
+ const int outlineThickness = 1;
+
+ g.fillAll (lassoComp.findColour (0x1000440 /*lassoFillColourId*/));
+
+ g.setColour (lassoComp.findColour (0x1000441 /*lassoOutlineColourId*/));
+ g.drawRect (lassoComp.getLocalBounds(), outlineThickness);
+}
+
+//==============================================================================
+void LookAndFeel_V2::paintToolbarBackground (Graphics& g, int w, int h, Toolbar& toolbar)
+{
+ const Colour background (toolbar.findColour (Toolbar::backgroundColourId));
+
+ g.setGradientFill (ColourGradient (background, 0.0f, 0.0f,
+ background.darker (0.1f),
+ toolbar.isVertical() ? w - 1.0f : 0.0f,
+ toolbar.isVertical() ? 0.0f : h - 1.0f,
+ false));
+ g.fillAll();
+}
+
+Button* LookAndFeel_V2::createToolbarMissingItemsButton (Toolbar& /*toolbar*/)
+{
+ return createTabBarExtrasButton();
+}
+
+void LookAndFeel_V2::paintToolbarButtonBackground (Graphics& g, int /*width*/, int /*height*/,
+ bool isMouseOver, bool isMouseDown,
+ ToolbarItemComponent& component)
+{
+ if (isMouseDown)
+ g.fillAll (component.findColour (Toolbar::buttonMouseDownBackgroundColourId, true));
+ else if (isMouseOver)
+ g.fillAll (component.findColour (Toolbar::buttonMouseOverBackgroundColourId, true));
+}
+
+void LookAndFeel_V2::paintToolbarButtonLabel (Graphics& g, int x, int y, int width, int height,
+ const String& text, ToolbarItemComponent& component)
+{
+ g.setColour (component.findColour (Toolbar::labelTextColourId, true)
+ .withAlpha (component.isEnabled() ? 1.0f : 0.25f));
+
+ const float fontHeight = jmin (14.0f, height * 0.85f);
+ g.setFont (fontHeight);
+
+ g.drawFittedText (text,
+ x, y, width, height,
+ Justification::centred,
+ jmax (1, height / (int) fontHeight));
+}
+
+//==============================================================================
+void LookAndFeel_V2::drawPropertyPanelSectionHeader (Graphics& g, const String& name,
+ bool isOpen, int width, int height)
+{
+ const float buttonSize = height * 0.75f;
+ const float buttonIndent = (height - buttonSize) * 0.5f;
+
+ drawTreeviewPlusMinusBox (g, Rectangle (buttonIndent, buttonIndent, buttonSize, buttonSize), Colours::white, isOpen, false);
+
+ const int textX = (int) (buttonIndent * 2.0f + buttonSize + 2.0f);
+
+ g.setColour (Colours::black);
+ g.setFont (Font (height * 0.7f, Font::bold));
+ g.drawText (name, textX, 0, width - textX - 4, height, Justification::centredLeft, true);
+}
+
+void LookAndFeel_V2::drawPropertyComponentBackground (Graphics& g, int width, int height,
+ PropertyComponent&)
+{
+ g.setColour (Colour (0x66ffffff));
+ g.fillRect (0, 0, width, height - 1);
+}
+
+void LookAndFeel_V2::drawPropertyComponentLabel (Graphics& g, int, int height,
+ PropertyComponent& component)
+{
+ g.setColour (Colours::black);
+
+ if (! component.isEnabled())
+ g.setOpacity (0.6f);
+
+ g.setFont (jmin (height, 24) * 0.65f);
+
+ const Rectangle r (getPropertyComponentContentPosition (component));
+
+ g.drawFittedText (component.getName(),
+ 3, r.getY(), r.getX() - 5, r.getHeight(),
+ Justification::centredLeft, 2);
+}
+
+Rectangle LookAndFeel_V2::getPropertyComponentContentPosition (PropertyComponent& component)
+{
+ const int textW = jmin (200, component.getWidth() / 3);
+ return Rectangle (textW, 1, component.getWidth() - textW - 1, component.getHeight() - 3);
+}
+
+//==============================================================================
+void LookAndFeel_V2::drawCallOutBoxBackground (CallOutBox& box, Graphics& g,
+ const Path& path, Image& cachedImage)
+{
+ if (cachedImage.isNull())
+ {
+ cachedImage = Image (Image::ARGB, box.getWidth(), box.getHeight(), true);
+ Graphics g2 (cachedImage);
+
+ DropShadow (Colours::black.withAlpha (0.7f), 8, Point (0, 2)).drawForPath (g2, path);
+ }
+
+ g.setColour (Colours::black);
+ g.drawImageAt (cachedImage, 0, 0);
+
+ g.setColour (Colour::greyLevel (0.23f).withAlpha (0.9f));
+ g.fillPath (path);
+
+ g.setColour (Colours::white.withAlpha (0.8f));
+ g.strokePath (path, PathStrokeType (2.0f));
+}
+
+
+//==============================================================================
+AttributedString LookAndFeel_V2::createFileChooserHeaderText (const String& title,
+ const String& instructions)
+{
+ AttributedString s;
+ s.setJustification (Justification::centred);
+
+ const Colour colour (findColour (FileChooserDialogBox::titleTextColourId));
+ s.append (title + "\n\n", Font (17.0f, Font::bold), colour);
+ s.append (instructions, Font (14.0f), colour);
+
+ return s;
+}
+
+void LookAndFeel_V2::drawFileBrowserRow (Graphics& g, int width, int height,
+ const String& filename, Image* icon,
+ const String& fileSizeDescription,
+ const String& fileTimeDescription,
+ const bool isDirectory,
+ const bool isItemSelected,
+ const int /*itemIndex*/,
+ DirectoryContentsDisplayComponent& dcc)
+{
+ Component* const fileListComp = dynamic_cast (&dcc);
+
+ if (isItemSelected)
+ g.fillAll (fileListComp != nullptr ? fileListComp->findColour (DirectoryContentsDisplayComponent::highlightColourId)
+ : findColour (DirectoryContentsDisplayComponent::highlightColourId));
+
+ const int x = 32;
+ g.setColour (Colours::black);
+
+ if (icon != nullptr && icon->isValid())
+ {
+ g.drawImageWithin (*icon, 2, 2, x - 4, height - 4,
+ RectanglePlacement::centred | RectanglePlacement::onlyReduceInSize,
+ false);
+ }
+ else
+ {
+ if (const Drawable* d = isDirectory ? getDefaultFolderImage()
+ : getDefaultDocumentFileImage())
+ d->drawWithin (g, Rectangle (2.0f, 2.0f, x - 4.0f, height - 4.0f),
+ RectanglePlacement::centred | RectanglePlacement::onlyReduceInSize, 1.0f);
+ }
+
+ g.setColour (fileListComp != nullptr ? fileListComp->findColour (DirectoryContentsDisplayComponent::textColourId)
+ : findColour (DirectoryContentsDisplayComponent::textColourId));
+ g.setFont (height * 0.7f);
+
+ if (width > 450 && ! isDirectory)
+ {
+ const int sizeX = roundToInt (width * 0.7f);
+ const int dateX = roundToInt (width * 0.8f);
+
+ g.drawFittedText (filename,
+ x, 0, sizeX - x, height,
+ Justification::centredLeft, 1);
+
+ g.setFont (height * 0.5f);
+ g.setColour (Colours::darkgrey);
+
+ if (! isDirectory)
+ {
+ g.drawFittedText (fileSizeDescription,
+ sizeX, 0, dateX - sizeX - 8, height,
+ Justification::centredRight, 1);
+
+ g.drawFittedText (fileTimeDescription,
+ dateX, 0, width - 8 - dateX, height,
+ Justification::centredRight, 1);
+ }
+ }
+ else
+ {
+ g.drawFittedText (filename,
+ x, 0, width - x, height,
+ Justification::centredLeft, 1);
+
+ }
+}
+
+Button* LookAndFeel_V2::createFileBrowserGoUpButton()
+{
+ DrawableButton* goUpButton = new DrawableButton ("up", DrawableButton::ImageOnButtonBackground);
+
+ Path arrowPath;
+ arrowPath.addArrow (Line (50.0f, 100.0f, 50.0f, 0.0f), 40.0f, 100.0f, 50.0f);
+
+ DrawablePath arrowImage;
+ arrowImage.setFill (Colours::black.withAlpha (0.4f));
+ arrowImage.setPath (arrowPath);
+
+ goUpButton->setImages (&arrowImage);
+
+ return goUpButton;
+}
+
+void LookAndFeel_V2::layoutFileBrowserComponent (FileBrowserComponent& browserComp,
+ DirectoryContentsDisplayComponent* fileListComponent,
+ FilePreviewComponent* previewComp,
+ ComboBox* currentPathBox,
+ TextEditor* filenameBox,
+ Button* goUpButton)
+{
+ const int x = 8;
+ int w = browserComp.getWidth() - x - x;
+
+ if (previewComp != nullptr)
+ {
+ const int previewWidth = w / 3;
+ previewComp->setBounds (x + w - previewWidth, 0, previewWidth, browserComp.getHeight());
+
+ w -= previewWidth + 4;
+ }
+
+ int y = 4;
+
+ const int controlsHeight = 22;
+ const int bottomSectionHeight = controlsHeight + 8;
+ const int upButtonWidth = 50;
+
+ currentPathBox->setBounds (x, y, w - upButtonWidth - 6, controlsHeight);
+ goUpButton->setBounds (x + w - upButtonWidth, y, upButtonWidth, controlsHeight);
+
+ y += controlsHeight + 4;
+
+ if (Component* const listAsComp = dynamic_cast (fileListComponent))
+ {
+ listAsComp->setBounds (x, y, w, browserComp.getHeight() - y - bottomSectionHeight);
+ y = listAsComp->getBottom() + 4;
+ }
+
+ filenameBox->setBounds (x + 50, y, w - 50, controlsHeight);
+}
+
+// Pulls a drawable out of compressed valuetree data..
+static Drawable* loadDrawableFromData (const void* data, size_t numBytes)
+{
+ MemoryInputStream m (data, numBytes, false);
+ GZIPDecompressorInputStream gz (m);
+ ValueTree drawable (ValueTree::readFromStream (gz));
+ return Drawable::createFromValueTree (drawable.getChild (0), nullptr);
+}
+
+const Drawable* LookAndFeel_V2::getDefaultFolderImage()
+{
+ if (folderImage == nullptr)
+ {
+ static const unsigned char drawableData[] =
+ { 120,218,197,86,77,111,27,55,16,229,182,161,237,6,61,39,233,77,63,192,38,56,195,225,215,209,105,210,2,141,13,20,201,193,109,111,178,181,178,183,145,181,130,180,110,145,127,159,199,93,73,137,87,53,218,91,109,192,160,151,179,156,55,111,222,188,229,155,247,
+ 231,87,231,175,47,222,170,234,155,229,244,190,86,213,115,253,102,61,253,123,122,189,168,85,51,83,213,119,250,238,221,47,231,151,175,223,169,170,250,121,221,62,172,84,245,172,60,63,209,243,118,49,171,215,170,107,87,23,245,188,83,213,145,182,167,19,91,
+ 254,127,223,220,222,117,37,68,82,40,143,174,219,174,107,239,135,168,147,18,37,108,85,245,237,46,207,70,33,249,175,211,238,78,85,186,28,253,76,175,73,109,186,117,251,177,190,106,102,229,241,247,58,24,103,203,15,101,245,103,219,44,187,15,221,39,0,172,142,
+ 245,125,211,1,196,205,116,181,125,114,164,175,31,186,78,45,219,229,31,245,186,189,106,150,179,102,121,139,100,154,240,231,167,102,177,64,72,247,105,213,23,122,187,158,206,154,122,217,169,85,57,18,1,47,53,101,107,18,135,204,167,147,192,201,216,20,114,
+ 244,195,62,171,234,7,125,198,100,136,216,145,149,211,9,57,103,40,249,72,219,8,167,170,87,250,140,162,199,123,226,3,34,82,202,134,131,13,172,74,170,233,162,0,177,234,166,93,180,15,235,141,170,206,180,157,204,231,150,156,159,207,39,195,50,214,88,18,150,
+ 245,205,124,250,104,169,212,135,158,19,144,53,20,112,172,55,237,2,132,13,199,149,130,230,115,145,112,147,147,82,61,157,32,238,178,253,11,145,213,138,10,52,138,38,103,111,99,164,211,137,139,198,35,177,35,167,212,143,15,215,205,13,160,109,163,172,225,152,
+ 16,232,17,149,140,103,144,158,146,90,113,217,12,6,197,167,236,3,54,5,181,101,73,54,138,90,245,165,227,120,18,252,150,77,15,242,188,228,204,81,169,139,102,249,5,68,192,145,14,244,112,1,145,29,94,137,96,235,49,136,151,58,246,32,88,192,161,88,176,76,226,
+ 36,247,24,176,7,232,62,16,83,42,155,201,160,30,222,65,72,98,82,76,33,198,254,197,96,124,10,150,243,8,130,48,228,36,94,124,6,4,43,38,0,142,205,99,30,4,221,13,33,230,220,71,177,65,49,142,243,150,7,1,51,20,2,5,96,96,84,225,56,217,188,3,33,46,24,228,112,
+ 69,69,12,68,228,108,242,99,16,165,118,208,28,51,200,98,87,42,74,62,209,24,4,206,48,22,153,125,132,220,196,56,15,234,99,216,130,0,141,38,74,162,130,48,35,163,141,94,196,245,32,94,104,7,154,132,209,40,108,162,165,232,153,165,17,4,138,201,176,135,58,49,
+ 165,130,122,108,114,54,28,240,64,17,89,188,79,177,116,149,10,4,246,91,30,94,104,112,96,226,144,131,144,142,98,78,177,7,128,81,242,224,140,36,249,80,208,145,196,12,202,15,16,60,161,200,69,187,169,213,86,198,123,87,224,255,199,21,94,105,134,72,40,177,245,
+ 14,182,32,232,54,196,231,100,111,11,189,168,201,39,177,84,102,38,139,177,168,74,210,87,174,64,20,138,160,67,111,10,4,98,196,97,60,158,118,133,25,111,173,224,171,37,97,185,119,133,221,242,63,184,194,140,71,174,240,252,145,43,72,32,147,146,147,4,104,104,
+ 117,134,10,18,12,107,212,40,72,148,57,6,71,69,135,222,248,16,160,168,3,169,144,55,201,69,41,147,137,134,99,50,97,8,178,85,43,217,140,201,151,192,152,10,242,190,24,11,59,183,29,25,42,115,236,98,14,229,252,32,80,66,0,162,17,136,72,6,67,5,45,242,224,10,
+ 193,102,71,50,6,17,129,212,18,115,105,150,80,169,45,123,222,141,76,178,70,32,55,24,90,217,132,71,73,200,57,238,204,3,136,49,144,185,55,183,190,20,137,52,246,47,113,232,158,69,35,49,145,208,129,193,56,178,77,135,230,145,113,22,140,69,74,20,146,2,120,218,
+ 155,135,48,32,10,89,30,156,165,204,254,222,193,160,12,19,49,6,210,59,11,70,62,4,31,15,64,196,2,157,98,33,58,1,104,32,152,50,31,128,64,148,183,197,108,209,89,107,240,41,75,36,123,16,208,108,180,44,236,250,182,227,27,20,137,118,76,60,165,137,221,92,94,
+ 78,215,31,235,245,230,183,242,229,30,214,251,251,195,145,94,148,15,253,170,221,52,93,211,46,7,109,171,81,208,177,94,247,119,132,47,81,186,92,22,246,7,255,254,15,7,107,141,171,197,191,156,123,162,135,187,198,227,131,113,219,80,159,1,4,239,223,231,0,0 };
+
+ folderImage = loadDrawableFromData (drawableData, sizeof (drawableData));
+ }
+
+ return folderImage;
+}
+
+const Drawable* LookAndFeel_V2::getDefaultDocumentFileImage()
+{
+ if (documentImage == nullptr)
+ {
+ static const unsigned char drawableData[] =
+ { 120,218,213,88,77,115,219,54,16,37,147,208,246,228,214,75,155,246,164,123,29,12,176,216,197,199,49,105,218,94,156,153,78,114,72,219,155,108,75,137,26,89,212,200,116,59,233,175,239,3,105,201,164,68,50,158,166,233,76,196,11,69,60,173,128,197,123,139,183,
+ 124,241,234,217,155,103,207,207,126,204,242,7,171,233,213,44,203,31,23,47,54,211,191,166,231,203,89,182,184,204,242,147,226,195,165,219,252,125,150,229,249,207,155,242,102,157,229,143,210,227,199,197,101,121,113,115,53,91,85,89,85,174,207,102,243,42,
+ 203,143,10,125,58,209,233,251,171,197,219,119,85,250,173,97,151,30,157,151,85,85,94,53,168,147,132,50,226,179,252,225,246,143,174,179,44,63,254,101,90,189,203,242,34,5,127,84,172,77,118,93,109,202,247,179,55,139,203,244,248,97,161,179,63,202,197,170,
+ 122,93,125,192,196,242,227,226,106,81,205,54,217,197,116,125,251,228,168,56,191,169,170,108,85,174,126,159,109,202,55,139,213,229,98,245,182,249,97,254,240,167,197,114,137,5,86,31,214,245,111,175,203,37,254,230,162,92,150,55,155,180,148,249,237,39,203,
+ 94,215,127,58,10,213,245,39,203,234,249,102,249,87,47,203,63,129,204,49,227,252,73,225,149,145,104,131,245,254,116,34,202,82,164,16,153,179,236,108,177,234,7,49,41,237,130,144,167,17,144,15,42,104,239,93,12,35,32,99,68,9,187,24,125,7,244,77,23,36,164,
+ 40,56,226,61,12,107,229,130,215,100,105,24,227,89,17,246,211,105,55,140,49,218,43,207,100,245,72,28,195,70,17,230,201,118,8,243,164,139,233,95,88,23,52,152,162,54,104,48,217,237,105,15,111,91,107,253,131,160,118,34,239,69,128,54,232,135,101,121,61,203,
+ 110,169,181,147,2,253,159,82,48,180,229,247,167,74,193,41,141,188,35,93,241,116,18,148,113,214,120,207,113,47,19,109,16,51,182,153,193,5,59,2,10,90,69,114,218,135,48,2,50,198,43,171,189,152,81,144,88,108,85,136,78,246,64,54,42,163,35,69,30,3,121,82,38,
+ 98,81,98,70,64,70,139,34,111,163,167,49,144,13,202,138,179,58,220,23,52,180,186,54,104,48,79,109,208,96,198,219,19,31,220,187,118,10,6,65,237,100,222,139,5,109,80,191,30,236,151,162,135,147,142,30,68,105,182,58,6,22,84,43,229,124,148,116,97,145,55,231,
+ 139,11,76,228,16,37,14,48,205,145,77,134,34,176,55,152,182,200,57,99,93,204,144,145,253,65,97,229,132,72,104,63,62,71,21,140,54,186,41,226,59,84,19,63,130,15,222,235,224,185,59,104,27,226,68,101,153,241,227,177,248,29,20,136,26,8,252,178,183,241,219,
+ 131,137,160,209,107,109,92,79,124,16,211,184,104,93,77,130,110,124,2,65,172,67,201,60,157,88,163,2,91,99,92,216,198,55,78,69,75,190,150,119,84,98,200,71,150,109,124,36,204,227,52,8,33,229,223,68,167,173,167,131,248,137,212,226,141,19,233,160,154,248,
+ 144,142,195,140,137,185,59,104,15,247,119,40,126,23,69,81,200,242,110,254,123,20,49,94,112,110,245,199,111,241,167,87,36,252,101,138,132,149,22,22,38,65,134,29,182,139,24,230,192,31,144,184,133,130,72,44,131,210,142,111,147,216,30,76,123,30,113,206,242,
+ 150,196,157,65,129,130,76,180,194,61,34,225,160,5,228,233,160,118,34,137,26,202,115,212,29,108,72,134,243,223,90,114,226,199,226,119,80,6,245,152,197,122,217,146,184,53,24,140,210,30,21,59,80,79,124,182,202,71,207,218,112,159,72,80,53,140,109,68,2,191,
+ 227,217,210,78,36,94,137,88,231,82,157,8,176,61,0,122,191,19,137,3,255,13,39,183,228,20,193,151,144,119,166,79,36,40,253,156,138,72,11,181,19,137,14,46,176,217,27,180,135,251,219,31,255,235,61,148,165,96,72,122,118,23,229,81,52,135,24,250,163,183,216,
+ 211,43,17,217,151,136,253,116,137,28,53,188,127,92,188,221,76,47,23,169,59,90,167,144,141,239,197,86,104,141,189,60,157,80,84,142,140,4,31,154,241,122,105,132,41,107,13,201,39,86,120,24,82,114,206,198,6,96,27,227,172,36,232,168,201,36,219,24,113,62,163,
+ 154,101,233,143,166,203,102,26,141,206,174,179,252,89,161,39,243,249,197,121,186,38,233,246,146,211,53,1,123,56,194,231,122,143,103,179,217,60,204,167,19,147,110,41,93,173,219,123,72,89,248,35,173,16,220,50,179,111,60,181,24,88,103,156,235,7,78,248,14,
+ 4,119,78,162,93,60,112,35,109,16,124,126,12,17,71,67,24,1,165,142,1,181,215,248,56,6,66,235,193,137,167,61,22,30,5,3,27,101,71,64,169,25,112,216,2,63,22,169,110,43,18,200,140,129,208,160,88,44,220,208,125,65,67,171,107,131,6,243,212,6,13,102,188,61,241,
+ 225,189,107,165,96,16,212,78,230,189,88,208,6,245,235,214,237,235,150,62,167,110,155,106,170,53,133,192,117,193,20,84,78,74,174,98,39,92,156,8,112,21,46,80,106,12,209,207,225,228,16,113,59,225,126,87,60,133,25,209,34,36,2,99,242,52,197,48,30,75,244,247,
+ 212,238,246,182,173,221,185,78,215,127,167,221,162,163,221,250,152,217,146,196,222,145,100,223,235,105,108,28,250,149,212,74,224,86,2,213,118,110,119,204,224,144,208,38,214,131,200,14,214,223,120,189,230,53,1,193,70,133,154,131,56,223,16,229,48,188,14,
+ 201,205,213,121,71,233,68,89,15,124,103,37,53,26,11,118,176,127,169,88,166,158,219,178,117,173,83,108,75,95,55,68,186,193,53,246,146,206,127,6,63,53,78,58,228,204,155,224,113,74,91,232,221,195,240,105,215,34,29,138,64,128,183,8,130,233,71,173,56,54,101,
+ 99,75,186,111,65,58,28,229,145,82,19,152,12,99,180,81,130,131,75,234,229,220,247,53,231,154,79,205,185,185,155,199,249,172,38,85,253,204,76,68,95,92,204,207,255,221,75,178,227,14,187,224,224,97,202,172,173,219,12,167,130,133,9,54,135,245,92,176,29,134,
+ 165,110,139,141,18,16,223,29,188,183,65,207,144,106,144,151,143,128,224,176,168,110,140,32,62,56,110,219,195,54,235,20,68,209,216,34,232,21,6,41,234,157,39,211,201,107,160,230,66,225,56,153,9,101,21,37,237,150,204,14,115,208,22,221,54,216,230,33,116,
+ 14,65,14,44,19,8,236,73,71,246,182,110,125,224,75,132,195,214,247,163,36,51,252,84,76,124,37,212,100,88,62,183,179,76,67,217,218,242,244,229,116,243,126,182,185,254,21,105,126,208,220,239,94,229,30,21,203,244,202,117,93,94,47,170,69,185,106,246,60,219,
+ 3,29,23,155,250,109,237,29,170,72,175,109,119,129,127,235,9,92,20,85,185,254,72,220,147,162,121,235,219,13,44,144,225,63,241,244,165,51,0,0 };
+
+ documentImage = loadDrawableFromData (drawableData, sizeof (drawableData));
+ }
+
+ return documentImage;
+}
+
+//==============================================================================
+void LookAndFeel_V2::drawLevelMeter (Graphics& g, int width, int height, float level)
+{
+ g.setColour (Colours::white.withAlpha (0.7f));
+ g.fillRoundedRectangle (0.0f, 0.0f, (float) width, (float) height, 3.0f);
+ g.setColour (Colours::black.withAlpha (0.2f));
+ g.drawRoundedRectangle (1.0f, 1.0f, width - 2.0f, height - 2.0f, 3.0f, 1.0f);
+
+ const int totalBlocks = 7;
+ const int numBlocks = roundToInt (totalBlocks * level);
+ const float w = (width - 6.0f) / (float) totalBlocks;
+
+ for (int i = 0; i < totalBlocks; ++i)
+ {
+ if (i >= numBlocks)
+ g.setColour (Colours::lightblue.withAlpha (0.6f));
+ else
+ g.setColour (i < totalBlocks - 1 ? Colours::blue.withAlpha (0.5f)
+ : Colours::red);
+
+ g.fillRoundedRectangle (3.0f + i * w + w * 0.1f, 3.0f, w * 0.8f, height - 6.0f, w * 0.4f);
+ }
+}
+
+//==============================================================================
+void LookAndFeel_V2::drawKeymapChangeButton (Graphics& g, int width, int height, Button& button, const String& keyDescription)
+{
+ const Colour textColour (button.findColour (0x100ad01 /*KeyMappingEditorComponent::textColourId*/, true));
+
+ if (keyDescription.isNotEmpty())
+ {
+ if (button.isEnabled())
+ {
+ const float alpha = button.isDown() ? 0.3f : (button.isOver() ? 0.15f : 0.08f);
+ g.fillAll (textColour.withAlpha (alpha));
+
+ g.setOpacity (0.3f);
+ drawBevel (g, 0, 0, width, height, 2);
+ }
+
+ g.setColour (textColour);
+ g.setFont (height * 0.6f);
+ g.drawFittedText (keyDescription,
+ 3, 0, width - 6, height,
+ Justification::centred, 1);
+ }
+ else
+ {
+ const float thickness = 7.0f;
+ const float indent = 22.0f;
+
+ Path p;
+ p.addEllipse (0.0f, 0.0f, 100.0f, 100.0f);
+ p.addRectangle (indent, 50.0f - thickness, 100.0f - indent * 2.0f, thickness * 2.0f);
+ p.addRectangle (50.0f - thickness, indent, thickness * 2.0f, 50.0f - indent - thickness);
+ p.addRectangle (50.0f - thickness, 50.0f + thickness, thickness * 2.0f, 50.0f - indent - thickness);
+ p.setUsingNonZeroWinding (false);
+
+ g.setColour (textColour.withAlpha (button.isDown() ? 0.7f : (button.isOver() ? 0.5f : 0.3f)));
+ g.fillPath (p, p.getTransformToScaleToFit (2.0f, 2.0f, width - 4.0f, height - 4.0f, true));
+ }
+
+ if (button.hasKeyboardFocus (false))
+ {
+ g.setColour (textColour.withAlpha (0.4f));
+ g.drawRect (0, 0, width, height);
+ }
+}
+
+//==============================================================================
+void LookAndFeel_V2::drawBevel (Graphics& g, const int x, const int y, const int width, const int height,
+ const int bevelThickness, const Colour& topLeftColour, const Colour& bottomRightColour,
+ const bool useGradient, const bool sharpEdgeOnOutside)
+{
+ if (g.clipRegionIntersects (Rectangle (x, y, width, height)))
+ {
+ LowLevelGraphicsContext& context = g.getInternalContext();
+ context.saveState();
+
+ for (int i = bevelThickness; --i >= 0;)
+ {
+ const float op = useGradient ? (sharpEdgeOnOutside ? bevelThickness - i : i) / (float) bevelThickness
+ : 1.0f;
+
+ context.setFill (topLeftColour.withMultipliedAlpha (op));
+ context.fillRect (Rectangle (x + i, y + i, width - i * 2, 1), false);
+ context.setFill (topLeftColour.withMultipliedAlpha (op * 0.75f));
+ context.fillRect (Rectangle (x + i, y + i + 1, 1, height - i * 2 - 2), false);
+ context.setFill (bottomRightColour.withMultipliedAlpha (op));
+ context.fillRect (Rectangle (x + i, y + height - i - 1, width - i * 2, 1), false);
+ context.setFill (bottomRightColour.withMultipliedAlpha (op * 0.75f));
+ context.fillRect (Rectangle (x + width - i - 1, y + i + 1, 1, height - i * 2 - 2), false);
+ }
+
+ context.restoreState();
+ }
+}
+
+//==============================================================================
+void LookAndFeel_V2::drawShinyButtonShape (Graphics& g,
+ float x, float y, float w, float h,
+ float maxCornerSize,
+ const Colour& baseColour,
+ const float strokeWidth,
+ const bool flatOnLeft,
+ const bool flatOnRight,
+ const bool flatOnTop,
+ const bool flatOnBottom) noexcept
+{
+ if (w <= strokeWidth * 1.1f || h <= strokeWidth * 1.1f)
+ return;
+
+ const float cs = jmin (maxCornerSize, w * 0.5f, h * 0.5f);
+
+ Path outline;
+ outline.addRoundedRectangle (x, y, w, h, cs, cs,
+ ! (flatOnLeft || flatOnTop),
+ ! (flatOnRight || flatOnTop),
+ ! (flatOnLeft || flatOnBottom),
+ ! (flatOnRight || flatOnBottom));
+
+ ColourGradient cg (baseColour, 0.0f, y,
+ baseColour.overlaidWith (Colour (0x070000ff)), 0.0f, y + h,
+ false);
+
+ cg.addColour (0.5, baseColour.overlaidWith (Colour (0x33ffffff)));
+ cg.addColour (0.51, baseColour.overlaidWith (Colour (0x110000ff)));
+
+ g.setGradientFill (cg);
+ g.fillPath (outline);
+
+ g.setColour (Colour (0x80000000));
+ g.strokePath (outline, PathStrokeType (strokeWidth));
+}
+
+//==============================================================================
+void LookAndFeel_V2::drawGlassSphere (Graphics& g,
+ const float x, const float y,
+ const float diameter,
+ const Colour& colour,
+ const float outlineThickness) noexcept
+{
+ if (diameter <= outlineThickness)
+ return;
+
+ Path p;
+ p.addEllipse (x, y, diameter, diameter);
+
+ {
+ ColourGradient cg (Colours::white.overlaidWith (colour.withMultipliedAlpha (0.3f)), 0, y,
+ Colours::white.overlaidWith (colour.withMultipliedAlpha (0.3f)), 0, y + diameter, false);
+
+ cg.addColour (0.4, Colours::white.overlaidWith (colour));
+
+ g.setGradientFill (cg);
+ g.fillPath (p);
+ }
+
+ g.setGradientFill (ColourGradient (Colours::white, 0, y + diameter * 0.06f,
+ Colours::transparentWhite, 0, y + diameter * 0.3f, false));
+ g.fillEllipse (x + diameter * 0.2f, y + diameter * 0.05f, diameter * 0.6f, diameter * 0.4f);
+
+ ColourGradient cg (Colours::transparentBlack,
+ x + diameter * 0.5f, y + diameter * 0.5f,
+ Colours::black.withAlpha (0.5f * outlineThickness * colour.getFloatAlpha()),
+ x, y + diameter * 0.5f, true);
+
+ cg.addColour (0.7, Colours::transparentBlack);
+ cg.addColour (0.8, Colours::black.withAlpha (0.1f * outlineThickness));
+
+ g.setGradientFill (cg);
+ g.fillPath (p);
+
+ g.setColour (Colours::black.withAlpha (0.5f * colour.getFloatAlpha()));
+ g.drawEllipse (x, y, diameter, diameter, outlineThickness);
+}
+
+//==============================================================================
+void LookAndFeel_V2::drawGlassPointer (Graphics& g,
+ const float x, const float y,
+ const float diameter,
+ const Colour& colour, const float outlineThickness,
+ const int direction) noexcept
+{
+ if (diameter <= outlineThickness)
+ return;
+
+ Path p;
+ p.startNewSubPath (x + diameter * 0.5f, y);
+ p.lineTo (x + diameter, y + diameter * 0.6f);
+ p.lineTo (x + diameter, y + diameter);
+ p.lineTo (x, y + diameter);
+ p.lineTo (x, y + diameter * 0.6f);
+ p.closeSubPath();
+
+ p.applyTransform (AffineTransform::rotation (direction * (float_Pi * 0.5f), x + diameter * 0.5f, y + diameter * 0.5f));
+
+ {
+ ColourGradient cg (Colours::white.overlaidWith (colour.withMultipliedAlpha (0.3f)), 0, y,
+ Colours::white.overlaidWith (colour.withMultipliedAlpha (0.3f)), 0, y + diameter, false);
+
+ cg.addColour (0.4, Colours::white.overlaidWith (colour));
+
+ g.setGradientFill (cg);
+ g.fillPath (p);
+ }
+
+ ColourGradient cg (Colours::transparentBlack,
+ x + diameter * 0.5f, y + diameter * 0.5f,
+ Colours::black.withAlpha (0.5f * outlineThickness * colour.getFloatAlpha()),
+ x - diameter * 0.2f, y + diameter * 0.5f, true);
+
+ cg.addColour (0.5, Colours::transparentBlack);
+ cg.addColour (0.7, Colours::black.withAlpha (0.07f * outlineThickness));
+
+ g.setGradientFill (cg);
+ g.fillPath (p);
+
+ g.setColour (Colours::black.withAlpha (0.5f * colour.getFloatAlpha()));
+ g.strokePath (p, PathStrokeType (outlineThickness));
+}
+
+//==============================================================================
+void LookAndFeel_V2::drawGlassLozenge (Graphics& g,
+ const float x, const float y,
+ const float width, const float height,
+ const Colour& colour,
+ const float outlineThickness,
+ const float cornerSize,
+ const bool flatOnLeft,
+ const bool flatOnRight,
+ const bool flatOnTop,
+ const bool flatOnBottom) noexcept
+{
+ if (width <= outlineThickness || height <= outlineThickness)
+ return;
+
+ const int intX = (int) x;
+ const int intY = (int) y;
+ const int intW = (int) width;
+ const int intH = (int) height;
+
+ const float cs = cornerSize < 0 ? jmin (width * 0.5f, height * 0.5f) : cornerSize;
+ const float edgeBlurRadius = height * 0.75f + (height - cs * 2.0f);
+ const int intEdge = (int) edgeBlurRadius;
+
+ Path outline;
+ outline.addRoundedRectangle (x, y, width, height, cs, cs,
+ ! (flatOnLeft || flatOnTop),
+ ! (flatOnRight || flatOnTop),
+ ! (flatOnLeft || flatOnBottom),
+ ! (flatOnRight || flatOnBottom));
+
+ {
+ ColourGradient cg (colour.darker (0.2f), 0, y,
+ colour.darker (0.2f), 0, y + height, false);
+
+ cg.addColour (0.03, colour.withMultipliedAlpha (0.3f));
+ cg.addColour (0.4, colour);
+ cg.addColour (0.97, colour.withMultipliedAlpha (0.3f));
+
+ g.setGradientFill (cg);
+ g.fillPath (outline);
+ }
+
+ ColourGradient cg (Colours::transparentBlack, x + edgeBlurRadius, y + height * 0.5f,
+ colour.darker (0.2f), x, y + height * 0.5f, true);
+
+ cg.addColour (jlimit (0.0, 1.0, 1.0 - (cs * 0.5f) / edgeBlurRadius), Colours::transparentBlack);
+ cg.addColour (jlimit (0.0, 1.0, 1.0 - (cs * 0.25f) / edgeBlurRadius), colour.darker (0.2f).withMultipliedAlpha (0.3f));
+
+ if (! (flatOnLeft || flatOnTop || flatOnBottom))
+ {
+ g.saveState();
+ g.setGradientFill (cg);
+ g.reduceClipRegion (intX, intY, intEdge, intH);
+ g.fillPath (outline);
+ g.restoreState();
+ }
+
+ if (! (flatOnRight || flatOnTop || flatOnBottom))
+ {
+ cg.point1.setX (x + width - edgeBlurRadius);
+ cg.point2.setX (x + width);
+
+ g.saveState();
+ g.setGradientFill (cg);
+ g.reduceClipRegion (intX + intW - intEdge, intY, 2 + intEdge, intH);
+ g.fillPath (outline);
+ g.restoreState();
+ }
+
+ {
+ const float leftIndent = flatOnTop || flatOnLeft ? 0.0f : cs * 0.4f;
+ const float rightIndent = flatOnTop || flatOnRight ? 0.0f : cs * 0.4f;
+
+ Path highlight;
+ highlight.addRoundedRectangle (x + leftIndent,
+ y + cs * 0.1f,
+ width - (leftIndent + rightIndent),
+ height * 0.4f,
+ cs * 0.4f,
+ cs * 0.4f,
+ ! (flatOnLeft || flatOnTop),
+ ! (flatOnRight || flatOnTop),
+ ! (flatOnLeft || flatOnBottom),
+ ! (flatOnRight || flatOnBottom));
+
+ g.setGradientFill (ColourGradient (colour.brighter (10.0f), 0, y + height * 0.06f,
+ Colours::transparentWhite, 0, y + height * 0.4f, false));
+ g.fillPath (highlight);
+ }
+
+ g.setColour (colour.darker().withMultipliedAlpha (1.5f));
+ g.strokePath (outline, PathStrokeType (outlineThickness));
+}
diff --git a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.h b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.h
new file mode 100644
index 0000000000..d0d3119b41
--- /dev/null
+++ b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.h
@@ -0,0 +1,347 @@
+/*
+ ==============================================================================
+
+ This file is part of the JUCE library.
+ Copyright (c) 2013 - Raw Material Software Ltd.
+
+ Permission is granted to use this software under the terms of either:
+ a) the GPL v2 (or any later version)
+ b) the Affero GPL v3
+
+ Details of these licenses can be found 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.juce.com for more information.
+
+ ==============================================================================
+*/
+
+#ifndef JUCE_LOOKANDFEEL_V2_H_INCLUDED
+#define JUCE_LOOKANDFEEL_V2_H_INCLUDED
+
+
+//==============================================================================
+/**
+ This LookAndFeel subclass implements the juce style from around 2008-12.
+
+ @see LookAndFeel, LookAndFeel_V1, LookAndFeel_V3
+*/
+class JUCE_API LookAndFeel_V2 : public LookAndFeel
+{
+public:
+ LookAndFeel_V2();
+ ~LookAndFeel_V2();
+
+ //==============================================================================
+ void drawButtonBackground (Graphics&, Button& button, const Colour& backgroundColour,
+ bool isMouseOverButton, bool isButtonDown) override;
+
+ Font getTextButtonFont (TextButton&) override;
+
+ void drawButtonText (Graphics&, TextButton& button,
+ bool isMouseOverButton, bool isButtonDown) override;
+
+ void drawToggleButton (Graphics&, ToggleButton& button, bool isMouseOverButton, bool isButtonDown) override;
+
+ void changeToggleButtonWidthToFitText (ToggleButton&) override;
+
+ void drawTickBox (Graphics&, Component&,
+ float x, float y, float w, float h,
+ bool ticked, bool isEnabled, bool isMouseOverButton, bool isButtonDown) override;
+
+ void drawDrawableButton (Graphics&, DrawableButton&, bool isMouseOverButton, bool isButtonDown) override;
+
+ //==============================================================================
+ AlertWindow* createAlertWindow (const String& title, const String& message,
+ const String& button1,
+ const String& button2,
+ const String& button3,
+ AlertWindow::AlertIconType iconType,
+ int numButtons, Component* associatedComponent) override;
+
+ void drawAlertBox (Graphics&, AlertWindow&, const Rectangle& textArea, TextLayout&) override;
+ int getAlertBoxWindowFlags() override;
+ int getAlertWindowButtonHeight() override;
+ Font getAlertWindowMessageFont() override;
+ Font getAlertWindowFont() override;
+
+ //==============================================================================
+ void drawProgressBar (Graphics&, ProgressBar&, int width, int height, double progress, const String& textToShow) override;
+ void drawSpinningWaitAnimation (Graphics&, const Colour& colour, int x, int y, int w, int h) override;
+
+ //==============================================================================
+ bool areScrollbarButtonsVisible() override;
+ void drawScrollbarButton (Graphics& g, ScrollBar&, int width, int height, int buttonDirection,
+ bool isScrollbarVertical, bool isMouseOverButton, bool isButtonDown) override;
+
+ void drawScrollbar (Graphics& g, ScrollBar&, int x, int y, int width, int height,
+ bool isScrollbarVertical, int thumbStartPosition, int thumbSize,
+ bool isMouseOver, bool isMouseDown) override;
+
+ ImageEffectFilter* getScrollbarEffect() override;
+ int getMinimumScrollbarThumbSize (ScrollBar&) override;
+ int getDefaultScrollbarWidth() override;
+ int getScrollbarButtonSize (ScrollBar& scrollbar) override;
+
+ //==============================================================================
+ Path getTickShape (float height) override;
+ Path getCrossShape (float height) override;
+
+ //==============================================================================
+ void drawTreeviewPlusMinusBox (Graphics&, const Rectangle& area,
+ Colour backgroundColour, bool isOpen, bool isMouseOver) override;
+ bool areLinesDrawnForTreeView (TreeView&) override;
+ int getTreeViewIndentSize (TreeView&) override;
+
+ //==============================================================================
+ void fillTextEditorBackground (Graphics&, int width, int height, TextEditor&) override;
+ void drawTextEditorOutline (Graphics&, int width, int height, TextEditor&) override;
+ CaretComponent* createCaretComponent (Component* keyFocusOwner) override;
+
+ //==============================================================================
+ const Drawable* getDefaultFolderImage() override;
+ const Drawable* getDefaultDocumentFileImage() override;
+
+ AttributedString createFileChooserHeaderText (const String& title, const String& instructions) override;
+
+ void drawFileBrowserRow (Graphics&, int width, int height,
+ const String& filename, Image* icon,
+ const String& fileSizeDescription, const String& fileTimeDescription,
+ bool isDirectory, bool isItemSelected, int itemIndex,
+ DirectoryContentsDisplayComponent&) override;
+
+ Button* createFileBrowserGoUpButton() override;
+
+ void layoutFileBrowserComponent (FileBrowserComponent&,
+ DirectoryContentsDisplayComponent*,
+ FilePreviewComponent*,
+ ComboBox* currentPathBox,
+ TextEditor* filenameBox,
+ Button* goUpButton) override;
+
+ //==============================================================================
+ void drawBubble (Graphics&, BubbleComponent&, const Point& tip, const Rectangle& body) override;
+
+ void drawLasso (Graphics&, Component&) override;
+
+ //==============================================================================
+ void drawPopupMenuBackground (Graphics&, int width, int height) override;
+
+ void drawPopupMenuItem (Graphics&, int width, int height,
+ bool isSeparator, bool isActive, bool isHighlighted, bool isTicked, bool hasSubMenu,
+ const String& text, const String& shortcutKeyText,
+ Image* image, const Colour* textColour) override;
+
+ Font getPopupMenuFont() override;
+
+ void drawPopupMenuUpDownArrow (Graphics&, int width, int height, bool isScrollUpArrow) override;
+
+ void getIdealPopupMenuItemSize (const String& text, bool isSeparator, int standardMenuItemHeight,
+ int& idealWidth, int& idealHeight) override;
+ int getMenuWindowFlags() override;
+
+ void drawMenuBarBackground (Graphics&, int width, int height, bool isMouseOverBar, MenuBarComponent&) override;
+ int getMenuBarItemWidth (MenuBarComponent&, int itemIndex, const String& itemText) override;
+ Font getMenuBarFont (MenuBarComponent&, int itemIndex, const String& itemText) override;
+ int getDefaultMenuBarHeight() override;
+
+ void drawMenuBarItem (Graphics&, int width, int height,
+ int itemIndex, const String& itemText,
+ bool isMouseOverItem, bool isMenuOpen, bool isMouseOverBar,
+ MenuBarComponent&) override;
+
+ //==============================================================================
+ void drawComboBox (Graphics&, int width, int height, bool isButtonDown,
+ int buttonX, int buttonY, int buttonW, int buttonH,
+ ComboBox&) override;
+ Font getComboBoxFont (ComboBox&) override;
+ Label* createComboBoxTextBox (ComboBox&) override;
+ void positionComboBoxText (ComboBox&, Label&) override;
+
+ //==============================================================================
+ void drawLabel (Graphics&, Label&) override;
+ Font getLabelFont (Label&) override;
+
+ //==============================================================================
+ void drawLinearSlider (Graphics&, int x, int y, int width, int height,
+ float sliderPos, float minSliderPos, float maxSliderPos,
+ const Slider::SliderStyle, Slider&) override;
+
+ void drawLinearSliderBackground (Graphics&, int x, int y, int width, int height,
+ float sliderPos, float minSliderPos, float maxSliderPos,
+ const Slider::SliderStyle, Slider&) override;
+
+ void drawLinearSliderThumb (Graphics&, int x, int y, int width, int height,
+ float sliderPos, float minSliderPos, float maxSliderPos,
+ const Slider::SliderStyle, Slider&) override;
+
+ void drawRotarySlider (Graphics&, int x, int y, int width, int height,
+ float sliderPosProportional, float rotaryStartAngle, float rotaryEndAngle,
+ Slider&) override;
+
+ int getSliderThumbRadius (Slider&) override;
+ Button* createSliderButton (bool isIncrement) override;
+ Label* createSliderTextBox (Slider&) override;
+ ImageEffectFilter* getSliderEffect() override;
+ Font getSliderPopupFont() override;
+ int getSliderPopupPlacement() override;
+
+ //==============================================================================
+ void getTooltipSize (const String& tipText, int& width, int& height) override;
+ void drawTooltip (Graphics&, const String& text, int width, int height) override;
+
+ //==============================================================================
+ Button* createFilenameComponentBrowseButton (const String& text) override;
+ void layoutFilenameComponent (FilenameComponent& filenameComp, ComboBox* filenameBox, Button* browseButton) override;
+
+ //==============================================================================
+ void drawConcertinaPanelHeader (Graphics&, const Rectangle& area,
+ bool isMouseOver, bool isMouseDown,
+ ConcertinaPanel&, Component& panel) override;
+
+ //==============================================================================
+ void drawCornerResizer (Graphics&, int w, int h, bool isMouseOver, bool isMouseDragging) override;
+ void drawResizableFrame (Graphics&, int w, int h, const BorderSize&) override;
+
+ //==============================================================================
+ void fillResizableWindowBackground (Graphics&, int w, int h, const BorderSize&, ResizableWindow&) override;
+ void drawResizableWindowBorder (Graphics&, int w, int h, const BorderSize& border, ResizableWindow&) override;
+
+ //==============================================================================
+ void drawDocumentWindowTitleBar (DocumentWindow&, Graphics&, int w, int h,
+ int titleSpaceX, int titleSpaceW,
+ const Image* icon, bool drawTitleTextOnLeft) override;
+
+ Button* createDocumentWindowButton (int buttonType) override;
+
+ void positionDocumentWindowButtons (DocumentWindow&,
+ int titleBarX, int titleBarY, int titleBarW, int titleBarH,
+ Button* minimiseButton,
+ Button* maximiseButton,
+ Button* closeButton,
+ bool positionTitleBarButtonsOnLeft) override;
+
+ //==============================================================================
+ DropShadower* createDropShadowerForComponent (Component*) override;
+
+ //==============================================================================
+ void drawStretchableLayoutResizerBar (Graphics&, int w, int h, bool isVerticalBar,
+ bool isMouseOver, bool isMouseDragging) override;
+
+ //==============================================================================
+ void drawGroupComponentOutline (Graphics&, int w, int h, const String& text,
+ const Justification&, GroupComponent&) override;
+
+ //==============================================================================
+ int getTabButtonSpaceAroundImage() override;
+ int getTabButtonOverlap (int tabDepth) override;
+ int getTabButtonBestWidth (TabBarButton&, int tabDepth) override;
+ Rectangle getTabButtonExtraComponentBounds (const TabBarButton&, Rectangle& textArea, Component& extraComp) override;
+
+ void drawTabButton (TabBarButton&, Graphics&, bool isMouseOver, bool isMouseDown) override;
+ void drawTabButtonText (TabBarButton&, Graphics&, bool isMouseOver, bool isMouseDown) override;
+ void drawTabbedButtonBarBackground (TabbedButtonBar&, Graphics&) override;
+ void drawTabAreaBehindFrontButton (TabbedButtonBar&, Graphics&, int w, int h) override;
+
+ void createTabButtonShape (TabBarButton&, Path& path, bool isMouseOver, bool isMouseDown) override;
+ void fillTabButtonShape (TabBarButton&, Graphics&, const Path& path, bool isMouseOver, bool isMouseDown) override;
+
+ Button* createTabBarExtrasButton() override;
+
+ //==============================================================================
+ void drawImageButton (Graphics&, Image*,
+ int imageX, int imageY, int imageW, int imageH,
+ const Colour& overlayColour, float imageOpacity, ImageButton&) override;
+
+ //==============================================================================
+ void drawTableHeaderBackground (Graphics&, TableHeaderComponent&) override;
+
+ void drawTableHeaderColumn (Graphics&, const String& columnName, int columnId,
+ int width, int height, bool isMouseOver, bool isMouseDown,
+ int columnFlags) override;
+
+ //==============================================================================
+ void paintToolbarBackground (Graphics&, int width, int height, Toolbar&) override;
+
+ Button* createToolbarMissingItemsButton (Toolbar&) override;
+
+ void paintToolbarButtonBackground (Graphics&, int width, int height,
+ bool isMouseOver, bool isMouseDown,
+ ToolbarItemComponent&) override;
+
+ void paintToolbarButtonLabel (Graphics&, int x, int y, int width, int height,
+ const String& text, ToolbarItemComponent&) override;
+
+ //==============================================================================
+ void drawPropertyPanelSectionHeader (Graphics&, const String& name, bool isOpen, int width, int height) override;
+ void drawPropertyComponentBackground (Graphics&, int width, int height, PropertyComponent&) override;
+ void drawPropertyComponentLabel (Graphics&, int width, int height, PropertyComponent&) override;
+ Rectangle getPropertyComponentContentPosition (PropertyComponent&) override;
+
+ //==============================================================================
+ void drawCallOutBoxBackground (CallOutBox&, Graphics&, const Path& path, Image& cachedImage) override;
+
+ //==============================================================================
+ void drawLevelMeter (Graphics&, int width, int height, float level) override;
+
+ void drawKeymapChangeButton (Graphics&, int width, int height, Button& button, const String& keyDescription) override;
+
+ //==============================================================================
+ /** Draws a 3D raised (or indented) bevel using two colours.
+
+ The bevel is drawn inside the given rectangle, and greater bevel thicknesses
+ extend inwards.
+
+ The top-left colour is used for the top- and left-hand edges of the
+ bevel; the bottom-right colour is used for the bottom- and right-hand
+ edges.
+
+ If useGradient is true, then the bevel fades out to make it look more curved
+ and less angular. If sharpEdgeOnOutside is true, the outside of the bevel is
+ sharp, and it fades towards the centre; if sharpEdgeOnOutside is false, then
+ the centre edges are sharp and it fades towards the outside.
+ */
+ static void drawBevel (Graphics&,
+ int x, int y, int width, int height,
+ int bevelThickness,
+ const Colour& topLeftColour = Colours::white,
+ const Colour& bottomRightColour = Colours::black,
+ bool useGradient = true,
+ bool sharpEdgeOnOutside = true);
+
+ /** Utility function to draw a shiny, glassy circle (for round LED-type buttons). */
+ static void drawGlassSphere (Graphics&, float x, float y, float diameter,
+ const Colour& colour, float outlineThickness) noexcept;
+
+ static void drawGlassPointer (Graphics&, float x, float y, float diameter,
+ const Colour& colour, float outlineThickness, int direction) noexcept;
+
+ /** Utility function to draw a shiny, glassy oblong (for text buttons). */
+ static void drawGlassLozenge (Graphics&,
+ float x, float y, float width, float height,
+ const Colour& colour, float outlineThickness, float cornerSize,
+ bool flatOnLeft, bool flatOnRight, bool flatOnTop, bool flatOnBottom) noexcept;
+
+private:
+ //==============================================================================
+ ScopedPointer folderImage, documentImage;
+
+ void drawShinyButtonShape (Graphics&,
+ float x, float y, float w, float h, float maxCornerSize,
+ const Colour& baseColour, float strokeWidth,
+ bool flatOnLeft, bool flatOnRight, bool flatOnTop, bool flatOnBottom) noexcept;
+
+ class GlassWindowButton;
+ class SliderLabelComp;
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LookAndFeel_V2)
+};
+
+
+#endif // JUCE_LOOKANDFEEL_H_INCLUDED
diff --git a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V3.cpp b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V3.cpp
new file mode 100644
index 0000000000..ac573ae59a
--- /dev/null
+++ b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V3.cpp
@@ -0,0 +1,361 @@
+/*
+ ==============================================================================
+
+ This file is part of the JUCE library.
+ Copyright (c) 2013 - Raw Material Software Ltd.
+
+ Permission is granted to use this software under the terms of either:
+ a) the GPL v2 (or any later version)
+ b) the Affero GPL v3
+
+ Details of these licenses can be found 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.juce.com for more information.
+
+ ==============================================================================
+*/
+
+LookAndFeel_V3::LookAndFeel_V3()
+{
+ setColour (TreeView::selectedItemBackgroundColourId, Colour (0x301111ee));
+
+ const Colour textButtonColour (0xffeeeeff);
+ setColour (TextButton::buttonColourId, textButtonColour);
+ setColour (ComboBox::buttonColourId, textButtonColour);
+
+ setColour (ScrollBar::thumbColourId, Colour::greyLevel (0.8f).contrasting().withAlpha (0.13f));
+}
+
+LookAndFeel_V3::~LookAndFeel_V3() {}
+
+bool LookAndFeel_V3::areScrollbarButtonsVisible() { return false; }
+
+void LookAndFeel_V3::drawStretchableLayoutResizerBar (Graphics& g, int /*w*/, int /*h*/, bool /*isVerticalBar*/,
+ bool isMouseOver, bool isMouseDragging)
+{
+ if (isMouseOver || isMouseDragging)
+ g.fillAll (Colours::yellow.withAlpha (0.4f));
+}
+
+void LookAndFeel_V3::drawScrollbar (Graphics& g, ScrollBar& scrollbar, int x, int y, int width, int height,
+ bool isScrollbarVertical, int thumbStartPosition, int thumbSize, bool isMouseOver, bool isMouseDown)
+{
+ Path thumbPath;
+
+ if (thumbSize > 0)
+ {
+ const float thumbIndent = (isScrollbarVertical ? width : height) * 0.25f;
+ const float thumbIndentx2 = thumbIndent * 2.0f;
+
+ if (isScrollbarVertical)
+ thumbPath.addRoundedRectangle (x + thumbIndent, thumbStartPosition + thumbIndent,
+ width - thumbIndentx2, thumbSize - thumbIndentx2, (width - thumbIndentx2) * 0.5f);
+ else
+ thumbPath.addRoundedRectangle (thumbStartPosition + thumbIndent, y + thumbIndent,
+ thumbSize - thumbIndentx2, height - thumbIndentx2, (height - thumbIndentx2) * 0.5f);
+ }
+
+ Colour thumbCol (scrollbar.findColour (ScrollBar::thumbColourId, true));
+
+ if (isMouseOver || isMouseDown)
+ thumbCol = thumbCol.withMultipliedAlpha (2.0f);
+
+ g.setColour (thumbCol);
+ g.fillPath (thumbPath);
+
+ g.setColour (thumbCol.contrasting ((isMouseOver || isMouseDown) ? 0.2f : 0.1f));
+ g.strokePath (thumbPath, PathStrokeType (1.0f));
+}
+
+void LookAndFeel_V3::drawConcertinaPanelHeader (Graphics& g, const Rectangle& area,
+ bool isMouseOver, bool /*isMouseDown*/,
+ ConcertinaPanel&, Component& panel)
+{
+ const Colour bkg (Colours::grey);
+
+ g.setGradientFill (ColourGradient (Colours::white.withAlpha (isMouseOver ? 0.4f : 0.2f), 0, (float) area.getY(),
+ Colours::darkgrey.withAlpha (0.2f), 0, (float) area.getBottom(), false));
+ g.fillAll();
+
+ g.setColour (bkg.contrasting().withAlpha (0.04f));
+ g.fillRect (area.withHeight (1));
+ g.fillRect (area.withTop (area.getBottom() - 1));
+
+ g.setColour (bkg.contrasting());
+ g.setFont (Font (area.getHeight() * 0.6f).boldened());
+ g.drawFittedText (panel.getName(), 4, 0, area.getWidth() - 6, area.getHeight(), Justification::centredLeft, 1);
+}
+
+static void drawButtonShape (Graphics& g, const Path& outline, Colour baseColour, float height)
+{
+ const float mainBrightness = baseColour.getBrightness();
+ const float mainAlpha = baseColour.getFloatAlpha();
+
+ g.setGradientFill (ColourGradient (baseColour.brighter (0.2f), 0.0f, 0.0f,
+ baseColour.darker (0.25f), 0.0f, height, false));
+ g.fillPath (outline);
+
+ g.setColour (Colours::white.withAlpha (0.4f * mainAlpha * mainBrightness * mainBrightness));
+ g.strokePath (outline, PathStrokeType (1.0f), AffineTransform::translation (0.0f, 1.0f)
+ .scaled (1.0f, (height - 1.6f) / height));
+
+ g.setColour (Colours::black.withAlpha (0.4f * mainAlpha));
+ g.strokePath (outline, PathStrokeType (1.0f));
+}
+
+void LookAndFeel_V3::drawButtonBackground (Graphics& g, Button& button, const Colour& backgroundColour,
+ bool isMouseOverButton, bool isButtonDown)
+{
+ Colour baseColour (backgroundColour.withMultipliedSaturation (button.hasKeyboardFocus (true) ? 1.3f : 0.9f)
+ .withMultipliedAlpha (button.isEnabled() ? 0.9f : 0.5f));
+
+ if (isButtonDown || isMouseOverButton)
+ baseColour = baseColour.contrasting (isButtonDown ? 0.2f : 0.1f);
+
+ const bool flatOnLeft = button.isConnectedOnLeft();
+ const bool flatOnRight = button.isConnectedOnRight();
+ const bool flatOnTop = button.isConnectedOnTop();
+ const bool flatOnBottom = button.isConnectedOnBottom();
+
+ const float width = button.getWidth() - 1.0f;
+ const float height = button.getHeight() - 1.0f;
+ const float cornerSize = 4.0f;
+
+ Path outline;
+ outline.addRoundedRectangle (0.5f, 0.5f, width, height, cornerSize, cornerSize,
+ ! (flatOnLeft || flatOnTop),
+ ! (flatOnRight || flatOnTop),
+ ! (flatOnLeft || flatOnBottom),
+ ! (flatOnRight || flatOnBottom));
+
+ drawButtonShape (g, outline, baseColour, height);
+}
+
+void LookAndFeel_V3::drawTableHeaderBackground (Graphics& g, TableHeaderComponent& header)
+{
+ Rectangle r (header.getLocalBounds());
+
+ g.setColour (Colours::black.withAlpha (0.5f));
+ g.fillRect (r.removeFromBottom (1));
+
+ g.setColour (Colours::white.withAlpha (0.6f));
+ g.fillRect (r);
+
+ g.setColour (Colours::black.withAlpha (0.5f));
+
+ for (int i = header.getNumColumns (true); --i >= 0;)
+ g.fillRect (header.getColumnPosition (i).removeFromRight (1));
+}
+
+int LookAndFeel_V3::getTabButtonOverlap (int /*tabDepth*/) { return -1; }
+int LookAndFeel_V3::getTabButtonSpaceAroundImage() { return 1; }
+
+void LookAndFeel_V3::createTabTextLayout (const TabBarButton& button, float length, float depth,
+ Colour colour, TextLayout& textLayout)
+{
+ Font font (depth * 0.5f);
+ font.setUnderline (button.hasKeyboardFocus (false));
+
+ AttributedString s;
+ s.setJustification (Justification::centred);
+ s.append (button.getButtonText().trim(), font, colour);
+
+ textLayout.createLayout (s, length);
+}
+
+void LookAndFeel_V3::drawTabButton (TabBarButton& button, Graphics& g, bool isMouseOver, bool isMouseDown)
+{
+ const Rectangle activeArea (button.getActiveArea());
+
+ const TabbedButtonBar::Orientation o = button.getTabbedButtonBar().getOrientation();
+
+ const Colour bkg (button.getTabBackgroundColour());
+
+ if (button.getToggleState())
+ {
+ g.setColour (bkg);
+ g.fillRect (activeArea);
+ }
+ else
+ {
+ Point p1, p2;
+
+ switch (o)
+ {
+ case TabbedButtonBar::TabsAtBottom: p1 = activeArea.getBottomLeft(); p2 = activeArea.getTopLeft(); break;
+ case TabbedButtonBar::TabsAtTop: p1 = activeArea.getTopLeft(); p2 = activeArea.getBottomLeft(); break;
+ case TabbedButtonBar::TabsAtRight: p1 = activeArea.getTopRight(); p2 = activeArea.getTopLeft(); break;
+ case TabbedButtonBar::TabsAtLeft: p1 = activeArea.getTopLeft(); p2 = activeArea.getTopRight(); break;
+ default: jassertfalse; break;
+ }
+
+ g.setGradientFill (ColourGradient (bkg.brighter (0.2f), (float) p1.x, (float) p1.y,
+ bkg.darker (0.1f), (float) p2.x, (float) p2.y, false));
+ g.fillRect (activeArea);
+ }
+
+ g.setColour (bkg.contrasting (0.3f));
+ Rectangle r (activeArea);
+
+ if (o != TabbedButtonBar::TabsAtBottom) g.fillRect (r.removeFromTop (1));
+ if (o != TabbedButtonBar::TabsAtTop) g.fillRect (r.removeFromBottom (1));
+ if (o != TabbedButtonBar::TabsAtRight) g.fillRect (r.removeFromLeft (1));
+ if (o != TabbedButtonBar::TabsAtLeft) g.fillRect (r.removeFromRight (1));
+
+ const float alpha = button.isEnabled() ? ((isMouseOver || isMouseDown) ? 1.0f : 0.8f) : 0.3f;
+ const Colour col (bkg.contrasting().withMultipliedAlpha (alpha));
+
+ const Rectangle area (button.getTextArea().toFloat());
+
+ float length = area.getWidth();
+ float depth = area.getHeight();
+
+ if (button.getTabbedButtonBar().isVertical())
+ std::swap (length, depth);
+
+ TextLayout textLayout;
+ createTabTextLayout (button, length, depth, col, textLayout);
+
+ AffineTransform t;
+
+ switch (o)
+ {
+ case TabbedButtonBar::TabsAtLeft: t = t.rotated (float_Pi * -0.5f).translated (area.getX(), area.getBottom()); break;
+ case TabbedButtonBar::TabsAtRight: t = t.rotated (float_Pi * 0.5f).translated (area.getRight(), area.getY()); break;
+ case TabbedButtonBar::TabsAtTop:
+ case TabbedButtonBar::TabsAtBottom: t = t.translated (area.getX(), area.getY()); break;
+ default: jassertfalse; break;
+ }
+
+ g.addTransform (t);
+ textLayout.draw (g, Rectangle (length, depth));
+}
+
+void LookAndFeel_V3::drawTreeviewPlusMinusBox (Graphics& g, const Rectangle& area,
+ Colour backgroundColour, bool isOpen, bool isMouseOver)
+{
+ Path p;
+ p.addTriangle (0.0f, 0.0f, 1.0f, isOpen ? 0.0f : 0.5f, isOpen ? 0.5f : 0.0f, 1.0f);
+
+ g.setColour (backgroundColour.contrasting().withAlpha (isMouseOver ? 0.5f : 0.3f));
+ g.fillPath (p, p.getTransformToScaleToFit (area.reduced (2, area.getHeight() / 4), true));
+}
+
+bool LookAndFeel_V3::areLinesDrawnForTreeView (TreeView&)
+{
+ return false;
+}
+
+int LookAndFeel_V3::getTreeViewIndentSize (TreeView&)
+{
+ return 20;
+}
+
+void LookAndFeel_V3::drawComboBox (Graphics& g, int width, int height, const bool isButtonDown,
+ int buttonX, int buttonY, int buttonW, int buttonH, ComboBox& box)
+{
+ g.fillAll (box.findColour (ComboBox::backgroundColourId));
+
+ const Colour buttonColour (box.findColour (ComboBox::buttonColourId));
+
+ if (box.isEnabled() && box.hasKeyboardFocus (false))
+ {
+ g.setColour (buttonColour);
+ g.drawRect (0, 0, width, height, 2);
+ }
+ else
+ {
+ g.setColour (box.findColour (ComboBox::outlineColourId));
+ g.drawRect (0, 0, width, height);
+ }
+
+ const float outlineThickness = box.isEnabled() ? (isButtonDown ? 1.2f : 0.5f) : 0.3f;
+
+ Path buttonShape;
+ buttonShape.addRectangle (buttonX + outlineThickness,
+ buttonY + outlineThickness,
+ buttonW - outlineThickness * 2.0f,
+ buttonH - outlineThickness * 2.0f);
+
+ drawButtonShape (g, buttonShape,
+ buttonColour.withMultipliedSaturation (box.hasKeyboardFocus (true) ? 1.3f : 0.9f)
+ .withMultipliedAlpha (box.isEnabled() ? 0.9f : 0.5f),
+ (float) height);
+
+ if (box.isEnabled())
+ {
+ const float arrowX = 0.3f;
+ const float arrowH = 0.2f;
+
+ Path p;
+ p.addTriangle (buttonX + buttonW * 0.5f, buttonY + buttonH * (0.45f - arrowH),
+ buttonX + buttonW * (1.0f - arrowX), buttonY + buttonH * 0.45f,
+ buttonX + buttonW * arrowX, buttonY + buttonH * 0.45f);
+
+ p.addTriangle (buttonX + buttonW * 0.5f, buttonY + buttonH * (0.55f + arrowH),
+ buttonX + buttonW * (1.0f - arrowX), buttonY + buttonH * 0.55f,
+ buttonX + buttonW * arrowX, buttonY + buttonH * 0.55f);
+
+ g.setColour (box.findColour (ComboBox::arrowColourId));
+ g.fillPath (p);
+ }
+}
+
+void LookAndFeel_V3::drawPopupMenuBackground (Graphics& g, int width, int height)
+{
+ g.fillAll (findColour (PopupMenu::backgroundColourId));
+ (void) width; (void) height;
+
+ #if ! JUCE_MAC
+ g.setColour (findColour (PopupMenu::textColourId).withAlpha (0.6f));
+ g.drawRect (0, 0, width, height);
+ #endif
+}
+
+void LookAndFeel_V3::drawKeymapChangeButton (Graphics& g, int width, int height,
+ Button& button, const String& keyDescription)
+{
+ const Colour textColour (button.findColour (0x100ad01 /*KeyMappingEditorComponent::textColourId*/, true));
+
+ if (keyDescription.isNotEmpty())
+ {
+ if (button.isEnabled())
+ {
+ g.setColour (textColour.withAlpha (button.isDown() ? 0.4f : (button.isOver() ? 0.2f : 0.1f)));
+ g.fillRoundedRectangle (button.getLocalBounds().toFloat(), 4.0f);
+ g.drawRoundedRectangle (button.getLocalBounds().toFloat(), 4.0f, 1.0f);
+ }
+
+ g.setColour (textColour);
+ g.setFont (height * 0.6f);
+ g.drawFittedText (keyDescription, 4, 0, width - 8, height, Justification::centred, 1);
+ }
+ else
+ {
+ const float thickness = 7.0f;
+ const float indent = 22.0f;
+
+ Path p;
+ p.addEllipse (0.0f, 0.0f, 100.0f, 100.0f);
+ p.addRectangle (indent, 50.0f - thickness, 100.0f - indent * 2.0f, thickness * 2.0f);
+ p.addRectangle (50.0f - thickness, indent, thickness * 2.0f, 50.0f - indent - thickness);
+ p.addRectangle (50.0f - thickness, 50.0f + thickness, thickness * 2.0f, 50.0f - indent - thickness);
+ p.setUsingNonZeroWinding (false);
+
+ g.setColour (textColour.darker(0.1f).withAlpha (button.isDown() ? 0.7f : (button.isOver() ? 0.5f : 0.3f)));
+ g.fillPath (p, p.getTransformToScaleToFit (2.0f, 2.0f, width - 4.0f, height - 4.0f, true));
+ }
+
+ if (button.hasKeyboardFocus (false))
+ {
+ g.setColour (textColour.withAlpha (0.4f));
+ g.drawRect (0, 0, width, height);
+ }
+}
diff --git a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V3.h b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V3.h
new file mode 100644
index 0000000000..b761cc81bf
--- /dev/null
+++ b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V3.h
@@ -0,0 +1,79 @@
+/*
+ ==============================================================================
+
+ This file is part of the JUCE library.
+ Copyright (c) 2013 - Raw Material Software Ltd.
+
+ Permission is granted to use this software under the terms of either:
+ a) the GPL v2 (or any later version)
+ b) the Affero GPL v3
+
+ Details of these licenses can be found 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.juce.com for more information.
+
+ ==============================================================================
+*/
+
+#ifndef JUCE_LOOKANDFEEL_V3_H_INCLUDED
+#define JUCE_LOOKANDFEEL_V3_H_INCLUDED
+
+//==============================================================================
+/**
+ The latest JUCE look-and-feel style, as introduced in 2013.
+ @see LookAndFeel, LookAndFeel_V1, LookAndFeel_V2
+*/
+class JUCE_API LookAndFeel_V3 : public LookAndFeel_V2
+{
+public:
+ LookAndFeel_V3();
+ ~LookAndFeel_V3();
+
+ //==============================================================================
+ void drawButtonBackground (Graphics&, Button&, const Colour& backgroundColour,
+ bool isMouseOverButton, bool isButtonDown) override;
+
+ void drawTableHeaderBackground (Graphics&, TableHeaderComponent&) override;
+
+ void drawTreeviewPlusMinusBox (Graphics&, const Rectangle& area,
+ Colour backgroundColour, bool isOpen, bool isMouseOver) override;
+ bool areLinesDrawnForTreeView (TreeView&) override;
+ int getTreeViewIndentSize (TreeView&) override;
+
+ void drawComboBox (Graphics& g, int width, int height, bool isButtonDown,
+ int buttonX, int buttonY, int buttonW, int buttonH, ComboBox& box) override;
+
+ void drawKeymapChangeButton (Graphics& g, int width, int height, Button& button, const String& keyDescription) override;
+
+ void drawPopupMenuBackground (Graphics& g, int width, int height) override;
+
+ int getTabButtonOverlap (int tabDepth) override;
+ int getTabButtonSpaceAroundImage() override;
+ void drawTabButton (TabBarButton&, Graphics&, bool isMouseOver, bool isMouseDown) override;
+
+ void drawStretchableLayoutResizerBar (Graphics&, int w, int h, bool isVerticalBar, bool isMouseOver, bool isMouseDragging) override;
+
+ bool areScrollbarButtonsVisible() override;
+
+ void drawScrollbar (Graphics&, ScrollBar&, int x, int y, int width, int height, bool isScrollbarVertical,
+ int thumbStartPosition, int thumbSize, bool isMouseOver, bool isMouseDown) override;
+
+ void drawConcertinaPanelHeader (Graphics&, const Rectangle& area, bool isMouseOver, bool isMouseDown,
+ ConcertinaPanel&, Component&) override;
+
+ static void createTabTextLayout (const TabBarButton& button, float length, float depth, Colour colour, TextLayout&);
+
+private:
+ Image backgroundTexture;
+ Colour backgroundTextureBaseColour;
+};
+
+
+#endif // JUCE_LOOKANDFEEL_H_INCLUDED
diff --git a/modules/juce_gui_basics/menus/juce_PopupMenu.h b/modules/juce_gui_basics/menus/juce_PopupMenu.h
index 3a20339137..e4622d6a8c 100644
--- a/modules/juce_gui_basics/menus/juce_PopupMenu.h
+++ b/modules/juce_gui_basics/menus/juce_PopupMenu.h
@@ -480,6 +480,62 @@ public:
void addCustomItem (int itemResultID, CustomComponent* customComponent,
const PopupMenu* optionalSubMenu = nullptr);
+
+ //==============================================================================
+ /** This abstract base class is implemented by LookAndFeel classes to provide
+ menu drawing functionality.
+ */
+ struct JUCE_API LookAndFeelMethods
+ {
+ virtual ~LookAndFeelMethods() {}
+
+ /** Fills the background of a popup menu component. */
+ virtual void drawPopupMenuBackground (Graphics&, int width, int height) = 0;
+
+ /** Draws one of the items in a popup menu. */
+ virtual void drawPopupMenuItem (Graphics&, int width, int height,
+ bool isSeparator, bool isActive, bool isHighlighted,
+ bool isTicked, bool hasSubMenu,
+ const String& text,
+ const String& shortcutKeyText,
+ Image* icon,
+ const Colour* textColour) = 0;
+
+ /** Returns the size and style of font to use in popup menus. */
+ virtual Font getPopupMenuFont() = 0;
+
+ virtual void drawPopupMenuUpDownArrow (Graphics&,
+ int width, int height,
+ bool isScrollUpArrow) = 0;
+
+ /** Finds the best size for an item in a popup menu. */
+ virtual void getIdealPopupMenuItemSize (const String& text,
+ bool isSeparator,
+ int standardMenuItemHeight,
+ int& idealWidth,
+ int& idealHeight) = 0;
+
+ virtual int getMenuWindowFlags() = 0;
+
+ virtual void drawMenuBarBackground (Graphics&, int width, int height,
+ bool isMouseOverBar,
+ MenuBarComponent&) = 0;
+
+ virtual int getDefaultMenuBarHeight() = 0;
+
+ virtual int getMenuBarItemWidth (MenuBarComponent&, int itemIndex, const String& itemText) = 0;
+
+ virtual Font getMenuBarFont (MenuBarComponent&, int itemIndex, const String& itemText) = 0;
+
+ virtual void drawMenuBarItem (Graphics&, int width, int height,
+ int itemIndex,
+ const String& itemText,
+ bool isMouseOverItem,
+ bool isMenuOpen,
+ bool isMouseOverBar,
+ MenuBarComponent&) = 0;
+ };
+
private:
//==============================================================================
JUCE_PUBLIC_IN_DLL_BUILD (class Item)
diff --git a/modules/juce_gui_basics/misc/juce_BubbleComponent.h b/modules/juce_gui_basics/misc/juce_BubbleComponent.h
index 11c3120422..200d27220a 100644
--- a/modules/juce_gui_basics/misc/juce_BubbleComponent.h
+++ b/modules/juce_gui_basics/misc/juce_BubbleComponent.h
@@ -136,6 +136,19 @@ public:
outlineColourId = 0x1000af1 /**< The colour to use for an outline around the bubble. */
};
+
+ //==============================================================================
+ /** This abstract base class is implemented by LookAndFeel classes.
+ */
+ struct JUCE_API LookAndFeelMethods
+ {
+ virtual ~LookAndFeelMethods() {}
+
+ virtual void drawBubble (Graphics&, BubbleComponent&,
+ const Point& positionOfTip,
+ const Rectangle& body) = 0;
+ };
+
protected:
//==============================================================================
/** Subclasses should override this to return the size of the content they
diff --git a/modules/juce_gui_basics/properties/juce_PropertyComponent.h b/modules/juce_gui_basics/properties/juce_PropertyComponent.h
index 9914ea5ccd..de45f3296a 100644
--- a/modules/juce_gui_basics/properties/juce_PropertyComponent.h
+++ b/modules/juce_gui_basics/properties/juce_PropertyComponent.h
@@ -102,6 +102,18 @@ public:
/** By default, this just repaints the component. */
void enablementChanged() override;
+ //==============================================================================
+ /** This abstract base class is implemented by LookAndFeel classes. */
+ struct JUCE_API LookAndFeelMethods
+ {
+ virtual ~LookAndFeelMethods() {}
+
+ virtual void drawPropertyPanelSectionHeader (Graphics&, const String& name, bool isOpen, int width, int height) = 0;
+ virtual void drawPropertyComponentBackground (Graphics&, int width, int height, PropertyComponent&) = 0;
+ virtual void drawPropertyComponentLabel (Graphics&, int width, int height, PropertyComponent&) = 0;
+ virtual Rectangle getPropertyComponentContentPosition (PropertyComponent&) = 0;
+ };
+
protected:
/** Used by the PropertyPanel to determine how high this component needs to be.
A subclass can update this value in its constructor but shouldn't alter it later
diff --git a/modules/juce_gui_basics/widgets/juce_ComboBox.h b/modules/juce_gui_basics/widgets/juce_ComboBox.h
index f03579e454..b258adff02 100644
--- a/modules/juce_gui_basics/widgets/juce_ComboBox.h
+++ b/modules/juce_gui_basics/widgets/juce_ComboBox.h
@@ -333,6 +333,25 @@ public:
arrowColourId = 0x1000e00, /**< The colour for the arrow shape that pops up the menu */
};
+ //==============================================================================
+ /** This abstract base class is implemented by LookAndFeel classes to provide
+ ComboBox functionality.
+ */
+ struct JUCE_API LookAndFeelMethods
+ {
+ virtual ~LookAndFeelMethods() {}
+
+ virtual void drawComboBox (Graphics&, int width, int height, bool isButtonDown,
+ int buttonX, int buttonY, int buttonW, int buttonH,
+ ComboBox&) = 0;
+
+ virtual Font getComboBoxFont (ComboBox&) = 0;
+
+ virtual Label* createComboBoxTextBox (ComboBox&) = 0;
+
+ virtual void positionComboBoxText (ComboBox&, Label& labelToPosition) = 0;
+ };
+
//==============================================================================
/** @internal */
void labelTextChanged (Label*) override;
diff --git a/modules/juce_gui_basics/widgets/juce_Label.h b/modules/juce_gui_basics/widgets/juce_Label.h
index fae999aed5..9094746241 100644
--- a/modules/juce_gui_basics/widgets/juce_Label.h
+++ b/modules/juce_gui_basics/widgets/juce_Label.h
@@ -249,6 +249,18 @@ public:
/** Returns the currently-visible text editor, or nullptr if none is open. */
TextEditor* getCurrentTextEditor() const noexcept;
+ //==============================================================================
+ /** This abstract base class is implemented by LookAndFeel classes to provide
+ label drawing functionality.
+ */
+ struct JUCE_API LookAndFeelMethods
+ {
+ virtual ~LookAndFeelMethods() {}
+
+ virtual void drawLabel (Graphics&, Label&) = 0;
+ virtual Font getLabelFont (Label&) = 0;
+ };
+
protected:
//==============================================================================
/** Creates the TextEditor component that will be used when the user has clicked on the label.
diff --git a/modules/juce_gui_basics/widgets/juce_ProgressBar.h b/modules/juce_gui_basics/widgets/juce_ProgressBar.h
index da7db46429..eae21cc988 100644
--- a/modules/juce_gui_basics/widgets/juce_ProgressBar.h
+++ b/modules/juce_gui_basics/widgets/juce_ProgressBar.h
@@ -90,6 +90,24 @@ public:
classes will probably use variations on this colour. */
};
+ //==============================================================================
+ /** This abstract base class is implemented by LookAndFeel classes. */
+ struct JUCE_API LookAndFeelMethods
+ {
+ virtual ~LookAndFeelMethods() {}
+
+ /** Draws a progress bar.
+
+ If the progress value is less than 0 or greater than 1.0, this should draw a spinning
+ bar that fills the whole space (i.e. to say that the app is still busy but the progress
+ isn't known). It can use the current time as a basis for playing an animation.
+
+ (Used by progress bars in AlertWindow).
+ */
+ virtual void drawProgressBar (Graphics&, ProgressBar&, int width, int height,
+ double progress, const String& textToShow) = 0;
+ };
+
protected:
//==============================================================================
/** @internal */
diff --git a/modules/juce_gui_basics/widgets/juce_Slider.h b/modules/juce_gui_basics/widgets/juce_Slider.h
index a6bb200d15..cec0e35181 100644
--- a/modules/juce_gui_basics/widgets/juce_Slider.h
+++ b/modules/juce_gui_basics/widgets/juce_Slider.h
@@ -762,6 +762,57 @@ public:
textBoxOutlineColourId = 0x1001700 /**< The colour to use for a border around the text-editor box. */
};
+ //==============================================================================
+ /** This abstract base class is implemented by LookAndFeel classes to provide
+ slider drawing functionality.
+ */
+ struct JUCE_API LookAndFeelMethods
+ {
+ virtual ~LookAndFeelMethods() {}
+
+ //==============================================================================
+ virtual void drawLinearSlider (Graphics&,
+ int x, int y, int width, int height,
+ float sliderPos,
+ float minSliderPos,
+ float maxSliderPos,
+ const Slider::SliderStyle,
+ Slider&) = 0;
+
+ virtual void drawLinearSliderBackground (Graphics&,
+ int x, int y, int width, int height,
+ float sliderPos,
+ float minSliderPos,
+ float maxSliderPos,
+ const Slider::SliderStyle style,
+ Slider&) = 0;
+
+ virtual void drawLinearSliderThumb (Graphics&,
+ int x, int y, int width, int height,
+ float sliderPos,
+ float minSliderPos,
+ float maxSliderPos,
+ const Slider::SliderStyle,
+ Slider&) = 0;
+
+ virtual int getSliderThumbRadius (Slider&) = 0;
+
+ virtual void drawRotarySlider (Graphics&,
+ int x, int y, int width, int height,
+ float sliderPosProportional,
+ float rotaryStartAngle,
+ float rotaryEndAngle,
+ Slider&) = 0;
+
+ virtual Button* createSliderButton (bool isIncrement) = 0;
+ virtual Label* createSliderTextBox (Slider&) = 0;
+
+ virtual ImageEffectFilter* getSliderEffect() = 0;
+
+ virtual Font getSliderPopupFont() = 0;
+ virtual int getSliderPopupPlacement() = 0;
+ };
+
protected:
//==============================================================================
/** @internal */
diff --git a/modules/juce_gui_basics/widgets/juce_TableHeaderComponent.h b/modules/juce_gui_basics/widgets/juce_TableHeaderComponent.h
index 845dec4537..b9eba92d46 100644
--- a/modules/juce_gui_basics/widgets/juce_TableHeaderComponent.h
+++ b/modules/juce_gui_basics/widgets/juce_TableHeaderComponent.h
@@ -366,6 +366,19 @@ public:
*/
virtual void reactToMenuItem (int menuReturnId, int columnIdClicked);
+ //==============================================================================
+ /** This abstract base class is implemented by LookAndFeel classes. */
+ struct JUCE_API LookAndFeelMethods
+ {
+ virtual ~LookAndFeelMethods() {}
+
+ virtual void drawTableHeaderBackground (Graphics&, TableHeaderComponent&) = 0;
+
+ virtual void drawTableHeaderColumn (Graphics&, const String& columnName, int columnId,
+ int width, int height,
+ bool isMouseOver, bool isMouseDown, int columnFlags) = 0;
+ };
+
//==============================================================================
/** @internal */
void paint (Graphics&) override;
diff --git a/modules/juce_gui_basics/widgets/juce_TextEditor.h b/modules/juce_gui_basics/widgets/juce_TextEditor.h
index f77f7f8197..f4a9784ba3 100644
--- a/modules/juce_gui_basics/widgets/juce_TextEditor.h
+++ b/modules/juce_gui_basics/widgets/juce_TextEditor.h
@@ -580,6 +580,20 @@ public:
void setInputRestrictions (int maxTextLength,
const String& allowedCharacters = String::empty);
+ //==============================================================================
+ /** This abstract base class is implemented by LookAndFeel classes to provide
+ TextEditor drawing functionality.
+ */
+ struct JUCE_API LookAndFeelMethods
+ {
+ virtual ~LookAndFeelMethods() {}
+
+ virtual void fillTextEditorBackground (Graphics&, int width, int height, TextEditor&) = 0;
+ virtual void drawTextEditorOutline (Graphics&, int width, int height, TextEditor&) = 0;
+
+ virtual CaretComponent* createCaretComponent (Component* keyFocusOwner) = 0;
+ };
+
//==============================================================================
/** @internal */
void paint (Graphics&) override;
diff --git a/modules/juce_gui_basics/widgets/juce_Toolbar.h b/modules/juce_gui_basics/widgets/juce_Toolbar.h
index d9505812fe..1a85726e53 100644
--- a/modules/juce_gui_basics/widgets/juce_Toolbar.h
+++ b/modules/juce_gui_basics/widgets/juce_Toolbar.h
@@ -267,6 +267,24 @@ public:
bool restoreFromString (ToolbarItemFactory& factoryToUse,
const String& savedVersion);
+ //==============================================================================
+ /** This abstract base class is implemented by LookAndFeel classes. */
+ struct JUCE_API LookAndFeelMethods
+ {
+ virtual ~LookAndFeelMethods() {}
+
+ virtual void paintToolbarBackground (Graphics&, int width, int height, Toolbar&) = 0;
+
+ virtual Button* createToolbarMissingItemsButton (Toolbar&) = 0;
+
+ virtual void paintToolbarButtonBackground (Graphics&, int width, int height,
+ bool isMouseOver, bool isMouseDown,
+ ToolbarItemComponent&) = 0;
+
+ virtual void paintToolbarButtonLabel (Graphics&, int x, int y, int width, int height,
+ const String& text, ToolbarItemComponent&) = 0;
+ };
+
//==============================================================================
/** @internal */
void paint (Graphics&) override;
diff --git a/modules/juce_gui_basics/widgets/juce_TreeView.cpp b/modules/juce_gui_basics/widgets/juce_TreeView.cpp
index 59c5b90f8c..3a49df3ec6 100644
--- a/modules/juce_gui_basics/widgets/juce_TreeView.cpp
+++ b/modules/juce_gui_basics/widgets/juce_TreeView.cpp
@@ -439,7 +439,7 @@ TreeView::TreeView (const String& name)
: Component (name),
viewport (new TreeViewport()),
rootItem (nullptr),
- indentSize (24),
+ indentSize (-1),
defaultOpenness (false),
needsRecalculating (true),
rootItemVisible (true),
@@ -522,6 +522,12 @@ void TreeView::setIndentSize (const int newIndentSize)
}
}
+int TreeView::getIndentSize() noexcept
+{
+ return indentSize >= 0 ? indentSize
+ : getLookAndFeel().getTreeViewIndentSize (*this);
+}
+
void TreeView::setDefaultOpenness (const bool isOpenByDefault)
{
if (defaultOpenness != isOpenByDefault)
@@ -860,7 +866,7 @@ void TreeView::recalculateIfNeeded()
//==============================================================================
struct TreeView::InsertPoint
{
- InsertPoint (const TreeView& view, const StringArray& files,
+ InsertPoint (TreeView& view, const StringArray& files,
const DragAndDropTarget::SourceDetails& dragSourceDetails)
: pos (dragSourceDetails.localPosition),
item (view.getItemAt (dragSourceDetails.localPosition.y)),
@@ -1125,7 +1131,8 @@ TreeViewItem::TreeViewItem()
totalWidth (0),
selected (false),
redrawNeeded (true),
- drawLinesInside (true),
+ drawLinesInside (false),
+ drawLinesSet (false),
drawsInLeftMargin (false),
openness (opennessDefault)
{
@@ -1495,6 +1502,12 @@ namespace TreeViewHelpers
}
}
+bool TreeViewItem::areLinesDrawn() const
+{
+ return drawLinesSet ? drawLinesInside
+ : (ownerView != nullptr && ownerView->getLookAndFeel().areLinesDrawnForTreeView (*ownerView));
+}
+
void TreeViewItem::paintRecursively (Graphics& g, int width)
{
jassert (ownerView != nullptr);
@@ -1526,11 +1539,12 @@ void TreeViewItem::paintRecursively (Graphics& g, int width)
{
float x = (depth + 0.5f) * indentWidth;
- if (parentItem != nullptr && parentItem->drawLinesInside)
+ const bool parentLinesDrawn = parentItem != nullptr && parentItem->areLinesDrawn();
+
+ if (parentLinesDrawn)
paintVerticalConnectingLine (g, Line (x, 0, x, isLastOfSiblings() ? halfH : (float) itemHeight));
- if ((parentItem != nullptr && parentItem->drawLinesInside)
- || (parentItem == nullptr && drawLinesInside))
+ if (parentLinesDrawn || (parentItem == nullptr && areLinesDrawn()))
paintHorizontalConnectingLine (g, Line (x, halfH, x + indentWidth / 2, halfH));
{
@@ -1541,8 +1555,7 @@ void TreeViewItem::paintRecursively (Graphics& g, int width)
{
x -= (float) indentWidth;
- if ((p->parentItem == nullptr || p->parentItem->drawLinesInside)
- && ! p->isLastOfSiblings())
+ if ((p->parentItem == nullptr || p->parentItem->areLinesDrawn()) && ! p->isLastOfSiblings())
p->paintVerticalConnectingLine (g, Line (x, 0, x, (float) itemHeight));
p = p->parentItem;
@@ -1730,6 +1743,7 @@ int TreeViewItem::getRowNumberInTree() const noexcept
void TreeViewItem::setLinesDrawnForSubItems (const bool drawLines) noexcept
{
drawLinesInside = drawLines;
+ drawLinesSet = true;
}
TreeViewItem* TreeViewItem::getNextVisibleItem (const bool recurse) const noexcept
diff --git a/modules/juce_gui_basics/widgets/juce_TreeView.h b/modules/juce_gui_basics/widgets/juce_TreeView.h
index 43a3c00bb9..2b18c67289 100644
--- a/modules/juce_gui_basics/widgets/juce_TreeView.h
+++ b/modules/juce_gui_basics/widgets/juce_TreeView.h
@@ -192,7 +192,7 @@ public:
bool areAllParentsOpen() const noexcept;
/** Changes whether lines are drawn to connect any sub-items to this item.
- By default, line-drawing is turned on.
+ By default, line-drawing is turned on according to LookAndFeel::areLinesDrawnForTreeView().
*/
void setLinesDrawnForSubItems (bool shouldDrawLines) noexcept;
@@ -542,6 +542,7 @@ private:
bool selected : 1;
bool redrawNeeded : 1;
bool drawLinesInside : 1;
+ bool drawLinesSet : 1;
bool drawsInLeftMargin : 1;
unsigned int openness : 2;
@@ -566,6 +567,7 @@ private:
XmlElement* getOpennessState (bool canReturnNull) const;
bool removeSubItemFromList (int index, bool deleteItem);
void removeAllSubItemsFromList();
+ bool areLinesDrawn() const;
#if JUCE_CATCH_DEPRECATED_CODE_MISUSE
// The parameters for these methods have changed - please update your code!
@@ -738,7 +740,7 @@ public:
/** Returns the number of pixels by which each nested level of the tree is indented.
@see setIndentSize
*/
- int getIndentSize() const noexcept { return indentSize; }
+ int getIndentSize() noexcept;
/** Changes the distance by which each nested level of the tree is indented.
@see getIndentSize
@@ -802,6 +804,21 @@ public:
selectedItemBackgroundColourId = 0x1000503 /**< The colour to use to fill the background of any selected items. */
};
+ //==============================================================================
+ /** This abstract base class is implemented by LookAndFeel classes to provide
+ treeview drawing functionality.
+ */
+ struct JUCE_API LookAndFeelMethods
+ {
+ virtual ~LookAndFeelMethods() {}
+
+ virtual void drawTreeviewPlusMinusBox (Graphics&, const Rectangle& area,
+ Colour backgroundColour, bool isItemOpen, bool isMouseOver) = 0;
+
+ virtual bool areLinesDrawnForTreeView (TreeView&) = 0;
+ virtual int getTreeViewIndentSize (TreeView&) = 0;
+ };
+
//==============================================================================
/** @internal */
void paint (Graphics&) override;
diff --git a/modules/juce_gui_basics/windows/juce_AlertWindow.h b/modules/juce_gui_basics/windows/juce_AlertWindow.h
index 7180ab7eea..2d3601354f 100644
--- a/modules/juce_gui_basics/windows/juce_AlertWindow.h
+++ b/modules/juce_gui_basics/windows/juce_AlertWindow.h
@@ -417,6 +417,32 @@ public:
outlineColourId = 0x1001820 /**< An optional colour to use to draw a border around the window. */
};
+ //==============================================================================
+ /** This abstract base class is implemented by LookAndFeel classes to provide
+ alert-window drawing functionality.
+ */
+ struct JUCE_API LookAndFeelMethods
+ {
+ virtual ~LookAndFeelMethods() {}
+
+ virtual AlertWindow* createAlertWindow (const String& title, const String& message,
+ const String& button1,
+ const String& button2,
+ const String& button3,
+ AlertWindow::AlertIconType iconType,
+ int numButtons,
+ Component* associatedComponent) = 0;
+
+ virtual void drawAlertBox (Graphics&, AlertWindow&, const Rectangle& textArea, TextLayout&) = 0;
+
+ virtual int getAlertBoxWindowFlags() = 0;
+
+ virtual int getAlertWindowButtonHeight() = 0;
+
+ virtual Font getAlertWindowMessageFont() = 0;
+ virtual Font getAlertWindowFont() = 0;
+ };
+
protected:
//==============================================================================
/** @internal */
diff --git a/modules/juce_gui_basics/windows/juce_CallOutBox.h b/modules/juce_gui_basics/windows/juce_CallOutBox.h
index 22a9612b61..fab2e6b5fc 100644
--- a/modules/juce_gui_basics/windows/juce_CallOutBox.h
+++ b/modules/juce_gui_basics/windows/juce_CallOutBox.h
@@ -118,6 +118,15 @@ public:
const Rectangle& areaToPointTo,
Component* parentComponent);
+ //==============================================================================
+ /** This abstract base class is implemented by LookAndFeel classes. */
+ struct JUCE_API LookAndFeelMethods
+ {
+ virtual ~LookAndFeelMethods() {}
+
+ virtual void drawCallOutBoxBackground (CallOutBox&, Graphics&, const Path&, Image& cachedImage) = 0;
+ };
+
//==============================================================================
/** @internal */
void paint (Graphics&) override;
diff --git a/modules/juce_gui_basics/windows/juce_DocumentWindow.h b/modules/juce_gui_basics/windows/juce_DocumentWindow.h
index 0bf7cc8a91..17457bdccc 100644
--- a/modules/juce_gui_basics/windows/juce_DocumentWindow.h
+++ b/modules/juce_gui_basics/windows/juce_DocumentWindow.h
@@ -223,6 +223,30 @@ public:
and feel class how this is used. */
};
+ //==============================================================================
+ /** This abstract base class is implemented by LookAndFeel classes to provide
+ window drawing functionality.
+ */
+ struct JUCE_API LookAndFeelMethods
+ {
+ virtual ~LookAndFeelMethods() {}
+
+ virtual void drawDocumentWindowTitleBar (DocumentWindow&,
+ Graphics&, int w, int h,
+ int titleSpaceX, int titleSpaceW,
+ const Image* icon,
+ bool drawTitleTextOnLeft) = 0;
+
+ virtual Button* createDocumentWindowButton (int buttonType) = 0;
+
+ virtual void positionDocumentWindowButtons (DocumentWindow&,
+ int titleBarX, int titleBarY, int titleBarW, int titleBarH,
+ Button* minimiseButton,
+ Button* maximiseButton,
+ Button* closeButton,
+ bool positionTitleBarButtonsOnLeft) = 0;
+ };
+
//==============================================================================
#ifndef DOXYGEN
/** @internal */
diff --git a/modules/juce_gui_basics/windows/juce_ResizableWindow.h b/modules/juce_gui_basics/windows/juce_ResizableWindow.h
index e2076d0335..7a7ffd74a0 100644
--- a/modules/juce_gui_basics/windows/juce_ResizableWindow.h
+++ b/modules/juce_gui_basics/windows/juce_ResizableWindow.h
@@ -306,8 +306,23 @@ public:
bool resizeToFit = false));
using TopLevelWindow::addToDesktop;
-protected:
//==============================================================================
+ /** This abstract base class is implemented by LookAndFeel classes to provide
+ window drawing functionality.
+ */
+ struct JUCE_API LookAndFeelMethods
+ {
+ virtual ~LookAndFeelMethods() {}
+
+ //==============================================================================
+ virtual void drawCornerResizer (Graphics&, int w, int h, bool isMouseOver, bool isMouseDragging) = 0;
+ virtual void drawResizableFrame (Graphics&, int w, int h, const BorderSize&) = 0;
+
+ virtual void fillResizableWindowBackground (Graphics&, int w, int h, const BorderSize&, ResizableWindow&) = 0;
+ virtual void drawResizableWindowBorder (Graphics&, int w, int h, const BorderSize& border, ResizableWindow&) = 0;
+ };
+
+protected:
/** @internal */
void paint (Graphics&) override;
/** (if overriding this, make sure you call ResizableWindow::moved() in your subclass) */
diff --git a/modules/juce_gui_basics/windows/juce_TooltipWindow.h b/modules/juce_gui_basics/windows/juce_TooltipWindow.h
index 63564be36a..e6515ee2f3 100644
--- a/modules/juce_gui_basics/windows/juce_TooltipWindow.h
+++ b/modules/juce_gui_basics/windows/juce_TooltipWindow.h
@@ -96,6 +96,17 @@ public:
outlineColourId = 0x1001c10 /**< The colour to use to draw an outline around the tooltip. */
};
+ //==============================================================================
+ /** This abstract base class is implemented by LookAndFeel classes to provide
+ window drawing functionality.
+ */
+ struct JUCE_API LookAndFeelMethods
+ {
+ virtual ~LookAndFeelMethods() {}
+
+ virtual void getTooltipSize (const String& tipText, int& width, int& height) = 0;
+ virtual void drawTooltip (Graphics&, const String& text, int width, int height) = 0;
+ };
private:
//==============================================================================
diff --git a/modules/juce_gui_extra/juce_gui_extra.cpp b/modules/juce_gui_extra/juce_gui_extra.cpp
index 2b9037d269..3b2eb9453a 100644
--- a/modules/juce_gui_extra/juce_gui_extra.cpp
+++ b/modules/juce_gui_extra/juce_gui_extra.cpp
@@ -86,7 +86,6 @@ namespace juce
#include "code_editor/juce_CodeDocument.cpp"
#include "code_editor/juce_CodeEditorComponent.cpp"
#include "code_editor/juce_CPlusPlusCodeTokeniser.cpp"
-#include "lookandfeel/juce_OldSchoolLookAndFeel.cpp"
#include "misc/juce_BubbleMessageComponent.cpp"
#include "misc/juce_ColourSelector.cpp"
#include "misc/juce_KeyMappingEditorComponent.cpp"
diff --git a/modules/juce_gui_extra/juce_gui_extra.h b/modules/juce_gui_extra/juce_gui_extra.h
index 9786520fa5..aead733e32 100644
--- a/modules/juce_gui_extra/juce_gui_extra.h
+++ b/modules/juce_gui_extra/juce_gui_extra.h
@@ -50,7 +50,6 @@ namespace juce
#include "embedding/juce_ActiveXControlComponent.h"
#include "embedding/juce_NSViewComponent.h"
#include "embedding/juce_UIViewComponent.h"
-#include "lookandfeel/juce_OldSchoolLookAndFeel.h"
#include "misc/juce_AppleRemote.h"
#include "misc/juce_BubbleMessageComponent.h"
#include "misc/juce_ColourSelector.h"
diff --git a/modules/juce_gui_extra/lookandfeel/juce_OldSchoolLookAndFeel.h b/modules/juce_gui_extra/lookandfeel/juce_OldSchoolLookAndFeel.h
deleted file mode 100644
index c483afdb9d..0000000000
--- a/modules/juce_gui_extra/lookandfeel/juce_OldSchoolLookAndFeel.h
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- ==============================================================================
-
- This file is part of the JUCE library.
- Copyright (c) 2013 - Raw Material Software Ltd.
-
- Permission is granted to use this software under the terms of either:
- a) the GPL v2 (or any later version)
- b) the Affero GPL v3
-
- Details of these licenses can be found 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.juce.com for more information.
-
- ==============================================================================
-*/
-
-#ifndef JUCE_OLDSCHOOLLOOKANDFEEL_H_INCLUDED
-#define JUCE_OLDSCHOOLLOOKANDFEEL_H_INCLUDED
-
-
-//==============================================================================
-/**
- The original Juce look-and-feel.
-
-*/
-class JUCE_API OldSchoolLookAndFeel : public LookAndFeel
-{
-public:
- //==============================================================================
- /** Creates the default JUCE look and feel. */
- OldSchoolLookAndFeel();
-
- /** Destructor. */
- virtual ~OldSchoolLookAndFeel();
-
- //==============================================================================
- /** Draws the lozenge-shaped background for a standard button. */
- virtual void drawButtonBackground (Graphics& g,
- Button& button,
- const Colour& backgroundColour,
- bool isMouseOverButton,
- bool isButtonDown);
-
-
- /** Draws the contents of a standard ToggleButton. */
- virtual void drawToggleButton (Graphics& g,
- ToggleButton& button,
- bool isMouseOverButton,
- bool isButtonDown);
-
- virtual void drawTickBox (Graphics& g,
- Component& component,
- float x, float y, float w, float h,
- bool ticked,
- bool isEnabled,
- bool isMouseOverButton,
- bool isButtonDown);
-
- //==============================================================================
- virtual void drawProgressBar (Graphics& g, ProgressBar& progressBar,
- int width, int height,
- double progress, const String& textToShow);
-
- //==============================================================================
- virtual void drawScrollbarButton (Graphics& g,
- ScrollBar& scrollbar,
- int width, int height,
- int buttonDirection,
- bool isScrollbarVertical,
- bool isMouseOverButton,
- bool isButtonDown);
-
- virtual void drawScrollbar (Graphics& g,
- ScrollBar& scrollbar,
- int x, int y,
- int width, int height,
- bool isScrollbarVertical,
- int thumbStartPosition,
- int thumbSize,
- bool isMouseOver,
- bool isMouseDown);
-
- virtual ImageEffectFilter* getScrollbarEffect();
-
- //==============================================================================
- virtual void drawTextEditorOutline (Graphics& g,
- int width, int height,
- TextEditor& textEditor);
-
- //==============================================================================
- /** Fills the background of a popup menu component. */
- virtual void drawPopupMenuBackground (Graphics& g, int width, int height);
-
- virtual void drawMenuBarBackground (Graphics& g, int width, int height,
- bool isMouseOverBar,
- MenuBarComponent& menuBar);
-
- //==============================================================================
- virtual void drawComboBox (Graphics& g, int width, int height,
- bool isButtonDown,
- int buttonX, int buttonY,
- int buttonW, int buttonH,
- ComboBox& box);
-
- virtual Font getComboBoxFont (ComboBox& box);
-
- //==============================================================================
- virtual void drawLinearSlider (Graphics& g,
- int x, int y,
- int width, int height,
- float sliderPos,
- float minSliderPos,
- float maxSliderPos,
- const Slider::SliderStyle style,
- Slider& slider);
-
- virtual int getSliderThumbRadius (Slider& slider);
-
- virtual Button* createSliderButton (bool isIncrement);
-
- virtual ImageEffectFilter* getSliderEffect();
-
- //==============================================================================
- virtual void drawCornerResizer (Graphics& g,
- int w, int h,
- bool isMouseOver,
- bool isMouseDragging);
-
- virtual Button* createDocumentWindowButton (int buttonType);
-
- virtual void positionDocumentWindowButtons (DocumentWindow& window,
- int titleBarX, int titleBarY,
- int titleBarW, int titleBarH,
- Button* minimiseButton,
- Button* maximiseButton,
- Button* closeButton,
- bool positionTitleBarButtonsOnLeft);
-
-
-private:
- //==============================================================================
- DropShadowEffect scrollbarShadow;
-
- JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (OldSchoolLookAndFeel)
-};
-
-
-#endif // JUCE_OLDSCHOOLLOOKANDFEEL_H_INCLUDED
diff --git a/modules/juce_gui_extra/misc/juce_KeyMappingEditorComponent.cpp b/modules/juce_gui_extra/misc/juce_KeyMappingEditorComponent.cpp
index ce2dbf83c6..366f9bbca3 100644
--- a/modules/juce_gui_extra/misc/juce_KeyMappingEditorComponent.cpp
+++ b/modules/juce_gui_extra/misc/juce_KeyMappingEditorComponent.cpp
@@ -294,20 +294,14 @@ public:
String getUniqueName() const override { return categoryName + "_cat"; }
bool mightContainSubItems() override { return true; }
- int getItemHeight() const override { return 24; }
+ int getItemHeight() const override { return 22; }
void paintItem (Graphics& g, int width, int height) override
{
g.setFont (Font (height * 0.7f, Font::bold));
g.setColour (owner.findColour (KeyMappingEditorComponent::textColourId));
- g.drawText (TRANS (categoryName), 2, 0, width - 2, height,
- Justification::centredLeft, true);
- }
-
- void paintOpenCloseButton (Graphics& g, const Rectangle& area, Colour backgroundColour, bool isMouseOver) override
- {
- TreeViewItem::paintOpenCloseButton (g, area.reduced (4), backgroundColour, isMouseOver);
+ g.drawText (TRANS (categoryName), 2, 0, width - 2, height, Justification::centredLeft, true);
}
void itemOpennessChanged (bool isNowOpen) override
@@ -418,6 +412,7 @@ KeyMappingEditorComponent::KeyMappingEditorComponent (KeyPressMappingSet& mappin
tree.setRootItemVisible (false);
tree.setDefaultOpenness (true);
tree.setRootItem (treeItem);
+ tree.setIndentSize (12);
}
KeyMappingEditorComponent::~KeyMappingEditorComponent()