From a126b1918a433349e715de50254db6b8950b4e01 Mon Sep 17 00:00:00 2001 From: Julian Storer Date: Fri, 18 Dec 2009 16:37:46 +0000 Subject: [PATCH] Added a colour ID for TextButton text when the button is toggled on. Improved the class hierarchy implementation of some container classes. Made DSound cope better with dropped buffers. --- build/linux/JUCE.make | 462 +++++++++--------- .../src/demos/AudioDemoRecordPage.cpp | 2 +- extras/juce demo/src/demos/WidgetsDemo.cpp | 4 +- .../components/jucer_TextButtonHandler.h | 3 +- src/audio/midi/juce_MidiBuffer.cpp | 50 +- src/audio/midi/juce_MidiBuffer.h | 3 +- src/containers/juce_Array.h | 143 +++--- src/containers/juce_ArrayAllocationBase.h | 2 +- src/containers/juce_OwnedArray.h | 97 ++-- src/containers/juce_ReferenceCountedArray.h | 115 ++--- src/containers/juce_SortedSet.h | 65 ++- src/containers/juce_ValueTree.cpp | 3 +- src/gui/components/buttons/juce_TextButton.h | 3 +- .../code_editor/juce_CodeDocument.cpp | 13 +- .../code_editor/juce_CodeEditorComponent.cpp | 6 +- src/gui/components/controls/juce_TreeView.cpp | 46 ++ src/gui/components/controls/juce_TreeView.h | 17 + .../lookandfeel/juce_LookAndFeel.cpp | 6 +- src/gui/graphics/geometry/juce_Path.cpp | 336 ++++++------- src/gui/graphics/geometry/juce_Path.h | 3 +- .../graphics/geometry/juce_PathIterator.cpp | 2 +- src/native/windows/juce_win32_DirectSound.cpp | 14 +- 22 files changed, 742 insertions(+), 653 deletions(-) diff --git a/build/linux/JUCE.make b/build/linux/JUCE.make index fdd623f1f6..4d553c9924 100644 --- a/build/linux/JUCE.make +++ b/build/linux/JUCE.make @@ -39,22 +39,23 @@ ifeq ($(CONFIG),Release) endif OBJECTS := \ - $(OBJDIR)/juce_Time.o \ - $(OBJDIR)/juce_SystemStats.o \ - $(OBJDIR)/juce_RelativeTime.o \ - $(OBJDIR)/juce_Random.o \ - $(OBJDIR)/juce_Logger.o \ $(OBJDIR)/juce_FileLogger.o \ - $(OBJDIR)/juce_Uuid.o \ + $(OBJDIR)/juce_Logger.o \ $(OBJDIR)/juce_PerformanceCounter.o \ + $(OBJDIR)/juce_Random.o \ + $(OBJDIR)/juce_RelativeTime.o \ + $(OBJDIR)/juce_Time.o \ + $(OBJDIR)/juce_Uuid.o \ + $(OBJDIR)/juce_SystemStats.o \ $(OBJDIR)/juce_BlowFish.o \ - $(OBJDIR)/juce_MD5.o \ $(OBJDIR)/juce_Primes.o \ $(OBJDIR)/juce_RSAKey.o \ - $(OBJDIR)/juce_BitArray.o \ + $(OBJDIR)/juce_MD5.o \ + $(OBJDIR)/juce_Variant.o \ $(OBJDIR)/juce_MemoryBlock.o \ + $(OBJDIR)/juce_ValueTree.o \ $(OBJDIR)/juce_PropertySet.o \ - $(OBJDIR)/juce_Variant.o \ + $(OBJDIR)/juce_BitArray.o \ $(OBJDIR)/juce_DirectoryIterator.o \ $(OBJDIR)/juce_File.o \ $(OBJDIR)/juce_FileInputStream.o \ @@ -62,8 +63,8 @@ OBJECTS := \ $(OBJDIR)/juce_FileSearchPath.o \ $(OBJDIR)/juce_NamedPipe.o \ $(OBJDIR)/juce_ZipFile.o \ - $(OBJDIR)/juce_Socket.o \ $(OBJDIR)/juce_URL.o \ + $(OBJDIR)/juce_Socket.o \ $(OBJDIR)/juce_BufferedInputStream.o \ $(OBJDIR)/juce_FileInputSource.o \ $(OBJDIR)/juce_GZIPCompressorOutputStream.o \ @@ -73,32 +74,32 @@ OBJECTS := \ $(OBJDIR)/juce_SubregionStream.o \ $(OBJDIR)/juce_InputStream.o \ $(OBJDIR)/juce_OutputStream.o \ - $(OBJDIR)/juce_CharacterFunctions.o \ $(OBJDIR)/juce_LocalisedStrings.o \ - $(OBJDIR)/juce_String.o \ - $(OBJDIR)/juce_StringArray.o \ $(OBJDIR)/juce_StringPairArray.o \ $(OBJDIR)/juce_XmlDocument.o \ $(OBJDIR)/juce_XmlElement.o \ + $(OBJDIR)/juce_CharacterFunctions.o \ + $(OBJDIR)/juce_String.o \ + $(OBJDIR)/juce_StringArray.o \ $(OBJDIR)/juce_InterProcessLock.o \ $(OBJDIR)/juce_ReadWriteLock.o \ $(OBJDIR)/juce_Thread.o \ $(OBJDIR)/juce_ThreadPool.o \ $(OBJDIR)/juce_TimeSliceThread.o \ - $(OBJDIR)/juce_Application.o \ $(OBJDIR)/juce_ApplicationCommandInfo.o \ + $(OBJDIR)/juce_Application.o \ $(OBJDIR)/juce_ApplicationCommandManager.o \ $(OBJDIR)/juce_ApplicationCommandTarget.o \ $(OBJDIR)/juce_ApplicationProperties.o \ $(OBJDIR)/juce_AudioDataConverters.o \ $(OBJDIR)/juce_AudioSampleBuffer.o \ $(OBJDIR)/juce_IIRFilter.o \ - $(OBJDIR)/juce_MidiBuffer.o \ $(OBJDIR)/juce_MidiFile.o \ $(OBJDIR)/juce_MidiKeyboardState.o \ - $(OBJDIR)/juce_MidiMessage.o \ $(OBJDIR)/juce_MidiMessageCollector.o \ $(OBJDIR)/juce_MidiMessageSequence.o \ + $(OBJDIR)/juce_MidiMessage.o \ + $(OBJDIR)/juce_MidiBuffer.o \ $(OBJDIR)/juce_AudioProcessor.o \ $(OBJDIR)/juce_AudioProcessorEditor.o \ $(OBJDIR)/juce_AudioProcessorGraph.o \ @@ -113,16 +114,16 @@ OBJECTS := \ $(OBJDIR)/juce_PluginListComponent.o \ $(OBJDIR)/juce_VSTPluginFormat.o \ $(OBJDIR)/juce_AiffAudioFormat.o \ - $(OBJDIR)/juce_AudioCDReader.o \ - $(OBJDIR)/juce_AudioFormat.o \ + $(OBJDIR)/juce_AudioThumbnail.o \ $(OBJDIR)/juce_AudioFormatManager.o \ $(OBJDIR)/juce_AudioSubsectionReader.o \ - $(OBJDIR)/juce_AudioThumbnail.o \ $(OBJDIR)/juce_AudioThumbnailCache.o \ - $(OBJDIR)/juce_WavAudioFormat.o \ - $(OBJDIR)/juce_QuickTimeAudioFormat.o \ $(OBJDIR)/juce_FlacAudioFormat.o \ $(OBJDIR)/juce_OggVorbisAudioFormat.o \ + $(OBJDIR)/juce_QuickTimeAudioFormat.o \ + $(OBJDIR)/juce_AudioFormat.o \ + $(OBJDIR)/juce_AudioCDReader.o \ + $(OBJDIR)/juce_WavAudioFormat.o \ $(OBJDIR)/juce_AudioFormatReaderSource.o \ $(OBJDIR)/juce_AudioSourcePlayer.o \ $(OBJDIR)/juce_AudioTransportSource.o \ @@ -130,12 +131,12 @@ OBJECTS := \ $(OBJDIR)/juce_ChannelRemappingAudioSource.o \ $(OBJDIR)/juce_IIRFilterAudioSource.o \ $(OBJDIR)/juce_MixerAudioSource.o \ - $(OBJDIR)/juce_ResamplingAudioSource.o \ $(OBJDIR)/juce_ToneGeneratorAudioSource.o \ - $(OBJDIR)/juce_AudioDeviceManager.o \ + $(OBJDIR)/juce_ResamplingAudioSource.o \ $(OBJDIR)/juce_AudioIODevice.o \ $(OBJDIR)/juce_AudioIODeviceType.o \ $(OBJDIR)/juce_MidiOutput.o \ + $(OBJDIR)/juce_AudioDeviceManager.o \ $(OBJDIR)/juce_Sampler.o \ $(OBJDIR)/juce_Synthesiser.o \ $(OBJDIR)/juce_ActionBroadcaster.o \ @@ -147,99 +148,99 @@ OBJECTS := \ $(OBJDIR)/juce_InterprocessConnectionServer.o \ $(OBJDIR)/juce_Message.o \ $(OBJDIR)/juce_MessageListener.o \ - $(OBJDIR)/juce_MessageManager.o \ $(OBJDIR)/juce_MultiTimer.o \ $(OBJDIR)/juce_Timer.o \ - $(OBJDIR)/juce_UndoManager.o \ + $(OBJDIR)/juce_MessageManager.o \ + $(OBJDIR)/juce_DeletedAtShutdown.o \ + $(OBJDIR)/juce_FileBasedDocument.o \ $(OBJDIR)/juce_PropertiesFile.o \ + $(OBJDIR)/juce_UndoManager.o \ $(OBJDIR)/juce_RecentlyOpenedFilesList.o \ - $(OBJDIR)/juce_FileBasedDocument.o \ - $(OBJDIR)/juce_DeletedAtShutdown.o \ - $(OBJDIR)/juce_Brush.o \ - $(OBJDIR)/juce_GradientBrush.o \ - $(OBJDIR)/juce_ImageBrush.o \ - $(OBJDIR)/juce_SolidColourBrush.o \ + $(OBJDIR)/juce_Colours.o \ $(OBJDIR)/juce_Colour.o \ $(OBJDIR)/juce_ColourGradient.o \ - $(OBJDIR)/juce_Colours.o \ + $(OBJDIR)/juce_Justification.o \ $(OBJDIR)/juce_EdgeTable.o \ + $(OBJDIR)/juce_RectanglePlacement.o \ $(OBJDIR)/juce_Graphics.o \ - $(OBJDIR)/juce_Justification.o \ - $(OBJDIR)/juce_LowLevelGraphicsPostScriptRenderer.o \ + $(OBJDIR)/juce_FillType.o \ $(OBJDIR)/juce_LowLevelGraphicsSoftwareRenderer.o \ - $(OBJDIR)/juce_RectanglePlacement.o \ - $(OBJDIR)/juce_Drawable.o \ + $(OBJDIR)/juce_LowLevelGraphicsPostScriptRenderer.o \ $(OBJDIR)/juce_DrawableComposite.o \ - $(OBJDIR)/juce_DrawableImage.o \ + $(OBJDIR)/juce_Drawable.o \ $(OBJDIR)/juce_DrawablePath.o \ $(OBJDIR)/juce_DrawableText.o \ + $(OBJDIR)/juce_DrawableImage.o \ $(OBJDIR)/juce_SVGParser.o \ - $(OBJDIR)/juce_DropShadowEffect.o \ $(OBJDIR)/juce_GlowEffect.o \ $(OBJDIR)/juce_ReduceOpacityEffect.o \ - $(OBJDIR)/juce_Font.o \ - $(OBJDIR)/juce_GlyphArrangement.o \ + $(OBJDIR)/juce_DropShadowEffect.o \ $(OBJDIR)/juce_TextLayout.o \ + $(OBJDIR)/juce_Font.o \ $(OBJDIR)/juce_Typeface.o \ - $(OBJDIR)/juce_AffineTransform.o \ + $(OBJDIR)/juce_GlyphArrangement.o \ $(OBJDIR)/juce_BorderSize.o \ $(OBJDIR)/juce_Line.o \ - $(OBJDIR)/juce_Path.o \ - $(OBJDIR)/juce_PathIterator.o \ - $(OBJDIR)/juce_PathStrokeType.o \ + $(OBJDIR)/juce_AffineTransform.o \ $(OBJDIR)/juce_Point.o \ $(OBJDIR)/juce_PositionedRectangle.o \ - $(OBJDIR)/juce_Rectangle.o \ $(OBJDIR)/juce_RectangleList.o \ - $(OBJDIR)/juce_Image.o \ + $(OBJDIR)/juce_PathStrokeType.o \ + $(OBJDIR)/juce_Rectangle.o \ + $(OBJDIR)/juce_Path.o \ + $(OBJDIR)/juce_PathIterator.o \ $(OBJDIR)/juce_ImageCache.o \ - $(OBJDIR)/juce_ImageConvolutionKernel.o \ $(OBJDIR)/juce_ImageFileFormat.o \ - $(OBJDIR)/juce_GIFLoader.o \ + $(OBJDIR)/juce_Image.o \ + $(OBJDIR)/juce_ImageConvolutionKernel.o \ $(OBJDIR)/juce_JPEGLoader.o \ $(OBJDIR)/juce_PNGLoader.o \ - $(OBJDIR)/juce_Component.o \ + $(OBJDIR)/juce_GIFLoader.o \ $(OBJDIR)/juce_ComponentListener.o \ $(OBJDIR)/juce_Desktop.o \ + $(OBJDIR)/juce_Component.o \ $(OBJDIR)/juce_ArrowButton.o \ $(OBJDIR)/juce_Button.o \ - $(OBJDIR)/juce_DrawableButton.o \ $(OBJDIR)/juce_HyperlinkButton.o \ $(OBJDIR)/juce_ImageButton.o \ - $(OBJDIR)/juce_ShapeButton.o \ $(OBJDIR)/juce_TextButton.o \ $(OBJDIR)/juce_ToggleButton.o \ + $(OBJDIR)/juce_DrawableButton.o \ $(OBJDIR)/juce_ToolbarButton.o \ - $(OBJDIR)/juce_ComboBox.o \ + $(OBJDIR)/juce_ShapeButton.o \ $(OBJDIR)/juce_Label.o \ - $(OBJDIR)/juce_ListBox.o \ - $(OBJDIR)/juce_ProgressBar.o \ - $(OBJDIR)/juce_Slider.o \ + $(OBJDIR)/juce_TreeView.o \ $(OBJDIR)/juce_TableHeaderComponent.o \ + $(OBJDIR)/juce_ProgressBar.o \ + $(OBJDIR)/juce_ToolbarItemPalette.o \ $(OBJDIR)/juce_TableListBox.o \ + $(OBJDIR)/juce_Slider.o \ $(OBJDIR)/juce_TextEditor.o \ + $(OBJDIR)/juce_ComboBox.o \ + $(OBJDIR)/juce_ListBox.o \ $(OBJDIR)/juce_Toolbar.o \ $(OBJDIR)/juce_ToolbarItemComponent.o \ - $(OBJDIR)/juce_ToolbarItemPalette.o \ - $(OBJDIR)/juce_TreeView.o \ + $(OBJDIR)/juce_CPlusPlusCodeTokeniser.o \ + $(OBJDIR)/juce_CodeEditorComponent.o \ + $(OBJDIR)/juce_CodeDocument.o \ $(OBJDIR)/juce_DirectoryContentsDisplayComponent.o \ $(OBJDIR)/juce_DirectoryContentsList.o \ $(OBJDIR)/juce_FileBrowserComponent.o \ - $(OBJDIR)/juce_FileChooser.o \ - $(OBJDIR)/juce_FileChooserDialogBox.o \ $(OBJDIR)/juce_FileFilter.o \ $(OBJDIR)/juce_FileListComponent.o \ - $(OBJDIR)/juce_FilenameComponent.o \ - $(OBJDIR)/juce_FileSearchPathListComponent.o \ + $(OBJDIR)/juce_FileChooser.o \ $(OBJDIR)/juce_FileTreeComponent.o \ + $(OBJDIR)/juce_FilenameComponent.o \ $(OBJDIR)/juce_ImagePreviewComponent.o \ + $(OBJDIR)/juce_FileChooserDialogBox.o \ + $(OBJDIR)/juce_FileSearchPathListComponent.o \ $(OBJDIR)/juce_WildcardFileFilter.o \ - $(OBJDIR)/juce_KeyboardFocusTraverser.o \ $(OBJDIR)/juce_KeyListener.o \ $(OBJDIR)/juce_KeyMappingEditorComponent.o \ - $(OBJDIR)/juce_KeyPress.o \ $(OBJDIR)/juce_KeyPressMappingSet.o \ + $(OBJDIR)/juce_KeyboardFocusTraverser.o \ $(OBJDIR)/juce_ModifierKeys.o \ + $(OBJDIR)/juce_KeyPress.o \ $(OBJDIR)/juce_ComponentAnimator.o \ $(OBJDIR)/juce_ComponentBoundsConstrainer.o \ $(OBJDIR)/juce_ComponentMovementWatcher.o \ @@ -256,15 +257,15 @@ OBJECTS := \ $(OBJDIR)/juce_Viewport.o \ $(OBJDIR)/juce_LookAndFeel.o \ $(OBJDIR)/juce_OldSchoolLookAndFeel.o \ - $(OBJDIR)/juce_MenuBarComponent.o \ $(OBJDIR)/juce_MenuBarModel.o \ + $(OBJDIR)/juce_MenuBarComponent.o \ $(OBJDIR)/juce_PopupMenu.o \ $(OBJDIR)/juce_ComponentDragger.o \ $(OBJDIR)/juce_DragAndDropContainer.o \ - $(OBJDIR)/juce_MouseCursor.o \ $(OBJDIR)/juce_MouseEvent.o \ $(OBJDIR)/juce_MouseHoverDetector.o \ $(OBJDIR)/juce_MouseListener.o \ + $(OBJDIR)/juce_MouseCursor.o \ $(OBJDIR)/juce_BooleanPropertyComponent.o \ $(OBJDIR)/juce_ButtonPropertyComponent.o \ $(OBJDIR)/juce_ChoicePropertyComponent.o \ @@ -273,17 +274,16 @@ OBJECTS := \ $(OBJDIR)/juce_SliderPropertyComponent.o \ $(OBJDIR)/juce_TextPropertyComponent.o \ $(OBJDIR)/juce_AudioDeviceSelectorComponent.o \ - $(OBJDIR)/juce_BubbleComponent.o \ $(OBJDIR)/juce_BubbleMessageComponent.o \ - $(OBJDIR)/juce_ColourSelector.o \ $(OBJDIR)/juce_DropShadower.o \ $(OBJDIR)/juce_MagnifierComponent.o \ - $(OBJDIR)/juce_MidiKeyboardComponent.o \ - $(OBJDIR)/juce_OpenGLComponent.o \ $(OBJDIR)/juce_PreferencesPanel.o \ $(OBJDIR)/juce_SystemTrayIconComponent.o \ + $(OBJDIR)/juce_OpenGLComponent.o \ + $(OBJDIR)/juce_MidiKeyboardComponent.o \ + $(OBJDIR)/juce_BubbleComponent.o \ + $(OBJDIR)/juce_ColourSelector.o \ $(OBJDIR)/juce_AlertWindow.o \ - $(OBJDIR)/juce_ComponentPeer.o \ $(OBJDIR)/juce_DialogWindow.o \ $(OBJDIR)/juce_DocumentWindow.o \ $(OBJDIR)/juce_ResizableWindow.o \ @@ -291,18 +291,20 @@ OBJECTS := \ $(OBJDIR)/juce_ThreadWithProgressWindow.o \ $(OBJDIR)/juce_TooltipWindow.o \ $(OBJDIR)/juce_TopLevelWindow.o \ - $(OBJDIR)/juce_linux_Audio.o \ - $(OBJDIR)/juce_linux_AudioCDReader.o \ - $(OBJDIR)/juce_linux_FileChooser.o \ - $(OBJDIR)/juce_linux_Files.o \ - $(OBJDIR)/juce_linux_Fonts.o \ - $(OBJDIR)/juce_linux_Messaging.o \ + $(OBJDIR)/juce_ComponentPeer.o \ $(OBJDIR)/juce_linux_Midi.o \ $(OBJDIR)/juce_linux_Network.o \ - $(OBJDIR)/juce_linux_SystemStats.o \ + $(OBJDIR)/juce_linux_FileChooser.o \ $(OBJDIR)/juce_linux_Threads.o \ + $(OBJDIR)/juce_linux_Messaging.o \ + $(OBJDIR)/juce_linux_Fonts.o \ + $(OBJDIR)/juce_linux_SystemStats.o \ $(OBJDIR)/juce_linux_WebBrowserComponent.o \ + $(OBJDIR)/juce_linux_Audio.o \ $(OBJDIR)/juce_linux_Windowing.o \ + $(OBJDIR)/juce_linux_JackAudio.o \ + $(OBJDIR)/juce_linux_AudioCDReader.o \ + $(OBJDIR)/juce_linux_Files.o \ $(OBJDIR)/juce_linux_NativeCode.o \ MKDIR_TYPE := msdos @@ -345,17 +347,17 @@ else -@if exist $(subst /,\,$(OBJDIR)) rmdir /s /q $(subst /,\,$(OBJDIR)) endif -$(OBJDIR)/juce_Time.o: ../../src/core/juce_Time.cpp +$(OBJDIR)/juce_FileLogger.o: ../../src/core/juce_FileLogger.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_SystemStats.o: ../../src/core/juce_SystemStats.cpp +$(OBJDIR)/juce_Logger.o: ../../src/core/juce_Logger.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_RelativeTime.o: ../../src/core/juce_RelativeTime.cpp +$(OBJDIR)/juce_PerformanceCounter.o: ../../src/core/juce_PerformanceCounter.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" @@ -365,12 +367,12 @@ $(OBJDIR)/juce_Random.o: ../../src/core/juce_Random.cpp @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_Logger.o: ../../src/core/juce_Logger.cpp +$(OBJDIR)/juce_RelativeTime.o: ../../src/core/juce_RelativeTime.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_FileLogger.o: ../../src/core/juce_FileLogger.cpp +$(OBJDIR)/juce_Time.o: ../../src/core/juce_Time.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" @@ -380,7 +382,7 @@ $(OBJDIR)/juce_Uuid.o: ../../src/core/juce_Uuid.cpp @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_PerformanceCounter.o: ../../src/core/juce_PerformanceCounter.cpp +$(OBJDIR)/juce_SystemStats.o: ../../src/core/juce_SystemStats.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" @@ -390,22 +392,22 @@ $(OBJDIR)/juce_BlowFish.o: ../../src/cryptography/juce_BlowFish.cpp @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_MD5.o: ../../src/cryptography/juce_MD5.cpp +$(OBJDIR)/juce_Primes.o: ../../src/cryptography/juce_Primes.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_Primes.o: ../../src/cryptography/juce_Primes.cpp +$(OBJDIR)/juce_RSAKey.o: ../../src/cryptography/juce_RSAKey.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_RSAKey.o: ../../src/cryptography/juce_RSAKey.cpp +$(OBJDIR)/juce_MD5.o: ../../src/cryptography/juce_MD5.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_BitArray.o: ../../src/containers/juce_BitArray.cpp +$(OBJDIR)/juce_Variant.o: ../../src/containers/juce_Variant.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" @@ -415,12 +417,17 @@ $(OBJDIR)/juce_MemoryBlock.o: ../../src/containers/juce_MemoryBlock.cpp @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" +$(OBJDIR)/juce_ValueTree.o: ../../src/containers/juce_ValueTree.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + $(OBJDIR)/juce_PropertySet.o: ../../src/containers/juce_PropertySet.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_Variant.o: ../../src/containers/juce_Variant.cpp +$(OBJDIR)/juce_BitArray.o: ../../src/containers/juce_BitArray.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" @@ -460,12 +467,12 @@ $(OBJDIR)/juce_ZipFile.o: ../../src/io/files/juce_ZipFile.cpp @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_Socket.o: ../../src/io/network/juce_Socket.cpp +$(OBJDIR)/juce_URL.o: ../../src/io/network/juce_URL.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_URL.o: ../../src/io/network/juce_URL.cpp +$(OBJDIR)/juce_Socket.o: ../../src/io/network/juce_Socket.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" @@ -515,37 +522,37 @@ $(OBJDIR)/juce_OutputStream.o: ../../src/io/streams/juce_OutputStream.cpp @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_CharacterFunctions.o: ../../src/text/juce_CharacterFunctions.cpp +$(OBJDIR)/juce_LocalisedStrings.o: ../../src/text/juce_LocalisedStrings.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_LocalisedStrings.o: ../../src/text/juce_LocalisedStrings.cpp +$(OBJDIR)/juce_StringPairArray.o: ../../src/text/juce_StringPairArray.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_String.o: ../../src/text/juce_String.cpp +$(OBJDIR)/juce_XmlDocument.o: ../../src/text/juce_XmlDocument.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_StringArray.o: ../../src/text/juce_StringArray.cpp +$(OBJDIR)/juce_XmlElement.o: ../../src/text/juce_XmlElement.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_StringPairArray.o: ../../src/text/juce_StringPairArray.cpp +$(OBJDIR)/juce_CharacterFunctions.o: ../../src/text/juce_CharacterFunctions.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_XmlDocument.o: ../../src/text/juce_XmlDocument.cpp +$(OBJDIR)/juce_String.o: ../../src/text/juce_String.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_XmlElement.o: ../../src/text/juce_XmlElement.cpp +$(OBJDIR)/juce_StringArray.o: ../../src/text/juce_StringArray.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" @@ -575,12 +582,12 @@ $(OBJDIR)/juce_TimeSliceThread.o: ../../src/threads/juce_TimeSliceThread.cpp @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_Application.o: ../../src/application/juce_Application.cpp +$(OBJDIR)/juce_ApplicationCommandInfo.o: ../../src/application/juce_ApplicationCommandInfo.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_ApplicationCommandInfo.o: ../../src/application/juce_ApplicationCommandInfo.cpp +$(OBJDIR)/juce_Application.o: ../../src/application/juce_Application.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" @@ -615,32 +622,32 @@ $(OBJDIR)/juce_IIRFilter.o: ../../src/audio/dsp/juce_IIRFilter.cpp @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_MidiBuffer.o: ../../src/audio/midi/juce_MidiBuffer.cpp +$(OBJDIR)/juce_MidiFile.o: ../../src/audio/midi/juce_MidiFile.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_MidiFile.o: ../../src/audio/midi/juce_MidiFile.cpp +$(OBJDIR)/juce_MidiKeyboardState.o: ../../src/audio/midi/juce_MidiKeyboardState.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_MidiKeyboardState.o: ../../src/audio/midi/juce_MidiKeyboardState.cpp +$(OBJDIR)/juce_MidiMessageCollector.o: ../../src/audio/midi/juce_MidiMessageCollector.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_MidiMessage.o: ../../src/audio/midi/juce_MidiMessage.cpp +$(OBJDIR)/juce_MidiMessageSequence.o: ../../src/audio/midi/juce_MidiMessageSequence.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_MidiMessageCollector.o: ../../src/audio/midi/juce_MidiMessageCollector.cpp +$(OBJDIR)/juce_MidiMessage.o: ../../src/audio/midi/juce_MidiMessage.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_MidiMessageSequence.o: ../../src/audio/midi/juce_MidiMessageSequence.cpp +$(OBJDIR)/juce_MidiBuffer.o: ../../src/audio/midi/juce_MidiBuffer.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" @@ -715,52 +722,52 @@ $(OBJDIR)/juce_AiffAudioFormat.o: ../../src/audio/audio_file_formats/juce_AiffAu @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_AudioCDReader.o: ../../src/audio/audio_file_formats/juce_AudioCDReader.cpp +$(OBJDIR)/juce_AudioThumbnail.o: ../../src/audio/audio_file_formats/juce_AudioThumbnail.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_AudioFormat.o: ../../src/audio/audio_file_formats/juce_AudioFormat.cpp +$(OBJDIR)/juce_AudioFormatManager.o: ../../src/audio/audio_file_formats/juce_AudioFormatManager.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_AudioFormatManager.o: ../../src/audio/audio_file_formats/juce_AudioFormatManager.cpp +$(OBJDIR)/juce_AudioSubsectionReader.o: ../../src/audio/audio_file_formats/juce_AudioSubsectionReader.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_AudioSubsectionReader.o: ../../src/audio/audio_file_formats/juce_AudioSubsectionReader.cpp +$(OBJDIR)/juce_AudioThumbnailCache.o: ../../src/audio/audio_file_formats/juce_AudioThumbnailCache.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_AudioThumbnail.o: ../../src/audio/audio_file_formats/juce_AudioThumbnail.cpp +$(OBJDIR)/juce_FlacAudioFormat.o: ../../src/audio/audio_file_formats/juce_FlacAudioFormat.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_AudioThumbnailCache.o: ../../src/audio/audio_file_formats/juce_AudioThumbnailCache.cpp +$(OBJDIR)/juce_OggVorbisAudioFormat.o: ../../src/audio/audio_file_formats/juce_OggVorbisAudioFormat.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_WavAudioFormat.o: ../../src/audio/audio_file_formats/juce_WavAudioFormat.cpp +$(OBJDIR)/juce_QuickTimeAudioFormat.o: ../../src/audio/audio_file_formats/juce_QuickTimeAudioFormat.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_QuickTimeAudioFormat.o: ../../src/audio/audio_file_formats/juce_QuickTimeAudioFormat.cpp +$(OBJDIR)/juce_AudioFormat.o: ../../src/audio/audio_file_formats/juce_AudioFormat.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_FlacAudioFormat.o: ../../src/audio/audio_file_formats/juce_FlacAudioFormat.cpp +$(OBJDIR)/juce_AudioCDReader.o: ../../src/audio/audio_file_formats/juce_AudioCDReader.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_OggVorbisAudioFormat.o: ../../src/audio/audio_file_formats/juce_OggVorbisAudioFormat.cpp +$(OBJDIR)/juce_WavAudioFormat.o: ../../src/audio/audio_file_formats/juce_WavAudioFormat.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" @@ -800,17 +807,12 @@ $(OBJDIR)/juce_MixerAudioSource.o: ../../src/audio/audio_sources/juce_MixerAudio @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_ResamplingAudioSource.o: ../../src/audio/audio_sources/juce_ResamplingAudioSource.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" - $(OBJDIR)/juce_ToneGeneratorAudioSource.o: ../../src/audio/audio_sources/juce_ToneGeneratorAudioSource.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_AudioDeviceManager.o: ../../src/audio/devices/juce_AudioDeviceManager.cpp +$(OBJDIR)/juce_ResamplingAudioSource.o: ../../src/audio/audio_sources/juce_ResamplingAudioSource.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" @@ -830,6 +832,11 @@ $(OBJDIR)/juce_MidiOutput.o: ../../src/audio/devices/juce_MidiOutput.cpp @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" +$(OBJDIR)/juce_AudioDeviceManager.o: ../../src/audio/devices/juce_AudioDeviceManager.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + $(OBJDIR)/juce_Sampler.o: ../../src/audio/synthesisers/juce_Sampler.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @@ -885,11 +892,6 @@ $(OBJDIR)/juce_MessageListener.o: ../../src/events/juce_MessageListener.cpp @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_MessageManager.o: ../../src/events/juce_MessageManager.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" - $(OBJDIR)/juce_MultiTimer.o: ../../src/events/juce_MultiTimer.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @@ -900,17 +902,12 @@ $(OBJDIR)/juce_Timer.o: ../../src/events/juce_Timer.cpp @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_UndoManager.o: ../../src/utilities/juce_UndoManager.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" - -$(OBJDIR)/juce_PropertiesFile.o: ../../src/utilities/juce_PropertiesFile.cpp +$(OBJDIR)/juce_MessageManager.o: ../../src/events/juce_MessageManager.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_RecentlyOpenedFilesList.o: ../../src/utilities/juce_RecentlyOpenedFilesList.cpp +$(OBJDIR)/juce_DeletedAtShutdown.o: ../../src/utilities/juce_DeletedAtShutdown.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" @@ -920,27 +917,22 @@ $(OBJDIR)/juce_FileBasedDocument.o: ../../src/utilities/juce_FileBasedDocument.c @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_DeletedAtShutdown.o: ../../src/utilities/juce_DeletedAtShutdown.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" - -$(OBJDIR)/juce_Brush.o: ../../src/gui/graphics/brushes/juce_Brush.cpp +$(OBJDIR)/juce_PropertiesFile.o: ../../src/utilities/juce_PropertiesFile.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_GradientBrush.o: ../../src/gui/graphics/brushes/juce_GradientBrush.cpp +$(OBJDIR)/juce_UndoManager.o: ../../src/utilities/juce_UndoManager.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_ImageBrush.o: ../../src/gui/graphics/brushes/juce_ImageBrush.cpp +$(OBJDIR)/juce_RecentlyOpenedFilesList.o: ../../src/utilities/juce_RecentlyOpenedFilesList.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_SolidColourBrush.o: ../../src/gui/graphics/brushes/juce_SolidColourBrush.cpp +$(OBJDIR)/juce_Colours.o: ../../src/gui/graphics/colour/juce_Colours.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" @@ -955,7 +947,7 @@ $(OBJDIR)/juce_ColourGradient.o: ../../src/gui/graphics/colour/juce_ColourGradie @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_Colours.o: ../../src/gui/graphics/colour/juce_Colours.cpp +$(OBJDIR)/juce_Justification.o: ../../src/gui/graphics/contexts/juce_Justification.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" @@ -965,17 +957,17 @@ $(OBJDIR)/juce_EdgeTable.o: ../../src/gui/graphics/contexts/juce_EdgeTable.cpp @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_Graphics.o: ../../src/gui/graphics/contexts/juce_Graphics.cpp +$(OBJDIR)/juce_RectanglePlacement.o: ../../src/gui/graphics/contexts/juce_RectanglePlacement.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_Justification.o: ../../src/gui/graphics/contexts/juce_Justification.cpp +$(OBJDIR)/juce_Graphics.o: ../../src/gui/graphics/contexts/juce_Graphics.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_LowLevelGraphicsPostScriptRenderer.o: ../../src/gui/graphics/contexts/juce_LowLevelGraphicsPostScriptRenderer.cpp +$(OBJDIR)/juce_FillType.o: ../../src/gui/graphics/contexts/juce_FillType.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" @@ -985,12 +977,7 @@ $(OBJDIR)/juce_LowLevelGraphicsSoftwareRenderer.o: ../../src/gui/graphics/contex @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_RectanglePlacement.o: ../../src/gui/graphics/contexts/juce_RectanglePlacement.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" - -$(OBJDIR)/juce_Drawable.o: ../../src/gui/graphics/drawables/juce_Drawable.cpp +$(OBJDIR)/juce_LowLevelGraphicsPostScriptRenderer.o: ../../src/gui/graphics/contexts/juce_LowLevelGraphicsPostScriptRenderer.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" @@ -1000,7 +987,7 @@ $(OBJDIR)/juce_DrawableComposite.o: ../../src/gui/graphics/drawables/juce_Drawab @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_DrawableImage.o: ../../src/gui/graphics/drawables/juce_DrawableImage.cpp +$(OBJDIR)/juce_Drawable.o: ../../src/gui/graphics/drawables/juce_Drawable.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" @@ -1015,12 +1002,12 @@ $(OBJDIR)/juce_DrawableText.o: ../../src/gui/graphics/drawables/juce_DrawableTex @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_SVGParser.o: ../../src/gui/graphics/drawables/juce_SVGParser.cpp +$(OBJDIR)/juce_DrawableImage.o: ../../src/gui/graphics/drawables/juce_DrawableImage.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_DropShadowEffect.o: ../../src/gui/graphics/effects/juce_DropShadowEffect.cpp +$(OBJDIR)/juce_SVGParser.o: ../../src/gui/graphics/drawables/juce_SVGParser.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" @@ -1035,17 +1022,17 @@ $(OBJDIR)/juce_ReduceOpacityEffect.o: ../../src/gui/graphics/effects/juce_Reduce @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_Font.o: ../../src/gui/graphics/fonts/juce_Font.cpp +$(OBJDIR)/juce_DropShadowEffect.o: ../../src/gui/graphics/effects/juce_DropShadowEffect.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_GlyphArrangement.o: ../../src/gui/graphics/fonts/juce_GlyphArrangement.cpp +$(OBJDIR)/juce_TextLayout.o: ../../src/gui/graphics/fonts/juce_TextLayout.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_TextLayout.o: ../../src/gui/graphics/fonts/juce_TextLayout.cpp +$(OBJDIR)/juce_Font.o: ../../src/gui/graphics/fonts/juce_Font.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" @@ -1055,7 +1042,7 @@ $(OBJDIR)/juce_Typeface.o: ../../src/gui/graphics/fonts/juce_Typeface.cpp @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_AffineTransform.o: ../../src/gui/graphics/geometry/juce_AffineTransform.cpp +$(OBJDIR)/juce_GlyphArrangement.o: ../../src/gui/graphics/fonts/juce_GlyphArrangement.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" @@ -1070,27 +1057,27 @@ $(OBJDIR)/juce_Line.o: ../../src/gui/graphics/geometry/juce_Line.cpp @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_Path.o: ../../src/gui/graphics/geometry/juce_Path.cpp +$(OBJDIR)/juce_AffineTransform.o: ../../src/gui/graphics/geometry/juce_AffineTransform.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_PathIterator.o: ../../src/gui/graphics/geometry/juce_PathIterator.cpp +$(OBJDIR)/juce_Point.o: ../../src/gui/graphics/geometry/juce_Point.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_PathStrokeType.o: ../../src/gui/graphics/geometry/juce_PathStrokeType.cpp +$(OBJDIR)/juce_PositionedRectangle.o: ../../src/gui/graphics/geometry/juce_PositionedRectangle.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_Point.o: ../../src/gui/graphics/geometry/juce_Point.cpp +$(OBJDIR)/juce_RectangleList.o: ../../src/gui/graphics/geometry/juce_RectangleList.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_PositionedRectangle.o: ../../src/gui/graphics/geometry/juce_PositionedRectangle.cpp +$(OBJDIR)/juce_PathStrokeType.o: ../../src/gui/graphics/geometry/juce_PathStrokeType.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" @@ -1100,12 +1087,12 @@ $(OBJDIR)/juce_Rectangle.o: ../../src/gui/graphics/geometry/juce_Rectangle.cpp @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_RectangleList.o: ../../src/gui/graphics/geometry/juce_RectangleList.cpp +$(OBJDIR)/juce_Path.o: ../../src/gui/graphics/geometry/juce_Path.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_Image.o: ../../src/gui/graphics/imaging/juce_Image.cpp +$(OBJDIR)/juce_PathIterator.o: ../../src/gui/graphics/geometry/juce_PathIterator.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" @@ -1115,17 +1102,17 @@ $(OBJDIR)/juce_ImageCache.o: ../../src/gui/graphics/imaging/juce_ImageCache.cpp @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_ImageConvolutionKernel.o: ../../src/gui/graphics/imaging/juce_ImageConvolutionKernel.cpp +$(OBJDIR)/juce_ImageFileFormat.o: ../../src/gui/graphics/imaging/juce_ImageFileFormat.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_ImageFileFormat.o: ../../src/gui/graphics/imaging/juce_ImageFileFormat.cpp +$(OBJDIR)/juce_Image.o: ../../src/gui/graphics/imaging/juce_Image.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_GIFLoader.o: ../../src/gui/graphics/imaging/image_file_formats/juce_GIFLoader.cpp +$(OBJDIR)/juce_ImageConvolutionKernel.o: ../../src/gui/graphics/imaging/juce_ImageConvolutionKernel.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" @@ -1140,7 +1127,7 @@ $(OBJDIR)/juce_PNGLoader.o: ../../src/gui/graphics/imaging/image_file_formats/ju @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_Component.o: ../../src/gui/components/juce_Component.cpp +$(OBJDIR)/juce_GIFLoader.o: ../../src/gui/graphics/imaging/image_file_formats/juce_GIFLoader.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" @@ -1155,17 +1142,17 @@ $(OBJDIR)/juce_Desktop.o: ../../src/gui/components/juce_Desktop.cpp @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_ArrowButton.o: ../../src/gui/components/buttons/juce_ArrowButton.cpp +$(OBJDIR)/juce_Component.o: ../../src/gui/components/juce_Component.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_Button.o: ../../src/gui/components/buttons/juce_Button.cpp +$(OBJDIR)/juce_ArrowButton.o: ../../src/gui/components/buttons/juce_ArrowButton.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_DrawableButton.o: ../../src/gui/components/buttons/juce_DrawableButton.cpp +$(OBJDIR)/juce_Button.o: ../../src/gui/components/buttons/juce_Button.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" @@ -1180,17 +1167,17 @@ $(OBJDIR)/juce_ImageButton.o: ../../src/gui/components/buttons/juce_ImageButton. @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_ShapeButton.o: ../../src/gui/components/buttons/juce_ShapeButton.cpp +$(OBJDIR)/juce_TextButton.o: ../../src/gui/components/buttons/juce_TextButton.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_TextButton.o: ../../src/gui/components/buttons/juce_TextButton.cpp +$(OBJDIR)/juce_ToggleButton.o: ../../src/gui/components/buttons/juce_ToggleButton.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_ToggleButton.o: ../../src/gui/components/buttons/juce_ToggleButton.cpp +$(OBJDIR)/juce_DrawableButton.o: ../../src/gui/components/buttons/juce_DrawableButton.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" @@ -1200,7 +1187,7 @@ $(OBJDIR)/juce_ToolbarButton.o: ../../src/gui/components/buttons/juce_ToolbarBut @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_ComboBox.o: ../../src/gui/components/controls/juce_ComboBox.cpp +$(OBJDIR)/juce_ShapeButton.o: ../../src/gui/components/buttons/juce_ShapeButton.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" @@ -1210,22 +1197,22 @@ $(OBJDIR)/juce_Label.o: ../../src/gui/components/controls/juce_Label.cpp @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_ListBox.o: ../../src/gui/components/controls/juce_ListBox.cpp +$(OBJDIR)/juce_TreeView.o: ../../src/gui/components/controls/juce_TreeView.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_ProgressBar.o: ../../src/gui/components/controls/juce_ProgressBar.cpp +$(OBJDIR)/juce_TableHeaderComponent.o: ../../src/gui/components/controls/juce_TableHeaderComponent.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_Slider.o: ../../src/gui/components/controls/juce_Slider.cpp +$(OBJDIR)/juce_ProgressBar.o: ../../src/gui/components/controls/juce_ProgressBar.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_TableHeaderComponent.o: ../../src/gui/components/controls/juce_TableHeaderComponent.cpp +$(OBJDIR)/juce_ToolbarItemPalette.o: ../../src/gui/components/controls/juce_ToolbarItemPalette.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" @@ -1235,11 +1222,26 @@ $(OBJDIR)/juce_TableListBox.o: ../../src/gui/components/controls/juce_TableListB @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" +$(OBJDIR)/juce_Slider.o: ../../src/gui/components/controls/juce_Slider.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + $(OBJDIR)/juce_TextEditor.o: ../../src/gui/components/controls/juce_TextEditor.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" +$(OBJDIR)/juce_ComboBox.o: ../../src/gui/components/controls/juce_ComboBox.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + +$(OBJDIR)/juce_ListBox.o: ../../src/gui/components/controls/juce_ListBox.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + $(OBJDIR)/juce_Toolbar.o: ../../src/gui/components/controls/juce_Toolbar.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @@ -1250,12 +1252,17 @@ $(OBJDIR)/juce_ToolbarItemComponent.o: ../../src/gui/components/controls/juce_To @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_ToolbarItemPalette.o: ../../src/gui/components/controls/juce_ToolbarItemPalette.cpp +$(OBJDIR)/juce_CPlusPlusCodeTokeniser.o: ../../src/gui/components/code_editor/juce_CPlusPlusCodeTokeniser.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_TreeView.o: ../../src/gui/components/controls/juce_TreeView.cpp +$(OBJDIR)/juce_CodeEditorComponent.o: ../../src/gui/components/code_editor/juce_CodeEditorComponent.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + +$(OBJDIR)/juce_CodeDocument.o: ../../src/gui/components/code_editor/juce_CodeDocument.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" @@ -1275,22 +1282,22 @@ $(OBJDIR)/juce_FileBrowserComponent.o: ../../src/gui/components/filebrowser/juce @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_FileChooser.o: ../../src/gui/components/filebrowser/juce_FileChooser.cpp +$(OBJDIR)/juce_FileFilter.o: ../../src/gui/components/filebrowser/juce_FileFilter.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_FileChooserDialogBox.o: ../../src/gui/components/filebrowser/juce_FileChooserDialogBox.cpp +$(OBJDIR)/juce_FileListComponent.o: ../../src/gui/components/filebrowser/juce_FileListComponent.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_FileFilter.o: ../../src/gui/components/filebrowser/juce_FileFilter.cpp +$(OBJDIR)/juce_FileChooser.o: ../../src/gui/components/filebrowser/juce_FileChooser.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_FileListComponent.o: ../../src/gui/components/filebrowser/juce_FileListComponent.cpp +$(OBJDIR)/juce_FileTreeComponent.o: ../../src/gui/components/filebrowser/juce_FileTreeComponent.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" @@ -1300,17 +1307,17 @@ $(OBJDIR)/juce_FilenameComponent.o: ../../src/gui/components/filebrowser/juce_Fi @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_FileSearchPathListComponent.o: ../../src/gui/components/filebrowser/juce_FileSearchPathListComponent.cpp +$(OBJDIR)/juce_ImagePreviewComponent.o: ../../src/gui/components/filebrowser/juce_ImagePreviewComponent.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_FileTreeComponent.o: ../../src/gui/components/filebrowser/juce_FileTreeComponent.cpp +$(OBJDIR)/juce_FileChooserDialogBox.o: ../../src/gui/components/filebrowser/juce_FileChooserDialogBox.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_ImagePreviewComponent.o: ../../src/gui/components/filebrowser/juce_ImagePreviewComponent.cpp +$(OBJDIR)/juce_FileSearchPathListComponent.o: ../../src/gui/components/filebrowser/juce_FileSearchPathListComponent.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" @@ -1320,32 +1327,32 @@ $(OBJDIR)/juce_WildcardFileFilter.o: ../../src/gui/components/filebrowser/juce_W @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_KeyboardFocusTraverser.o: ../../src/gui/components/keyboard/juce_KeyboardFocusTraverser.cpp +$(OBJDIR)/juce_KeyListener.o: ../../src/gui/components/keyboard/juce_KeyListener.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_KeyListener.o: ../../src/gui/components/keyboard/juce_KeyListener.cpp +$(OBJDIR)/juce_KeyMappingEditorComponent.o: ../../src/gui/components/keyboard/juce_KeyMappingEditorComponent.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_KeyMappingEditorComponent.o: ../../src/gui/components/keyboard/juce_KeyMappingEditorComponent.cpp +$(OBJDIR)/juce_KeyPressMappingSet.o: ../../src/gui/components/keyboard/juce_KeyPressMappingSet.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_KeyPress.o: ../../src/gui/components/keyboard/juce_KeyPress.cpp +$(OBJDIR)/juce_KeyboardFocusTraverser.o: ../../src/gui/components/keyboard/juce_KeyboardFocusTraverser.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_KeyPressMappingSet.o: ../../src/gui/components/keyboard/juce_KeyPressMappingSet.cpp +$(OBJDIR)/juce_ModifierKeys.o: ../../src/gui/components/keyboard/juce_ModifierKeys.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_ModifierKeys.o: ../../src/gui/components/keyboard/juce_ModifierKeys.cpp +$(OBJDIR)/juce_KeyPress.o: ../../src/gui/components/keyboard/juce_KeyPress.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" @@ -1430,12 +1437,12 @@ $(OBJDIR)/juce_OldSchoolLookAndFeel.o: ../../src/gui/components/lookandfeel/juce @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_MenuBarComponent.o: ../../src/gui/components/menus/juce_MenuBarComponent.cpp +$(OBJDIR)/juce_MenuBarModel.o: ../../src/gui/components/menus/juce_MenuBarModel.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_MenuBarModel.o: ../../src/gui/components/menus/juce_MenuBarModel.cpp +$(OBJDIR)/juce_MenuBarComponent.o: ../../src/gui/components/menus/juce_MenuBarComponent.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" @@ -1455,22 +1462,22 @@ $(OBJDIR)/juce_DragAndDropContainer.o: ../../src/gui/components/mouse/juce_DragA @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_MouseCursor.o: ../../src/gui/components/mouse/juce_MouseCursor.cpp +$(OBJDIR)/juce_MouseEvent.o: ../../src/gui/components/mouse/juce_MouseEvent.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_MouseEvent.o: ../../src/gui/components/mouse/juce_MouseEvent.cpp +$(OBJDIR)/juce_MouseHoverDetector.o: ../../src/gui/components/mouse/juce_MouseHoverDetector.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_MouseHoverDetector.o: ../../src/gui/components/mouse/juce_MouseHoverDetector.cpp +$(OBJDIR)/juce_MouseListener.o: ../../src/gui/components/mouse/juce_MouseListener.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_MouseListener.o: ../../src/gui/components/mouse/juce_MouseListener.cpp +$(OBJDIR)/juce_MouseCursor.o: ../../src/gui/components/mouse/juce_MouseCursor.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" @@ -1515,32 +1522,27 @@ $(OBJDIR)/juce_AudioDeviceSelectorComponent.o: ../../src/gui/components/special/ @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_BubbleComponent.o: ../../src/gui/components/special/juce_BubbleComponent.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" - $(OBJDIR)/juce_BubbleMessageComponent.o: ../../src/gui/components/special/juce_BubbleMessageComponent.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_ColourSelector.o: ../../src/gui/components/special/juce_ColourSelector.cpp +$(OBJDIR)/juce_DropShadower.o: ../../src/gui/components/special/juce_DropShadower.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_DropShadower.o: ../../src/gui/components/special/juce_DropShadower.cpp +$(OBJDIR)/juce_MagnifierComponent.o: ../../src/gui/components/special/juce_MagnifierComponent.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_MagnifierComponent.o: ../../src/gui/components/special/juce_MagnifierComponent.cpp +$(OBJDIR)/juce_PreferencesPanel.o: ../../src/gui/components/special/juce_PreferencesPanel.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_MidiKeyboardComponent.o: ../../src/gui/components/special/juce_MidiKeyboardComponent.cpp +$(OBJDIR)/juce_SystemTrayIconComponent.o: ../../src/gui/components/special/juce_SystemTrayIconComponent.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" @@ -1550,22 +1552,22 @@ $(OBJDIR)/juce_OpenGLComponent.o: ../../src/gui/components/special/juce_OpenGLCo @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_PreferencesPanel.o: ../../src/gui/components/special/juce_PreferencesPanel.cpp +$(OBJDIR)/juce_MidiKeyboardComponent.o: ../../src/gui/components/special/juce_MidiKeyboardComponent.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_SystemTrayIconComponent.o: ../../src/gui/components/special/juce_SystemTrayIconComponent.cpp +$(OBJDIR)/juce_BubbleComponent.o: ../../src/gui/components/special/juce_BubbleComponent.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_AlertWindow.o: ../../src/gui/components/windows/juce_AlertWindow.cpp +$(OBJDIR)/juce_ColourSelector.o: ../../src/gui/components/special/juce_ColourSelector.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_ComponentPeer.o: ../../src/gui/components/windows/juce_ComponentPeer.cpp +$(OBJDIR)/juce_AlertWindow.o: ../../src/gui/components/windows/juce_AlertWindow.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" @@ -1605,12 +1607,17 @@ $(OBJDIR)/juce_TopLevelWindow.o: ../../src/gui/components/windows/juce_TopLevelW @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_linux_Audio.o: ../../src/native/linux/juce_linux_Audio.cpp +$(OBJDIR)/juce_ComponentPeer.o: ../../src/gui/components/windows/juce_ComponentPeer.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_linux_AudioCDReader.o: ../../src/native/linux/juce_linux_AudioCDReader.cpp +$(OBJDIR)/juce_linux_Midi.o: ../../src/native/linux/juce_linux_Midi.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + +$(OBJDIR)/juce_linux_Network.o: ../../src/native/linux/juce_linux_Network.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" @@ -1620,7 +1627,12 @@ $(OBJDIR)/juce_linux_FileChooser.o: ../../src/native/linux/juce_linux_FileChoose @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_linux_Files.o: ../../src/native/linux/juce_linux_Files.cpp +$(OBJDIR)/juce_linux_Threads.o: ../../src/native/linux/juce_linux_Threads.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + +$(OBJDIR)/juce_linux_Messaging.o: ../../src/native/linux/juce_linux_Messaging.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" @@ -1630,37 +1642,37 @@ $(OBJDIR)/juce_linux_Fonts.o: ../../src/native/linux/juce_linux_Fonts.cpp @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_linux_Messaging.o: ../../src/native/linux/juce_linux_Messaging.cpp +$(OBJDIR)/juce_linux_SystemStats.o: ../../src/native/linux/juce_linux_SystemStats.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_linux_Midi.o: ../../src/native/linux/juce_linux_Midi.cpp +$(OBJDIR)/juce_linux_WebBrowserComponent.o: ../../src/native/linux/juce_linux_WebBrowserComponent.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_linux_Network.o: ../../src/native/linux/juce_linux_Network.cpp +$(OBJDIR)/juce_linux_Audio.o: ../../src/native/linux/juce_linux_Audio.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_linux_SystemStats.o: ../../src/native/linux/juce_linux_SystemStats.cpp +$(OBJDIR)/juce_linux_Windowing.o: ../../src/native/linux/juce_linux_Windowing.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_linux_Threads.o: ../../src/native/linux/juce_linux_Threads.cpp +$(OBJDIR)/juce_linux_JackAudio.o: ../../src/native/linux/juce_linux_JackAudio.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_linux_WebBrowserComponent.o: ../../src/native/linux/juce_linux_WebBrowserComponent.cpp +$(OBJDIR)/juce_linux_AudioCDReader.o: ../../src/native/linux/juce_linux_AudioCDReader.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/juce_linux_Windowing.o: ../../src/native/linux/juce_linux_Windowing.cpp +$(OBJDIR)/juce_linux_Files.o: ../../src/native/linux/juce_linux_Files.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" diff --git a/extras/juce demo/src/demos/AudioDemoRecordPage.cpp b/extras/juce demo/src/demos/AudioDemoRecordPage.cpp index b34b1186e5..1109e55d01 100644 --- a/extras/juce demo/src/demos/AudioDemoRecordPage.cpp +++ b/extras/juce demo/src/demos/AudioDemoRecordPage.cpp @@ -257,7 +257,7 @@ AudioDemoRecordPage::AudioDemoRecordPage (AudioDeviceManager& deviceManager_) recordButton->setButtonText (T("Record")); recordButton->addButtonListener (this); recordButton->setColour (TextButton::buttonColourId, Colour (0xffff5c5c)); - recordButton->setColour (TextButton::textColourId, Colours::black); + recordButton->setColour (TextButton::textColourOffId, Colours::black); //[UserPreSize] diff --git a/extras/juce demo/src/demos/WidgetsDemo.cpp b/extras/juce demo/src/demos/WidgetsDemo.cpp index c6fc60b717..a99f611548 100644 --- a/extras/juce demo/src/demos/WidgetsDemo.cpp +++ b/extras/juce demo/src/demos/WidgetsDemo.cpp @@ -263,7 +263,7 @@ public: ColourSelector colourSelector2; colourSelector2.setName (T("text")); - colourSelector2.setCurrentColour (findColour (TextButton::textColourId)); + colourSelector2.setCurrentColour (findColour (TextButton::textColourOffId)); colourSelector2.addChangeListener (this); // and add the selectors as custom menu items to a PopupMenu, putting @@ -285,7 +285,7 @@ public: ColourSelector* cs = (ColourSelector*) source; if (cs->getName() == T("text")) - setColour (TextButton::textColourId, cs->getCurrentColour()); + setColour (TextButton::textColourOffId, cs->getCurrentColour()); else setColour (TextButton::buttonColourId, cs->getCurrentColour()); } diff --git a/extras/the jucer/src/model/components/jucer_TextButtonHandler.h b/extras/the jucer/src/model/components/jucer_TextButtonHandler.h index f420c2a4c3..494b855a9f 100644 --- a/extras/the jucer/src/model/components/jucer_TextButtonHandler.h +++ b/extras/the jucer/src/model/components/jucer_TextButtonHandler.h @@ -42,7 +42,8 @@ public: { registerColour (TextButton::buttonColourId, "background (normal)", "bgColOff"); registerColour (TextButton::buttonOnColourId, "background (on)", "bgColOn"); - registerColour (TextButton::textColourId, "text colour", "textCol"); + registerColour (TextButton::textColourOnId, "text colour (normal)", "textCol"); + registerColour (TextButton::textColourOffId, "text colour (on)", "textColOn"); } //============================================================================== diff --git a/src/audio/midi/juce_MidiBuffer.cpp b/src/audio/midi/juce_MidiBuffer.cpp index ddc8fc4631..54254b96e3 100644 --- a/src/audio/midi/juce_MidiBuffer.cpp +++ b/src/audio/midi/juce_MidiBuffer.cpp @@ -32,24 +32,24 @@ BEGIN_JUCE_NAMESPACE //============================================================================== MidiBuffer::MidiBuffer() throw() - : ArrayAllocationBase (32), + : data (32), bytesUsed (0) { } MidiBuffer::MidiBuffer (const MidiMessage& message) throw() - : ArrayAllocationBase (32), + : data (32), bytesUsed (0) { addEvent (message, 0); } MidiBuffer::MidiBuffer (const MidiBuffer& other) throw() - : ArrayAllocationBase (32), + : data (32), bytesUsed (other.bytesUsed) { - ensureAllocatedSize (bytesUsed); - memcpy (elements, other.elements, bytesUsed); + data.ensureAllocatedSize (bytesUsed); + memcpy (data.elements, other.data.elements, bytesUsed); } const MidiBuffer& MidiBuffer::operator= (const MidiBuffer& other) throw() @@ -57,10 +57,10 @@ const MidiBuffer& MidiBuffer::operator= (const MidiBuffer& other) throw() if (this != &other) { bytesUsed = other.bytesUsed; - ensureAllocatedSize (bytesUsed); + data.ensureAllocatedSize (bytesUsed); if (bytesUsed > 0) - memcpy (elements, other.elements, bytesUsed); + memcpy (data.elements, other.data.elements, bytesUsed); } return *this; @@ -68,9 +68,9 @@ const MidiBuffer& MidiBuffer::operator= (const MidiBuffer& other) throw() void MidiBuffer::swap (MidiBuffer& other) { - swapVariables (this->elements, other.elements); - swapVariables (this->numAllocated, other.numAllocated); - swapVariables (this->bytesUsed, other.bytesUsed); + swapVariables (data.elements, other.data.elements); + swapVariables (data.numAllocated, other.data.numAllocated); + swapVariables (bytesUsed, other.bytesUsed); } MidiBuffer::~MidiBuffer() throw() @@ -85,12 +85,12 @@ void MidiBuffer::clear() throw() void MidiBuffer::clear (const int startSample, const int numSamples) throw() { - uint8* const start = findEventAfter (elements, startSample - 1); + uint8* const start = findEventAfter (data.elements, startSample - 1); uint8* const end = findEventAfter (start, startSample + numSamples - 1); if (end > start) { - const size_t bytesToMove = (size_t) (bytesUsed - (end - elements)); + const size_t bytesToMove = (size_t) (bytesUsed - (end - data.elements)); if (bytesToMove > 0) memmove (start, end, bytesToMove); @@ -144,10 +144,10 @@ void MidiBuffer::addEvent (const uint8* const newData, if (numBytes > 0) { - ensureAllocatedSize (bytesUsed + numBytes + 6); + data.ensureAllocatedSize (bytesUsed + numBytes + 6); - uint8* d = findEventAfter (elements, sampleNumber); - const size_t bytesToMove = (size_t) (bytesUsed - (d - elements)); + uint8* d = findEventAfter (data.elements, sampleNumber); + const size_t bytesToMove = (size_t) (bytesUsed - (d - data.elements)); if (bytesToMove > 0) memmove (d + numBytes + 6, @@ -191,8 +191,8 @@ bool MidiBuffer::isEmpty() const throw() int MidiBuffer::getNumEvents() const throw() { int n = 0; - const uint8* d = elements; - const uint8* const end = elements + bytesUsed; + const uint8* d = data.elements; + const uint8* const end = data.elements + bytesUsed; while (d < end) { @@ -206,7 +206,7 @@ int MidiBuffer::getNumEvents() const throw() int MidiBuffer::getFirstEventTime() const throw() { - return (bytesUsed > 0) ? *(const int*) elements : 0; + return (bytesUsed > 0) ? *(const int*) data.elements : 0; } int MidiBuffer::getLastEventTime() const throw() @@ -214,7 +214,7 @@ int MidiBuffer::getLastEventTime() const throw() if (bytesUsed == 0) return 0; - const uint8* d = elements; + const uint8* d = data.elements; const uint8* const endData = d + bytesUsed; for (;;) @@ -230,7 +230,7 @@ int MidiBuffer::getLastEventTime() const throw() uint8* MidiBuffer::findEventAfter (uint8* d, const int samplePosition) const throw() { - const uint8* const endData = elements + bytesUsed; + const uint8* const endData = data.elements + bytesUsed; while (d < endData && *(int*) d <= samplePosition) { @@ -244,7 +244,7 @@ uint8* MidiBuffer::findEventAfter (uint8* d, const int samplePosition) const thr //============================================================================== MidiBuffer::Iterator::Iterator (const MidiBuffer& buffer_) throw() : buffer (buffer_), - data (buffer_.elements) + data (buffer_.data.elements) { } @@ -255,8 +255,8 @@ MidiBuffer::Iterator::~Iterator() throw() //============================================================================== void MidiBuffer::Iterator::setNextSamplePosition (const int samplePosition) throw() { - data = buffer.elements; - const uint8* dataEnd = buffer.elements + buffer.bytesUsed; + data = buffer.data.elements; + const uint8* dataEnd = buffer.data.elements + buffer.bytesUsed; while (data < dataEnd && *(int*) data < samplePosition) { @@ -269,7 +269,7 @@ bool MidiBuffer::Iterator::getNextEvent (const uint8* &midiData, int& numBytes, int& samplePosition) throw() { - if (data >= buffer.elements + buffer.bytesUsed) + if (data >= buffer.data.elements + buffer.bytesUsed) return false; samplePosition = *(int*) data; @@ -285,7 +285,7 @@ bool MidiBuffer::Iterator::getNextEvent (const uint8* &midiData, bool MidiBuffer::Iterator::getNextEvent (MidiMessage& result, int& samplePosition) throw() { - if (data >= buffer.elements + buffer.bytesUsed) + if (data >= buffer.data.elements + buffer.bytesUsed) return false; samplePosition = *(int*) data; diff --git a/src/audio/midi/juce_MidiBuffer.h b/src/audio/midi/juce_MidiBuffer.h index 816e9115f9..7e023d9b8b 100644 --- a/src/audio/midi/juce_MidiBuffer.h +++ b/src/audio/midi/juce_MidiBuffer.h @@ -39,7 +39,7 @@ @see MidiMessage */ -class JUCE_API MidiBuffer : private ArrayAllocationBase +class JUCE_API MidiBuffer { public: //============================================================================== @@ -226,6 +226,7 @@ public: private: friend class MidiBuffer::Iterator; + ArrayAllocationBase data; int bytesUsed; uint8* findEventAfter (uint8* d, const int samplePosition) const throw(); diff --git a/src/containers/juce_Array.h b/src/containers/juce_Array.h index 048bb047a0..54c2dd51a2 100644 --- a/src/containers/juce_Array.h +++ b/src/containers/juce_Array.h @@ -52,7 +52,7 @@ @see OwnedArray, ReferenceCountedArray, StringArray, CriticalSection */ template -class Array : private ArrayAllocationBase +class Array { public: //============================================================================== @@ -61,11 +61,9 @@ public: @param granularity this is the size of increment by which the internal storage used by the array will grow. Only change it from the default if you know the array is going to be very big and needs to be able to grow efficiently. - - @see ArrayAllocationBase */ Array (const int granularity_ = juceDefaultArrayGranularity) throw() - : ArrayAllocationBase (granularity_), + : data (granularity_), numUsed (0) { } @@ -74,12 +72,12 @@ public: @param other the array to copy */ Array (const Array& other) throw() - : ArrayAllocationBase (other.granularity) + : data (other.data.granularity) { other.lockArray(); numUsed = other.numUsed; - this->setAllocatedSize (other.numUsed); - memcpy (this->elements, other.elements, numUsed * sizeof (ElementType)); + data.setAllocatedSize (other.numUsed); + memcpy (data.elements, other.data.elements, numUsed * sizeof (ElementType)); other.unlockArray(); } @@ -88,7 +86,7 @@ public: @param values the array to copy from */ Array (const ElementType* values) throw() - : ArrayAllocationBase (juceDefaultArrayGranularity), + : data (juceDefaultArrayGranularity), numUsed (0) { while (*values != 0) @@ -101,11 +99,11 @@ public: @param numValues the number of values in the array */ Array (const ElementType* values, int numValues) throw() - : ArrayAllocationBase (juceDefaultArrayGranularity), + : data (juceDefaultArrayGranularity), numUsed (numValues) { - this->setAllocatedSize (numValues); - memcpy (this->elements, values, numValues * sizeof (ElementType)); + data.setAllocatedSize (numValues); + memcpy (data.elements, values, numValues * sizeof (ElementType)); } /** Destructor. */ @@ -123,10 +121,10 @@ public: other.lockArray(); lock.enter(); - this->granularity = other.granularity; - this->ensureAllocatedSize (other.size()); + data.granularity = other.data.granularity; + data.ensureAllocatedSize (other.size()); numUsed = other.numUsed; - memcpy (this->elements, other.elements, this->numUsed * sizeof (ElementType)); + memcpy (data.elements, other.data.elements, numUsed * sizeof (ElementType)); minimiseStorageOverheads(); lock.exit(); @@ -147,7 +145,7 @@ public: { lock.enter(); - if (this->numUsed != other.numUsed) + if (numUsed != other.numUsed) { lock.exit(); return false; @@ -155,7 +153,7 @@ public: for (int i = numUsed; --i >= 0;) { - if (this->elements [i] != other.elements [i]) + if (data.elements [i] != other.data.elements [i]) { lock.exit(); return false; @@ -188,7 +186,7 @@ public: void clear() throw() { lock.enter(); - this->setAllocatedSize (0); + data.setAllocatedSize (0); numUsed = 0; lock.exit(); } @@ -226,7 +224,7 @@ public: { lock.enter(); const ElementType result = (((unsigned int) index) < (unsigned int) numUsed) - ? this->elements [index] + ? data.elements [index] : ElementType(); lock.exit(); @@ -246,7 +244,7 @@ public: { lock.enter(); jassert (((unsigned int) index) < (unsigned int) numUsed); - const ElementType result = this->elements [index]; + const ElementType result = data.elements [index]; lock.exit(); return result; @@ -265,7 +263,7 @@ public: { lock.enter(); jassert (((unsigned int) index) < (unsigned int) numUsed); - ElementType& result = this->elements [index]; + ElementType& result = data.elements [index]; lock.exit(); return result; } @@ -277,7 +275,7 @@ public: inline ElementType getFirst() const throw() { lock.enter(); - const ElementType result = (numUsed > 0) ? this->elements [0] + const ElementType result = (numUsed > 0) ? data.elements [0] : ElementType(); lock.exit(); @@ -291,7 +289,7 @@ public: inline ElementType getLast() const throw() { lock.enter(); - const ElementType result = (numUsed > 0) ? this->elements [numUsed - 1] + const ElementType result = (numUsed > 0) ? data.elements [numUsed - 1] : ElementType(); lock.exit(); @@ -312,13 +310,13 @@ public: int result = -1; lock.enter(); - const ElementType* e = this->elements; + const ElementType* e = data.elements; for (int i = numUsed; --i >= 0;) { if (elementToLookFor == *e) { - result = (int) (e - this->elements); + result = (int) (e - data.elements); break; } @@ -338,7 +336,7 @@ public: { lock.enter(); - const ElementType* e = this->elements; + const ElementType* e = data.elements; int num = numUsed; while (num >= 4) @@ -381,8 +379,8 @@ public: void add (const ElementType newElement) throw() { lock.enter(); - this->ensureAllocatedSize (numUsed + 1); - this->elements [numUsed++] = newElement; + data.ensureAllocatedSize (numUsed + 1); + data.elements [numUsed++] = newElement; lock.exit(); } @@ -401,11 +399,11 @@ public: void insert (int indexToInsertAt, const ElementType newElement) throw() { lock.enter(); - this->ensureAllocatedSize (numUsed + 1); + data.ensureAllocatedSize (numUsed + 1); if (((unsigned int) indexToInsertAt) < (unsigned int) numUsed) { - ElementType* const insertPos = this->elements + indexToInsertAt; + ElementType* const insertPos = data.elements + indexToInsertAt; const int numberToMove = numUsed - indexToInsertAt; if (numberToMove > 0) @@ -416,7 +414,7 @@ public: } else { - this->elements [numUsed++] = newElement; + data.elements [numUsed++] = newElement; } lock.exit(); @@ -440,11 +438,11 @@ public: if (numberOfTimesToInsertIt > 0) { lock.enter(); - this->ensureAllocatedSize (numUsed + numberOfTimesToInsertIt); + data.ensureAllocatedSize (numUsed + numberOfTimesToInsertIt); if (((unsigned int) indexToInsertAt) < (unsigned int) numUsed) { - ElementType* insertPos = this->elements + indexToInsertAt; + ElementType* insertPos = data.elements + indexToInsertAt; const int numberToMove = numUsed - indexToInsertAt; memmove (insertPos + numberOfTimesToInsertIt, insertPos, numberToMove * sizeof (ElementType)); @@ -456,7 +454,7 @@ public: else { while (--numberOfTimesToInsertIt >= 0) - this->elements [numUsed++] = newElement; + data.elements [numUsed++] = newElement; } lock.exit(); @@ -482,11 +480,11 @@ public: if (numberOfElements > 0) { lock.enter(); - this->ensureAllocatedSize (numUsed + numberOfElements); + data.ensureAllocatedSize (numUsed + numberOfElements); if (((unsigned int) indexToInsertAt) < (unsigned int) numUsed) { - ElementType* insertPos = this->elements + indexToInsertAt; + ElementType* insertPos = data.elements + indexToInsertAt; const int numberToMove = numUsed - indexToInsertAt; memmove (insertPos + numberOfElements, insertPos, numberToMove * sizeof (ElementType)); @@ -498,7 +496,7 @@ public: else { while (--numberOfElements >= 0) - this->elements [numUsed++] = *newElements++; + data.elements [numUsed++] = *newElements++; } lock.exit(); @@ -543,12 +541,12 @@ public: if (indexToChange < numUsed) { - this->elements [indexToChange] = newValue; + data.elements [indexToChange] = newValue; } else { - this->ensureAllocatedSize (numUsed + 1); - this->elements [numUsed++] = newValue; + data.ensureAllocatedSize (numUsed + 1); + data.elements [numUsed++] = newValue; } lock.exit(); @@ -569,7 +567,7 @@ public: { lock.enter(); jassert (((unsigned int) indexToChange) < (unsigned int) numUsed); - this->elements [indexToChange] = newValue; + data.elements [indexToChange] = newValue; lock.exit(); } @@ -586,10 +584,10 @@ public: if (numElementsToAdd > 0) { - this->ensureAllocatedSize (numUsed + numElementsToAdd); + data.ensureAllocatedSize (numUsed + numElementsToAdd); while (--numElementsToAdd >= 0) - this->elements [numUsed++] = *elementsToAdd++; + data.elements [numUsed++] = *elementsToAdd++; } lock.exit(); @@ -605,9 +603,9 @@ public: { lock.enter(); otherArray.lock.enter(); - swapVariables (this->numUsed, otherArray.numUsed); - swapVariables (this->elements, otherArray.elements); - swapVariables (this->numAllocated, otherArray.numAllocated); + swapVariables (numUsed, otherArray.numUsed); + swapVariables (data.elements, otherArray.data.elements); + swapVariables (data.numAllocated, otherArray.data.numAllocated); otherArray.lock.exit(); lock.exit(); } @@ -639,7 +637,7 @@ public: if (numElementsToAdd < 0 || startIndex + numElementsToAdd > arrayToAddFrom.size()) numElementsToAdd = arrayToAddFrom.size() - startIndex; - this->addArray ((const ElementType*) (arrayToAddFrom.elements + startIndex), numElementsToAdd); + addArray ((const ElementType*) (arrayToAddFrom.data.elements + startIndex), numElementsToAdd); lock.exit(); arrayToAddFrom.unlockArray(); @@ -661,7 +659,7 @@ public: const ElementType newElement) throw() { lock.enter(); - insert (findInsertIndexInSortedArray (comparator, this->elements, newElement, 0, numUsed), newElement); + insert (findInsertIndexInSortedArray (comparator, data.elements, newElement, 0, numUsed), newElement); lock.exit(); } @@ -695,7 +693,7 @@ public: lock.exit(); return -1; } - else if (comparator.compareElements (elementToLookFor, this->elements [start]) == 0) + else if (comparator.compareElements (elementToLookFor, data.elements [start]) == 0) { lock.exit(); return start; @@ -709,7 +707,7 @@ public: lock.exit(); return -1; } - else if (comparator.compareElements (elementToLookFor, this->elements [halfway]) >= 0) + else if (comparator.compareElements (elementToLookFor, data.elements [halfway]) >= 0) start = halfway; else end = halfway; @@ -736,14 +734,14 @@ public: { --numUsed; - ElementType* const e = this->elements + indexToRemove; + ElementType* const e = data.elements + indexToRemove; ElementType const removed = *e; const int numberToShift = numUsed - indexToRemove; if (numberToShift > 0) memmove (e, e + 1, numberToShift * sizeof (ElementType)); - if ((numUsed << 1) < this->numAllocated) + if ((numUsed << 1) < data.numAllocated) minimiseStorageOverheads(); lock.exit(); @@ -767,13 +765,13 @@ public: void removeValue (const ElementType valueToRemove) throw() { lock.enter(); - ElementType* e = this->elements; + ElementType* e = data.elements; for (int i = numUsed; --i >= 0;) { if (valueToRemove == *e) { - remove ((int) (e - this->elements)); + remove ((int) (e - data.elements)); break; } @@ -805,7 +803,7 @@ public: if (endIndex > startIndex) { const int rangeSize = endIndex - startIndex; - ElementType* e = this->elements + startIndex; + ElementType* e = data.elements + startIndex; int numToShift = numUsed - endIndex; numUsed -= rangeSize; @@ -815,7 +813,7 @@ public: ++e; } - if ((numUsed << 1) < this->numAllocated) + if ((numUsed << 1) < data.numAllocated) minimiseStorageOverheads(); } @@ -832,7 +830,7 @@ public: lock.enter(); numUsed = jmax (0, numUsed - howManyToRemove); - if ((numUsed << 1) < this->numAllocated) + if ((numUsed << 1) < data.numAllocated) minimiseStorageOverheads(); lock.exit(); @@ -858,7 +856,7 @@ public: if (otherArray.size() > 0) { for (int i = numUsed; --i >= 0;) - if (otherArray.contains (this->elements [i])) + if (otherArray.contains (data.elements [i])) remove (i); } } @@ -889,7 +887,7 @@ public: else { for (int i = numUsed; --i >= 0;) - if (! otherArray.contains (this->elements [i])) + if (! otherArray.contains (data.elements [i])) remove (i); } } @@ -914,8 +912,8 @@ public: if (((unsigned int) index1) < (unsigned int) numUsed && ((unsigned int) index2) < (unsigned int) numUsed) { - swapVariables (this->elements [index1], - this->elements [index2]); + swapVariables (data.elements [index1], + data.elements [index2]); } lock.exit(); @@ -947,22 +945,22 @@ public: if (((unsigned int) newIndex) >= (unsigned int) numUsed) newIndex = numUsed - 1; - const ElementType value = this->elements [currentIndex]; + const ElementType value = data.elements [currentIndex]; if (newIndex > currentIndex) { - memmove (this->elements + currentIndex, - this->elements + currentIndex + 1, + memmove (data.elements + currentIndex, + data.elements + currentIndex + 1, (newIndex - currentIndex) * sizeof (ElementType)); } else { - memmove (this->elements + newIndex + 1, - this->elements + newIndex, + memmove (data.elements + newIndex + 1, + data.elements + newIndex, (currentIndex - newIndex) * sizeof (ElementType)); } - this->elements [newIndex] = value; + data.elements [newIndex] = value; } lock.exit(); @@ -982,14 +980,14 @@ public: if (numUsed == 0) { - this->setAllocatedSize (0); + data.setAllocatedSize (0); } else { - const int newAllocation = this->granularity * (numUsed / this->granularity + 1); + const int newAllocation = data.granularity * (numUsed / data.granularity + 1); - if (newAllocation < this->numAllocated) - this->setAllocatedSize (newAllocation); + if (newAllocation < data.numAllocated) + data.setAllocatedSize (newAllocation); } lock.exit(); @@ -1003,7 +1001,7 @@ public: */ void ensureStorageAllocated (const int minNumElements) throw() { - this->ensureAllocatedSize (minNumElements); + data.ensureAllocatedSize (minNumElements); } //============================================================================== @@ -1040,7 +1038,7 @@ public: (void) comparator; // if you pass in an object with a static compareElements() method, this // avoids getting warning messages about the parameter being unused lock.enter(); - sortArray (comparator, this->elements, 0, size() - 1, retainOrderOfEquivalentItems); + sortArray (comparator, data.elements, 0, size() - 1, retainOrderOfEquivalentItems); lock.exit(); } @@ -1074,6 +1072,7 @@ public: juce_UseDebuggingNewOperator private: + ArrayAllocationBase data; int numUsed; TypeOfCriticalSectionToUse lock; }; diff --git a/src/containers/juce_ArrayAllocationBase.h b/src/containers/juce_ArrayAllocationBase.h index 325ff89ed8..c3034309fc 100644 --- a/src/containers/juce_ArrayAllocationBase.h +++ b/src/containers/juce_ArrayAllocationBase.h @@ -47,7 +47,7 @@ const int juceDefaultArrayGranularity = 8; template class ArrayAllocationBase { -protected: +public: //============================================================================== /** Creates an empty array. diff --git a/src/containers/juce_OwnedArray.h b/src/containers/juce_OwnedArray.h index 439f27afbc..dd8dee356e 100644 --- a/src/containers/juce_OwnedArray.h +++ b/src/containers/juce_OwnedArray.h @@ -53,7 +53,7 @@ template -class OwnedArray : private ArrayAllocationBase +class OwnedArray { public: //============================================================================== @@ -62,11 +62,9 @@ public: @param granularity this is the size of increment by which the internal storage used by the array will grow. Only change it from the default if you know the array is going to be very big and needs to be able to grow efficiently. - - @see ArrayAllocationBase */ OwnedArray (const int granularity_ = juceDefaultArrayGranularity) throw() - : ArrayAllocationBase (granularity_), + : data (granularity_), numUsed (0) { } @@ -90,10 +88,10 @@ public: if (deleteObjects) { while (numUsed > 0) - delete this->elements [--numUsed]; + delete data.elements [--numUsed]; } - this->setAllocatedSize (0); + data.setAllocatedSize (0); numUsed = 0; lock.exit(); } @@ -119,7 +117,7 @@ public: { lock.enter(); ObjectClass* const result = (((unsigned int) index) < (unsigned int) numUsed) - ? this->elements [index] + ? data.elements [index] : (ObjectClass*) 0; lock.exit(); @@ -135,7 +133,7 @@ public: { lock.enter(); jassert (((unsigned int) index) < (unsigned int) numUsed); - ObjectClass* const result = this->elements [index]; + ObjectClass* const result = data.elements [index]; lock.exit(); return result; @@ -149,7 +147,7 @@ public: inline ObjectClass* getFirst() const throw() { lock.enter(); - ObjectClass* const result = (numUsed > 0) ? this->elements [0] + ObjectClass* const result = (numUsed > 0) ? data.elements [0] : (ObjectClass*) 0; lock.exit(); return result; @@ -163,7 +161,7 @@ public: inline ObjectClass* getLast() const throw() { lock.enter(); - ObjectClass* const result = (numUsed > 0) ? this->elements [numUsed - 1] + ObjectClass* const result = (numUsed > 0) ? data.elements [numUsed - 1] : (ObjectClass*) 0; lock.exit(); @@ -181,13 +179,13 @@ public: int result = -1; lock.enter(); - ObjectClass* const* e = this->elements; + ObjectClass* const* e = data.elements; for (int i = numUsed; --i >= 0;) { if (objectToLookFor == *e) { - result = (int) (e - this->elements); + result = (int) (e - data.elements); break; } @@ -207,7 +205,7 @@ public: { lock.enter(); - ObjectClass* const* e = this->elements; + ObjectClass* const* e = data.elements; int i = numUsed; while (i >= 4) @@ -256,8 +254,8 @@ public: void add (const ObjectClass* const newObject) throw() { lock.enter(); - this->ensureAllocatedSize (numUsed + 1); - this->elements [numUsed++] = const_cast (newObject); + data.ensureAllocatedSize (numUsed + 1); + data.elements [numUsed++] = const_cast (newObject); lock.exit(); } @@ -288,9 +286,9 @@ public: if (indexToInsertAt > numUsed) indexToInsertAt = numUsed; - this->ensureAllocatedSize (numUsed + 1); + data.ensureAllocatedSize (numUsed + 1); - ObjectClass** const e = this->elements + indexToInsertAt; + ObjectClass** const e = data.elements + indexToInsertAt; const int numToMove = numUsed - indexToInsertAt; if (numToMove > 0) @@ -350,18 +348,18 @@ public: { if (deleteOldElement) { - toDelete = this->elements [indexToChange]; + toDelete = data.elements [indexToChange]; if (toDelete == newObject) toDelete = 0; } - this->elements [indexToChange] = const_cast (newObject); + data.elements [indexToChange] = const_cast (newObject); } else { - this->ensureAllocatedSize (numUsed + 1); - this->elements [numUsed++] = const_cast (newObject); + data.ensureAllocatedSize (numUsed + 1); + data.elements [numUsed++] = const_cast (newObject); } lock.exit(); @@ -388,7 +386,7 @@ public: (void) comparator; // if you pass in an object with a static compareElements() method, this // avoids getting warning messages about the parameter being unused lock.enter(); - insert (findInsertIndexInSortedArray (comparator, this->elements, newObject, 0, numUsed), newObject); + insert (findInsertIndexInSortedArray (comparator, data.elements, newObject, 0, numUsed), newObject); lock.exit(); } @@ -422,7 +420,7 @@ public: lock.exit(); return -1; } - else if (comparator.compareElements (objectToLookFor, this->elements [start]) == 0) + else if (comparator.compareElements (objectToLookFor, data.elements [start]) == 0) { lock.exit(); return start; @@ -436,7 +434,7 @@ public: lock.exit(); return -1; } - else if (comparator.compareElements (objectToLookFor, this->elements [halfway]) >= 0) + else if (comparator.compareElements (objectToLookFor, data.elements [halfway]) >= 0) start = halfway; else end = halfway; @@ -463,7 +461,7 @@ public: if (((unsigned int) indexToRemove) < (unsigned int) numUsed) { - ObjectClass** const e = this->elements + indexToRemove; + ObjectClass** const e = data.elements + indexToRemove; if (deleteObject) toDelete = *e; @@ -474,7 +472,7 @@ public: if (numToShift > 0) memmove (e, e + 1, numToShift * sizeof (ObjectClass*)); - if ((numUsed << 1) < this->numAllocated) + if ((numUsed << 1) < data.numAllocated) minimiseStorageOverheads(); } @@ -495,13 +493,13 @@ public: const bool deleteObject = true) { lock.enter(); - ObjectClass** e = this->elements; + ObjectClass** e = data.elements; for (int i = numUsed; --i >= 0;) { if (objectToRemove == *e) { - remove ((int) (e - this->elements), deleteObject); + remove ((int) (e - data.elements), deleteObject); break; } @@ -538,13 +536,13 @@ public: { for (int i = startIndex; i < endIndex; ++i) { - delete this->elements [i]; - this->elements [i] = 0; // (in case one of the destructors accesses this array and hits a dangling pointer) + delete data.elements [i]; + data.elements [i] = 0; // (in case one of the destructors accesses this array and hits a dangling pointer) } } const int rangeSize = endIndex - startIndex; - ObjectClass** e = this->elements + startIndex; + ObjectClass** e = data.elements + startIndex; int numToShift = numUsed - endIndex; numUsed -= rangeSize; @@ -554,7 +552,7 @@ public: ++e; } - if ((numUsed << 1) < this->numAllocated) + if ((numUsed << 1) < data.numAllocated) minimiseStorageOverheads(); } @@ -598,8 +596,8 @@ public: if (((unsigned int) index1) < (unsigned int) numUsed && ((unsigned int) index2) < (unsigned int) numUsed) { - swapVariables (this->elements [index1], - this->elements [index2]); + swapVariables (data.elements [index1], + data.elements [index2]); } lock.exit(); @@ -630,22 +628,22 @@ public: if (((unsigned int) newIndex) >= (unsigned int) numUsed) newIndex = numUsed - 1; - ObjectClass* const value = this->elements [currentIndex]; + ObjectClass* const value = data.elements [currentIndex]; if (newIndex > currentIndex) { - memmove (this->elements + currentIndex, - this->elements + currentIndex + 1, + memmove (data.elements + currentIndex, + data.elements + currentIndex + 1, (newIndex - currentIndex) * sizeof (ObjectClass*)); } else { - memmove (this->elements + newIndex + 1, - this->elements + newIndex, + memmove (data.elements + newIndex + 1, + data.elements + newIndex, (currentIndex - newIndex) * sizeof (ObjectClass*)); } - this->elements [newIndex] = value; + data.elements [newIndex] = value; } lock.exit(); @@ -662,9 +660,9 @@ public: { lock.enter(); otherArray.lock.enter(); - swapVariables (this->numUsed, otherArray.numUsed); - swapVariables (this->elements, otherArray.elements); - swapVariables (this->numAllocated, otherArray.numAllocated); + swapVariables (numUsed, otherArray.numUsed); + swapVariables (data.elements, otherArray.data.elements); + swapVariables (data.numAllocated, otherArray.data.numAllocated); otherArray.lock.exit(); lock.exit(); } @@ -682,14 +680,14 @@ public: if (numUsed == 0) { - this->setAllocatedSize (0); + data.setAllocatedSize (0); } else { - const int newAllocation = this->granularity * (numUsed / this->granularity + 1); + const int newAllocation = data.granularity * (numUsed / data.granularity + 1); - if (newAllocation < this->numAllocated) - this->setAllocatedSize (newAllocation); + if (newAllocation < data.numAllocated) + data.setAllocatedSize (newAllocation); } lock.exit(); @@ -703,7 +701,7 @@ public: */ void ensureStorageAllocated (const int minNumElements) throw() { - this->ensureAllocatedSize (minNumElements); + data.ensureAllocatedSize (minNumElements); } //============================================================================== @@ -740,7 +738,7 @@ public: // avoids getting warning messages about the parameter being unused lock.enter(); - sortArray (comparator, this->elements, 0, size() - 1, retainOrderOfEquivalentItems); + sortArray (comparator, data.elements, 0, size() - 1, retainOrderOfEquivalentItems); lock.exit(); } @@ -774,6 +772,7 @@ public: juce_UseDebuggingNewOperator private: + ArrayAllocationBase data; int numUsed; TypeOfCriticalSectionToUse lock; diff --git a/src/containers/juce_ReferenceCountedArray.h b/src/containers/juce_ReferenceCountedArray.h index f3ccdba89b..432067cfaf 100644 --- a/src/containers/juce_ReferenceCountedArray.h +++ b/src/containers/juce_ReferenceCountedArray.h @@ -46,7 +46,7 @@ @see Array, OwnedArray, StringArray */ template -class ReferenceCountedArray : private ArrayAllocationBase +class ReferenceCountedArray { public: //============================================================================== @@ -56,26 +56,26 @@ public: used by the array will grow. Only change it from the default if you know the array is going to be very big and needs to be able to grow efficiently. - @see ReferenceCountedObject, ArrayAllocationBase, Array, OwnedArray + @see ReferenceCountedObject, Array, OwnedArray */ ReferenceCountedArray (const int granularity_ = juceDefaultArrayGranularity) throw() - : ArrayAllocationBase (granularity_), + : data (granularity_), numUsed (0) { } /** Creates a copy of another array */ ReferenceCountedArray (const ReferenceCountedArray& other) throw() - : ArrayAllocationBase (other.granularity) + : data (other.data.granularity) { other.lockArray(); numUsed = other.numUsed; - this->setAllocatedSize (numUsed); - memcpy (this->elements, other.elements, numUsed * sizeof (ObjectClass*)); + data.setAllocatedSize (numUsed); + memcpy (data.elements, other.data.elements, numUsed * sizeof (ObjectClass*)); for (int i = numUsed; --i >= 0;) - if (this->elements[i] != 0) - this->elements[i]->incReferenceCount(); + if (data.elements[i] != 0) + data.elements[i]->incReferenceCount(); other.unlockArray(); } @@ -93,15 +93,15 @@ public: clear(); - this->granularity = other.granularity; - this->ensureAllocatedSize (other.numUsed); + data.granularity = other.granularity; + data.ensureAllocatedSize (other.numUsed); numUsed = other.numUsed; - memcpy (this->elements, other.elements, numUsed * sizeof (ObjectClass*)); + memcpy (data.elements, other.data.elements, numUsed * sizeof (ObjectClass*)); minimiseStorageOverheads(); for (int i = numUsed; --i >= 0;) - if (this->elements[i] != 0) - this->elements[i]->incReferenceCount(); + if (data.elements[i] != 0) + data.elements[i]->incReferenceCount(); lock.exit(); other.unlockArray(); @@ -129,11 +129,11 @@ public: lock.enter(); while (numUsed > 0) - if (this->elements [--numUsed] != 0) - this->elements [numUsed]->decReferenceCount(); + if (data.elements [--numUsed] != 0) + data.elements [numUsed]->decReferenceCount(); jassert (numUsed == 0); - this->setAllocatedSize (0); + data.setAllocatedSize (0); lock.exit(); } @@ -156,7 +156,7 @@ public: { lock.enter(); const ReferenceCountedObjectPtr result ((((unsigned int) index) < (unsigned int) numUsed) - ? this->elements [index] + ? data.elements [index] : (ObjectClass*) 0); lock.exit(); return result; @@ -171,7 +171,7 @@ public: { lock.enter(); jassert (((unsigned int) index) < (unsigned int) numUsed); - const ReferenceCountedObjectPtr result (this->elements [index]); + const ReferenceCountedObjectPtr result (data.elements [index]); lock.exit(); return result; } @@ -184,7 +184,7 @@ public: inline const ReferenceCountedObjectPtr getFirst() const throw() { lock.enter(); - const ReferenceCountedObjectPtr result ((numUsed > 0) ? this->elements [0] + const ReferenceCountedObjectPtr result ((numUsed > 0) ? data.elements [0] : (ObjectClass*) 0); lock.exit(); @@ -199,7 +199,7 @@ public: inline const ReferenceCountedObjectPtr getLast() const throw() { lock.enter(); - const ReferenceCountedObjectPtr result ((numUsed > 0) ? this->elements [numUsed - 1] + const ReferenceCountedObjectPtr result ((numUsed > 0) ? data.elements [numUsed - 1] : (ObjectClass*) 0); lock.exit(); @@ -217,13 +217,13 @@ public: int result = -1; lock.enter(); - ObjectClass** e = this->elements; + ObjectClass** e = data.elements; for (int i = numUsed; --i >= 0;) { if (objectToLookFor == *e) { - result = (int) (e - this->elements); + result = (int) (e - data.elements); break; } @@ -242,7 +242,7 @@ public: bool contains (const ObjectClass* const objectToLookFor) const throw() { lock.enter(); - ObjectClass** e = this->elements; + ObjectClass** e = data.elements; for (int i = numUsed; --i >= 0;) { @@ -269,8 +269,8 @@ public: void add (ObjectClass* const newObject) throw() { lock.enter(); - this->ensureAllocatedSize (numUsed + 1); - this->elements [numUsed++] = newObject; + data.ensureAllocatedSize (numUsed + 1); + data.elements [numUsed++] = newObject; if (newObject != 0) newObject->incReferenceCount(); @@ -301,9 +301,9 @@ public: if (indexToInsertAt > numUsed) indexToInsertAt = numUsed; - this->ensureAllocatedSize (numUsed + 1); + data.ensureAllocatedSize (numUsed + 1); - ObjectClass** const e = this->elements + indexToInsertAt; + ObjectClass** const e = data.elements + indexToInsertAt; const int numToMove = numUsed - indexToInsertAt; if (numToMove > 0) @@ -364,15 +364,15 @@ public: if (indexToChange < numUsed) { - if (this->elements [indexToChange] != 0) - this->elements [indexToChange]->decReferenceCount(); + if (data.elements [indexToChange] != 0) + data.elements [indexToChange]->decReferenceCount(); - this->elements [indexToChange] = newObject; + data.elements [indexToChange] = newObject; } else { - this->ensureAllocatedSize (numUsed + 1); - this->elements [numUsed++] = newObject; + data.ensureAllocatedSize (numUsed + 1); + data.elements [numUsed++] = newObject; } lock.exit(); @@ -406,7 +406,7 @@ public: if (numElementsToAdd > 0) { - this->ensureAllocatedSize (numUsed + numElementsToAdd); + data.ensureAllocatedSize (numUsed + numElementsToAdd); while (--numElementsToAdd >= 0) add (arrayToAddFrom.getUnchecked (startIndex++)); @@ -432,7 +432,7 @@ public: ObjectClass* newObject) throw() { lock.enter(); - insert (findInsertIndexInSortedArray (comparator, this->elements, newObject, 0, numUsed), newObject); + insert (findInsertIndexInSortedArray (comparator, data.elements, newObject, 0, numUsed), newObject); lock.exit(); } @@ -446,9 +446,9 @@ public: ObjectClass* newObject) throw() { lock.enter(); - const int index = findInsertIndexInSortedArray (comparator, this->elements, newObject, 0, numUsed); + const int index = findInsertIndexInSortedArray (comparator, data.elements, newObject, 0, numUsed); - if (index > 0 && comparator.compareElements (newObject, this->elements [index - 1]) == 0) + if (index > 0 && comparator.compareElements (newObject, data.elements [index - 1]) == 0) set (index - 1, newObject); // replace an existing object that matches else insert (index, newObject); // no match, so insert the new one @@ -476,7 +476,7 @@ public: if (((unsigned int) indexToRemove) < (unsigned int) numUsed) { - ObjectClass** const e = this->elements + indexToRemove; + ObjectClass** const e = data.elements + indexToRemove; if (*e != 0) (*e)->decReferenceCount(); @@ -487,7 +487,7 @@ public: if (numberToShift > 0) memmove (e, e + 1, numberToShift * sizeof (ObjectClass*)); - if ((numUsed << 1) < this->numAllocated) + if ((numUsed << 1) < data.numAllocated) minimiseStorageOverheads(); } @@ -537,15 +537,15 @@ public: int i; for (i = start; i < end; ++i) { - if (this->elements[i] != 0) + if (data.elements[i] != 0) { - this->elements[i]->decReferenceCount(); - this->elements[i] = 0; // (in case one of the destructors accesses this array and hits a dangling pointer) + data.elements[i]->decReferenceCount(); + data.elements[i] = 0; // (in case one of the destructors accesses this array and hits a dangling pointer) } } const int rangeSize = end - start; - ObjectClass** e = this->elements + start; + ObjectClass** e = data.elements + start; i = numUsed - end; numUsed -= rangeSize; @@ -555,7 +555,7 @@ public: ++e; } - if ((numUsed << 1) < this->numAllocated) + if ((numUsed << 1) < data.numAllocated) minimiseStorageOverheads(); } @@ -596,8 +596,8 @@ public: if (((unsigned int) index1) < (unsigned int) numUsed && ((unsigned int) index2) < (unsigned int) numUsed) { - swapVariables (this->elements [index1], - this->elements [index2]); + swapVariables (data.elements [index1], + data.elements [index2]); } lock.exit(); @@ -628,22 +628,22 @@ public: if (((unsigned int) newIndex) >= (unsigned int) numUsed) newIndex = numUsed - 1; - ObjectClass* const value = this->elements [currentIndex]; + ObjectClass* const value = data.elements [currentIndex]; if (newIndex > currentIndex) { - memmove (this->elements + currentIndex, - this->elements + currentIndex + 1, + memmove (data.elements + currentIndex, + data.elements + currentIndex + 1, (newIndex - currentIndex) * sizeof (ObjectClass*)); } else { - memmove (this->elements + newIndex + 1, - this->elements + newIndex, + memmove (data.elements + newIndex + 1, + data.elements + newIndex, (currentIndex - newIndex) * sizeof (ObjectClass*)); } - this->elements [newIndex] = value; + data.elements [newIndex] = value; } lock.exit(); @@ -666,7 +666,7 @@ public: { for (int i = numUsed; --i >= 0;) { - if (this->elements [i] != other.elements [i]) + if (data.elements [i] != other.data.elements [i]) { result = false; break; @@ -724,7 +724,7 @@ public: // avoids getting warning messages about the parameter being unused lock.enter(); - sortArray (comparator, this->elements, 0, size() - 1, retainOrderOfEquivalentItems); + sortArray (comparator, data.elements, 0, size() - 1, retainOrderOfEquivalentItems); lock.exit(); } @@ -741,14 +741,14 @@ public: if (numUsed == 0) { - this->setAllocatedSize (0); + data.setAllocatedSize (0); } else { - const int newAllocation = this->granularity * (numUsed / this->granularity + 1); + const int newAllocation = data.granularity * (numUsed / data.granularity + 1); - if (newAllocation < this->numAllocated) - this->setAllocatedSize (newAllocation); + if (newAllocation < data.numAllocated) + data.setAllocatedSize (newAllocation); } lock.exit(); @@ -784,6 +784,7 @@ public: juce_UseDebuggingNewOperator private: + ArrayAllocationBase data; int numUsed; TypeOfCriticalSectionToUse lock; }; diff --git a/src/containers/juce_SortedSet.h b/src/containers/juce_SortedSet.h index a14749a4c2..f99bda0e6a 100644 --- a/src/containers/juce_SortedSet.h +++ b/src/containers/juce_SortedSet.h @@ -58,7 +58,7 @@ @see Array, OwnedArray, ReferenceCountedArray, StringArray, CriticalSection */ template -class SortedSet : private ArrayAllocationBase +class SortedSet { public: //============================================================================== @@ -67,11 +67,9 @@ public: @param granularity this is the size of increment by which the internal storage used by the array will grow. Only change it from the default if you know the array is going to be very big and needs to be able to grow efficiently. - - @see ArrayAllocationBase */ SortedSet (const int granularity_ = juceDefaultArrayGranularity) throw() - : ArrayAllocationBase (granularity_), + : data (granularity_), numUsed (0) { } @@ -80,12 +78,12 @@ public: @param other the set to copy */ SortedSet (const SortedSet& other) throw() - : ArrayAllocationBase (other.granularity) + : data (other.data.granularity) { other.lockSet(); numUsed = other.numUsed; - setAllocatedSize (other.numUsed); - memcpy (this->elements, other.elements, numUsed * sizeof (ElementType)); + data.setAllocatedSize (other.numUsed); + memcpy (data.elements, other.data.elements, numUsed * sizeof (ElementType)); other.unlockSet(); } @@ -104,10 +102,10 @@ public: other.lockSet(); lock.enter(); - this->granularity = other.granularity; - ensureAllocatedSize (other.size()); + data.granularity = other.data.granularity; + data.ensureAllocatedSize (other.size()); numUsed = other.numUsed; - memcpy (this->elements, other.elements, numUsed * sizeof (ElementType)); + memcpy (data.elements, other.data.elements, numUsed * sizeof (ElementType)); minimiseStorageOverheads(); lock.exit(); @@ -137,7 +135,7 @@ public: for (int i = numUsed; --i >= 0;) { - if (this->elements [i] != other.elements [i]) + if (data.elements [i] != other.data.elements [i]) { lock.exit(); return false; @@ -172,7 +170,7 @@ public: void clear() throw() { lock.enter(); - this->setAllocatedSize (0); + data.setAllocatedSize (0); numUsed = 0; lock.exit(); } @@ -211,7 +209,7 @@ public: { lock.enter(); const ElementType result = (((unsigned int) index) < (unsigned int) numUsed) - ? this->elements [index] + ? data.elements [index] : (ElementType) 0; lock.exit(); @@ -230,7 +228,7 @@ public: { lock.enter(); jassert (((unsigned int) index) < (unsigned int) numUsed); - const ElementType result = this->elements [index]; + const ElementType result = data.elements [index]; lock.exit(); return result; @@ -243,7 +241,7 @@ public: inline ElementType getFirst() const throw() { lock.enter(); - const ElementType result = (numUsed > 0) ? this->elements [0] + const ElementType result = (numUsed > 0) ? data.elements [0] : (ElementType) 0; lock.exit(); @@ -257,7 +255,7 @@ public: inline ElementType getLast() const throw() { lock.enter(); - const ElementType result = (numUsed > 0) ? this->elements [numUsed - 1] + const ElementType result = (numUsed > 0) ? data.elements [numUsed - 1] : (ElementType) 0; lock.exit(); @@ -287,7 +285,7 @@ public: lock.exit(); return -1; } - else if (elementToLookFor == this->elements [start]) + else if (elementToLookFor == data.elements [start]) { lock.exit(); return start; @@ -301,7 +299,7 @@ public: lock.exit(); return -1; } - else if (elementToLookFor >= this->elements [halfway]) + else if (elementToLookFor >= data.elements [halfway]) start = halfway; else end = halfway; @@ -328,7 +326,7 @@ public: lock.exit(); return false; } - else if (elementToLookFor == this->elements [start]) + else if (elementToLookFor == data.elements [start]) { lock.exit(); return true; @@ -342,7 +340,7 @@ public: lock.exit(); return false; } - else if (elementToLookFor >= this->elements [halfway]) + else if (elementToLookFor >= data.elements [halfway]) start = halfway; else end = halfway; @@ -371,7 +369,7 @@ public: insertInternal (start, newElement); break; } - else if (newElement == this->elements [start]) + else if (newElement == data.elements [start]) { break; } @@ -381,14 +379,14 @@ public: if (halfway == start) { - if (newElement >= this->elements [halfway]) + if (newElement >= data.elements [halfway]) insertInternal (start + 1, newElement); else insertInternal (start, newElement); break; } - else if (newElement >= this->elements [halfway]) + else if (newElement >= data.elements [halfway]) start = halfway; else end = halfway; @@ -470,14 +468,14 @@ public: { --numUsed; - ElementType* const e = this->elements + indexToRemove; + ElementType* const e = data.elements + indexToRemove; ElementType const removed = *e; const int numberToShift = numUsed - indexToRemove; if (numberToShift > 0) memmove (e, e + 1, numberToShift * sizeof (ElementType)); - if ((numUsed << 1) < this->numAllocated) + if ((numUsed << 1) < data.numAllocated) minimiseStorageOverheads(); lock.exit(); @@ -524,7 +522,7 @@ public: if (otherSet.size() > 0) { for (int i = numUsed; --i >= 0;) - if (otherSet.contains (this->elements [i])) + if (otherSet.contains (data.elements [i])) remove (i); } } @@ -555,7 +553,7 @@ public: else { for (int i = numUsed; --i >= 0;) - if (! otherSet.contains (this->elements [i])) + if (! otherSet.contains (data.elements [i])) remove (i); } } @@ -577,14 +575,14 @@ public: if (numUsed == 0) { - this->setAllocatedSize (0); + data.setAllocatedSize (0); } else { - const int newAllocation = this->granularity * (numUsed / this->granularity + 1); + const int newAllocation = data.granularity * (numUsed / data.granularity + 1); - if (newAllocation < this->numAllocated) - this->setAllocatedSize (newAllocation); + if (newAllocation < data.numAllocated) + data.setAllocatedSize (newAllocation); } lock.exit(); @@ -620,14 +618,15 @@ public: juce_UseDebuggingNewOperator private: + ArrayAllocationBase data; int numUsed; TypeOfCriticalSectionToUse lock; void insertInternal (const int indexToInsertAt, const ElementType newElement) throw() { - this->ensureAllocatedSize (numUsed + 1); + data.ensureAllocatedSize (numUsed + 1); - ElementType* const insertPos = this->elements + indexToInsertAt; + ElementType* const insertPos = data.elements + indexToInsertAt; const int numberToMove = numUsed - indexToInsertAt; if (numberToMove > 0) diff --git a/src/containers/juce_ValueTree.cpp b/src/containers/juce_ValueTree.cpp index 1161948531..cefe552bf4 100644 --- a/src/containers/juce_ValueTree.cpp +++ b/src/containers/juce_ValueTree.cpp @@ -90,8 +90,9 @@ class ValueTreeChildChangeAction : public UndoableAction public: ValueTreeChildChangeAction (const ValueTree::SharedObjectPtr& target_, const int childIndex_, const ValueTree::SharedObjectPtr& newChild_) throw() - : target (target_), childIndex (childIndex_), + : target (target_), child (newChild_ != 0 ? newChild_ : target_->children [childIndex_]), + childIndex (childIndex_), isDeleting (newChild_ == 0) { jassert (child != 0); diff --git a/src/gui/components/buttons/juce_TextButton.h b/src/gui/components/buttons/juce_TextButton.h index 968052a19b..c6bdb66946 100644 --- a/src/gui/components/buttons/juce_TextButton.h +++ b/src/gui/components/buttons/juce_TextButton.h @@ -71,7 +71,8 @@ public: buttonOnColourId = 0x1000101, /**< The colour used to fill the button shape (when the button is toggled 'on'). The look-and-feel class might re-interpret this to add effects, etc. */ - textColourId = 0x1000102 /**< The colour to use for the button's text. */ + textColourOffId = 0x1000102, /**< The colour to use for the button's text when the button's toggle state is "off". */ + textColourOnId = 0x1000103 /**< The colour to use for the button's text.when the button's toggle state is "on". */ }; //============================================================================== diff --git a/src/gui/components/code_editor/juce_CodeDocument.cpp b/src/gui/components/code_editor/juce_CodeDocument.cpp index 65c81b9383..9d1203b7db 100644 --- a/src/gui/components/code_editor/juce_CodeDocument.cpp +++ b/src/gui/components/code_editor/juce_CodeDocument.cpp @@ -212,16 +212,16 @@ bool CodeDocument::Iterator::isEOF() const throw() //============================================================================== CodeDocument::Position::Position() throw() - : owner (0), line (0), indexInLine (0), - characterPos (0), positionMaintained (false) + : owner (0), characterPos (0), line (0), + indexInLine (0), positionMaintained (false) { } CodeDocument::Position::Position (const CodeDocument* const ownerDocument, const int line_, const int indexInLine_) throw() : owner (const_cast (ownerDocument)), - line (line_), indexInLine (indexInLine_), - characterPos (0), positionMaintained (false) + characterPos (0), line (line_), + indexInLine (indexInLine_), positionMaintained (false) { setLineAndIndex (line_, indexInLine_); } @@ -235,9 +235,8 @@ CodeDocument::Position::Position (const CodeDocument* const ownerDocument, } CodeDocument::Position::Position (const Position& other) throw() - : owner (other.owner), line (other.line), - indexInLine (other.indexInLine), characterPos (other.characterPos), - positionMaintained (false) + : owner (other.owner), characterPos (other.characterPos), line (other.line), + indexInLine (other.indexInLine), positionMaintained (false) { jassert (*this == other); } diff --git a/src/gui/components/code_editor/juce_CodeEditorComponent.cpp b/src/gui/components/code_editor/juce_CodeEditorComponent.cpp index b04bc05924..038d01b034 100644 --- a/src/gui/components/code_editor/juce_CodeEditorComponent.cpp +++ b/src/gui/components/code_editor/juce_CodeEditorComponent.cpp @@ -277,16 +277,16 @@ private: CodeEditorComponent::CodeEditorComponent (CodeDocument& document_, CodeTokeniser* const codeTokeniser_) : document (document_), - codeTokeniser (codeTokeniser_), + firstLineOnScreen (0), gutter (5), spacesPerTab (4), lineHeight (0), - firstLineOnScreen (0), linesOnScreen (0), columnsOnScreen (0), scrollbarThickness (16), + useSpacesForTabs (false), xOffset (0), - useSpacesForTabs (false) + codeTokeniser (codeTokeniser_) { caretPos = CodeDocument::Position (&document_, 0, 0); caretPos.setPositionMaintained (true); diff --git a/src/gui/components/controls/juce_TreeView.cpp b/src/gui/components/controls/juce_TreeView.cpp index 91d2a40a2e..5d354c3241 100644 --- a/src/gui/components/controls/juce_TreeView.cpp +++ b/src/gui/components/controls/juce_TreeView.cpp @@ -565,6 +565,14 @@ TreeViewItem* TreeView::getItemAt (int y) const throw() return tc->findItemAt (y, pos); } +TreeViewItem* TreeView::findItemFromIdentifierString (const String& identifierString) const +{ + if (rootItem == 0) + return 0; + + return rootItem->findItemFromIdentifierString (identifierString); +} + //============================================================================== XmlElement* TreeView::getOpennessState (const bool alsoIncludeScrollPosition) const { @@ -1679,6 +1687,44 @@ TreeViewItem* TreeViewItem::getNextVisibleItem (const bool recurse) const throw( return 0; } +const String TreeViewItem::getItemIdentifierString() const +{ + String s; + + if (parentItem != 0) + s = parentItem->getItemIdentifierString(); + + return s + T("/") + getUniqueName().replaceCharacter (T('/'), T('\\')); +} + +TreeViewItem* TreeViewItem::findItemFromIdentifierString (const String& identifierString) +{ + const String uid (getUniqueName()); + + if (uid == identifierString) + return this; + + if (identifierString.startsWith (uid + T("/"))) + { + const String remainingPath (identifierString.substring (uid.length() + 1)); + + bool wasOpen = isOpen(); + setOpen (true); + + for (int i = subItems.size(); --i >= 0;) + { + TreeViewItem* item = subItems.getUnchecked(i)->findItemFromIdentifierString (remainingPath); + + if (item != 0) + return item; + } + + setOpen (wasOpen); + } + + return 0; +} + void TreeViewItem::restoreOpennessState (const XmlElement& e) throw() { if (e.hasTagName (T("CLOSED"))) diff --git a/src/gui/components/controls/juce_TreeView.h b/src/gui/components/controls/juce_TreeView.h index 03fa4eb6f5..ee801f65c3 100644 --- a/src/gui/components/controls/juce_TreeView.h +++ b/src/gui/components/controls/juce_TreeView.h @@ -450,6 +450,15 @@ public: /** Returns true if this item is the last of its parent's sub-itens. */ bool isLastOfSiblings() const throw(); + /** Creates a string that can be used to uniquely retrieve this item in the tree. + + The string that is returned can be passed to TreeView::findItemFromIdentifierString(). + The string takes the form of a path, constructed from the getUniqueName() of this + item and all its parents, so these must all be correctly implemented for it to work. + @see TreeView::findItemFromIdentifierString, getUniqueName + */ + const String getItemIdentifierString() const; + //============================================================================== juce_UseDebuggingNewOperator @@ -481,6 +490,7 @@ private: int countSelectedItemsRecursively() const throw(); TreeViewItem* getSelectedItemWithIndex (int index) throw(); TreeViewItem* getNextVisibleItem (const bool recurse) const throw(); + TreeViewItem* findItemFromIdentifierString (const String& identifierString); TreeViewItem (const TreeViewItem&); const TreeViewItem& operator= (const TreeViewItem&); @@ -654,6 +664,13 @@ public: */ void setIndentSize (const int newIndentSize); + /** Searches the tree for an item with the specified identifier. + The identifer string must have been created by calling TreeViewItem::getItemIdentifierString(). + If no such item exists, this will return false. If the item is found, all of its items + will be automatically opened. + */ + TreeViewItem* findItemFromIdentifierString (const String& identifierString) const; + //============================================================================== /** Saves the current state of open/closed nodes so it can be restored later. diff --git a/src/gui/components/lookandfeel/juce_LookAndFeel.cpp b/src/gui/components/lookandfeel/juce_LookAndFeel.cpp index 520c513240..eea832efc5 100644 --- a/src/gui/components/lookandfeel/juce_LookAndFeel.cpp +++ b/src/gui/components/lookandfeel/juce_LookAndFeel.cpp @@ -114,7 +114,8 @@ LookAndFeel::LookAndFeel() { TextButton::buttonColourId, textButtonColour, TextButton::buttonOnColourId, 0xff4444ff, - TextButton::textColourId, 0xff000000, + TextButton::textColourOnId, 0xff000000, + TextButton::textColourOffId, 0xff000000, ComboBox::buttonColourId, 0xffbbbbff, ComboBox::outlineColourId, standardOutlineColour, @@ -386,7 +387,8 @@ void LookAndFeel::drawButtonText (Graphics& g, TextButton& button, { Font font (getFontForTextButton (button)); g.setFont (font); - g.setColour (button.findColour (TextButton::textColourId) + g.setColour (button.findColour (button.getToggleState() ? TextButton::textColourOnId + : TextButton::textColourOffId) .withMultipliedAlpha (button.isEnabled() ? 1.0f : 0.5f)); const int yIndent = jmin (4, button.proportionOfHeight (0.3f)); diff --git a/src/gui/graphics/geometry/juce_Path.cpp b/src/gui/graphics/geometry/juce_Path.cpp index 31a3c49054..4e72b6b58f 100644 --- a/src/gui/graphics/geometry/juce_Path.cpp +++ b/src/gui/graphics/geometry/juce_Path.cpp @@ -48,7 +48,7 @@ static const int defaultGranularity = 32; //============================================================================== Path::Path() throw() - : ArrayAllocationBase (defaultGranularity), + : data (defaultGranularity), numElements (0), pathXMin (0), pathXMax (0), @@ -63,7 +63,7 @@ Path::~Path() throw() } Path::Path (const Path& other) throw() - : ArrayAllocationBase (defaultGranularity), + : data (defaultGranularity), numElements (other.numElements), pathXMin (other.pathXMin), pathXMax (other.pathXMax), @@ -73,8 +73,8 @@ Path::Path (const Path& other) throw() { if (numElements > 0) { - setAllocatedSize (numElements); - memcpy (elements, other.elements, numElements * sizeof (float)); + data.setAllocatedSize (numElements); + memcpy (data.elements, other.data.elements, numElements * sizeof (float)); } } @@ -82,7 +82,7 @@ const Path& Path::operator= (const Path& other) throw() { if (this != &other) { - ensureAllocatedSize (other.numElements); + data.ensureAllocatedSize (other.numElements); numElements = other.numElements; pathXMin = other.pathXMin; @@ -92,7 +92,7 @@ const Path& Path::operator= (const Path& other) throw() useNonZeroWinding = other.useNonZeroWinding; if (numElements > 0) - memcpy (elements, other.elements, numElements * sizeof (float)); + memcpy (data.elements, other.data.elements, numElements * sizeof (float)); } return *this; @@ -109,14 +109,14 @@ void Path::clear() throw() void Path::swapWithPath (Path& other) { - swapVariables (this->numAllocated, other.numAllocated); - swapVariables (this->elements, other.elements); - swapVariables (this->numElements, other.numElements); - swapVariables (this->pathXMin, other.pathXMin); - swapVariables (this->pathXMax, other.pathXMax); - swapVariables (this->pathYMin, other.pathYMin); - swapVariables (this->pathYMax, other.pathYMax); - swapVariables (this->useNonZeroWinding, other.useNonZeroWinding); + swapVariables (data.numAllocated, other.data.numAllocated); + swapVariables (data.elements, other.data.elements); + swapVariables (numElements, other.numElements); + swapVariables (pathXMin, other.pathXMin); + swapVariables (pathXMax, other.pathXMax); + swapVariables (pathYMin, other.pathYMin); + swapVariables (pathYMax, other.pathYMax); + swapVariables (useNonZeroWinding, other.useNonZeroWinding); } //============================================================================== @@ -138,7 +138,7 @@ bool Path::isEmpty() const throw() while (i < numElements) { - const float type = elements [i++]; + const float type = data.elements [i++]; if (type == moveMarker) { @@ -210,11 +210,11 @@ void Path::startNewSubPath (const float x, pathYMax = jmax (pathYMax, y); } - ensureAllocatedSize (numElements + 3); + data.ensureAllocatedSize (numElements + 3); - elements [numElements++] = moveMarker; - elements [numElements++] = x; - elements [numElements++] = y; + data.elements [numElements++] = moveMarker; + data.elements [numElements++] = x; + data.elements [numElements++] = y; } void Path::lineTo (const float x, const float y) throw() @@ -224,11 +224,11 @@ void Path::lineTo (const float x, const float y) throw() if (numElements == 0) startNewSubPath (0, 0); - ensureAllocatedSize (numElements + 3); + data.ensureAllocatedSize (numElements + 3); - elements [numElements++] = lineMarker; - elements [numElements++] = x; - elements [numElements++] = y; + data.elements [numElements++] = lineMarker; + data.elements [numElements++] = x; + data.elements [numElements++] = y; pathXMin = jmin (pathXMin, x); pathXMax = jmax (pathXMax, x); @@ -245,13 +245,13 @@ void Path::quadraticTo (const float x1, const float y1, if (numElements == 0) startNewSubPath (0, 0); - ensureAllocatedSize (numElements + 5); + data.ensureAllocatedSize (numElements + 5); - elements [numElements++] = quadMarker; - elements [numElements++] = x1; - elements [numElements++] = y1; - elements [numElements++] = x2; - elements [numElements++] = y2; + data.elements [numElements++] = quadMarker; + data.elements [numElements++] = x1; + data.elements [numElements++] = y1; + data.elements [numElements++] = x2; + data.elements [numElements++] = y2; pathXMin = jmin (pathXMin, x1, x2); pathXMax = jmax (pathXMax, x1, x2); @@ -270,15 +270,15 @@ void Path::cubicTo (const float x1, const float y1, if (numElements == 0) startNewSubPath (0, 0); - ensureAllocatedSize (numElements + 7); + data.ensureAllocatedSize (numElements + 7); - elements [numElements++] = cubicMarker; - elements [numElements++] = x1; - elements [numElements++] = y1; - elements [numElements++] = x2; - elements [numElements++] = y2; - elements [numElements++] = x3; - elements [numElements++] = y3; + data.elements [numElements++] = cubicMarker; + data.elements [numElements++] = x1; + data.elements [numElements++] = y1; + data.elements [numElements++] = x2; + data.elements [numElements++] = y2; + data.elements [numElements++] = x3; + data.elements [numElements++] = y3; pathXMin = jmin (pathXMin, x1, x2, x3); pathXMax = jmax (pathXMax, x1, x2, x3); @@ -289,10 +289,10 @@ void Path::cubicTo (const float x1, const float y1, void Path::closeSubPath() throw() { if (numElements > 0 - && elements [numElements - 1] != closeSubPathMarker) + && data.elements [numElements - 1] != closeSubPathMarker) { - ensureAllocatedSize (numElements + 1); - elements [numElements++] = closeSubPathMarker; + data.ensureAllocatedSize (numElements + 1); + data.elements [numElements++] = closeSubPathMarker; } } @@ -300,11 +300,11 @@ const Point Path::getCurrentPosition() const { int i = numElements - 1; - if (i > 0 && elements[i] == closeSubPathMarker) + if (i > 0 && data.elements[i] == closeSubPathMarker) { while (i >= 0) { - if (elements[i] == moveMarker) + if (data.elements[i] == moveMarker) { i += 2; break; @@ -315,7 +315,7 @@ const Point Path::getCurrentPosition() const } if (i > 0) - return Point (elements [i - 1], elements [i]); + return Point (data.elements [i - 1], data.elements [i]); return Point (0.0f, 0.0f); } @@ -331,7 +331,7 @@ void Path::addRectangle (const float x, const float y, if (h < 0) swapVariables (y1, y2); - ensureAllocatedSize (numElements + 13); + data.ensureAllocatedSize (numElements + 13); if (numElements == 0) { @@ -348,19 +348,19 @@ void Path::addRectangle (const float x, const float y, pathYMax = jmax (pathYMax, y2); } - elements [numElements++] = moveMarker; - elements [numElements++] = x1; - elements [numElements++] = y2; - elements [numElements++] = lineMarker; - elements [numElements++] = x1; - elements [numElements++] = y1; - elements [numElements++] = lineMarker; - elements [numElements++] = x2; - elements [numElements++] = y1; - elements [numElements++] = lineMarker; - elements [numElements++] = x2; - elements [numElements++] = y2; - elements [numElements++] = closeSubPathMarker; + data.elements [numElements++] = moveMarker; + data.elements [numElements++] = x1; + data.elements [numElements++] = y2; + data.elements [numElements++] = lineMarker; + data.elements [numElements++] = x1; + data.elements [numElements++] = y1; + data.elements [numElements++] = lineMarker; + data.elements [numElements++] = x2; + data.elements [numElements++] = y1; + data.elements [numElements++] = lineMarker; + data.elements [numElements++] = x2; + data.elements [numElements++] = y2; + data.elements [numElements++] = closeSubPathMarker; } void Path::addRectangle (const Rectangle& rectangle) throw() @@ -791,38 +791,38 @@ void Path::addPath (const Path& other) throw() while (i < other.numElements) { - const float type = other.elements [i++]; + const float type = other.data.elements [i++]; if (type == moveMarker) { - startNewSubPath (other.elements [i], - other.elements [i + 1]); + startNewSubPath (other.data.elements [i], + other.data.elements [i + 1]); i += 2; } else if (type == lineMarker) { - lineTo (other.elements [i], - other.elements [i + 1]); + lineTo (other.data.elements [i], + other.data.elements [i + 1]); i += 2; } else if (type == quadMarker) { - quadraticTo (other.elements [i], - other.elements [i + 1], - other.elements [i + 2], - other.elements [i + 3]); + quadraticTo (other.data.elements [i], + other.data.elements [i + 1], + other.data.elements [i + 2], + other.data.elements [i + 3]); i += 4; } else if (type == cubicMarker) { - cubicTo (other.elements [i], - other.elements [i + 1], - other.elements [i + 2], - other.elements [i + 3], - other.elements [i + 4], - other.elements [i + 5]); + cubicTo (other.data.elements [i], + other.data.elements [i + 1], + other.data.elements [i + 2], + other.data.elements [i + 3], + other.data.elements [i + 4], + other.data.elements [i + 5]); i += 6; } @@ -845,7 +845,7 @@ void Path::addPath (const Path& other, while (i < other.numElements) { - const float type = other.elements [i++]; + const float type = other.data.elements [i++]; if (type == closeSubPathMarker) { @@ -853,8 +853,8 @@ void Path::addPath (const Path& other, } else { - float x = other.elements [i++]; - float y = other.elements [i++]; + float x = other.data.elements [i++]; + float y = other.data.elements [i++]; transformToApply.transformPoint (x, y); if (type == moveMarker) @@ -867,18 +867,18 @@ void Path::addPath (const Path& other, } else if (type == quadMarker) { - float x2 = other.elements [i++]; - float y2 = other.elements [i++]; + float x2 = other.data.elements [i++]; + float y2 = other.data.elements [i++]; transformToApply.transformPoint (x2, y2); quadraticTo (x, y, x2, y2); } else if (type == cubicMarker) { - float x2 = other.elements [i++]; - float y2 = other.elements [i++]; - float x3 = other.elements [i++]; - float y3 = other.elements [i++]; + float x2 = other.data.elements [i++]; + float y2 = other.data.elements [i++]; + float x3 = other.data.elements [i++]; + float y3 = other.data.elements [i++]; transformToApply.transformPoint (x2, y2); transformToApply.transformPoint (x3, y3); @@ -903,24 +903,24 @@ void Path::applyTransform (const AffineTransform& transform) throw() while (i < numElements) { - const float type = elements [i++]; + const float type = data.elements [i++]; if (type == moveMarker) { - transform.transformPoint (elements [i], - elements [i + 1]); + transform.transformPoint (data.elements [i], + data.elements [i + 1]); if (setMaxMin) { - pathXMin = jmin (pathXMin, elements [i]); - pathXMax = jmax (pathXMax, elements [i]); - pathYMin = jmin (pathYMin, elements [i + 1]); - pathYMax = jmax (pathYMax, elements [i + 1]); + pathXMin = jmin (pathXMin, data.elements [i]); + pathXMax = jmax (pathXMax, data.elements [i]); + pathYMin = jmin (pathYMin, data.elements [i + 1]); + pathYMax = jmax (pathYMax, data.elements [i + 1]); } else { - pathXMin = pathXMax = elements [i]; - pathYMin = pathYMax = elements [i + 1]; + pathXMin = pathXMax = data.elements [i]; + pathYMin = pathYMax = data.elements [i + 1]; setMaxMin = true; } @@ -928,46 +928,46 @@ void Path::applyTransform (const AffineTransform& transform) throw() } else if (type == lineMarker) { - transform.transformPoint (elements [i], - elements [i + 1]); + transform.transformPoint (data.elements [i], + data.elements [i + 1]); - pathXMin = jmin (pathXMin, elements [i]); - pathXMax = jmax (pathXMax, elements [i]); - pathYMin = jmin (pathYMin, elements [i + 1]); - pathYMax = jmax (pathYMax, elements [i + 1]); + pathXMin = jmin (pathXMin, data.elements [i]); + pathXMax = jmax (pathXMax, data.elements [i]); + pathYMin = jmin (pathYMin, data.elements [i + 1]); + pathYMax = jmax (pathYMax, data.elements [i + 1]); i += 2; } else if (type == quadMarker) { - transform.transformPoint (elements [i], - elements [i + 1]); + transform.transformPoint (data.elements [i], + data.elements [i + 1]); - transform.transformPoint (elements [i + 2], - elements [i + 3]); + transform.transformPoint (data.elements [i + 2], + data.elements [i + 3]); - pathXMin = jmin (pathXMin, elements [i], elements [i + 2]); - pathXMax = jmax (pathXMax, elements [i], elements [i + 2]); - pathYMin = jmin (pathYMin, elements [i + 1], elements [i + 3]); - pathYMax = jmax (pathYMax, elements [i + 1], elements [i + 3]); + pathXMin = jmin (pathXMin, data.elements [i], data.elements [i + 2]); + pathXMax = jmax (pathXMax, data.elements [i], data.elements [i + 2]); + pathYMin = jmin (pathYMin, data.elements [i + 1], data.elements [i + 3]); + pathYMax = jmax (pathYMax, data.elements [i + 1], data.elements [i + 3]); i += 4; } else if (type == cubicMarker) { - transform.transformPoint (elements [i], - elements [i + 1]); + transform.transformPoint (data.elements [i], + data.elements [i + 1]); - transform.transformPoint (elements [i + 2], - elements [i + 3]); + transform.transformPoint (data.elements [i + 2], + data.elements [i + 3]); - transform.transformPoint (elements [i + 4], - elements [i + 5]); + transform.transformPoint (data.elements [i + 4], + data.elements [i + 5]); - pathXMin = jmin (pathXMin, elements [i], elements [i + 2], elements [i + 4]); - pathXMax = jmax (pathXMax, elements [i], elements [i + 2], elements [i + 4]); - pathYMin = jmin (pathYMin, elements [i + 1], elements [i + 3], elements [i + 5]); - pathYMax = jmax (pathYMax, elements [i + 1], elements [i + 3], elements [i + 5]); + pathXMin = jmin (pathXMin, data.elements [i], data.elements [i + 2], data.elements [i + 4]); + pathXMax = jmax (pathXMax, data.elements [i], data.elements [i + 2], data.elements [i + 4]); + pathYMin = jmin (pathYMin, data.elements [i + 1], data.elements [i + 3], data.elements [i + 5]); + pathYMax = jmax (pathYMax, data.elements [i + 1], data.elements [i + 3], data.elements [i + 5]); i += 6; } @@ -1098,17 +1098,17 @@ const Path Path::createPathWithRoundedCorners (const float cornerRadius) const t while (n < numElements) { - const float type = elements [n++]; + const float type = data.elements [n++]; if (type == moveMarker) { indexOfPathStart = p.numElements; indexOfPathStartThis = n - 1; - const float x = elements [n++]; - const float y = elements [n++]; + const float x = data.elements [n++]; + const float y = data.elements [n++]; p.startNewSubPath (x, y); lastWasLine = false; - firstWasLine = (elements [n] == lineMarker); + firstWasLine = (data.elements [n] == lineMarker); } else if (type == lineMarker || type == closeSubPathMarker) { @@ -1116,28 +1116,28 @@ const Path Path::createPathWithRoundedCorners (const float cornerRadius) const t if (type == lineMarker) { - endX = elements [n++]; - endY = elements [n++]; + endX = data.elements [n++]; + endY = data.elements [n++]; if (n > 8) { - startX = elements [n - 8]; - startY = elements [n - 7]; - joinX = elements [n - 5]; - joinY = elements [n - 4]; + startX = data.elements [n - 8]; + startY = data.elements [n - 7]; + joinX = data.elements [n - 5]; + joinY = data.elements [n - 4]; } } else { - endX = elements [indexOfPathStartThis + 1]; - endY = elements [indexOfPathStartThis + 2]; + endX = data.elements [indexOfPathStartThis + 1]; + endY = data.elements [indexOfPathStartThis + 2]; if (n > 6) { - startX = elements [n - 6]; - startY = elements [n - 5]; - joinX = elements [n - 3]; - joinY = elements [n - 2]; + startX = data.elements [n - 6]; + startY = data.elements [n - 5]; + joinX = data.elements [n - 3]; + joinY = data.elements [n - 2]; } } @@ -1150,8 +1150,8 @@ const Path Path::createPathWithRoundedCorners (const float cornerRadius) const t { const double propNeeded = jmin (0.5, cornerRadius / len1); - p.elements [p.numElements - 2] = (float) (joinX - (joinX - startX) * propNeeded); - p.elements [p.numElements - 1] = (float) (joinY - (joinY - startY) * propNeeded); + p.data.elements [p.numElements - 2] = (float) (joinX - (joinX - startX) * propNeeded); + p.data.elements [p.numElements - 1] = (float) (joinY - (joinY - startY) * propNeeded); } const double len2 = juce_hypot (endX - joinX, @@ -1178,12 +1178,12 @@ const Path Path::createPathWithRoundedCorners (const float cornerRadius) const t { if (firstWasLine) { - startX = elements [n - 3]; - startY = elements [n - 2]; + startX = data.elements [n - 3]; + startY = data.elements [n - 2]; joinX = endX; joinY = endY; - endX = elements [indexOfPathStartThis + 4]; - endY = elements [indexOfPathStartThis + 5]; + endX = data.elements [indexOfPathStartThis + 4]; + endY = data.elements [indexOfPathStartThis + 5]; const double len1 = juce_hypot (startX - joinX, startY - joinY); @@ -1192,8 +1192,8 @@ const Path Path::createPathWithRoundedCorners (const float cornerRadius) const t { const double propNeeded = jmin (0.5, cornerRadius / len1); - p.elements [p.numElements - 2] = (float) (joinX - (joinX - startX) * propNeeded); - p.elements [p.numElements - 1] = (float) (joinY - (joinY - startY) * propNeeded); + p.data.elements [p.numElements - 2] = (float) (joinX - (joinX - startX) * propNeeded); + p.data.elements [p.numElements - 1] = (float) (joinY - (joinY - startY) * propNeeded); } const double len2 = juce_hypot (endX - joinX, @@ -1208,8 +1208,8 @@ const Path Path::createPathWithRoundedCorners (const float cornerRadius) const t p.quadraticTo (joinX, joinY, endX, endY); - p.elements [indexOfPathStart + 1] = endX; - p.elements [indexOfPathStart + 2] = endY; + p.data.elements [indexOfPathStart + 1] = endX; + p.data.elements [indexOfPathStart + 2] = endY; } } @@ -1219,21 +1219,21 @@ const Path Path::createPathWithRoundedCorners (const float cornerRadius) const t else if (type == quadMarker) { lastWasLine = false; - const float x1 = elements [n++]; - const float y1 = elements [n++]; - const float x2 = elements [n++]; - const float y2 = elements [n++]; + const float x1 = data.elements [n++]; + const float y1 = data.elements [n++]; + const float x2 = data.elements [n++]; + const float y2 = data.elements [n++]; p.quadraticTo (x1, y1, x2, y2); } else if (type == cubicMarker) { lastWasLine = false; - const float x1 = elements [n++]; - const float y1 = elements [n++]; - const float x2 = elements [n++]; - const float y2 = elements [n++]; - const float x3 = elements [n++]; - const float y3 = elements [n++]; + const float x1 = data.elements [n++]; + const float y1 = data.elements [n++]; + const float x2 = data.elements [n++]; + const float y2 = data.elements [n++]; + const float x3 = data.elements [n++]; + const float y3 = data.elements [n++]; p.cubicTo (x1, y1, x2, y2, x3, y3); } } @@ -1322,37 +1322,37 @@ void Path::writePathToStream (OutputStream& dest) const int i = 0; while (i < numElements) { - const float type = elements [i++]; + const float type = data.elements [i++]; if (type == moveMarker) { dest.writeByte ('m'); - dest.writeFloat (elements [i++]); - dest.writeFloat (elements [i++]); + dest.writeFloat (data.elements [i++]); + dest.writeFloat (data.elements [i++]); } else if (type == lineMarker) { dest.writeByte ('l'); - dest.writeFloat (elements [i++]); - dest.writeFloat (elements [i++]); + dest.writeFloat (data.elements [i++]); + dest.writeFloat (data.elements [i++]); } else if (type == quadMarker) { dest.writeByte ('q'); - dest.writeFloat (elements [i++]); - dest.writeFloat (elements [i++]); - dest.writeFloat (elements [i++]); - dest.writeFloat (elements [i++]); + dest.writeFloat (data.elements [i++]); + dest.writeFloat (data.elements [i++]); + dest.writeFloat (data.elements [i++]); + dest.writeFloat (data.elements [i++]); } else if (type == cubicMarker) { dest.writeByte ('b'); - dest.writeFloat (elements [i++]); - dest.writeFloat (elements [i++]); - dest.writeFloat (elements [i++]); - dest.writeFloat (elements [i++]); - dest.writeFloat (elements [i++]); - dest.writeFloat (elements [i++]); + dest.writeFloat (data.elements [i++]); + dest.writeFloat (data.elements [i++]); + dest.writeFloat (data.elements [i++]); + dest.writeFloat (data.elements [i++]); + dest.writeFloat (data.elements [i++]); + dest.writeFloat (data.elements [i++]); } else if (type == closeSubPathMarker) { @@ -1375,7 +1375,7 @@ const String Path::toString() const while (i < numElements) { - const float marker = elements [i++]; + const float marker = data.elements [i++]; tchar markerChar = 0; int numCoords = 0; @@ -1413,7 +1413,7 @@ const String Path::toString() const while (--numCoords >= 0 && i < numElements) { - String n (elements [i++], 3); + String n (data.elements [i++], 3); while (n.endsWithChar (T('0'))) n = n.dropLastCharacters (1); @@ -1541,7 +1541,7 @@ Path::Iterator::~Iterator() bool Path::Iterator::next() { - const float* const elements = path.elements; + const float* const elements = path.data.elements; if (index < path.numElements) { diff --git a/src/gui/graphics/geometry/juce_Path.h b/src/gui/graphics/geometry/juce_Path.h index 4f12671bee..bf5224dd2b 100644 --- a/src/gui/graphics/geometry/juce_Path.h +++ b/src/gui/graphics/geometry/juce_Path.h @@ -69,7 +69,7 @@ class Image; @see PathFlatteningIterator, PathStrokeType, Graphics */ -class JUCE_API Path : private ArrayAllocationBase +class JUCE_API Path { public: //============================================================================== @@ -632,6 +632,7 @@ public: private: friend class PathFlatteningIterator; friend class Path::Iterator; + ArrayAllocationBase data; int numElements; float pathXMin, pathXMax, pathYMin, pathYMax; bool useNonZeroWinding; diff --git a/src/gui/graphics/geometry/juce_PathIterator.cpp b/src/gui/graphics/geometry/juce_PathIterator.cpp index ef7e54b2f0..f3e34be5e3 100644 --- a/src/gui/graphics/geometry/juce_PathIterator.cpp +++ b/src/gui/graphics/geometry/juce_PathIterator.cpp @@ -44,7 +44,7 @@ PathFlatteningIterator::PathFlatteningIterator (const Path& path_, subPathIndex (-1), path (path_), transform (transform_), - points (path_.elements), + points (path_.data.elements), tolerence (tolerence_ * tolerence_), subPathCloseX (0), subPathCloseY (0), diff --git a/src/native/windows/juce_win32_DirectSound.cpp b/src/native/windows/juce_win32_DirectSound.cpp index 2a3494e27d..5bdca4eb9c 100644 --- a/src/native/windows/juce_win32_DirectSound.cpp +++ b/src/native/windows/juce_win32_DirectSound.cpp @@ -464,10 +464,20 @@ public: return true; DWORD playCursor, writeCursor; - HRESULT hr = pOutputBuffer->GetCurrentPosition (&playCursor, &writeCursor); - if (hr != S_OK) + for (;;) { + HRESULT hr = pOutputBuffer->GetCurrentPosition (&playCursor, &writeCursor); + + if (hr == MAKE_HRESULT (1, 0x878, 150)) // DSERR_BUFFERLOST + { + pOutputBuffer->Restore(); + continue; + } + + if (hr == S_OK) + break; + logError (hr); jassertfalse return true;