| @@ -193,7 +193,6 @@ OBJECTS := \ | |||
| $(OBJDIR)/juce_DragAndDropContainer_553e412.o \ | |||
| $(OBJDIR)/juce_MouseCursor_afb68802.o \ | |||
| $(OBJDIR)/juce_MouseEvent_f6ca6078.o \ | |||
| $(OBJDIR)/juce_MouseHoverDetector_d4af7a00.o \ | |||
| $(OBJDIR)/juce_MouseInputSource_8904aa23.o \ | |||
| $(OBJDIR)/juce_MouseListener_eb73f8a0.o \ | |||
| $(OBJDIR)/juce_MarkerList_2fbb4ef.o \ | |||
| @@ -215,7 +214,6 @@ OBJECTS := \ | |||
| $(OBJDIR)/juce_BubbleMessageComponent_22f737f9.o \ | |||
| $(OBJDIR)/juce_ColourSelector_ac8bb1e2.o \ | |||
| $(OBJDIR)/juce_DropShadower_5903f9f3.o \ | |||
| $(OBJDIR)/juce_MagnifierComponent_58d7efb6.o \ | |||
| $(OBJDIR)/juce_MidiKeyboardComponent_896e2ac8.o \ | |||
| $(OBJDIR)/juce_OpenGLComponent_73944221.o \ | |||
| $(OBJDIR)/juce_PreferencesPanel_dbc7d503.o \ | |||
| @@ -1139,11 +1137,6 @@ $(OBJDIR)/juce_MouseEvent_f6ca6078.o: ../../src/gui/components/mouse/juce_MouseE | |||
| @echo "Compiling juce_MouseEvent.cpp" | |||
| @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
| $(OBJDIR)/juce_MouseHoverDetector_d4af7a00.o: ../../src/gui/components/mouse/juce_MouseHoverDetector.cpp | |||
| -@mkdir -p $(OBJDIR) | |||
| @echo "Compiling juce_MouseHoverDetector.cpp" | |||
| @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
| $(OBJDIR)/juce_MouseInputSource_8904aa23.o: ../../src/gui/components/mouse/juce_MouseInputSource.cpp | |||
| -@mkdir -p $(OBJDIR) | |||
| @echo "Compiling juce_MouseInputSource.cpp" | |||
| @@ -1249,11 +1242,6 @@ $(OBJDIR)/juce_DropShadower_5903f9f3.o: ../../src/gui/components/special/juce_Dr | |||
| @echo "Compiling juce_DropShadower.cpp" | |||
| @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
| $(OBJDIR)/juce_MagnifierComponent_58d7efb6.o: ../../src/gui/components/special/juce_MagnifierComponent.cpp | |||
| -@mkdir -p $(OBJDIR) | |||
| @echo "Compiling juce_MagnifierComponent.cpp" | |||
| @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
| $(OBJDIR)/juce_MidiKeyboardComponent_896e2ac8.o: ../../src/gui/components/special/juce_MidiKeyboardComponent.cpp | |||
| -@mkdir -p $(OBJDIR) | |||
| @echo "Compiling juce_MidiKeyboardComponent.cpp" | |||
| @@ -162,7 +162,6 @@ | |||
| E6971F06B78AE76C35E1A19C = { isa = PBXBuildFile; fileRef = 3D74B30C63465C32E26D8E33; }; | |||
| 6629D535AE1ABE35A0D53C69 = { isa = PBXBuildFile; fileRef = 944BC51C440C167C5B2A23E3; }; | |||
| DD4599D0A8117B025B477DE1 = { isa = PBXBuildFile; fileRef = 067D84F9291770240D1AB5B4; }; | |||
| 968B31D8101A937444C6DFB3 = { isa = PBXBuildFile; fileRef = 2531C57B0C861A48E3F3A673; }; | |||
| E064E329741F36C329989203 = { isa = PBXBuildFile; fileRef = 441257DD380138C03568FCBD; }; | |||
| 61E659ADBF9D832ED8F24540 = { isa = PBXBuildFile; fileRef = 2886656DF7ACC9DDC888827F; }; | |||
| 9379C833B875207E5DFC5A3F = { isa = PBXBuildFile; fileRef = 82DFF1BD3665DC32672FCCE8; }; | |||
| @@ -184,7 +183,6 @@ | |||
| 710BF477DE534CF18BD68959 = { isa = PBXBuildFile; fileRef = 4C3C3AFC3D97C1378B7D7435; }; | |||
| E5DA150E966B948C4CB4EFDB = { isa = PBXBuildFile; fileRef = 0A20E7E561633610A76A34AB; }; | |||
| E96B477EB51FC152AC2EA6BD = { isa = PBXBuildFile; fileRef = 9C1D5CDA61FB51F657DA8B22; }; | |||
| E847271789B669289C899425 = { isa = PBXBuildFile; fileRef = 4A6A78512816BA378FFF348A; }; | |||
| CF36EF39EEAB7A4744C5D310 = { isa = PBXBuildFile; fileRef = 3C8C1AAF32DFECB89EB83271; }; | |||
| 372B6FF28C49018F5191C517 = { isa = PBXBuildFile; fileRef = 1317F0BE5EC80371F744967B; }; | |||
| D9AAB4AE220010CD526C87D2 = { isa = PBXBuildFile; fileRef = A34C0E63D41CFF5E55FD1D9E; }; | |||
| @@ -702,7 +700,6 @@ | |||
| 502B3625329816EA6330465F = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = juce_MenuBarModel.h; path = ../../src/gui/components/menus/juce_MenuBarModel.h; sourceTree = SOURCE_ROOT; }; | |||
| 6AACD2FD239E39F87B666C6F = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = juce_PopupMenu.cpp; path = ../../src/gui/components/menus/juce_PopupMenu.cpp; sourceTree = SOURCE_ROOT; }; | |||
| A563BC883D801CF5956DC4BC = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = juce_PopupMenu.h; path = ../../src/gui/components/menus/juce_PopupMenu.h; sourceTree = SOURCE_ROOT; }; | |||
| 7B0A07F03743BCFD719863CF = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = juce_PopupMenuCustomComponent.h; path = ../../src/gui/components/menus/juce_PopupMenuCustomComponent.h; sourceTree = SOURCE_ROOT; }; | |||
| 9E4B3BAB9BDB06B60D28DF48 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = juce_ComponentDragger.cpp; path = ../../src/gui/components/mouse/juce_ComponentDragger.cpp; sourceTree = SOURCE_ROOT; }; | |||
| BCDD702ED33BADF3FC19384C = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = juce_ComponentDragger.h; path = ../../src/gui/components/mouse/juce_ComponentDragger.h; sourceTree = SOURCE_ROOT; }; | |||
| 3D74B30C63465C32E26D8E33 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = juce_DragAndDropContainer.cpp; path = ../../src/gui/components/mouse/juce_DragAndDropContainer.cpp; sourceTree = SOURCE_ROOT; }; | |||
| @@ -714,8 +711,6 @@ | |||
| 136109B3076DDA7B2E01CF90 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = juce_MouseCursor.h; path = ../../src/gui/components/mouse/juce_MouseCursor.h; sourceTree = SOURCE_ROOT; }; | |||
| 067D84F9291770240D1AB5B4 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = juce_MouseEvent.cpp; path = ../../src/gui/components/mouse/juce_MouseEvent.cpp; sourceTree = SOURCE_ROOT; }; | |||
| 50C02B44D0CB18898F575B1E = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = juce_MouseEvent.h; path = ../../src/gui/components/mouse/juce_MouseEvent.h; sourceTree = SOURCE_ROOT; }; | |||
| 2531C57B0C861A48E3F3A673 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = juce_MouseHoverDetector.cpp; path = ../../src/gui/components/mouse/juce_MouseHoverDetector.cpp; sourceTree = SOURCE_ROOT; }; | |||
| D6743AC444E80E191B8C8FE3 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = juce_MouseHoverDetector.h; path = ../../src/gui/components/mouse/juce_MouseHoverDetector.h; sourceTree = SOURCE_ROOT; }; | |||
| 441257DD380138C03568FCBD = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = juce_MouseInputSource.cpp; path = ../../src/gui/components/mouse/juce_MouseInputSource.cpp; sourceTree = SOURCE_ROOT; }; | |||
| 07CF9AF337779EB486AC92BF = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = juce_MouseInputSource.h; path = ../../src/gui/components/mouse/juce_MouseInputSource.h; sourceTree = SOURCE_ROOT; }; | |||
| 2886656DF7ACC9DDC888827F = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = juce_MouseListener.cpp; path = ../../src/gui/components/mouse/juce_MouseListener.cpp; sourceTree = SOURCE_ROOT; }; | |||
| @@ -760,8 +755,6 @@ | |||
| CD9F817B7EF0DA080668A3A8 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = juce_ColourSelector.h; path = ../../src/gui/components/special/juce_ColourSelector.h; sourceTree = SOURCE_ROOT; }; | |||
| 9C1D5CDA61FB51F657DA8B22 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = juce_DropShadower.cpp; path = ../../src/gui/components/special/juce_DropShadower.cpp; sourceTree = SOURCE_ROOT; }; | |||
| 7DB8CFB77EA690ACF54C63B4 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = juce_DropShadower.h; path = ../../src/gui/components/special/juce_DropShadower.h; sourceTree = SOURCE_ROOT; }; | |||
| 4A6A78512816BA378FFF348A = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = juce_MagnifierComponent.cpp; path = ../../src/gui/components/special/juce_MagnifierComponent.cpp; sourceTree = SOURCE_ROOT; }; | |||
| 3C61804B771D33BED18FADE4 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = juce_MagnifierComponent.h; path = ../../src/gui/components/special/juce_MagnifierComponent.h; sourceTree = SOURCE_ROOT; }; | |||
| 3C8C1AAF32DFECB89EB83271 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = juce_MidiKeyboardComponent.cpp; path = ../../src/gui/components/special/juce_MidiKeyboardComponent.cpp; sourceTree = SOURCE_ROOT; }; | |||
| 127FC743FE67E6EEF2531BD5 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = juce_MidiKeyboardComponent.h; path = ../../src/gui/components/special/juce_MidiKeyboardComponent.h; sourceTree = SOURCE_ROOT; }; | |||
| 4387C6496C7079FB0032B99D = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = juce_NSViewComponent.h; path = ../../src/gui/components/special/juce_NSViewComponent.h; sourceTree = SOURCE_ROOT; }; | |||
| @@ -1446,8 +1439,7 @@ | |||
| 1DDE0A8E4C5857715D9B5FAE, | |||
| 502B3625329816EA6330465F, | |||
| 6AACD2FD239E39F87B666C6F, | |||
| A563BC883D801CF5956DC4BC, | |||
| 7B0A07F03743BCFD719863CF ); name = menus; sourceTree = "<group>"; }; | |||
| A563BC883D801CF5956DC4BC ); name = menus; sourceTree = "<group>"; }; | |||
| 4F37E36BA5E052B3BD4B87AD = { isa = PBXGroup; children = ( | |||
| 9E4B3BAB9BDB06B60D28DF48, | |||
| BCDD702ED33BADF3FC19384C, | |||
| @@ -1460,8 +1452,6 @@ | |||
| 136109B3076DDA7B2E01CF90, | |||
| 067D84F9291770240D1AB5B4, | |||
| 50C02B44D0CB18898F575B1E, | |||
| 2531C57B0C861A48E3F3A673, | |||
| D6743AC444E80E191B8C8FE3, | |||
| 441257DD380138C03568FCBD, | |||
| 07CF9AF337779EB486AC92BF, | |||
| 2886656DF7ACC9DDC888827F, | |||
| @@ -1509,8 +1499,6 @@ | |||
| CD9F817B7EF0DA080668A3A8, | |||
| 9C1D5CDA61FB51F657DA8B22, | |||
| 7DB8CFB77EA690ACF54C63B4, | |||
| 4A6A78512816BA378FFF348A, | |||
| 3C61804B771D33BED18FADE4, | |||
| 3C8C1AAF32DFECB89EB83271, | |||
| 127FC743FE67E6EEF2531BD5, | |||
| 4387C6496C7079FB0032B99D, | |||
| @@ -2128,7 +2116,6 @@ | |||
| E6971F06B78AE76C35E1A19C, | |||
| 6629D535AE1ABE35A0D53C69, | |||
| DD4599D0A8117B025B477DE1, | |||
| 968B31D8101A937444C6DFB3, | |||
| E064E329741F36C329989203, | |||
| 61E659ADBF9D832ED8F24540, | |||
| 9379C833B875207E5DFC5A3F, | |||
| @@ -2150,7 +2137,6 @@ | |||
| 710BF477DE534CF18BD68959, | |||
| E5DA150E966B948C4CB4EFDB, | |||
| E96B477EB51FC152AC2EA6BD, | |||
| E847271789B669289C899425, | |||
| CF36EF39EEAB7A4744C5D310, | |||
| 372B6FF28C49018F5191C517, | |||
| D9AAB4AE220010CD526C87D2, | |||
| @@ -582,7 +582,6 @@ | |||
| <File RelativePath="..\..\src\gui\components\menus\juce_MenuBarModel.h"/> | |||
| <File RelativePath="..\..\src\gui\components\menus\juce_PopupMenu.cpp"/> | |||
| <File RelativePath="..\..\src\gui\components\menus\juce_PopupMenu.h"/> | |||
| <File RelativePath="..\..\src\gui\components\menus\juce_PopupMenuCustomComponent.h"/> | |||
| </Filter> | |||
| <Filter Name="mouse"> | |||
| <File RelativePath="..\..\src\gui\components\mouse\juce_ComponentDragger.cpp"/> | |||
| @@ -596,8 +595,6 @@ | |||
| <File RelativePath="..\..\src\gui\components\mouse\juce_MouseCursor.h"/> | |||
| <File RelativePath="..\..\src\gui\components\mouse\juce_MouseEvent.cpp"/> | |||
| <File RelativePath="..\..\src\gui\components\mouse\juce_MouseEvent.h"/> | |||
| <File RelativePath="..\..\src\gui\components\mouse\juce_MouseHoverDetector.cpp"/> | |||
| <File RelativePath="..\..\src\gui\components\mouse\juce_MouseHoverDetector.h"/> | |||
| <File RelativePath="..\..\src\gui\components\mouse\juce_MouseInputSource.cpp"/> | |||
| <File RelativePath="..\..\src\gui\components\mouse\juce_MouseInputSource.h"/> | |||
| <File RelativePath="..\..\src\gui\components\mouse\juce_MouseListener.cpp"/> | |||
| @@ -648,8 +645,6 @@ | |||
| <File RelativePath="..\..\src\gui\components\special\juce_ColourSelector.h"/> | |||
| <File RelativePath="..\..\src\gui\components\special\juce_DropShadower.cpp"/> | |||
| <File RelativePath="..\..\src\gui\components\special\juce_DropShadower.h"/> | |||
| <File RelativePath="..\..\src\gui\components\special\juce_MagnifierComponent.cpp"/> | |||
| <File RelativePath="..\..\src\gui\components\special\juce_MagnifierComponent.h"/> | |||
| <File RelativePath="..\..\src\gui\components\special\juce_MidiKeyboardComponent.cpp"/> | |||
| <File RelativePath="..\..\src\gui\components\special\juce_MidiKeyboardComponent.h"/> | |||
| <File RelativePath="..\..\src\gui\components\special\juce_NSViewComponent.h"/> | |||
| @@ -582,7 +582,6 @@ | |||
| <File RelativePath="..\..\src\gui\components\menus\juce_MenuBarModel.h"/> | |||
| <File RelativePath="..\..\src\gui\components\menus\juce_PopupMenu.cpp"/> | |||
| <File RelativePath="..\..\src\gui\components\menus\juce_PopupMenu.h"/> | |||
| <File RelativePath="..\..\src\gui\components\menus\juce_PopupMenuCustomComponent.h"/> | |||
| </Filter> | |||
| <Filter Name="mouse"> | |||
| <File RelativePath="..\..\src\gui\components\mouse\juce_ComponentDragger.cpp"/> | |||
| @@ -596,8 +595,6 @@ | |||
| <File RelativePath="..\..\src\gui\components\mouse\juce_MouseCursor.h"/> | |||
| <File RelativePath="..\..\src\gui\components\mouse\juce_MouseEvent.cpp"/> | |||
| <File RelativePath="..\..\src\gui\components\mouse\juce_MouseEvent.h"/> | |||
| <File RelativePath="..\..\src\gui\components\mouse\juce_MouseHoverDetector.cpp"/> | |||
| <File RelativePath="..\..\src\gui\components\mouse\juce_MouseHoverDetector.h"/> | |||
| <File RelativePath="..\..\src\gui\components\mouse\juce_MouseInputSource.cpp"/> | |||
| <File RelativePath="..\..\src\gui\components\mouse\juce_MouseInputSource.h"/> | |||
| <File RelativePath="..\..\src\gui\components\mouse\juce_MouseListener.cpp"/> | |||
| @@ -648,8 +645,6 @@ | |||
| <File RelativePath="..\..\src\gui\components\special\juce_ColourSelector.h"/> | |||
| <File RelativePath="..\..\src\gui\components\special\juce_DropShadower.cpp"/> | |||
| <File RelativePath="..\..\src\gui\components\special\juce_DropShadower.h"/> | |||
| <File RelativePath="..\..\src\gui\components\special\juce_MagnifierComponent.cpp"/> | |||
| <File RelativePath="..\..\src\gui\components\special\juce_MagnifierComponent.h"/> | |||
| <File RelativePath="..\..\src\gui\components\special\juce_MidiKeyboardComponent.cpp"/> | |||
| <File RelativePath="..\..\src\gui\components\special\juce_MidiKeyboardComponent.h"/> | |||
| <File RelativePath="..\..\src\gui\components\special\juce_NSViewComponent.h"/> | |||
| @@ -584,7 +584,6 @@ | |||
| <File RelativePath="..\..\src\gui\components\menus\juce_MenuBarModel.h"/> | |||
| <File RelativePath="..\..\src\gui\components\menus\juce_PopupMenu.cpp"/> | |||
| <File RelativePath="..\..\src\gui\components\menus\juce_PopupMenu.h"/> | |||
| <File RelativePath="..\..\src\gui\components\menus\juce_PopupMenuCustomComponent.h"/> | |||
| </Filter> | |||
| <Filter Name="mouse"> | |||
| <File RelativePath="..\..\src\gui\components\mouse\juce_ComponentDragger.cpp"/> | |||
| @@ -598,8 +597,6 @@ | |||
| <File RelativePath="..\..\src\gui\components\mouse\juce_MouseCursor.h"/> | |||
| <File RelativePath="..\..\src\gui\components\mouse\juce_MouseEvent.cpp"/> | |||
| <File RelativePath="..\..\src\gui\components\mouse\juce_MouseEvent.h"/> | |||
| <File RelativePath="..\..\src\gui\components\mouse\juce_MouseHoverDetector.cpp"/> | |||
| <File RelativePath="..\..\src\gui\components\mouse\juce_MouseHoverDetector.h"/> | |||
| <File RelativePath="..\..\src\gui\components\mouse\juce_MouseInputSource.cpp"/> | |||
| <File RelativePath="..\..\src\gui\components\mouse\juce_MouseInputSource.h"/> | |||
| <File RelativePath="..\..\src\gui\components\mouse\juce_MouseListener.cpp"/> | |||
| @@ -650,8 +647,6 @@ | |||
| <File RelativePath="..\..\src\gui\components\special\juce_ColourSelector.h"/> | |||
| <File RelativePath="..\..\src\gui\components\special\juce_DropShadower.cpp"/> | |||
| <File RelativePath="..\..\src\gui\components\special\juce_DropShadower.h"/> | |||
| <File RelativePath="..\..\src\gui\components\special\juce_MagnifierComponent.cpp"/> | |||
| <File RelativePath="..\..\src\gui\components\special\juce_MagnifierComponent.h"/> | |||
| <File RelativePath="..\..\src\gui\components\special\juce_MidiKeyboardComponent.cpp"/> | |||
| <File RelativePath="..\..\src\gui\components\special\juce_MidiKeyboardComponent.h"/> | |||
| <File RelativePath="..\..\src\gui\components\special\juce_NSViewComponent.h"/> | |||
| @@ -276,7 +276,6 @@ | |||
| <ClCompile Include="..\..\src\gui\components\mouse\juce_DragAndDropContainer.cpp"/> | |||
| <ClCompile Include="..\..\src\gui\components\mouse\juce_MouseCursor.cpp"/> | |||
| <ClCompile Include="..\..\src\gui\components\mouse\juce_MouseEvent.cpp"/> | |||
| <ClCompile Include="..\..\src\gui\components\mouse\juce_MouseHoverDetector.cpp"/> | |||
| <ClCompile Include="..\..\src\gui\components\mouse\juce_MouseInputSource.cpp"/> | |||
| <ClCompile Include="..\..\src\gui\components\mouse\juce_MouseListener.cpp"/> | |||
| <ClCompile Include="..\..\src\gui\components\positioning\juce_MarkerList.cpp"/> | |||
| @@ -298,7 +297,6 @@ | |||
| <ClCompile Include="..\..\src\gui\components\special\juce_BubbleMessageComponent.cpp"/> | |||
| <ClCompile Include="..\..\src\gui\components\special\juce_ColourSelector.cpp"/> | |||
| <ClCompile Include="..\..\src\gui\components\special\juce_DropShadower.cpp"/> | |||
| <ClCompile Include="..\..\src\gui\components\special\juce_MagnifierComponent.cpp"/> | |||
| <ClCompile Include="..\..\src\gui\components\special\juce_MidiKeyboardComponent.cpp"/> | |||
| <ClCompile Include="..\..\src\gui\components\special\juce_OpenGLComponent.cpp"/> | |||
| <ClCompile Include="..\..\src\gui\components\special\juce_PreferencesPanel.cpp"/> | |||
| @@ -628,7 +626,6 @@ | |||
| <ClInclude Include="..\..\src\gui\components\menus\juce_MenuBarComponent.h"/> | |||
| <ClInclude Include="..\..\src\gui\components\menus\juce_MenuBarModel.h"/> | |||
| <ClInclude Include="..\..\src\gui\components\menus\juce_PopupMenu.h"/> | |||
| <ClInclude Include="..\..\src\gui\components\menus\juce_PopupMenuCustomComponent.h"/> | |||
| <ClInclude Include="..\..\src\gui\components\mouse\juce_ComponentDragger.h"/> | |||
| <ClInclude Include="..\..\src\gui\components\mouse\juce_DragAndDropContainer.h"/> | |||
| <ClInclude Include="..\..\src\gui\components\mouse\juce_DragAndDropTarget.h"/> | |||
| @@ -636,7 +633,6 @@ | |||
| <ClInclude Include="..\..\src\gui\components\mouse\juce_LassoComponent.h"/> | |||
| <ClInclude Include="..\..\src\gui\components\mouse\juce_MouseCursor.h"/> | |||
| <ClInclude Include="..\..\src\gui\components\mouse\juce_MouseEvent.h"/> | |||
| <ClInclude Include="..\..\src\gui\components\mouse\juce_MouseHoverDetector.h"/> | |||
| <ClInclude Include="..\..\src\gui\components\mouse\juce_MouseInputSource.h"/> | |||
| <ClInclude Include="..\..\src\gui\components\mouse\juce_MouseListener.h"/> | |||
| <ClInclude Include="..\..\src\gui\components\mouse\juce_TooltipClient.h"/> | |||
| @@ -660,7 +656,6 @@ | |||
| <ClInclude Include="..\..\src\gui\components\special\juce_BubbleMessageComponent.h"/> | |||
| <ClInclude Include="..\..\src\gui\components\special\juce_ColourSelector.h"/> | |||
| <ClInclude Include="..\..\src\gui\components\special\juce_DropShadower.h"/> | |||
| <ClInclude Include="..\..\src\gui\components\special\juce_MagnifierComponent.h"/> | |||
| <ClInclude Include="..\..\src\gui\components\special\juce_MidiKeyboardComponent.h"/> | |||
| <ClInclude Include="..\..\src\gui\components\special\juce_NSViewComponent.h"/> | |||
| <ClInclude Include="..\..\src\gui\components\special\juce_OpenGLComponent.h"/> | |||
| @@ -685,9 +685,6 @@ | |||
| <ClCompile Include="..\..\src\gui\components\mouse\juce_MouseEvent.cpp"> | |||
| <Filter>Juce\Source\gui\components\mouse</Filter> | |||
| </ClCompile> | |||
| <ClCompile Include="..\..\src\gui\components\mouse\juce_MouseHoverDetector.cpp"> | |||
| <Filter>Juce\Source\gui\components\mouse</Filter> | |||
| </ClCompile> | |||
| <ClCompile Include="..\..\src\gui\components\mouse\juce_MouseInputSource.cpp"> | |||
| <Filter>Juce\Source\gui\components\mouse</Filter> | |||
| </ClCompile> | |||
| @@ -751,9 +748,6 @@ | |||
| <ClCompile Include="..\..\src\gui\components\special\juce_DropShadower.cpp"> | |||
| <Filter>Juce\Source\gui\components\special</Filter> | |||
| </ClCompile> | |||
| <ClCompile Include="..\..\src\gui\components\special\juce_MagnifierComponent.cpp"> | |||
| <Filter>Juce\Source\gui\components\special</Filter> | |||
| </ClCompile> | |||
| <ClCompile Include="..\..\src\gui\components\special\juce_MidiKeyboardComponent.cpp"> | |||
| <Filter>Juce\Source\gui\components\special</Filter> | |||
| </ClCompile> | |||
| @@ -1815,9 +1809,6 @@ | |||
| <ClInclude Include="..\..\src\gui\components\menus\juce_PopupMenu.h"> | |||
| <Filter>Juce\Source\gui\components\menus</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\src\gui\components\menus\juce_PopupMenuCustomComponent.h"> | |||
| <Filter>Juce\Source\gui\components\menus</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\src\gui\components\mouse\juce_ComponentDragger.h"> | |||
| <Filter>Juce\Source\gui\components\mouse</Filter> | |||
| </ClInclude> | |||
| @@ -1839,9 +1830,6 @@ | |||
| <ClInclude Include="..\..\src\gui\components\mouse\juce_MouseEvent.h"> | |||
| <Filter>Juce\Source\gui\components\mouse</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\src\gui\components\mouse\juce_MouseHoverDetector.h"> | |||
| <Filter>Juce\Source\gui\components\mouse</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\src\gui\components\mouse\juce_MouseInputSource.h"> | |||
| <Filter>Juce\Source\gui\components\mouse</Filter> | |||
| </ClInclude> | |||
| @@ -1911,9 +1899,6 @@ | |||
| <ClInclude Include="..\..\src\gui\components\special\juce_DropShadower.h"> | |||
| <Filter>Juce\Source\gui\components\special</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\src\gui\components\special\juce_MagnifierComponent.h"> | |||
| <Filter>Juce\Source\gui\components\special</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\src\gui\components\special\juce_MidiKeyboardComponent.h"> | |||
| <Filter>Juce\Source\gui\components\special</Filter> | |||
| </ClInclude> | |||
| @@ -162,7 +162,6 @@ | |||
| E6971F06B78AE76C35E1A19C = { isa = PBXBuildFile; fileRef = 3D74B30C63465C32E26D8E33; }; | |||
| 6629D535AE1ABE35A0D53C69 = { isa = PBXBuildFile; fileRef = 944BC51C440C167C5B2A23E3; }; | |||
| DD4599D0A8117B025B477DE1 = { isa = PBXBuildFile; fileRef = 067D84F9291770240D1AB5B4; }; | |||
| 968B31D8101A937444C6DFB3 = { isa = PBXBuildFile; fileRef = 2531C57B0C861A48E3F3A673; }; | |||
| E064E329741F36C329989203 = { isa = PBXBuildFile; fileRef = 441257DD380138C03568FCBD; }; | |||
| 61E659ADBF9D832ED8F24540 = { isa = PBXBuildFile; fileRef = 2886656DF7ACC9DDC888827F; }; | |||
| 9379C833B875207E5DFC5A3F = { isa = PBXBuildFile; fileRef = 82DFF1BD3665DC32672FCCE8; }; | |||
| @@ -184,7 +183,6 @@ | |||
| 710BF477DE534CF18BD68959 = { isa = PBXBuildFile; fileRef = 4C3C3AFC3D97C1378B7D7435; }; | |||
| E5DA150E966B948C4CB4EFDB = { isa = PBXBuildFile; fileRef = 0A20E7E561633610A76A34AB; }; | |||
| E96B477EB51FC152AC2EA6BD = { isa = PBXBuildFile; fileRef = 9C1D5CDA61FB51F657DA8B22; }; | |||
| E847271789B669289C899425 = { isa = PBXBuildFile; fileRef = 4A6A78512816BA378FFF348A; }; | |||
| CF36EF39EEAB7A4744C5D310 = { isa = PBXBuildFile; fileRef = 3C8C1AAF32DFECB89EB83271; }; | |||
| 372B6FF28C49018F5191C517 = { isa = PBXBuildFile; fileRef = 1317F0BE5EC80371F744967B; }; | |||
| D9AAB4AE220010CD526C87D2 = { isa = PBXBuildFile; fileRef = A34C0E63D41CFF5E55FD1D9E; }; | |||
| @@ -702,7 +700,6 @@ | |||
| 502B3625329816EA6330465F = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = juce_MenuBarModel.h; path = ../../src/gui/components/menus/juce_MenuBarModel.h; sourceTree = SOURCE_ROOT; }; | |||
| 6AACD2FD239E39F87B666C6F = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = juce_PopupMenu.cpp; path = ../../src/gui/components/menus/juce_PopupMenu.cpp; sourceTree = SOURCE_ROOT; }; | |||
| A563BC883D801CF5956DC4BC = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = juce_PopupMenu.h; path = ../../src/gui/components/menus/juce_PopupMenu.h; sourceTree = SOURCE_ROOT; }; | |||
| 7B0A07F03743BCFD719863CF = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = juce_PopupMenuCustomComponent.h; path = ../../src/gui/components/menus/juce_PopupMenuCustomComponent.h; sourceTree = SOURCE_ROOT; }; | |||
| 9E4B3BAB9BDB06B60D28DF48 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = juce_ComponentDragger.cpp; path = ../../src/gui/components/mouse/juce_ComponentDragger.cpp; sourceTree = SOURCE_ROOT; }; | |||
| BCDD702ED33BADF3FC19384C = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = juce_ComponentDragger.h; path = ../../src/gui/components/mouse/juce_ComponentDragger.h; sourceTree = SOURCE_ROOT; }; | |||
| 3D74B30C63465C32E26D8E33 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = juce_DragAndDropContainer.cpp; path = ../../src/gui/components/mouse/juce_DragAndDropContainer.cpp; sourceTree = SOURCE_ROOT; }; | |||
| @@ -714,8 +711,6 @@ | |||
| 136109B3076DDA7B2E01CF90 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = juce_MouseCursor.h; path = ../../src/gui/components/mouse/juce_MouseCursor.h; sourceTree = SOURCE_ROOT; }; | |||
| 067D84F9291770240D1AB5B4 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = juce_MouseEvent.cpp; path = ../../src/gui/components/mouse/juce_MouseEvent.cpp; sourceTree = SOURCE_ROOT; }; | |||
| 50C02B44D0CB18898F575B1E = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = juce_MouseEvent.h; path = ../../src/gui/components/mouse/juce_MouseEvent.h; sourceTree = SOURCE_ROOT; }; | |||
| 2531C57B0C861A48E3F3A673 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = juce_MouseHoverDetector.cpp; path = ../../src/gui/components/mouse/juce_MouseHoverDetector.cpp; sourceTree = SOURCE_ROOT; }; | |||
| D6743AC444E80E191B8C8FE3 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = juce_MouseHoverDetector.h; path = ../../src/gui/components/mouse/juce_MouseHoverDetector.h; sourceTree = SOURCE_ROOT; }; | |||
| 441257DD380138C03568FCBD = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = juce_MouseInputSource.cpp; path = ../../src/gui/components/mouse/juce_MouseInputSource.cpp; sourceTree = SOURCE_ROOT; }; | |||
| 07CF9AF337779EB486AC92BF = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = juce_MouseInputSource.h; path = ../../src/gui/components/mouse/juce_MouseInputSource.h; sourceTree = SOURCE_ROOT; }; | |||
| 2886656DF7ACC9DDC888827F = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = juce_MouseListener.cpp; path = ../../src/gui/components/mouse/juce_MouseListener.cpp; sourceTree = SOURCE_ROOT; }; | |||
| @@ -760,8 +755,6 @@ | |||
| CD9F817B7EF0DA080668A3A8 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = juce_ColourSelector.h; path = ../../src/gui/components/special/juce_ColourSelector.h; sourceTree = SOURCE_ROOT; }; | |||
| 9C1D5CDA61FB51F657DA8B22 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = juce_DropShadower.cpp; path = ../../src/gui/components/special/juce_DropShadower.cpp; sourceTree = SOURCE_ROOT; }; | |||
| 7DB8CFB77EA690ACF54C63B4 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = juce_DropShadower.h; path = ../../src/gui/components/special/juce_DropShadower.h; sourceTree = SOURCE_ROOT; }; | |||
| 4A6A78512816BA378FFF348A = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = juce_MagnifierComponent.cpp; path = ../../src/gui/components/special/juce_MagnifierComponent.cpp; sourceTree = SOURCE_ROOT; }; | |||
| 3C61804B771D33BED18FADE4 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = juce_MagnifierComponent.h; path = ../../src/gui/components/special/juce_MagnifierComponent.h; sourceTree = SOURCE_ROOT; }; | |||
| 3C8C1AAF32DFECB89EB83271 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = juce_MidiKeyboardComponent.cpp; path = ../../src/gui/components/special/juce_MidiKeyboardComponent.cpp; sourceTree = SOURCE_ROOT; }; | |||
| 127FC743FE67E6EEF2531BD5 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = juce_MidiKeyboardComponent.h; path = ../../src/gui/components/special/juce_MidiKeyboardComponent.h; sourceTree = SOURCE_ROOT; }; | |||
| 4387C6496C7079FB0032B99D = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = juce_NSViewComponent.h; path = ../../src/gui/components/special/juce_NSViewComponent.h; sourceTree = SOURCE_ROOT; }; | |||
| @@ -1446,8 +1439,7 @@ | |||
| 1DDE0A8E4C5857715D9B5FAE, | |||
| 502B3625329816EA6330465F, | |||
| 6AACD2FD239E39F87B666C6F, | |||
| A563BC883D801CF5956DC4BC, | |||
| 7B0A07F03743BCFD719863CF ); name = menus; sourceTree = "<group>"; }; | |||
| A563BC883D801CF5956DC4BC ); name = menus; sourceTree = "<group>"; }; | |||
| 4F37E36BA5E052B3BD4B87AD = { isa = PBXGroup; children = ( | |||
| 9E4B3BAB9BDB06B60D28DF48, | |||
| BCDD702ED33BADF3FC19384C, | |||
| @@ -1460,8 +1452,6 @@ | |||
| 136109B3076DDA7B2E01CF90, | |||
| 067D84F9291770240D1AB5B4, | |||
| 50C02B44D0CB18898F575B1E, | |||
| 2531C57B0C861A48E3F3A673, | |||
| D6743AC444E80E191B8C8FE3, | |||
| 441257DD380138C03568FCBD, | |||
| 07CF9AF337779EB486AC92BF, | |||
| 2886656DF7ACC9DDC888827F, | |||
| @@ -1509,8 +1499,6 @@ | |||
| CD9F817B7EF0DA080668A3A8, | |||
| 9C1D5CDA61FB51F657DA8B22, | |||
| 7DB8CFB77EA690ACF54C63B4, | |||
| 4A6A78512816BA378FFF348A, | |||
| 3C61804B771D33BED18FADE4, | |||
| 3C8C1AAF32DFECB89EB83271, | |||
| 127FC743FE67E6EEF2531BD5, | |||
| 4387C6496C7079FB0032B99D, | |||
| @@ -2128,7 +2116,6 @@ | |||
| E6971F06B78AE76C35E1A19C, | |||
| 6629D535AE1ABE35A0D53C69, | |||
| DD4599D0A8117B025B477DE1, | |||
| 968B31D8101A937444C6DFB3, | |||
| E064E329741F36C329989203, | |||
| 61E659ADBF9D832ED8F24540, | |||
| 9379C833B875207E5DFC5A3F, | |||
| @@ -2150,7 +2137,6 @@ | |||
| 710BF477DE534CF18BD68959, | |||
| E5DA150E966B948C4CB4EFDB, | |||
| E96B477EB51FC152AC2EA6BD, | |||
| E847271789B669289C899425, | |||
| CF36EF39EEAB7A4744C5D310, | |||
| 372B6FF28C49018F5191C517, | |||
| D9AAB4AE220010CD526C87D2, | |||
| @@ -792,8 +792,6 @@ | |||
| file="src/gui/components/menus/juce_PopupMenu.cpp"/> | |||
| <FILE id="VNJnvSCVQ" name="juce_PopupMenu.h" compile="0" resource="0" | |||
| file="src/gui/components/menus/juce_PopupMenu.h"/> | |||
| <FILE id="fdRptQQCr" name="juce_PopupMenuCustomComponent.h" compile="0" | |||
| resource="0" file="src/gui/components/menus/juce_PopupMenuCustomComponent.h"/> | |||
| </GROUP> | |||
| <GROUP id="4Z6gX1IB5" name="mouse"> | |||
| <FILE id="zg6SjElG2" name="juce_ComponentDragger.cpp" compile="1" resource="0" | |||
| @@ -818,10 +816,6 @@ | |||
| file="src/gui/components/mouse/juce_MouseEvent.cpp"/> | |||
| <FILE id="w6gpReQJ" name="juce_MouseEvent.h" compile="0" resource="0" | |||
| file="src/gui/components/mouse/juce_MouseEvent.h"/> | |||
| <FILE id="jWJffCCWt" name="juce_MouseHoverDetector.cpp" compile="1" | |||
| resource="0" file="src/gui/components/mouse/juce_MouseHoverDetector.cpp"/> | |||
| <FILE id="wLpGKPDBH" name="juce_MouseHoverDetector.h" compile="0" resource="0" | |||
| file="src/gui/components/mouse/juce_MouseHoverDetector.h"/> | |||
| <FILE id="RxLJE2TH8" name="juce_MouseInputSource.cpp" compile="1" resource="0" | |||
| file="src/gui/components/mouse/juce_MouseInputSource.cpp"/> | |||
| <FILE id="bf62P4hKo" name="juce_MouseInputSource.h" compile="0" resource="0" | |||
| @@ -916,10 +910,6 @@ | |||
| file="src/gui/components/special/juce_DropShadower.cpp"/> | |||
| <FILE id="tNsR3nrMx" name="juce_DropShadower.h" compile="0" resource="0" | |||
| file="src/gui/components/special/juce_DropShadower.h"/> | |||
| <FILE id="dPsalIXYm" name="juce_MagnifierComponent.cpp" compile="1" | |||
| resource="0" file="src/gui/components/special/juce_MagnifierComponent.cpp"/> | |||
| <FILE id="9mE7Snh9t" name="juce_MagnifierComponent.h" compile="0" resource="0" | |||
| file="src/gui/components/special/juce_MagnifierComponent.h"/> | |||
| <FILE id="azZgJ9Sn" name="juce_MidiKeyboardComponent.cpp" compile="1" | |||
| resource="0" file="src/gui/components/special/juce_MidiKeyboardComponent.cpp"/> | |||
| <FILE id="lZq5kJdPd" name="juce_MidiKeyboardComponent.h" compile="0" | |||
| @@ -297,7 +297,6 @@ | |||
| #include "../src/gui/components/mouse/juce_MouseCursor.cpp" | |||
| #include "../src/gui/components/mouse/juce_MouseEvent.cpp" | |||
| #include "../src/gui/components/mouse/juce_MouseInputSource.cpp" | |||
| #include "../src/gui/components/mouse/juce_MouseHoverDetector.cpp" | |||
| #include "../src/gui/components/mouse/juce_MouseListener.cpp" | |||
| #include "../src/gui/components/properties/juce_BooleanPropertyComponent.cpp" | |||
| #include "../src/gui/components/properties/juce_ButtonPropertyComponent.cpp" | |||
| @@ -311,7 +310,6 @@ | |||
| #include "../src/gui/components/special/juce_BubbleMessageComponent.cpp" | |||
| #include "../src/gui/components/special/juce_ColourSelector.cpp" | |||
| #include "../src/gui/components/special/juce_DropShadower.cpp" | |||
| #include "../src/gui/components/special/juce_MagnifierComponent.cpp" | |||
| #include "../src/gui/components/special/juce_MidiKeyboardComponent.cpp" | |||
| #include "../src/gui/components/special/juce_OpenGLComponent.cpp" | |||
| #include "../src/gui/components/special/juce_PreferencesPanel.cpp" | |||
| @@ -17595,8 +17595,6 @@ public: | |||
| { | |||
| } | |||
| ~SetPropertyAction() {} | |||
| bool perform() | |||
| { | |||
| jassert (! (isAddingNewProperty && target->hasProperty (name))); | |||
| @@ -17663,8 +17661,6 @@ public: | |||
| jassert (child != 0); | |||
| } | |||
| ~AddOrRemoveChildAction() {} | |||
| bool perform() | |||
| { | |||
| if (isDeleting) | |||
| @@ -17716,8 +17712,6 @@ public: | |||
| { | |||
| } | |||
| ~MoveChildAction() {} | |||
| bool perform() | |||
| { | |||
| parent->moveChild (startIndex, endIndex, 0); | |||
| @@ -17919,7 +17913,7 @@ ValueTree ValueTree::SharedObject::getChildWithName (const Identifier& typeToMat | |||
| { | |||
| for (int i = 0; i < children.size(); ++i) | |||
| if (children.getUnchecked(i)->type == typeToMatch) | |||
| return ValueTree (static_cast <SharedObject*> (children.getUnchecked(i))); | |||
| return ValueTree (children.getUnchecked(i).getObject()); | |||
| return ValueTree::invalid; | |||
| } | |||
| @@ -17928,7 +17922,7 @@ ValueTree ValueTree::SharedObject::getOrCreateChildWithName (const Identifier& t | |||
| { | |||
| for (int i = 0; i < children.size(); ++i) | |||
| if (children.getUnchecked(i)->type == typeToMatch) | |||
| return ValueTree (static_cast <SharedObject*> (children.getUnchecked(i))); | |||
| return ValueTree (children.getUnchecked(i).getObject()); | |||
| SharedObject* const newObject = new SharedObject (typeToMatch); | |||
| addChild (newObject, -1, undoManager); | |||
| @@ -17940,7 +17934,7 @@ ValueTree ValueTree::SharedObject::getChildWithProperty (const Identifier& prope | |||
| { | |||
| for (int i = 0; i < children.size(); ++i) | |||
| if (children.getUnchecked(i)->getProperty (propertyName) == propertyValue) | |||
| return ValueTree (static_cast <SharedObject*> (children.getUnchecked(i))); | |||
| return ValueTree (children.getUnchecked(i).getObject()); | |||
| return ValueTree::invalid; | |||
| } | |||
| @@ -18179,7 +18173,7 @@ ValueTree ValueTree::getSibling (const int delta) const | |||
| return invalid; | |||
| const int index = object->parent->indexOf (*this) + delta; | |||
| return ValueTree (static_cast <SharedObject*> (object->parent->children [index])); | |||
| return ValueTree (object->parent->children [index].getObject()); | |||
| } | |||
| const var& ValueTree::operator[] (const Identifier& name) const | |||
| @@ -28605,6 +28599,14 @@ int MidiMessage::getMessageLengthFromFirstByte (const uint8 firstByte) throw() | |||
| return messageLengths [firstByte & 0x7f]; | |||
| } | |||
| MidiMessage::MidiMessage() throw() | |||
| : timeStamp (0), | |||
| data (static_cast<uint8*> (preallocatedData.asBytes)), | |||
| size (1) | |||
| { | |||
| data[0] = 0xfe; | |||
| } | |||
| MidiMessage::MidiMessage (const void* const d, const int dataSize, const double t) | |||
| : timeStamp (t), | |||
| size (dataSize) | |||
| @@ -54772,11 +54774,11 @@ private: | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ToolbarSpacerComp); | |||
| }; | |||
| class Toolbar::MissingItemsComponent : public PopupMenuCustomComponent | |||
| class Toolbar::MissingItemsComponent : public PopupMenu::CustomComponent | |||
| { | |||
| public: | |||
| MissingItemsComponent (Toolbar& owner_, const int height_) | |||
| : PopupMenuCustomComponent (true), | |||
| : PopupMenu::CustomComponent (true), | |||
| owner (&owner_), | |||
| height (height_) | |||
| { | |||
| @@ -68844,7 +68846,7 @@ public: | |||
| const Image& im, | |||
| const Colour& textColour_, | |||
| const bool usesColour_, | |||
| PopupMenuCustomComponent* const customComp_, | |||
| CustomComponent* const customComp_, | |||
| const PopupMenu* const subMenu_, | |||
| ApplicationCommandManager* const commandManager_) | |||
| : itemId (itemId_), text (text_), textColour (textColour_), | |||
| @@ -68906,7 +68908,7 @@ public: | |||
| const Colour textColour; | |||
| const bool active, isSeparator, isTicked, usesColour; | |||
| Image image; | |||
| ReferenceCountedObjectPtr <PopupMenuCustomComponent> customComp; | |||
| ReferenceCountedObjectPtr <CustomComponent> customComp; | |||
| ScopedPointer <PopupMenu> subMenu; | |||
| ApplicationCommandManager* const commandManager; | |||
| @@ -68939,22 +68941,15 @@ public: | |||
| removeChildComponent (itemInfo.customComp); | |||
| } | |||
| void getIdealSize (int& idealWidth, | |||
| int& idealHeight, | |||
| const int standardItemHeight) | |||
| void getIdealSize (int& idealWidth, int& idealHeight, const int standardItemHeight) | |||
| { | |||
| if (itemInfo.customComp != 0) | |||
| { | |||
| itemInfo.customComp->getIdealSize (idealWidth, idealHeight); | |||
| } | |||
| else | |||
| { | |||
| getLookAndFeel().getIdealPopupMenuItemSize (itemInfo.text, | |||
| itemInfo.isSeparator, | |||
| standardItemHeight, | |||
| idealWidth, | |||
| idealHeight); | |||
| } | |||
| idealWidth, idealHeight); | |||
| } | |||
| void paint (Graphics& g) | |||
| @@ -68999,10 +68994,7 @@ public: | |||
| isHighlighted = shouldBeHighlighted; | |||
| if (itemInfo.customComp != 0) | |||
| { | |||
| itemInfo.customComp->isHighlighted = shouldBeHighlighted; | |||
| itemInfo.customComp->repaint(); | |||
| } | |||
| itemInfo.customComp->setHighlighted (shouldBeHighlighted); | |||
| repaint(); | |||
| } | |||
| @@ -69899,9 +69891,7 @@ private: | |||
| && (isOver || (activeSubMenu == 0) || ! activeSubMenu->isVisible())) | |||
| { | |||
| if (isOver && (c != 0) && (activeSubMenu != 0)) | |||
| { | |||
| activeSubMenu->hide (0, true); | |||
| } | |||
| if (! isOver) | |||
| mic = 0; | |||
| @@ -69916,7 +69906,7 @@ private: | |||
| if (currentChild != 0 | |||
| && currentChild->itemInfo.canBeTriggered() | |||
| && (currentChild->itemInfo.customComp == 0 | |||
| || currentChild->itemInfo.customComp->isTriggeredAutomatically)) | |||
| || currentChild->itemInfo.customComp->isTriggeredAutomatically())) | |||
| { | |||
| dismissMenu (¤tChild->itemInfo); | |||
| } | |||
| @@ -70064,8 +70054,7 @@ void PopupMenu::addColouredItem (const int itemResultId, | |||
| itemTextColour, true, 0, 0, 0)); | |||
| } | |||
| void PopupMenu::addCustomItem (const int itemResultId, | |||
| PopupMenuCustomComponent* const customComponent) | |||
| void PopupMenu::addCustomItem (const int itemResultId, CustomComponent* const customComponent) | |||
| { | |||
| jassert (itemResultId != 0); // 0 is used as a return value to indicate that the user | |||
| // didn't pick anything, so you shouldn't use it as the id | |||
| @@ -70077,19 +70066,17 @@ void PopupMenu::addCustomItem (const int itemResultId, | |||
| Colours::black, false, customComponent, 0, 0)); | |||
| } | |||
| class NormalComponentWrapper : public PopupMenuCustomComponent | |||
| class NormalComponentWrapper : public PopupMenu::CustomComponent | |||
| { | |||
| public: | |||
| NormalComponentWrapper (Component* const comp, const int w, const int h, | |||
| const bool triggerMenuItemAutomaticallyWhenClicked) | |||
| : PopupMenuCustomComponent (triggerMenuItemAutomaticallyWhenClicked), | |||
| : PopupMenu::CustomComponent (triggerMenuItemAutomaticallyWhenClicked), | |||
| width (w), height (h) | |||
| { | |||
| addAndMakeVisible (comp); | |||
| } | |||
| ~NormalComponentWrapper() {} | |||
| void getIdealSize (int& idealWidth, int& idealHeight) | |||
| { | |||
| idealWidth = width; | |||
| @@ -70135,11 +70122,11 @@ void PopupMenu::addSeparator() | |||
| separatorPending = true; | |||
| } | |||
| class HeaderItemComponent : public PopupMenuCustomComponent | |||
| class HeaderItemComponent : public PopupMenu::CustomComponent | |||
| { | |||
| public: | |||
| HeaderItemComponent (const String& name) | |||
| : PopupMenuCustomComponent (false) | |||
| : PopupMenu::CustomComponent (false) | |||
| { | |||
| setName (name); | |||
| } | |||
| @@ -70156,8 +70143,7 @@ public: | |||
| Justification::bottomLeft, 1); | |||
| } | |||
| void getIdealSize (int& idealWidth, | |||
| int& idealHeight) | |||
| void getIdealSize (int& idealWidth, int& idealHeight) | |||
| { | |||
| getLookAndFeel().getIdealPopupMenuItemSize (getName(), false, -1, idealWidth, idealHeight); | |||
| idealHeight += idealHeight / 2; | |||
| @@ -70359,17 +70345,23 @@ void PopupMenu::setLookAndFeel (LookAndFeel* const newLookAndFeel) | |||
| lookAndFeel = newLookAndFeel; | |||
| } | |||
| PopupMenuCustomComponent::PopupMenuCustomComponent (const bool isTriggeredAutomatically_) | |||
| PopupMenu::CustomComponent::CustomComponent (const bool isTriggeredAutomatically_) | |||
| : isHighlighted (false), | |||
| isTriggeredAutomatically (isTriggeredAutomatically_) | |||
| triggeredAutomatically (isTriggeredAutomatically_) | |||
| { | |||
| } | |||
| PopupMenu::CustomComponent::~CustomComponent() | |||
| { | |||
| } | |||
| PopupMenuCustomComponent::~PopupMenuCustomComponent() | |||
| void PopupMenu::CustomComponent::setHighlighted (bool shouldBeHighlighted) | |||
| { | |||
| isHighlighted = shouldBeHighlighted; | |||
| repaint(); | |||
| } | |||
| void PopupMenuCustomComponent::triggerMenuItem() | |||
| void PopupMenu::CustomComponent::triggerMenuItem() | |||
| { | |||
| PopupMenu::ItemComponent* const mic = dynamic_cast <PopupMenu::ItemComponent*> (getParentComponent()); | |||
| @@ -70429,7 +70421,7 @@ bool PopupMenu::MenuItemIterator::next() | |||
| isSeparator = item->isSeparator; | |||
| isTicked = item->isTicked; | |||
| isEnabled = item->active; | |||
| isSectionHeader = dynamic_cast <HeaderItemComponent*> (static_cast <PopupMenuCustomComponent*> (item->customComp)) != 0; | |||
| isSectionHeader = dynamic_cast <HeaderItemComponent*> (static_cast <CustomComponent*> (item->customComp)) != 0; | |||
| isCustomComponent = (! isSectionHeader) && item->customComp != 0; | |||
| customColour = item->usesColour ? &(item->textColour) : 0; | |||
| customImage = item->image; | |||
| @@ -70741,7 +70733,7 @@ private: | |||
| WeakReference<Component> currentlyOverComp; | |||
| DragAndDropTarget* getCurrentlyOver() | |||
| { | |||
| return dynamic_cast <DragAndDropTarget*> (static_cast <Component*> (currentlyOverComp)); | |||
| return dynamic_cast <DragAndDropTarget*> (currentlyOverComp.get()); | |||
| } | |||
| String dragDesc; | |||
| @@ -71707,122 +71699,6 @@ END_JUCE_NAMESPACE | |||
| /*** End of inlined file: juce_MouseInputSource.cpp ***/ | |||
| /*** Start of inlined file: juce_MouseHoverDetector.cpp ***/ | |||
| BEGIN_JUCE_NAMESPACE | |||
| MouseHoverDetector::MouseHoverDetector (const int hoverTimeMillisecs_) | |||
| : source (0), | |||
| hoverTimeMillisecs (hoverTimeMillisecs_), | |||
| hasJustHovered (false) | |||
| { | |||
| internalTimer.owner = this; | |||
| } | |||
| MouseHoverDetector::~MouseHoverDetector() | |||
| { | |||
| setHoverComponent (0); | |||
| } | |||
| void MouseHoverDetector::setHoverTimeMillisecs (const int newTimeInMillisecs) | |||
| { | |||
| hoverTimeMillisecs = newTimeInMillisecs; | |||
| } | |||
| void MouseHoverDetector::setHoverComponent (Component* const newSourceComponent) | |||
| { | |||
| if (source != newSourceComponent) | |||
| { | |||
| internalTimer.stopTimer(); | |||
| hasJustHovered = false; | |||
| if (source != 0) | |||
| source->removeMouseListener (&internalTimer); | |||
| source = newSourceComponent; | |||
| if (newSourceComponent != 0) | |||
| newSourceComponent->addMouseListener (&internalTimer, false); | |||
| } | |||
| } | |||
| void MouseHoverDetector::hoverTimerCallback() | |||
| { | |||
| internalTimer.stopTimer(); | |||
| if (source != 0) | |||
| { | |||
| const Point<int> pos (source->getMouseXYRelative()); | |||
| if (source->reallyContains (pos, false)) | |||
| { | |||
| hasJustHovered = true; | |||
| mouseHovered (pos.getX(), pos.getY()); | |||
| } | |||
| } | |||
| } | |||
| void MouseHoverDetector::checkJustHoveredCallback() | |||
| { | |||
| if (hasJustHovered) | |||
| { | |||
| hasJustHovered = false; | |||
| mouseMovedAfterHover(); | |||
| } | |||
| } | |||
| void MouseHoverDetector::HoverDetectorInternal::timerCallback() | |||
| { | |||
| owner->hoverTimerCallback(); | |||
| } | |||
| void MouseHoverDetector::HoverDetectorInternal::mouseEnter (const MouseEvent&) | |||
| { | |||
| stopTimer(); | |||
| owner->checkJustHoveredCallback(); | |||
| } | |||
| void MouseHoverDetector::HoverDetectorInternal::mouseExit (const MouseEvent&) | |||
| { | |||
| stopTimer(); | |||
| owner->checkJustHoveredCallback(); | |||
| } | |||
| void MouseHoverDetector::HoverDetectorInternal::mouseDown (const MouseEvent&) | |||
| { | |||
| stopTimer(); | |||
| owner->checkJustHoveredCallback(); | |||
| } | |||
| void MouseHoverDetector::HoverDetectorInternal::mouseUp (const MouseEvent&) | |||
| { | |||
| stopTimer(); | |||
| owner->checkJustHoveredCallback(); | |||
| } | |||
| void MouseHoverDetector::HoverDetectorInternal::mouseMove (const MouseEvent& e) | |||
| { | |||
| if (lastX != e.x || lastY != e.y) // to avoid fake mouse-moves setting it off | |||
| { | |||
| lastX = e.x; | |||
| lastY = e.y; | |||
| if (owner->source != 0) | |||
| startTimer (owner->hoverTimeMillisecs); | |||
| owner->checkJustHoveredCallback(); | |||
| } | |||
| } | |||
| void MouseHoverDetector::HoverDetectorInternal::mouseWheelMove (const MouseEvent&, float, float) | |||
| { | |||
| stopTimer(); | |||
| owner->checkJustHoveredCallback(); | |||
| } | |||
| END_JUCE_NAMESPACE | |||
| /*** End of inlined file: juce_MouseHoverDetector.cpp ***/ | |||
| /*** Start of inlined file: juce_MouseListener.cpp ***/ | |||
| BEGIN_JUCE_NAMESPACE | |||
| @@ -74825,309 +74701,6 @@ END_JUCE_NAMESPACE | |||
| /*** End of inlined file: juce_DropShadower.cpp ***/ | |||
| /*** Start of inlined file: juce_MagnifierComponent.cpp ***/ | |||
| BEGIN_JUCE_NAMESPACE | |||
| class MagnifyingPeer : public ComponentPeer | |||
| { | |||
| public: | |||
| MagnifyingPeer (Component* const component_, | |||
| MagnifierComponent* const magnifierComp_) | |||
| : ComponentPeer (component_, 0), | |||
| magnifierComp (magnifierComp_) | |||
| { | |||
| } | |||
| ~MagnifyingPeer() | |||
| { | |||
| } | |||
| void* getNativeHandle() const { return 0; } | |||
| void setVisible (bool) {} | |||
| void setTitle (const String&) {} | |||
| void setPosition (int, int) {} | |||
| void setSize (int, int) {} | |||
| void setBounds (int, int, int, int, bool) {} | |||
| void setMinimised (bool) {} | |||
| void setAlpha (float /*newAlpha*/) {} | |||
| bool isMinimised() const { return false; } | |||
| void setFullScreen (bool) {} | |||
| bool isFullScreen() const { return false; } | |||
| const BorderSize getFrameSize() const { return BorderSize (0); } | |||
| bool setAlwaysOnTop (bool) { return true; } | |||
| void toFront (bool) {} | |||
| void toBehind (ComponentPeer*) {} | |||
| void setIcon (const Image&) {} | |||
| bool isFocused() const | |||
| { | |||
| return magnifierComp->hasKeyboardFocus (true); | |||
| } | |||
| void grabFocus() | |||
| { | |||
| ComponentPeer* peer = magnifierComp->getPeer(); | |||
| if (peer != 0) | |||
| peer->grabFocus(); | |||
| } | |||
| void textInputRequired (const Point<int>& position) | |||
| { | |||
| ComponentPeer* peer = magnifierComp->getPeer(); | |||
| if (peer != 0) | |||
| peer->textInputRequired (position); | |||
| } | |||
| const Rectangle<int> getBounds() const | |||
| { | |||
| return Rectangle<int> (magnifierComp->getScreenX(), magnifierComp->getScreenY(), | |||
| component->getWidth(), component->getHeight()); | |||
| } | |||
| const Point<int> getScreenPosition() const | |||
| { | |||
| return magnifierComp->getScreenPosition(); | |||
| } | |||
| const Point<int> localToGlobal (const Point<int>& relativePosition) | |||
| { | |||
| const double zoom = magnifierComp->getScaleFactor(); | |||
| return magnifierComp->localPointToGlobal (Point<int> (roundToInt (relativePosition.getX() * zoom), | |||
| roundToInt (relativePosition.getY() * zoom))); | |||
| } | |||
| const Point<int> globalToLocal (const Point<int>& screenPosition) | |||
| { | |||
| const Point<int> p (magnifierComp->getLocalPoint (0, screenPosition)); | |||
| const double zoom = magnifierComp->getScaleFactor(); | |||
| return Point<int> (roundToInt (p.getX() / zoom), | |||
| roundToInt (p.getY() / zoom)); | |||
| } | |||
| bool contains (const Point<int>& position, bool) const | |||
| { | |||
| return isPositiveAndBelow (position.getX(), magnifierComp->getWidth()) | |||
| && isPositiveAndBelow (position.getY(), magnifierComp->getHeight()); | |||
| } | |||
| void repaint (const Rectangle<int>& area) | |||
| { | |||
| const double zoom = magnifierComp->getScaleFactor(); | |||
| magnifierComp->repaint ((int) (area.getX() * zoom), | |||
| (int) (area.getY() * zoom), | |||
| roundToInt (area.getWidth() * zoom) + 1, | |||
| roundToInt (area.getHeight() * zoom) + 1); | |||
| } | |||
| void performAnyPendingRepaintsNow() | |||
| { | |||
| } | |||
| private: | |||
| MagnifierComponent* const magnifierComp; | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MagnifyingPeer); | |||
| }; | |||
| class PeerHolderComp : public Component | |||
| { | |||
| public: | |||
| PeerHolderComp (MagnifierComponent* const magnifierComp_) | |||
| : magnifierComp (magnifierComp_) | |||
| { | |||
| setVisible (true); | |||
| } | |||
| ~PeerHolderComp() | |||
| { | |||
| } | |||
| ComponentPeer* createNewPeer (int, void*) | |||
| { | |||
| return new MagnifyingPeer (this, magnifierComp); | |||
| } | |||
| void childBoundsChanged (Component* c) | |||
| { | |||
| if (c != 0) | |||
| { | |||
| setSize (c->getWidth(), c->getHeight()); | |||
| magnifierComp->childBoundsChanged (this); | |||
| } | |||
| } | |||
| void mouseWheelMove (const MouseEvent& e, float ix, float iy) | |||
| { | |||
| // unhandled mouse wheel moves can be referred upwards to the parent comp.. | |||
| Component* const p = magnifierComp->getParentComponent(); | |||
| if (p != 0) | |||
| p->mouseWheelMove (e.getEventRelativeTo (p), ix, iy); | |||
| } | |||
| private: | |||
| MagnifierComponent* const magnifierComp; | |||
| JUCE_DECLARE_NON_COPYABLE (PeerHolderComp); | |||
| }; | |||
| MagnifierComponent::MagnifierComponent (Component* const content_, | |||
| const bool deleteContentCompWhenNoLongerNeeded) | |||
| : content (content_), | |||
| scaleFactor (0.0), | |||
| peer (0), | |||
| deleteContent (deleteContentCompWhenNoLongerNeeded), | |||
| quality (Graphics::lowResamplingQuality), | |||
| mouseSource (0, true) | |||
| { | |||
| holderComp = new PeerHolderComp (this); | |||
| setScaleFactor (1.0); | |||
| } | |||
| MagnifierComponent::~MagnifierComponent() | |||
| { | |||
| delete holderComp; | |||
| if (deleteContent) | |||
| delete content; | |||
| } | |||
| void MagnifierComponent::setScaleFactor (double newScaleFactor) | |||
| { | |||
| jassert (newScaleFactor > 0.0); // hmm - unlikely to work well with a negative scale factor | |||
| newScaleFactor = jlimit (1.0 / 8.0, 1000.0, newScaleFactor); | |||
| if (scaleFactor != newScaleFactor) | |||
| { | |||
| scaleFactor = newScaleFactor; | |||
| if (scaleFactor == 1.0) | |||
| { | |||
| holderComp->removeFromDesktop(); | |||
| peer = 0; | |||
| addChildComponent (content); | |||
| childBoundsChanged (content); | |||
| } | |||
| else | |||
| { | |||
| holderComp->addAndMakeVisible (content); | |||
| holderComp->childBoundsChanged (content); | |||
| childBoundsChanged (holderComp); | |||
| holderComp->addToDesktop (0); | |||
| peer = holderComp->getPeer(); | |||
| } | |||
| repaint(); | |||
| } | |||
| } | |||
| void MagnifierComponent::setResamplingQuality (Graphics::ResamplingQuality newQuality) | |||
| { | |||
| quality = newQuality; | |||
| } | |||
| void MagnifierComponent::paint (Graphics& g) | |||
| { | |||
| const int w = holderComp->getWidth(); | |||
| const int h = holderComp->getHeight(); | |||
| if (w == 0 || h == 0) | |||
| return; | |||
| const Rectangle<int> r (g.getClipBounds()); | |||
| const int srcX = (int) (r.getX() / scaleFactor); | |||
| const int srcY = (int) (r.getY() / scaleFactor); | |||
| int srcW = roundToInt (r.getRight() / scaleFactor) - srcX; | |||
| int srcH = roundToInt (r.getBottom() / scaleFactor) - srcY; | |||
| if (scaleFactor >= 1.0) | |||
| { | |||
| ++srcW; | |||
| ++srcH; | |||
| } | |||
| Image temp (Image::ARGB, jmax (w, srcX + srcW), jmax (h, srcY + srcH), false); | |||
| const Rectangle<int> area (srcX, srcY, srcW, srcH); | |||
| temp.clear (area); | |||
| { | |||
| Graphics g2 (temp); | |||
| g2.reduceClipRegion (area); | |||
| holderComp->paintEntireComponent (g2, false); | |||
| } | |||
| g.setImageResamplingQuality (quality); | |||
| g.drawImageTransformed (temp, AffineTransform::scale ((float) scaleFactor, (float) scaleFactor), false); | |||
| } | |||
| void MagnifierComponent::childBoundsChanged (Component* c) | |||
| { | |||
| if (c != 0) | |||
| setSize (roundToInt (c->getWidth() * scaleFactor), | |||
| roundToInt (c->getHeight() * scaleFactor)); | |||
| } | |||
| void MagnifierComponent::passOnMouseEventToPeer (const MouseEvent& e) | |||
| { | |||
| if (peer != 0) | |||
| mouseSource.handleEvent (peer, Point<int> (scaleInt (e.x), scaleInt (e.y)), | |||
| e.eventTime.toMilliseconds(), ModifierKeys::getCurrentModifiers()); | |||
| } | |||
| void MagnifierComponent::mouseDown (const MouseEvent& e) | |||
| { | |||
| passOnMouseEventToPeer (e); | |||
| } | |||
| void MagnifierComponent::mouseUp (const MouseEvent& e) | |||
| { | |||
| passOnMouseEventToPeer (e); | |||
| } | |||
| void MagnifierComponent::mouseDrag (const MouseEvent& e) | |||
| { | |||
| passOnMouseEventToPeer (e); | |||
| } | |||
| void MagnifierComponent::mouseMove (const MouseEvent& e) | |||
| { | |||
| passOnMouseEventToPeer (e); | |||
| } | |||
| void MagnifierComponent::mouseEnter (const MouseEvent& e) | |||
| { | |||
| passOnMouseEventToPeer (e); | |||
| } | |||
| void MagnifierComponent::mouseExit (const MouseEvent& e) | |||
| { | |||
| passOnMouseEventToPeer (e); | |||
| } | |||
| void MagnifierComponent::mouseWheelMove (const MouseEvent& e, float ix, float iy) | |||
| { | |||
| if (peer != 0) | |||
| peer->handleMouseWheel (e.source.getIndex(), | |||
| Point<int> (scaleInt (e.x), scaleInt (e.y)), e.eventTime.toMilliseconds(), | |||
| ix * 256.0f, iy * 256.0f); | |||
| else | |||
| Component::mouseWheelMove (e, ix, iy); | |||
| } | |||
| int MagnifierComponent::scaleInt (const int n) const | |||
| { | |||
| return roundToInt (n / scaleFactor); | |||
| } | |||
| END_JUCE_NAMESPACE | |||
| /*** End of inlined file: juce_MagnifierComponent.cpp ***/ | |||
| /*** Start of inlined file: juce_MidiKeyboardComponent.cpp ***/ | |||
| BEGIN_JUCE_NAMESPACE | |||
| @@ -79639,12 +79212,12 @@ public: | |||
| const Expression getSymbolValue (const String& objectName, const String& member) const | |||
| { | |||
| if (member.isNotEmpty()) | |||
| if (member.isEmpty()) | |||
| { | |||
| const MarkerList::Marker* const marker = markerList.getMarker (objectName); | |||
| if (marker != 0) | |||
| return Expression ((double) marker->position.resolve (this)); | |||
| return Expression (marker->position.resolve (this)); | |||
| } | |||
| else if (parentComponent != 0 && objectName == RelativeCoordinate::Strings::parent) | |||
| { | |||
| @@ -84461,7 +84034,7 @@ public: | |||
| } | |||
| y = y_; | |||
| generate (static_cast <SrcPixelType*> (scratchBuffer), x, width); | |||
| generate (scratchBuffer.getData(), x, width); | |||
| et.clipLineToMask (x, y_, | |||
| reinterpret_cast<uint8*> (scratchBuffer.getData()) + SrcPixelType::indexA, | |||
| @@ -249127,6 +248700,8 @@ MidiOutput* MidiOutput::openDevice (int index) | |||
| MidiOutput::~MidiOutput() | |||
| { | |||
| stopBackgroundThread(); | |||
| MidiOutHandle* const h = static_cast <MidiOutHandle*> (internal); | |||
| if (MidiOutHandle::activeHandles.contains (h) && --(h->refCount) == 0) | |||
| @@ -73,7 +73,7 @@ namespace JuceDummyNamespace {} | |||
| */ | |||
| #define JUCE_MAJOR_VERSION 1 | |||
| #define JUCE_MINOR_VERSION 53 | |||
| #define JUCE_BUILDNUMBER 9 | |||
| #define JUCE_BUILDNUMBER 10 | |||
| /** Current Juce version number. | |||
| @@ -35473,6 +35473,12 @@ public: | |||
| int& numBytesUsed, uint8 lastStatusByte, | |||
| double timeStamp = 0); | |||
| /** Creates an active-sense message. | |||
| Since the MidiMessage has to contain a valid message, this default constructor | |||
| just initialises it with a simple one-byte active-sense message. | |||
| */ | |||
| MidiMessage() throw(); | |||
| /** Creates a copy of another midi message. */ | |||
| MidiMessage (const MidiMessage& other); | |||
| @@ -37943,8 +37949,6 @@ private: | |||
| #ifndef __JUCE_POPUPMENU_JUCEHEADER__ | |||
| #define __JUCE_POPUPMENU_JUCEHEADER__ | |||
| class PopupMenuCustomComponent; | |||
| /** Creates and displays a popup-menu. | |||
| To show a popup-menu, you create one of these, add some items to it, then | |||
| @@ -38059,19 +38063,10 @@ public: | |||
| bool isTicked = false, | |||
| const Image& iconToUse = Image::null); | |||
| /** Appends a custom menu item. | |||
| This will add a user-defined component to use as a menu item. The component | |||
| passed in will be deleted by this menu when it's no longer needed. | |||
| @see PopupMenuCustomComponent | |||
| */ | |||
| void addCustomItem (int itemResultId, PopupMenuCustomComponent* customComponent); | |||
| /** Appends a custom menu item that can't be used to trigger a result. | |||
| This will add a user-defined component to use as a menu item. Unlike the | |||
| addCustomItem() method that takes a PopupMenuCustomComponent, this version | |||
| addCustomItem() method that takes a PopupMenu::CustomComponent, this version | |||
| can't trigger a result from it, so doesn't take a menu ID. It also doesn't | |||
| delete the component when it's finished, so it's the caller's responsibility | |||
| to manage the component that is passed-in. | |||
| @@ -38081,7 +38076,7 @@ public: | |||
| menu ID specified in itemResultId. If this is false, the menu item can't | |||
| be triggered, so itemResultId is not used. | |||
| @see PopupMenuCustomComponent | |||
| @see CustomComponent | |||
| */ | |||
| void addCustomItem (int itemResultId, | |||
| Component* customComponent, | |||
| @@ -38282,6 +38277,64 @@ public: | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MenuItemIterator); | |||
| }; | |||
| /** A user-defined copmonent that can be used as an item in a popup menu. | |||
| @see PopupMenu::addCustomItem | |||
| */ | |||
| class JUCE_API CustomComponent : public Component, | |||
| public ReferenceCountedObject | |||
| { | |||
| public: | |||
| /** Creates a custom item. | |||
| If isTriggeredAutomatically is true, then the menu will automatically detect | |||
| a mouse-click on this component and use that to invoke the menu item. If it's | |||
| false, then it's up to your class to manually trigger the item when it wants to. | |||
| */ | |||
| CustomComponent (bool isTriggeredAutomatically = true); | |||
| /** Destructor. */ | |||
| ~CustomComponent(); | |||
| /** Returns a rectangle with the size that this component would like to have. | |||
| Note that the size which this method returns isn't necessarily the one that | |||
| the menu will give it, as the items will be stretched to have a uniform width. | |||
| */ | |||
| virtual void getIdealSize (int& idealWidth, int& idealHeight) = 0; | |||
| /** Dismisses the menu, indicating that this item has been chosen. | |||
| This will cause the menu to exit from its modal state, returning | |||
| this item's id as the result. | |||
| */ | |||
| void triggerMenuItem(); | |||
| /** Returns true if this item should be highlighted because the mouse is over it. | |||
| You can call this method in your paint() method to find out whether | |||
| to draw a highlight. | |||
| */ | |||
| bool isItemHighlighted() const throw() { return isHighlighted; } | |||
| /** @internal. */ | |||
| bool isTriggeredAutomatically() const throw() { return triggeredAutomatically; } | |||
| /** @internal. */ | |||
| void setHighlighted (bool shouldBeHighlighted); | |||
| private: | |||
| bool isHighlighted, triggeredAutomatically; | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CustomComponent); | |||
| }; | |||
| /** Appends a custom menu item. | |||
| This will add a user-defined component to use as a menu item. The component | |||
| passed in will be deleted by this menu when it's no longer needed. | |||
| @see CustomComponent | |||
| */ | |||
| void addCustomItem (int itemResultId, CustomComponent* customComponent); | |||
| private: | |||
| class Item; | |||
| @@ -38291,7 +38344,7 @@ private: | |||
| friend class MenuItemIterator; | |||
| friend class ItemComponent; | |||
| friend class Window; | |||
| friend class PopupMenuCustomComponent; | |||
| friend class CustomComponent; | |||
| friend class MenuBarComponent; | |||
| friend class OwnedArray <Item>; | |||
| friend class OwnedArray <ItemComponent>; | |||
| @@ -56959,70 +57012,6 @@ private: | |||
| #endif | |||
| #ifndef __JUCE_POPUPMENU_JUCEHEADER__ | |||
| #endif | |||
| #ifndef __JUCE_POPUPMENUCUSTOMCOMPONENT_JUCEHEADER__ | |||
| /*** Start of inlined file: juce_PopupMenuCustomComponent.h ***/ | |||
| #ifndef __JUCE_POPUPMENUCUSTOMCOMPONENT_JUCEHEADER__ | |||
| #define __JUCE_POPUPMENUCUSTOMCOMPONENT_JUCEHEADER__ | |||
| /** A user-defined copmonent that can appear inside one of the rows of a popup menu. | |||
| @see PopupMenu::addCustomItem | |||
| */ | |||
| class JUCE_API PopupMenuCustomComponent : public Component, | |||
| public ReferenceCountedObject | |||
| { | |||
| public: | |||
| /** Destructor. */ | |||
| ~PopupMenuCustomComponent(); | |||
| /** Chooses the size that this component would like to have. | |||
| Note that the size which this method returns isn't necessarily the one that | |||
| the menu will give it, as it will be stretched to fit the other items in | |||
| the menu. | |||
| */ | |||
| virtual void getIdealSize (int& idealWidth, | |||
| int& idealHeight) = 0; | |||
| /** Dismisses the menu indicating that this item has been chosen. | |||
| This will cause the menu to exit from its modal state, returning | |||
| this item's id as the result. | |||
| */ | |||
| void triggerMenuItem(); | |||
| /** Returns true if this item should be highlighted because the mouse is | |||
| over it. | |||
| You can call this method in your paint() method to find out whether | |||
| to draw a highlight. | |||
| */ | |||
| bool isItemHighlighted() const throw() { return isHighlighted; } | |||
| protected: | |||
| /** Constructor. | |||
| If isTriggeredAutomatically is true, then the menu will automatically detect | |||
| a click on this component and use that to trigger it. If it's false, then it's | |||
| up to your class to manually trigger the item if it wants to. | |||
| */ | |||
| PopupMenuCustomComponent (bool isTriggeredAutomatically = true); | |||
| private: | |||
| friend class PopupMenu; | |||
| friend class PopupMenu::ItemComponent; | |||
| friend class PopupMenu::Window; | |||
| bool isHighlighted, isTriggeredAutomatically; | |||
| JUCE_DECLARE_NON_COPYABLE (PopupMenuCustomComponent); | |||
| }; | |||
| #endif // __JUCE_POPUPMENUCUSTOMCOMPONENT_JUCEHEADER__ | |||
| /*** End of inlined file: juce_PopupMenuCustomComponent.h ***/ | |||
| #endif | |||
| #ifndef __JUCE_COMPONENTDRAGGER_JUCEHEADER__ | |||
| @@ -57548,109 +57537,6 @@ private: | |||
| #endif | |||
| #ifndef __JUCE_MOUSEEVENT_JUCEHEADER__ | |||
| #endif | |||
| #ifndef __JUCE_MOUSEHOVERDETECTOR_JUCEHEADER__ | |||
| /*** Start of inlined file: juce_MouseHoverDetector.h ***/ | |||
| #ifndef __JUCE_MOUSEHOVERDETECTOR_JUCEHEADER__ | |||
| #define __JUCE_MOUSEHOVERDETECTOR_JUCEHEADER__ | |||
| /** | |||
| Monitors a component for mouse activity, and triggers a callback | |||
| when the mouse hovers in one place for a specified length of time. | |||
| To use a hover-detector, just create one and call its setHoverComponent() | |||
| method to start it watching a component. You can call setHoverComponent (0) | |||
| to make it inactive. | |||
| (Be careful not to delete a component that's being monitored without first | |||
| stopping or deleting the hover detector). | |||
| */ | |||
| class JUCE_API MouseHoverDetector | |||
| { | |||
| public: | |||
| /** Creates a hover detector. | |||
| Initially the object is inactive, and you need to tell it which component | |||
| to monitor, using the setHoverComponent() method. | |||
| @param hoverTimeMillisecs the number of milliseconds for which the mouse | |||
| needs to stay still before the mouseHovered() method | |||
| is invoked. You can change this setting later with | |||
| the setHoverTimeMillisecs() method | |||
| */ | |||
| MouseHoverDetector (int hoverTimeMillisecs = 400); | |||
| /** Destructor. */ | |||
| virtual ~MouseHoverDetector(); | |||
| /** Changes the time for which the mouse has to stay still before it's considered | |||
| to be hovering. | |||
| */ | |||
| void setHoverTimeMillisecs (int newTimeInMillisecs); | |||
| /** Changes the component that's being monitored for hovering. | |||
| Be careful not to delete a component that's being monitored without first | |||
| stopping or deleting the hover detector. | |||
| */ | |||
| void setHoverComponent (Component* newSourceComponent); | |||
| protected: | |||
| /** Called back when the mouse hovers. | |||
| After the mouse has stayed still over the component for the length of time | |||
| specified by setHoverTimeMillisecs(), this method will be invoked. | |||
| When the mouse is first moved after this callback has occurred, the | |||
| mouseMovedAfterHover() method will be called. | |||
| @param mouseX the mouse's X position relative to the component being monitored | |||
| @param mouseY the mouse's Y position relative to the component being monitored | |||
| */ | |||
| virtual void mouseHovered (int mouseX, | |||
| int mouseY) = 0; | |||
| /** Called when the mouse is moved away after just having hovered. */ | |||
| virtual void mouseMovedAfterHover() = 0; | |||
| private: | |||
| class JUCE_API HoverDetectorInternal : public MouseListener, | |||
| public Timer | |||
| { | |||
| public: | |||
| MouseHoverDetector* owner; | |||
| int lastX, lastY; | |||
| void timerCallback(); | |||
| void mouseEnter (const MouseEvent&); | |||
| void mouseExit (const MouseEvent&); | |||
| void mouseDown (const MouseEvent&); | |||
| void mouseUp (const MouseEvent&); | |||
| void mouseMove (const MouseEvent&); | |||
| void mouseWheelMove (const MouseEvent&, float, float); | |||
| } internalTimer; | |||
| friend class HoverDetectorInternal; | |||
| Component* source; | |||
| int hoverTimeMillisecs; | |||
| bool hasJustHovered; | |||
| void hoverTimerCallback(); | |||
| void checkJustHoveredCallback(); | |||
| JUCE_DECLARE_NON_COPYABLE (MouseHoverDetector); | |||
| }; | |||
| #endif // __JUCE_MOUSEHOVERDETECTOR_JUCEHEADER__ | |||
| /*** End of inlined file: juce_MouseHoverDetector.h ***/ | |||
| #endif | |||
| #ifndef __JUCE_MOUSEINPUTSOURCE_JUCEHEADER__ | |||
| @@ -57658,8 +57544,6 @@ private: | |||
| #ifndef __JUCE_MOUSEINPUTSOURCE_JUCEHEADER__ | |||
| #define __JUCE_MOUSEINPUTSOURCE_JUCEHEADER__ | |||
| class Component; | |||
| class ComponentPeer; | |||
| class MouseInputSourceInternal; | |||
| /** | |||
| @@ -57756,12 +57640,22 @@ public: | |||
| */ | |||
| bool hasMouseMovedSignificantlySincePressed() const throw(); | |||
| /** Returns true if this input source uses a visible mouse cursor. */ | |||
| bool hasMouseCursor() const throw(); | |||
| /** Changes the mouse cursor, (if there is one). */ | |||
| void showMouseCursor (const MouseCursor& cursor); | |||
| /** Hides the mouse cursor (if there is one). */ | |||
| void hideCursor(); | |||
| /** Un-hides the mouse cursor if it was hidden by hideCursor(). */ | |||
| void revealCursor(); | |||
| /** Forces an update of the mouse cursor for whatever component it's currently over. */ | |||
| void forceMouseCursorUpdate(); | |||
| /** Returns true if this mouse can be moved indefinitely in any direction without running out of space. */ | |||
| bool canDoUnboundedMovement() const throw(); | |||
| /** Allows the mouse to move beyond the edges of the screen. | |||
| @@ -59081,99 +58975,6 @@ private: | |||
| #endif | |||
| #ifndef __JUCE_DROPSHADOWER_JUCEHEADER__ | |||
| #endif | |||
| #ifndef __JUCE_MAGNIFIERCOMPONENT_JUCEHEADER__ | |||
| /*** Start of inlined file: juce_MagnifierComponent.h ***/ | |||
| #ifndef __JUCE_MAGNIFIERCOMPONENT_JUCEHEADER__ | |||
| #define __JUCE_MAGNIFIERCOMPONENT_JUCEHEADER__ | |||
| /** | |||
| A component that contains another component, and can magnify or shrink it. | |||
| This component will continually update its size so that it fits the zoomed | |||
| version of the content component that you put inside it, so don't try to | |||
| change the size of this component directly - instead change that of the | |||
| content component. | |||
| To make it all work, the magnifier uses extremely cunning ComponentPeer tricks | |||
| to remap mouse events correctly. This means that the content component won't | |||
| appear to be a direct child of this component, and instead will think its | |||
| on the desktop. | |||
| */ | |||
| class JUCE_API MagnifierComponent : public Component | |||
| { | |||
| public: | |||
| /** Creates a MagnifierComponent. | |||
| This component will continually update its size so that it fits the zoomed | |||
| version of the content component that you put inside it, so don't try to | |||
| change the size of this component directly - instead change that of the | |||
| content component. | |||
| @param contentComponent the component to add as the magnified one | |||
| @param deleteContentCompWhenNoLongerNeeded if true, the content component will | |||
| be deleted when this component is deleted. If false, | |||
| it's the caller's responsibility to delete it later. | |||
| */ | |||
| MagnifierComponent (Component* contentComponent, | |||
| bool deleteContentCompWhenNoLongerNeeded); | |||
| /** Destructor. */ | |||
| ~MagnifierComponent(); | |||
| /** Returns the current content component. */ | |||
| Component* getContentComponent() const { return content; } | |||
| /** Changes the zoom level. | |||
| The scale factor must be greater than zero. Values less than 1 will shrink the | |||
| image; values greater than 1 will multiply its size by this amount. | |||
| When this is called, this component will change its size to fit the full extent | |||
| of the newly zoomed content. | |||
| */ | |||
| void setScaleFactor (double newScaleFactor); | |||
| /** Returns the current zoom factor. */ | |||
| double getScaleFactor() const { return scaleFactor; } | |||
| /** Changes the quality setting used to rescale the graphics. | |||
| */ | |||
| void setResamplingQuality (Graphics::ResamplingQuality newQuality); | |||
| /** @internal */ | |||
| void childBoundsChanged (Component*); | |||
| private: | |||
| Component* content; | |||
| Component* holderComp; | |||
| double scaleFactor; | |||
| ComponentPeer* peer; | |||
| bool deleteContent; | |||
| Graphics::ResamplingQuality quality; | |||
| MouseInputSource mouseSource; | |||
| void paint (Graphics& g); | |||
| void mouseDown (const MouseEvent& e); | |||
| void mouseUp (const MouseEvent& e); | |||
| void mouseDrag (const MouseEvent& e); | |||
| void mouseMove (const MouseEvent& e); | |||
| void mouseEnter (const MouseEvent& e); | |||
| void mouseExit (const MouseEvent& e); | |||
| void mouseWheelMove (const MouseEvent& e, float, float); | |||
| void passOnMouseEventToPeer (const MouseEvent& e); | |||
| int scaleInt (int n) const; | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MagnifierComponent); | |||
| }; | |||
| #endif // __JUCE_MAGNIFIERCOMPONENT_JUCEHEADER__ | |||
| /*** End of inlined file: juce_MagnifierComponent.h ***/ | |||
| #endif | |||
| #ifndef __JUCE_MIDIKEYBOARDCOMPONENT_JUCEHEADER__ | |||
| @@ -75,6 +75,14 @@ int MidiMessage::getMessageLengthFromFirstByte (const uint8 firstByte) throw() | |||
| } | |||
| //============================================================================== | |||
| MidiMessage::MidiMessage() throw() | |||
| : timeStamp (0), | |||
| data (static_cast<uint8*> (preallocatedData.asBytes)), | |||
| size (1) | |||
| { | |||
| data[0] = 0xfe; | |||
| } | |||
| MidiMessage::MidiMessage (const void* const d, const int dataSize, const double t) | |||
| : timeStamp (t), | |||
| size (dataSize) | |||
| @@ -90,6 +90,12 @@ public: | |||
| int& numBytesUsed, uint8 lastStatusByte, | |||
| double timeStamp = 0); | |||
| /** Creates an active-sense message. | |||
| Since the MidiMessage has to contain a valid message, this default constructor | |||
| just initialises it with a simple one-byte active-sense message. | |||
| */ | |||
| MidiMessage() throw(); | |||
| /** Creates a copy of another midi message. */ | |||
| MidiMessage (const MidiMessage& other); | |||
| @@ -43,8 +43,6 @@ public: | |||
| { | |||
| } | |||
| ~SetPropertyAction() {} | |||
| bool perform() | |||
| { | |||
| jassert (! (isAddingNewProperty && target->hasProperty (name))); | |||
| @@ -112,8 +110,6 @@ public: | |||
| jassert (child != 0); | |||
| } | |||
| ~AddOrRemoveChildAction() {} | |||
| bool perform() | |||
| { | |||
| if (isDeleting) | |||
| @@ -166,8 +162,6 @@ public: | |||
| { | |||
| } | |||
| ~MoveChildAction() {} | |||
| bool perform() | |||
| { | |||
| parent->moveChild (startIndex, endIndex, 0); | |||
| @@ -373,7 +367,7 @@ ValueTree ValueTree::SharedObject::getChildWithName (const Identifier& typeToMat | |||
| { | |||
| for (int i = 0; i < children.size(); ++i) | |||
| if (children.getUnchecked(i)->type == typeToMatch) | |||
| return ValueTree (static_cast <SharedObject*> (children.getUnchecked(i))); | |||
| return ValueTree (children.getUnchecked(i).getObject()); | |||
| return ValueTree::invalid; | |||
| } | |||
| @@ -382,7 +376,7 @@ ValueTree ValueTree::SharedObject::getOrCreateChildWithName (const Identifier& t | |||
| { | |||
| for (int i = 0; i < children.size(); ++i) | |||
| if (children.getUnchecked(i)->type == typeToMatch) | |||
| return ValueTree (static_cast <SharedObject*> (children.getUnchecked(i))); | |||
| return ValueTree (children.getUnchecked(i).getObject()); | |||
| SharedObject* const newObject = new SharedObject (typeToMatch); | |||
| addChild (newObject, -1, undoManager); | |||
| @@ -394,7 +388,7 @@ ValueTree ValueTree::SharedObject::getChildWithProperty (const Identifier& prope | |||
| { | |||
| for (int i = 0; i < children.size(); ++i) | |||
| if (children.getUnchecked(i)->getProperty (propertyName) == propertyValue) | |||
| return ValueTree (static_cast <SharedObject*> (children.getUnchecked(i))); | |||
| return ValueTree (children.getUnchecked(i).getObject()); | |||
| return ValueTree::invalid; | |||
| } | |||
| @@ -635,7 +629,7 @@ ValueTree ValueTree::getSibling (const int delta) const | |||
| return invalid; | |||
| const int index = object->parent->indexOf (*this) + delta; | |||
| return ValueTree (static_cast <SharedObject*> (object->parent->children [index])); | |||
| return ValueTree (object->parent->children [index].getObject()); | |||
| } | |||
| const var& ValueTree::operator[] (const Identifier& name) const | |||
| @@ -33,7 +33,7 @@ | |||
| */ | |||
| #define JUCE_MAJOR_VERSION 1 | |||
| #define JUCE_MINOR_VERSION 53 | |||
| #define JUCE_BUILDNUMBER 9 | |||
| #define JUCE_BUILDNUMBER 10 | |||
| /** Current Juce version number. | |||
| @@ -32,7 +32,6 @@ BEGIN_JUCE_NAMESPACE | |||
| #include "juce_ToolbarItemFactory.h" | |||
| #include "juce_ToolbarItemPalette.h" | |||
| #include "../menus/juce_PopupMenu.h" | |||
| #include "../menus/juce_PopupMenuCustomComponent.h" | |||
| #include "../lookandfeel/juce_LookAndFeel.h" | |||
| #include "../layout/juce_StretchableObjectResizer.h" | |||
| #include "../windows/juce_DialogWindow.h" | |||
| @@ -169,11 +168,11 @@ private: | |||
| }; | |||
| //============================================================================== | |||
| class Toolbar::MissingItemsComponent : public PopupMenuCustomComponent | |||
| class Toolbar::MissingItemsComponent : public PopupMenu::CustomComponent | |||
| { | |||
| public: | |||
| MissingItemsComponent (Toolbar& owner_, const int height_) | |||
| : PopupMenuCustomComponent (true), | |||
| : PopupMenu::CustomComponent (true), | |||
| owner (&owner_), | |||
| height (height_) | |||
| { | |||
| @@ -28,7 +28,6 @@ | |||
| BEGIN_JUCE_NAMESPACE | |||
| #include "juce_PopupMenu.h" | |||
| #include "juce_PopupMenuCustomComponent.h" | |||
| #include "../windows/juce_ComponentPeer.h" | |||
| #include "../lookandfeel/juce_LookAndFeel.h" | |||
| #include "../juce_Desktop.h" | |||
| @@ -57,7 +56,7 @@ public: | |||
| const Image& im, | |||
| const Colour& textColour_, | |||
| const bool usesColour_, | |||
| PopupMenuCustomComponent* const customComp_, | |||
| CustomComponent* const customComp_, | |||
| const PopupMenu* const subMenu_, | |||
| ApplicationCommandManager* const commandManager_) | |||
| : itemId (itemId_), text (text_), textColour (textColour_), | |||
| @@ -120,7 +119,7 @@ public: | |||
| const Colour textColour; | |||
| const bool active, isSeparator, isTicked, usesColour; | |||
| Image image; | |||
| ReferenceCountedObjectPtr <PopupMenuCustomComponent> customComp; | |||
| ReferenceCountedObjectPtr <CustomComponent> customComp; | |||
| ScopedPointer <PopupMenu> subMenu; | |||
| ApplicationCommandManager* const commandManager; | |||
| @@ -155,22 +154,15 @@ public: | |||
| removeChildComponent (itemInfo.customComp); | |||
| } | |||
| void getIdealSize (int& idealWidth, | |||
| int& idealHeight, | |||
| const int standardItemHeight) | |||
| void getIdealSize (int& idealWidth, int& idealHeight, const int standardItemHeight) | |||
| { | |||
| if (itemInfo.customComp != 0) | |||
| { | |||
| itemInfo.customComp->getIdealSize (idealWidth, idealHeight); | |||
| } | |||
| else | |||
| { | |||
| getLookAndFeel().getIdealPopupMenuItemSize (itemInfo.text, | |||
| itemInfo.isSeparator, | |||
| standardItemHeight, | |||
| idealWidth, | |||
| idealHeight); | |||
| } | |||
| idealWidth, idealHeight); | |||
| } | |||
| void paint (Graphics& g) | |||
| @@ -215,10 +207,7 @@ public: | |||
| isHighlighted = shouldBeHighlighted; | |||
| if (itemInfo.customComp != 0) | |||
| { | |||
| itemInfo.customComp->isHighlighted = shouldBeHighlighted; | |||
| itemInfo.customComp->repaint(); | |||
| } | |||
| itemInfo.customComp->setHighlighted (shouldBeHighlighted); | |||
| repaint(); | |||
| } | |||
| @@ -1126,9 +1115,7 @@ private: | |||
| && (isOver || (activeSubMenu == 0) || ! activeSubMenu->isVisible())) | |||
| { | |||
| if (isOver && (c != 0) && (activeSubMenu != 0)) | |||
| { | |||
| activeSubMenu->hide (0, true); | |||
| } | |||
| if (! isOver) | |||
| mic = 0; | |||
| @@ -1143,7 +1130,7 @@ private: | |||
| if (currentChild != 0 | |||
| && currentChild->itemInfo.canBeTriggered() | |||
| && (currentChild->itemInfo.customComp == 0 | |||
| || currentChild->itemInfo.customComp->isTriggeredAutomatically)) | |||
| || currentChild->itemInfo.customComp->isTriggeredAutomatically())) | |||
| { | |||
| dismissMenu (¤tChild->itemInfo); | |||
| } | |||
| @@ -1294,8 +1281,7 @@ void PopupMenu::addColouredItem (const int itemResultId, | |||
| } | |||
| //============================================================================== | |||
| void PopupMenu::addCustomItem (const int itemResultId, | |||
| PopupMenuCustomComponent* const customComponent) | |||
| void PopupMenu::addCustomItem (const int itemResultId, CustomComponent* const customComponent) | |||
| { | |||
| jassert (itemResultId != 0); // 0 is used as a return value to indicate that the user | |||
| // didn't pick anything, so you shouldn't use it as the id | |||
| @@ -1307,19 +1293,17 @@ void PopupMenu::addCustomItem (const int itemResultId, | |||
| Colours::black, false, customComponent, 0, 0)); | |||
| } | |||
| class NormalComponentWrapper : public PopupMenuCustomComponent | |||
| class NormalComponentWrapper : public PopupMenu::CustomComponent | |||
| { | |||
| public: | |||
| NormalComponentWrapper (Component* const comp, const int w, const int h, | |||
| const bool triggerMenuItemAutomaticallyWhenClicked) | |||
| : PopupMenuCustomComponent (triggerMenuItemAutomaticallyWhenClicked), | |||
| : PopupMenu::CustomComponent (triggerMenuItemAutomaticallyWhenClicked), | |||
| width (w), height (h) | |||
| { | |||
| addAndMakeVisible (comp); | |||
| } | |||
| ~NormalComponentWrapper() {} | |||
| void getIdealSize (int& idealWidth, int& idealHeight) | |||
| { | |||
| idealWidth = width; | |||
| @@ -1368,11 +1352,11 @@ void PopupMenu::addSeparator() | |||
| //============================================================================== | |||
| class HeaderItemComponent : public PopupMenuCustomComponent | |||
| class HeaderItemComponent : public PopupMenu::CustomComponent | |||
| { | |||
| public: | |||
| HeaderItemComponent (const String& name) | |||
| : PopupMenuCustomComponent (false) | |||
| : PopupMenu::CustomComponent (false) | |||
| { | |||
| setName (name); | |||
| } | |||
| @@ -1389,8 +1373,7 @@ public: | |||
| Justification::bottomLeft, 1); | |||
| } | |||
| void getIdealSize (int& idealWidth, | |||
| int& idealHeight) | |||
| void getIdealSize (int& idealWidth, int& idealHeight) | |||
| { | |||
| getLookAndFeel().getIdealPopupMenuItemSize (getName(), false, -1, idealWidth, idealHeight); | |||
| idealHeight += idealHeight / 2; | |||
| @@ -1596,17 +1579,23 @@ void PopupMenu::setLookAndFeel (LookAndFeel* const newLookAndFeel) | |||
| } | |||
| //============================================================================== | |||
| PopupMenuCustomComponent::PopupMenuCustomComponent (const bool isTriggeredAutomatically_) | |||
| PopupMenu::CustomComponent::CustomComponent (const bool isTriggeredAutomatically_) | |||
| : isHighlighted (false), | |||
| isTriggeredAutomatically (isTriggeredAutomatically_) | |||
| triggeredAutomatically (isTriggeredAutomatically_) | |||
| { | |||
| } | |||
| PopupMenu::CustomComponent::~CustomComponent() | |||
| { | |||
| } | |||
| PopupMenuCustomComponent::~PopupMenuCustomComponent() | |||
| void PopupMenu::CustomComponent::setHighlighted (bool shouldBeHighlighted) | |||
| { | |||
| isHighlighted = shouldBeHighlighted; | |||
| repaint(); | |||
| } | |||
| void PopupMenuCustomComponent::triggerMenuItem() | |||
| void PopupMenu::CustomComponent::triggerMenuItem() | |||
| { | |||
| PopupMenu::ItemComponent* const mic = dynamic_cast <PopupMenu::ItemComponent*> (getParentComponent()); | |||
| @@ -1667,7 +1656,7 @@ bool PopupMenu::MenuItemIterator::next() | |||
| isSeparator = item->isSeparator; | |||
| isTicked = item->isTicked; | |||
| isEnabled = item->active; | |||
| isSectionHeader = dynamic_cast <HeaderItemComponent*> (static_cast <PopupMenuCustomComponent*> (item->customComp)) != 0; | |||
| isSectionHeader = dynamic_cast <HeaderItemComponent*> (static_cast <CustomComponent*> (item->customComp)) != 0; | |||
| isCustomComponent = (! isSectionHeader) && item->customComp != 0; | |||
| customColour = item->usesColour ? &(item->textColour) : 0; | |||
| customImage = item->image; | |||
| @@ -27,7 +27,7 @@ | |||
| #define __JUCE_POPUPMENU_JUCEHEADER__ | |||
| #include "../../../application/juce_ApplicationCommandManager.h" | |||
| class PopupMenuCustomComponent; | |||
| #include "../../../memory/juce_ReferenceCountedObject.h" | |||
| //============================================================================== | |||
| @@ -147,19 +147,10 @@ public: | |||
| bool isTicked = false, | |||
| const Image& iconToUse = Image::null); | |||
| /** Appends a custom menu item. | |||
| This will add a user-defined component to use as a menu item. The component | |||
| passed in will be deleted by this menu when it's no longer needed. | |||
| @see PopupMenuCustomComponent | |||
| */ | |||
| void addCustomItem (int itemResultId, PopupMenuCustomComponent* customComponent); | |||
| /** Appends a custom menu item that can't be used to trigger a result. | |||
| This will add a user-defined component to use as a menu item. Unlike the | |||
| addCustomItem() method that takes a PopupMenuCustomComponent, this version | |||
| addCustomItem() method that takes a PopupMenu::CustomComponent, this version | |||
| can't trigger a result from it, so doesn't take a menu ID. It also doesn't | |||
| delete the component when it's finished, so it's the caller's responsibility | |||
| to manage the component that is passed-in. | |||
| @@ -169,7 +160,7 @@ public: | |||
| menu ID specified in itemResultId. If this is false, the menu item can't | |||
| be triggered, so itemResultId is not used. | |||
| @see PopupMenuCustomComponent | |||
| @see CustomComponent | |||
| */ | |||
| void addCustomItem (int itemResultId, | |||
| Component* customComponent, | |||
| @@ -378,6 +369,64 @@ public: | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MenuItemIterator); | |||
| }; | |||
| //============================================================================== | |||
| /** A user-defined copmonent that can be used as an item in a popup menu. | |||
| @see PopupMenu::addCustomItem | |||
| */ | |||
| class JUCE_API CustomComponent : public Component, | |||
| public ReferenceCountedObject | |||
| { | |||
| public: | |||
| /** Creates a custom item. | |||
| If isTriggeredAutomatically is true, then the menu will automatically detect | |||
| a mouse-click on this component and use that to invoke the menu item. If it's | |||
| false, then it's up to your class to manually trigger the item when it wants to. | |||
| */ | |||
| CustomComponent (bool isTriggeredAutomatically = true); | |||
| /** Destructor. */ | |||
| ~CustomComponent(); | |||
| /** Returns a rectangle with the size that this component would like to have. | |||
| Note that the size which this method returns isn't necessarily the one that | |||
| the menu will give it, as the items will be stretched to have a uniform width. | |||
| */ | |||
| virtual void getIdealSize (int& idealWidth, int& idealHeight) = 0; | |||
| /** Dismisses the menu, indicating that this item has been chosen. | |||
| This will cause the menu to exit from its modal state, returning | |||
| this item's id as the result. | |||
| */ | |||
| void triggerMenuItem(); | |||
| /** Returns true if this item should be highlighted because the mouse is over it. | |||
| You can call this method in your paint() method to find out whether | |||
| to draw a highlight. | |||
| */ | |||
| bool isItemHighlighted() const throw() { return isHighlighted; } | |||
| /** @internal. */ | |||
| bool isTriggeredAutomatically() const throw() { return triggeredAutomatically; } | |||
| /** @internal. */ | |||
| void setHighlighted (bool shouldBeHighlighted); | |||
| private: | |||
| //============================================================================== | |||
| bool isHighlighted, triggeredAutomatically; | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CustomComponent); | |||
| }; | |||
| /** Appends a custom menu item. | |||
| This will add a user-defined component to use as a menu item. The component | |||
| passed in will be deleted by this menu when it's no longer needed. | |||
| @see CustomComponent | |||
| */ | |||
| void addCustomItem (int itemResultId, CustomComponent* customComponent); | |||
| private: | |||
| //============================================================================== | |||
| @@ -388,7 +437,7 @@ private: | |||
| friend class MenuItemIterator; | |||
| friend class ItemComponent; | |||
| friend class Window; | |||
| friend class PopupMenuCustomComponent; | |||
| friend class CustomComponent; | |||
| friend class MenuBarComponent; | |||
| friend class OwnedArray <Item>; | |||
| friend class OwnedArray <ItemComponent>; | |||
| @@ -1,91 +0,0 @@ | |||
| /* | |||
| ============================================================================== | |||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | |||
| Copyright 2004-10 by Raw Material Software Ltd. | |||
| ------------------------------------------------------------------------------ | |||
| JUCE can be redistributed and/or modified under the terms of the GNU General | |||
| Public License (Version 2), as published by the Free Software Foundation. | |||
| A copy of the license is included in the JUCE distribution, or can be found | |||
| online at www.gnu.org/licenses. | |||
| JUCE is distributed in the hope that it will be useful, but WITHOUT ANY | |||
| WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR | |||
| A PARTICULAR PURPOSE. See the GNU General Public License for more details. | |||
| ------------------------------------------------------------------------------ | |||
| To release a closed-source product which uses JUCE, commercial licenses are | |||
| available: visit www.rawmaterialsoftware.com/juce for more information. | |||
| ============================================================================== | |||
| */ | |||
| #ifndef __JUCE_POPUPMENUCUSTOMCOMPONENT_JUCEHEADER__ | |||
| #define __JUCE_POPUPMENUCUSTOMCOMPONENT_JUCEHEADER__ | |||
| #include "juce_PopupMenu.h" | |||
| #include "../juce_Component.h" | |||
| #include "../../../memory/juce_ReferenceCountedObject.h" | |||
| //============================================================================== | |||
| /** A user-defined copmonent that can appear inside one of the rows of a popup menu. | |||
| @see PopupMenu::addCustomItem | |||
| */ | |||
| class JUCE_API PopupMenuCustomComponent : public Component, | |||
| public ReferenceCountedObject | |||
| { | |||
| public: | |||
| /** Destructor. */ | |||
| ~PopupMenuCustomComponent(); | |||
| /** Chooses the size that this component would like to have. | |||
| Note that the size which this method returns isn't necessarily the one that | |||
| the menu will give it, as it will be stretched to fit the other items in | |||
| the menu. | |||
| */ | |||
| virtual void getIdealSize (int& idealWidth, | |||
| int& idealHeight) = 0; | |||
| /** Dismisses the menu indicating that this item has been chosen. | |||
| This will cause the menu to exit from its modal state, returning | |||
| this item's id as the result. | |||
| */ | |||
| void triggerMenuItem(); | |||
| /** Returns true if this item should be highlighted because the mouse is | |||
| over it. | |||
| You can call this method in your paint() method to find out whether | |||
| to draw a highlight. | |||
| */ | |||
| bool isItemHighlighted() const throw() { return isHighlighted; } | |||
| protected: | |||
| /** Constructor. | |||
| If isTriggeredAutomatically is true, then the menu will automatically detect | |||
| a click on this component and use that to trigger it. If it's false, then it's | |||
| up to your class to manually trigger the item if it wants to. | |||
| */ | |||
| PopupMenuCustomComponent (bool isTriggeredAutomatically = true); | |||
| private: | |||
| friend class PopupMenu; | |||
| friend class PopupMenu::ItemComponent; | |||
| friend class PopupMenu::Window; | |||
| bool isHighlighted, isTriggeredAutomatically; | |||
| JUCE_DECLARE_NON_COPYABLE (PopupMenuCustomComponent); | |||
| }; | |||
| #endif // __JUCE_POPUPMENUCUSTOMCOMPONENT_JUCEHEADER__ | |||
| @@ -286,7 +286,7 @@ private: | |||
| WeakReference<Component> currentlyOverComp; | |||
| DragAndDropTarget* getCurrentlyOver() | |||
| { | |||
| return dynamic_cast <DragAndDropTarget*> (static_cast <Component*> (currentlyOverComp)); | |||
| return dynamic_cast <DragAndDropTarget*> (currentlyOverComp.get()); | |||
| } | |||
| String dragDesc; | |||
| @@ -1,146 +0,0 @@ | |||
| /* | |||
| ============================================================================== | |||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | |||
| Copyright 2004-10 by Raw Material Software Ltd. | |||
| ------------------------------------------------------------------------------ | |||
| JUCE can be redistributed and/or modified under the terms of the GNU General | |||
| Public License (Version 2), as published by the Free Software Foundation. | |||
| A copy of the license is included in the JUCE distribution, or can be found | |||
| online at www.gnu.org/licenses. | |||
| JUCE is distributed in the hope that it will be useful, but WITHOUT ANY | |||
| WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR | |||
| A PARTICULAR PURPOSE. See the GNU General Public License for more details. | |||
| ------------------------------------------------------------------------------ | |||
| To release a closed-source product which uses JUCE, commercial licenses are | |||
| available: visit www.rawmaterialsoftware.com/juce for more information. | |||
| ============================================================================== | |||
| */ | |||
| #include "../../../core/juce_StandardHeader.h" | |||
| BEGIN_JUCE_NAMESPACE | |||
| #include "../juce_Component.h" | |||
| #include "juce_MouseHoverDetector.h" | |||
| #include "juce_MouseEvent.h" | |||
| //============================================================================== | |||
| MouseHoverDetector::MouseHoverDetector (const int hoverTimeMillisecs_) | |||
| : source (0), | |||
| hoverTimeMillisecs (hoverTimeMillisecs_), | |||
| hasJustHovered (false) | |||
| { | |||
| internalTimer.owner = this; | |||
| } | |||
| MouseHoverDetector::~MouseHoverDetector() | |||
| { | |||
| setHoverComponent (0); | |||
| } | |||
| void MouseHoverDetector::setHoverTimeMillisecs (const int newTimeInMillisecs) | |||
| { | |||
| hoverTimeMillisecs = newTimeInMillisecs; | |||
| } | |||
| void MouseHoverDetector::setHoverComponent (Component* const newSourceComponent) | |||
| { | |||
| if (source != newSourceComponent) | |||
| { | |||
| internalTimer.stopTimer(); | |||
| hasJustHovered = false; | |||
| if (source != 0) | |||
| source->removeMouseListener (&internalTimer); | |||
| source = newSourceComponent; | |||
| if (newSourceComponent != 0) | |||
| newSourceComponent->addMouseListener (&internalTimer, false); | |||
| } | |||
| } | |||
| void MouseHoverDetector::hoverTimerCallback() | |||
| { | |||
| internalTimer.stopTimer(); | |||
| if (source != 0) | |||
| { | |||
| const Point<int> pos (source->getMouseXYRelative()); | |||
| if (source->reallyContains (pos, false)) | |||
| { | |||
| hasJustHovered = true; | |||
| mouseHovered (pos.getX(), pos.getY()); | |||
| } | |||
| } | |||
| } | |||
| void MouseHoverDetector::checkJustHoveredCallback() | |||
| { | |||
| if (hasJustHovered) | |||
| { | |||
| hasJustHovered = false; | |||
| mouseMovedAfterHover(); | |||
| } | |||
| } | |||
| //============================================================================== | |||
| void MouseHoverDetector::HoverDetectorInternal::timerCallback() | |||
| { | |||
| owner->hoverTimerCallback(); | |||
| } | |||
| void MouseHoverDetector::HoverDetectorInternal::mouseEnter (const MouseEvent&) | |||
| { | |||
| stopTimer(); | |||
| owner->checkJustHoveredCallback(); | |||
| } | |||
| void MouseHoverDetector::HoverDetectorInternal::mouseExit (const MouseEvent&) | |||
| { | |||
| stopTimer(); | |||
| owner->checkJustHoveredCallback(); | |||
| } | |||
| void MouseHoverDetector::HoverDetectorInternal::mouseDown (const MouseEvent&) | |||
| { | |||
| stopTimer(); | |||
| owner->checkJustHoveredCallback(); | |||
| } | |||
| void MouseHoverDetector::HoverDetectorInternal::mouseUp (const MouseEvent&) | |||
| { | |||
| stopTimer(); | |||
| owner->checkJustHoveredCallback(); | |||
| } | |||
| void MouseHoverDetector::HoverDetectorInternal::mouseMove (const MouseEvent& e) | |||
| { | |||
| if (lastX != e.x || lastY != e.y) // to avoid fake mouse-moves setting it off | |||
| { | |||
| lastX = e.x; | |||
| lastY = e.y; | |||
| if (owner->source != 0) | |||
| startTimer (owner->hoverTimeMillisecs); | |||
| owner->checkJustHoveredCallback(); | |||
| } | |||
| } | |||
| void MouseHoverDetector::HoverDetectorInternal::mouseWheelMove (const MouseEvent&, float, float) | |||
| { | |||
| stopTimer(); | |||
| owner->checkJustHoveredCallback(); | |||
| } | |||
| END_JUCE_NAMESPACE | |||
| @@ -1,130 +0,0 @@ | |||
| /* | |||
| ============================================================================== | |||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | |||
| Copyright 2004-10 by Raw Material Software Ltd. | |||
| ------------------------------------------------------------------------------ | |||
| JUCE can be redistributed and/or modified under the terms of the GNU General | |||
| Public License (Version 2), as published by the Free Software Foundation. | |||
| A copy of the license is included in the JUCE distribution, or can be found | |||
| online at www.gnu.org/licenses. | |||
| JUCE is distributed in the hope that it will be useful, but WITHOUT ANY | |||
| WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR | |||
| A PARTICULAR PURPOSE. See the GNU General Public License for more details. | |||
| ------------------------------------------------------------------------------ | |||
| To release a closed-source product which uses JUCE, commercial licenses are | |||
| available: visit www.rawmaterialsoftware.com/juce for more information. | |||
| ============================================================================== | |||
| */ | |||
| #ifndef __JUCE_MOUSEHOVERDETECTOR_JUCEHEADER__ | |||
| #define __JUCE_MOUSEHOVERDETECTOR_JUCEHEADER__ | |||
| #include "juce_MouseListener.h" | |||
| #include "../../../events/juce_Timer.h" | |||
| //============================================================================== | |||
| /** | |||
| Monitors a component for mouse activity, and triggers a callback | |||
| when the mouse hovers in one place for a specified length of time. | |||
| To use a hover-detector, just create one and call its setHoverComponent() | |||
| method to start it watching a component. You can call setHoverComponent (0) | |||
| to make it inactive. | |||
| (Be careful not to delete a component that's being monitored without first | |||
| stopping or deleting the hover detector). | |||
| */ | |||
| class JUCE_API MouseHoverDetector | |||
| { | |||
| public: | |||
| //============================================================================== | |||
| /** Creates a hover detector. | |||
| Initially the object is inactive, and you need to tell it which component | |||
| to monitor, using the setHoverComponent() method. | |||
| @param hoverTimeMillisecs the number of milliseconds for which the mouse | |||
| needs to stay still before the mouseHovered() method | |||
| is invoked. You can change this setting later with | |||
| the setHoverTimeMillisecs() method | |||
| */ | |||
| MouseHoverDetector (int hoverTimeMillisecs = 400); | |||
| /** Destructor. */ | |||
| virtual ~MouseHoverDetector(); | |||
| //============================================================================== | |||
| /** Changes the time for which the mouse has to stay still before it's considered | |||
| to be hovering. | |||
| */ | |||
| void setHoverTimeMillisecs (int newTimeInMillisecs); | |||
| /** Changes the component that's being monitored for hovering. | |||
| Be careful not to delete a component that's being monitored without first | |||
| stopping or deleting the hover detector. | |||
| */ | |||
| void setHoverComponent (Component* newSourceComponent); | |||
| protected: | |||
| //============================================================================== | |||
| /** Called back when the mouse hovers. | |||
| After the mouse has stayed still over the component for the length of time | |||
| specified by setHoverTimeMillisecs(), this method will be invoked. | |||
| When the mouse is first moved after this callback has occurred, the | |||
| mouseMovedAfterHover() method will be called. | |||
| @param mouseX the mouse's X position relative to the component being monitored | |||
| @param mouseY the mouse's Y position relative to the component being monitored | |||
| */ | |||
| virtual void mouseHovered (int mouseX, | |||
| int mouseY) = 0; | |||
| /** Called when the mouse is moved away after just having hovered. */ | |||
| virtual void mouseMovedAfterHover() = 0; | |||
| private: | |||
| //============================================================================== | |||
| class JUCE_API HoverDetectorInternal : public MouseListener, | |||
| public Timer | |||
| { | |||
| public: | |||
| MouseHoverDetector* owner; | |||
| int lastX, lastY; | |||
| void timerCallback(); | |||
| void mouseEnter (const MouseEvent&); | |||
| void mouseExit (const MouseEvent&); | |||
| void mouseDown (const MouseEvent&); | |||
| void mouseUp (const MouseEvent&); | |||
| void mouseMove (const MouseEvent&); | |||
| void mouseWheelMove (const MouseEvent&, float, float); | |||
| } internalTimer; | |||
| friend class HoverDetectorInternal; | |||
| Component* source; | |||
| int hoverTimeMillisecs; | |||
| bool hasJustHovered; | |||
| void hoverTimerCallback(); | |||
| void checkJustHoveredCallback(); | |||
| JUCE_DECLARE_NON_COPYABLE (MouseHoverDetector); | |||
| }; | |||
| #endif // __JUCE_MOUSEHOVERDETECTOR_JUCEHEADER__ | |||
| @@ -26,14 +26,12 @@ | |||
| #ifndef __JUCE_MOUSEINPUTSOURCE_JUCEHEADER__ | |||
| #define __JUCE_MOUSEINPUTSOURCE_JUCEHEADER__ | |||
| class Component; | |||
| class ComponentPeer; | |||
| class MouseInputSourceInternal; | |||
| #include "../keyboard/juce_ModifierKeys.h" | |||
| #include "../../../core/juce_Time.h" | |||
| #include "../../../memory/juce_ScopedPointer.h" | |||
| #include "../../graphics/geometry/juce_Point.h" | |||
| #include "../juce_Desktop.h" | |||
| class MouseInputSourceInternal; | |||
| //============================================================================== | |||
| @@ -132,12 +130,22 @@ public: | |||
| */ | |||
| bool hasMouseMovedSignificantlySincePressed() const throw(); | |||
| /** Returns true if this input source uses a visible mouse cursor. */ | |||
| bool hasMouseCursor() const throw(); | |||
| /** Changes the mouse cursor, (if there is one). */ | |||
| void showMouseCursor (const MouseCursor& cursor); | |||
| /** Hides the mouse cursor (if there is one). */ | |||
| void hideCursor(); | |||
| /** Un-hides the mouse cursor if it was hidden by hideCursor(). */ | |||
| void revealCursor(); | |||
| /** Forces an update of the mouse cursor for whatever component it's currently over. */ | |||
| void forceMouseCursorUpdate(); | |||
| /** Returns true if this mouse can be moved indefinitely in any direction without running out of space. */ | |||
| bool canDoUnboundedMovement() const throw(); | |||
| /** Allows the mouse to move beyond the edges of the screen. | |||
| @@ -257,12 +257,12 @@ public: | |||
| const Expression getSymbolValue (const String& objectName, const String& member) const | |||
| { | |||
| if (member.isNotEmpty()) | |||
| if (member.isEmpty()) | |||
| { | |||
| const MarkerList::Marker* const marker = markerList.getMarker (objectName); | |||
| if (marker != 0) | |||
| return Expression ((double) marker->position.resolve (this)); | |||
| return Expression (marker->position.resolve (this)); | |||
| } | |||
| else if (parentComponent != 0 && objectName == RelativeCoordinate::Strings::parent) | |||
| { | |||
| @@ -1,339 +0,0 @@ | |||
| /* | |||
| ============================================================================== | |||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | |||
| Copyright 2004-10 by Raw Material Software Ltd. | |||
| ------------------------------------------------------------------------------ | |||
| JUCE can be redistributed and/or modified under the terms of the GNU General | |||
| Public License (Version 2), as published by the Free Software Foundation. | |||
| A copy of the license is included in the JUCE distribution, or can be found | |||
| online at www.gnu.org/licenses. | |||
| JUCE is distributed in the hope that it will be useful, but WITHOUT ANY | |||
| WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR | |||
| A PARTICULAR PURPOSE. See the GNU General Public License for more details. | |||
| ------------------------------------------------------------------------------ | |||
| To release a closed-source product which uses JUCE, commercial licenses are | |||
| available: visit www.rawmaterialsoftware.com/juce for more information. | |||
| ============================================================================== | |||
| */ | |||
| #include "../../../core/juce_StandardHeader.h" | |||
| BEGIN_JUCE_NAMESPACE | |||
| #include "juce_MagnifierComponent.h" | |||
| #include "../../graphics/imaging/juce_Image.h" | |||
| #include "../windows/juce_ComponentPeer.h" | |||
| //============================================================================== | |||
| class MagnifyingPeer : public ComponentPeer | |||
| { | |||
| public: | |||
| //============================================================================== | |||
| MagnifyingPeer (Component* const component_, | |||
| MagnifierComponent* const magnifierComp_) | |||
| : ComponentPeer (component_, 0), | |||
| magnifierComp (magnifierComp_) | |||
| { | |||
| } | |||
| ~MagnifyingPeer() | |||
| { | |||
| } | |||
| //============================================================================== | |||
| void* getNativeHandle() const { return 0; } | |||
| void setVisible (bool) {} | |||
| void setTitle (const String&) {} | |||
| void setPosition (int, int) {} | |||
| void setSize (int, int) {} | |||
| void setBounds (int, int, int, int, bool) {} | |||
| void setMinimised (bool) {} | |||
| void setAlpha (float /*newAlpha*/) {} | |||
| bool isMinimised() const { return false; } | |||
| void setFullScreen (bool) {} | |||
| bool isFullScreen() const { return false; } | |||
| const BorderSize getFrameSize() const { return BorderSize (0); } | |||
| bool setAlwaysOnTop (bool) { return true; } | |||
| void toFront (bool) {} | |||
| void toBehind (ComponentPeer*) {} | |||
| void setIcon (const Image&) {} | |||
| bool isFocused() const | |||
| { | |||
| return magnifierComp->hasKeyboardFocus (true); | |||
| } | |||
| void grabFocus() | |||
| { | |||
| ComponentPeer* peer = magnifierComp->getPeer(); | |||
| if (peer != 0) | |||
| peer->grabFocus(); | |||
| } | |||
| void textInputRequired (const Point<int>& position) | |||
| { | |||
| ComponentPeer* peer = magnifierComp->getPeer(); | |||
| if (peer != 0) | |||
| peer->textInputRequired (position); | |||
| } | |||
| const Rectangle<int> getBounds() const | |||
| { | |||
| return Rectangle<int> (magnifierComp->getScreenX(), magnifierComp->getScreenY(), | |||
| component->getWidth(), component->getHeight()); | |||
| } | |||
| const Point<int> getScreenPosition() const | |||
| { | |||
| return magnifierComp->getScreenPosition(); | |||
| } | |||
| const Point<int> localToGlobal (const Point<int>& relativePosition) | |||
| { | |||
| const double zoom = magnifierComp->getScaleFactor(); | |||
| return magnifierComp->localPointToGlobal (Point<int> (roundToInt (relativePosition.getX() * zoom), | |||
| roundToInt (relativePosition.getY() * zoom))); | |||
| } | |||
| const Point<int> globalToLocal (const Point<int>& screenPosition) | |||
| { | |||
| const Point<int> p (magnifierComp->getLocalPoint (0, screenPosition)); | |||
| const double zoom = magnifierComp->getScaleFactor(); | |||
| return Point<int> (roundToInt (p.getX() / zoom), | |||
| roundToInt (p.getY() / zoom)); | |||
| } | |||
| bool contains (const Point<int>& position, bool) const | |||
| { | |||
| return isPositiveAndBelow (position.getX(), magnifierComp->getWidth()) | |||
| && isPositiveAndBelow (position.getY(), magnifierComp->getHeight()); | |||
| } | |||
| void repaint (const Rectangle<int>& area) | |||
| { | |||
| const double zoom = magnifierComp->getScaleFactor(); | |||
| magnifierComp->repaint ((int) (area.getX() * zoom), | |||
| (int) (area.getY() * zoom), | |||
| roundToInt (area.getWidth() * zoom) + 1, | |||
| roundToInt (area.getHeight() * zoom) + 1); | |||
| } | |||
| void performAnyPendingRepaintsNow() | |||
| { | |||
| } | |||
| //============================================================================== | |||
| private: | |||
| MagnifierComponent* const magnifierComp; | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MagnifyingPeer); | |||
| }; | |||
| //============================================================================== | |||
| class PeerHolderComp : public Component | |||
| { | |||
| public: | |||
| PeerHolderComp (MagnifierComponent* const magnifierComp_) | |||
| : magnifierComp (magnifierComp_) | |||
| { | |||
| setVisible (true); | |||
| } | |||
| ~PeerHolderComp() | |||
| { | |||
| } | |||
| ComponentPeer* createNewPeer (int, void*) | |||
| { | |||
| return new MagnifyingPeer (this, magnifierComp); | |||
| } | |||
| void childBoundsChanged (Component* c) | |||
| { | |||
| if (c != 0) | |||
| { | |||
| setSize (c->getWidth(), c->getHeight()); | |||
| magnifierComp->childBoundsChanged (this); | |||
| } | |||
| } | |||
| void mouseWheelMove (const MouseEvent& e, float ix, float iy) | |||
| { | |||
| // unhandled mouse wheel moves can be referred upwards to the parent comp.. | |||
| Component* const p = magnifierComp->getParentComponent(); | |||
| if (p != 0) | |||
| p->mouseWheelMove (e.getEventRelativeTo (p), ix, iy); | |||
| } | |||
| private: | |||
| MagnifierComponent* const magnifierComp; | |||
| JUCE_DECLARE_NON_COPYABLE (PeerHolderComp); | |||
| }; | |||
| //============================================================================== | |||
| MagnifierComponent::MagnifierComponent (Component* const content_, | |||
| const bool deleteContentCompWhenNoLongerNeeded) | |||
| : content (content_), | |||
| scaleFactor (0.0), | |||
| peer (0), | |||
| deleteContent (deleteContentCompWhenNoLongerNeeded), | |||
| quality (Graphics::lowResamplingQuality), | |||
| mouseSource (0, true) | |||
| { | |||
| holderComp = new PeerHolderComp (this); | |||
| setScaleFactor (1.0); | |||
| } | |||
| MagnifierComponent::~MagnifierComponent() | |||
| { | |||
| delete holderComp; | |||
| if (deleteContent) | |||
| delete content; | |||
| } | |||
| void MagnifierComponent::setScaleFactor (double newScaleFactor) | |||
| { | |||
| jassert (newScaleFactor > 0.0); // hmm - unlikely to work well with a negative scale factor | |||
| newScaleFactor = jlimit (1.0 / 8.0, 1000.0, newScaleFactor); | |||
| if (scaleFactor != newScaleFactor) | |||
| { | |||
| scaleFactor = newScaleFactor; | |||
| if (scaleFactor == 1.0) | |||
| { | |||
| holderComp->removeFromDesktop(); | |||
| peer = 0; | |||
| addChildComponent (content); | |||
| childBoundsChanged (content); | |||
| } | |||
| else | |||
| { | |||
| holderComp->addAndMakeVisible (content); | |||
| holderComp->childBoundsChanged (content); | |||
| childBoundsChanged (holderComp); | |||
| holderComp->addToDesktop (0); | |||
| peer = holderComp->getPeer(); | |||
| } | |||
| repaint(); | |||
| } | |||
| } | |||
| void MagnifierComponent::setResamplingQuality (Graphics::ResamplingQuality newQuality) | |||
| { | |||
| quality = newQuality; | |||
| } | |||
| void MagnifierComponent::paint (Graphics& g) | |||
| { | |||
| const int w = holderComp->getWidth(); | |||
| const int h = holderComp->getHeight(); | |||
| if (w == 0 || h == 0) | |||
| return; | |||
| const Rectangle<int> r (g.getClipBounds()); | |||
| const int srcX = (int) (r.getX() / scaleFactor); | |||
| const int srcY = (int) (r.getY() / scaleFactor); | |||
| int srcW = roundToInt (r.getRight() / scaleFactor) - srcX; | |||
| int srcH = roundToInt (r.getBottom() / scaleFactor) - srcY; | |||
| if (scaleFactor >= 1.0) | |||
| { | |||
| ++srcW; | |||
| ++srcH; | |||
| } | |||
| Image temp (Image::ARGB, jmax (w, srcX + srcW), jmax (h, srcY + srcH), false); | |||
| const Rectangle<int> area (srcX, srcY, srcW, srcH); | |||
| temp.clear (area); | |||
| { | |||
| Graphics g2 (temp); | |||
| g2.reduceClipRegion (area); | |||
| holderComp->paintEntireComponent (g2, false); | |||
| } | |||
| g.setImageResamplingQuality (quality); | |||
| g.drawImageTransformed (temp, AffineTransform::scale ((float) scaleFactor, (float) scaleFactor), false); | |||
| } | |||
| void MagnifierComponent::childBoundsChanged (Component* c) | |||
| { | |||
| if (c != 0) | |||
| setSize (roundToInt (c->getWidth() * scaleFactor), | |||
| roundToInt (c->getHeight() * scaleFactor)); | |||
| } | |||
| void MagnifierComponent::passOnMouseEventToPeer (const MouseEvent& e) | |||
| { | |||
| if (peer != 0) | |||
| mouseSource.handleEvent (peer, Point<int> (scaleInt (e.x), scaleInt (e.y)), | |||
| e.eventTime.toMilliseconds(), ModifierKeys::getCurrentModifiers()); | |||
| } | |||
| void MagnifierComponent::mouseDown (const MouseEvent& e) | |||
| { | |||
| passOnMouseEventToPeer (e); | |||
| } | |||
| void MagnifierComponent::mouseUp (const MouseEvent& e) | |||
| { | |||
| passOnMouseEventToPeer (e); | |||
| } | |||
| void MagnifierComponent::mouseDrag (const MouseEvent& e) | |||
| { | |||
| passOnMouseEventToPeer (e); | |||
| } | |||
| void MagnifierComponent::mouseMove (const MouseEvent& e) | |||
| { | |||
| passOnMouseEventToPeer (e); | |||
| } | |||
| void MagnifierComponent::mouseEnter (const MouseEvent& e) | |||
| { | |||
| passOnMouseEventToPeer (e); | |||
| } | |||
| void MagnifierComponent::mouseExit (const MouseEvent& e) | |||
| { | |||
| passOnMouseEventToPeer (e); | |||
| } | |||
| void MagnifierComponent::mouseWheelMove (const MouseEvent& e, float ix, float iy) | |||
| { | |||
| if (peer != 0) | |||
| peer->handleMouseWheel (e.source.getIndex(), | |||
| Point<int> (scaleInt (e.x), scaleInt (e.y)), e.eventTime.toMilliseconds(), | |||
| ix * 256.0f, iy * 256.0f); | |||
| else | |||
| Component::mouseWheelMove (e, ix, iy); | |||
| } | |||
| int MagnifierComponent::scaleInt (const int n) const | |||
| { | |||
| return roundToInt (n / scaleFactor); | |||
| } | |||
| END_JUCE_NAMESPACE | |||
| @@ -1,121 +0,0 @@ | |||
| /* | |||
| ============================================================================== | |||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | |||
| Copyright 2004-10 by Raw Material Software Ltd. | |||
| ------------------------------------------------------------------------------ | |||
| JUCE can be redistributed and/or modified under the terms of the GNU General | |||
| Public License (Version 2), as published by the Free Software Foundation. | |||
| A copy of the license is included in the JUCE distribution, or can be found | |||
| online at www.gnu.org/licenses. | |||
| JUCE is distributed in the hope that it will be useful, but WITHOUT ANY | |||
| WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR | |||
| A PARTICULAR PURPOSE. See the GNU General Public License for more details. | |||
| ------------------------------------------------------------------------------ | |||
| To release a closed-source product which uses JUCE, commercial licenses are | |||
| available: visit www.rawmaterialsoftware.com/juce for more information. | |||
| ============================================================================== | |||
| */ | |||
| #ifndef __JUCE_MAGNIFIERCOMPONENT_JUCEHEADER__ | |||
| #define __JUCE_MAGNIFIERCOMPONENT_JUCEHEADER__ | |||
| #include "../juce_Component.h" | |||
| #include "../mouse/juce_MouseInputSource.h" | |||
| //============================================================================== | |||
| /** | |||
| A component that contains another component, and can magnify or shrink it. | |||
| This component will continually update its size so that it fits the zoomed | |||
| version of the content component that you put inside it, so don't try to | |||
| change the size of this component directly - instead change that of the | |||
| content component. | |||
| To make it all work, the magnifier uses extremely cunning ComponentPeer tricks | |||
| to remap mouse events correctly. This means that the content component won't | |||
| appear to be a direct child of this component, and instead will think its | |||
| on the desktop. | |||
| */ | |||
| class JUCE_API MagnifierComponent : public Component | |||
| { | |||
| public: | |||
| //============================================================================== | |||
| /** Creates a MagnifierComponent. | |||
| This component will continually update its size so that it fits the zoomed | |||
| version of the content component that you put inside it, so don't try to | |||
| change the size of this component directly - instead change that of the | |||
| content component. | |||
| @param contentComponent the component to add as the magnified one | |||
| @param deleteContentCompWhenNoLongerNeeded if true, the content component will | |||
| be deleted when this component is deleted. If false, | |||
| it's the caller's responsibility to delete it later. | |||
| */ | |||
| MagnifierComponent (Component* contentComponent, | |||
| bool deleteContentCompWhenNoLongerNeeded); | |||
| /** Destructor. */ | |||
| ~MagnifierComponent(); | |||
| //============================================================================== | |||
| /** Returns the current content component. */ | |||
| Component* getContentComponent() const { return content; } | |||
| //============================================================================== | |||
| /** Changes the zoom level. | |||
| The scale factor must be greater than zero. Values less than 1 will shrink the | |||
| image; values greater than 1 will multiply its size by this amount. | |||
| When this is called, this component will change its size to fit the full extent | |||
| of the newly zoomed content. | |||
| */ | |||
| void setScaleFactor (double newScaleFactor); | |||
| /** Returns the current zoom factor. */ | |||
| double getScaleFactor() const { return scaleFactor; } | |||
| /** Changes the quality setting used to rescale the graphics. | |||
| */ | |||
| void setResamplingQuality (Graphics::ResamplingQuality newQuality); | |||
| //============================================================================== | |||
| /** @internal */ | |||
| void childBoundsChanged (Component*); | |||
| private: | |||
| Component* content; | |||
| Component* holderComp; | |||
| double scaleFactor; | |||
| ComponentPeer* peer; | |||
| bool deleteContent; | |||
| Graphics::ResamplingQuality quality; | |||
| MouseInputSource mouseSource; | |||
| //============================================================================== | |||
| void paint (Graphics& g); | |||
| void mouseDown (const MouseEvent& e); | |||
| void mouseUp (const MouseEvent& e); | |||
| void mouseDrag (const MouseEvent& e); | |||
| void mouseMove (const MouseEvent& e); | |||
| void mouseEnter (const MouseEvent& e); | |||
| void mouseExit (const MouseEvent& e); | |||
| void mouseWheelMove (const MouseEvent& e, float, float); | |||
| void passOnMouseEventToPeer (const MouseEvent& e); | |||
| int scaleInt (int n) const; | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MagnifierComponent); | |||
| }; | |||
| #endif // __JUCE_MAGNIFIERCOMPONENT_JUCEHEADER__ | |||
| @@ -650,7 +650,7 @@ public: | |||
| } | |||
| y = y_; | |||
| generate (static_cast <SrcPixelType*> (scratchBuffer), x, width); | |||
| generate (scratchBuffer.getData(), x, width); | |||
| et.clipLineToMask (x, y_, | |||
| reinterpret_cast<uint8*> (scratchBuffer.getData()) + SrcPixelType::indexA, | |||
| @@ -482,9 +482,6 @@ | |||
| #ifndef __JUCE_POPUPMENU_JUCEHEADER__ | |||
| #include "gui/components/menus/juce_PopupMenu.h" | |||
| #endif | |||
| #ifndef __JUCE_POPUPMENUCUSTOMCOMPONENT_JUCEHEADER__ | |||
| #include "gui/components/menus/juce_PopupMenuCustomComponent.h" | |||
| #endif | |||
| #ifndef __JUCE_COMPONENTDRAGGER_JUCEHEADER__ | |||
| #include "gui/components/mouse/juce_ComponentDragger.h" | |||
| #endif | |||
| @@ -506,9 +503,6 @@ | |||
| #ifndef __JUCE_MOUSEEVENT_JUCEHEADER__ | |||
| #include "gui/components/mouse/juce_MouseEvent.h" | |||
| #endif | |||
| #ifndef __JUCE_MOUSEHOVERDETECTOR_JUCEHEADER__ | |||
| #include "gui/components/mouse/juce_MouseHoverDetector.h" | |||
| #endif | |||
| #ifndef __JUCE_MOUSEINPUTSOURCE_JUCEHEADER__ | |||
| #include "gui/components/mouse/juce_MouseInputSource.h" | |||
| #endif | |||
| @@ -578,9 +572,6 @@ | |||
| #ifndef __JUCE_DROPSHADOWER_JUCEHEADER__ | |||
| #include "gui/components/special/juce_DropShadower.h" | |||
| #endif | |||
| #ifndef __JUCE_MAGNIFIERCOMPONENT_JUCEHEADER__ | |||
| #include "gui/components/special/juce_MagnifierComponent.h" | |||
| #endif | |||
| #ifndef __JUCE_MIDIKEYBOARDCOMPONENT_JUCEHEADER__ | |||
| #include "gui/components/special/juce_MidiKeyboardComponent.h" | |||
| #endif | |||
| @@ -447,6 +447,8 @@ MidiOutput* MidiOutput::openDevice (int index) | |||
| MidiOutput::~MidiOutput() | |||
| { | |||
| stopBackgroundThread(); | |||
| MidiOutHandle* const h = static_cast <MidiOutHandle*> (internal); | |||
| if (MidiOutHandle::activeHandles.contains (h) && --(h->refCount) == 0) | |||