From 08dd8f62c7ebee126969a4a7e53cd4eb60c198ba Mon Sep 17 00:00:00 2001 From: jules Date: Thu, 20 Sep 2012 13:49:12 +0100 Subject: [PATCH] Got rid of the remaining uses of juce_useDebuggingNewOperator in the old Jucer template. --- .../Source/demos/AudioDemoLatencyPage.cpp | 2 +- .../Source/demos/AudioDemoLatencyPage.h | 15 +-- .../Source/demos/AudioDemoPlaybackPage.cpp | 50 +++++----- .../Source/demos/AudioDemoPlaybackPage.h | 25 ++--- .../Source/demos/AudioDemoRecordPage.cpp | 2 +- .../Source/demos/AudioDemoRecordPage.h | 15 +-- .../Source/demos/AudioDemoSetupPage.cpp | 2 +- .../Source/demos/AudioDemoSetupPage.h | 15 +-- .../Source/demos/AudioDemoSynthPage.cpp | 2 +- .../Source/demos/AudioDemoSynthPage.h | 15 +-- .../Source/demos/AudioDemoTabComponent.cpp | 2 +- .../Source/demos/AudioDemoTabComponent.h | 15 +-- .../Source/demos/RenderingTestComponent.cpp | 98 +++++++++---------- .../Source/demos/RenderingTestComponent.h | 15 +-- .../src/templates/jucer_ComponentTemplate.h | 7 +- .../audio_io/juce_AudioDeviceManager.cpp | 7 +- .../format/juce_AudioFormatManager.cpp | 16 +-- .../format/juce_AudioFormatReaderSource.cpp | 4 +- .../application/juce_Application.cpp | 4 +- 19 files changed, 128 insertions(+), 183 deletions(-) diff --git a/extras/JuceDemo/Source/demos/AudioDemoLatencyPage.cpp b/extras/JuceDemo/Source/demos/AudioDemoLatencyPage.cpp index bc9822f8d3..d5a7a32f7f 100644 --- a/extras/JuceDemo/Source/demos/AudioDemoLatencyPage.cpp +++ b/extras/JuceDemo/Source/demos/AudioDemoLatencyPage.cpp @@ -3,7 +3,7 @@ This is an automatically generated file created by the Jucer! - Creation date: 1 May 2011 1:54:50pm + Creation date: 20 Sep 2012 1:43:09pm Be careful when adding custom code to these files, as only the code within the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded diff --git a/extras/JuceDemo/Source/demos/AudioDemoLatencyPage.h b/extras/JuceDemo/Source/demos/AudioDemoLatencyPage.h index 6ee1efaee9..f70b791d57 100644 --- a/extras/JuceDemo/Source/demos/AudioDemoLatencyPage.h +++ b/extras/JuceDemo/Source/demos/AudioDemoLatencyPage.h @@ -3,7 +3,7 @@ This is an automatically generated file created by the Jucer! - Creation date: 1 May 2011 1:54:50pm + Creation date: 20 Sep 2012 1:43:09pm Be careful when adding custom code to these files, as only the code within the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded @@ -19,8 +19,8 @@ ============================================================================== */ -#ifndef __JUCER_HEADER_AUDIODEMOLATENCYPAGE_AUDIODEMOLATENCYPAGE_7C897E97__ -#define __JUCER_HEADER_AUDIODEMOLATENCYPAGE_AUDIODEMOLATENCYPAGE_7C897E97__ +#ifndef __JUCER_HEADER_AUDIODEMOLATENCYPAGE_AUDIODEMOLATENCYPAGE_623CCFC4__ +#define __JUCER_HEADER_AUDIODEMOLATENCYPAGE_AUDIODEMOLATENCYPAGE_623CCFC4__ //[Headers] -- You can add your own extra header files here -- #include "../jucedemo_headers.h" @@ -56,9 +56,6 @@ public: - //============================================================================== - juce_UseDebuggingNewOperator - private: //[UserVariables] -- You can add your own custom variables in this section. AudioDeviceManager& deviceManager; @@ -72,10 +69,8 @@ private: //============================================================================== - // (prevent copy constructor and operator= being generated..) - AudioDemoLatencyPage (const AudioDemoLatencyPage&); - const AudioDemoLatencyPage& operator= (const AudioDemoLatencyPage&); + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioDemoLatencyPage); }; -#endif // __JUCER_HEADER_AUDIODEMOLATENCYPAGE_AUDIODEMOLATENCYPAGE_7C897E97__ +#endif // __JUCER_HEADER_AUDIODEMOLATENCYPAGE_AUDIODEMOLATENCYPAGE_623CCFC4__ diff --git a/extras/JuceDemo/Source/demos/AudioDemoPlaybackPage.cpp b/extras/JuceDemo/Source/demos/AudioDemoPlaybackPage.cpp index ef2ffc9665..7c9eaae79f 100644 --- a/extras/JuceDemo/Source/demos/AudioDemoPlaybackPage.cpp +++ b/extras/JuceDemo/Source/demos/AudioDemoPlaybackPage.cpp @@ -3,7 +3,7 @@ This is an automatically generated file created by the Jucer! - Creation date: 1 May 2011 12:08:14pm + Creation date: 20 Sep 2012 1:43:44pm Be careful when adding custom code to these files, as only the code within the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded @@ -24,6 +24,7 @@ #include "AudioDemoPlaybackPage.h" + //[MiscUserDefs] You can add your own user definitions and misc code here... class DemoThumbnailComp : public Component, public ChangeListener, @@ -176,11 +177,11 @@ AudioDemoPlaybackPage::AudioDemoPlaybackPage (AudioDeviceManager& deviceManager_ thread ("audio file preview"), directoryList (0, thread), zoomLabel (0), + explanation (0), + zoomSlider (0), thumbnail (0), startStopButton (0), - fileTreeComp (0), - explanation (0), - zoomSlider (0) + fileTreeComp (0) { addAndMakeVisible (zoomLabel = new Label (String::empty, L"zoom:")); @@ -214,6 +215,7 @@ AudioDemoPlaybackPage::AudioDemoPlaybackPage (AudioDeviceManager& deviceManager_ addAndMakeVisible (fileTreeComp = new FileTreeComponent (directoryList)); + //[UserPreSize] //[/UserPreSize] @@ -245,11 +247,11 @@ AudioDemoPlaybackPage::~AudioDemoPlaybackPage() //[/Destructor_pre] deleteAndZero (zoomLabel); + deleteAndZero (explanation); + deleteAndZero (zoomSlider); deleteAndZero (thumbnail); deleteAndZero (startStopButton); deleteAndZero (fileTreeComp); - deleteAndZero (explanation); - deleteAndZero (zoomSlider); //[Destructor]. You can add your own custom destruction code here.. @@ -271,15 +273,31 @@ void AudioDemoPlaybackPage::paint (Graphics& g) void AudioDemoPlaybackPage::resized() { zoomLabel->setBounds (16, getHeight() - 90, 55, 24); + explanation->setBounds (256, getHeight() - 82, getWidth() - 275, 64); + zoomSlider->setBounds (72, getHeight() - 90, 200, 24); thumbnail->setBounds (16, getHeight() - 221, getWidth() - 32, 123); startStopButton->setBounds (16, getHeight() - 46, 150, 32); fileTreeComp->setBounds (16, 8, getWidth() - 32, getHeight() - 245); - explanation->setBounds (256, getHeight() - 82, getWidth() - 275, 64); - zoomSlider->setBounds (72, getHeight() - 90, 200, 24); //[UserResized] Add your own custom resize handling here.. //[/UserResized] } +void AudioDemoPlaybackPage::sliderValueChanged (Slider* sliderThatWasMoved) +{ + //[UsersliderValueChanged_Pre] + //[/UsersliderValueChanged_Pre] + + if (sliderThatWasMoved == zoomSlider) + { + //[UserSliderCode_zoomSlider] -- add your slider handling code here.. + thumbnail->setZoomFactor (zoomSlider->getValue()); + //[/UserSliderCode_zoomSlider] + } + + //[UsersliderValueChanged_Post] + //[/UsersliderValueChanged_Post] +} + void AudioDemoPlaybackPage::buttonClicked (Button* buttonThatWasClicked) { //[UserbuttonClicked_Pre] @@ -304,22 +322,6 @@ void AudioDemoPlaybackPage::buttonClicked (Button* buttonThatWasClicked) //[/UserbuttonClicked_Post] } -void AudioDemoPlaybackPage::sliderValueChanged (Slider* sliderThatWasMoved) -{ - //[UsersliderValueChanged_Pre] - //[/UsersliderValueChanged_Pre] - - if (sliderThatWasMoved == zoomSlider) - { - //[UserSliderCode_zoomSlider] -- add your slider handling code here.. - thumbnail->setZoomFactor (zoomSlider->getValue()); - //[/UserSliderCode_zoomSlider] - } - - //[UsersliderValueChanged_Post] - //[/UsersliderValueChanged_Post] -} - //[MiscUserCode] You can add your own definitions of your custom methods or any other code here... diff --git a/extras/JuceDemo/Source/demos/AudioDemoPlaybackPage.h b/extras/JuceDemo/Source/demos/AudioDemoPlaybackPage.h index 6a6810c234..8fec2e1235 100644 --- a/extras/JuceDemo/Source/demos/AudioDemoPlaybackPage.h +++ b/extras/JuceDemo/Source/demos/AudioDemoPlaybackPage.h @@ -3,7 +3,7 @@ This is an automatically generated file created by the Jucer! - Creation date: 1 May 2011 12:08:14pm + Creation date: 20 Sep 2012 1:43:44pm Be careful when adding custom code to these files, as only the code within the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded @@ -19,8 +19,8 @@ ============================================================================== */ -#ifndef __JUCER_HEADER_AUDIODEMOPLAYBACKPAGE_AUDIODEMOPLAYBACKPAGE_81B4F279__ -#define __JUCER_HEADER_AUDIODEMOPLAYBACKPAGE_AUDIODEMOPLAYBACKPAGE_81B4F279__ +#ifndef __JUCER_HEADER_AUDIODEMOPLAYBACKPAGE_AUDIODEMOPLAYBACKPAGE_10A391BC__ +#define __JUCER_HEADER_AUDIODEMOPLAYBACKPAGE_AUDIODEMOPLAYBACKPAGE_10A391BC__ //[Headers] -- You can add your own extra header files here -- #include "../jucedemo_headers.h" @@ -39,8 +39,8 @@ class DemoThumbnailComp; */ class AudioDemoPlaybackPage : public Component, public FileBrowserListener, - public ButtonListener, - public SliderListener + public SliderListener, + public ButtonListener { public: //============================================================================== @@ -60,14 +60,11 @@ public: void paint (Graphics& g); void resized(); - void buttonClicked (Button* buttonThatWasClicked); void sliderValueChanged (Slider* sliderThatWasMoved); + void buttonClicked (Button* buttonThatWasClicked); - //============================================================================== - juce_UseDebuggingNewOperator - private: //[UserVariables] -- You can add your own custom variables in this section. AudioDeviceManager& deviceManager; @@ -84,18 +81,16 @@ private: //============================================================================== Label* zoomLabel; + Label* explanation; + Slider* zoomSlider; DemoThumbnailComp* thumbnail; TextButton* startStopButton; FileTreeComponent* fileTreeComp; - Label* explanation; - Slider* zoomSlider; //============================================================================== - // (prevent copy constructor and operator= being generated..) - AudioDemoPlaybackPage (const AudioDemoPlaybackPage&); - const AudioDemoPlaybackPage& operator= (const AudioDemoPlaybackPage&); + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioDemoPlaybackPage); }; -#endif // __JUCER_HEADER_AUDIODEMOPLAYBACKPAGE_AUDIODEMOPLAYBACKPAGE_81B4F279__ +#endif // __JUCER_HEADER_AUDIODEMOPLAYBACKPAGE_AUDIODEMOPLAYBACKPAGE_10A391BC__ diff --git a/extras/JuceDemo/Source/demos/AudioDemoRecordPage.cpp b/extras/JuceDemo/Source/demos/AudioDemoRecordPage.cpp index 031cc8da1e..fa763f1ace 100644 --- a/extras/JuceDemo/Source/demos/AudioDemoRecordPage.cpp +++ b/extras/JuceDemo/Source/demos/AudioDemoRecordPage.cpp @@ -3,7 +3,7 @@ This is an automatically generated file created by the Jucer! - Creation date: 1 May 2011 12:08:25pm + Creation date: 20 Sep 2012 1:43:57pm Be careful when adding custom code to these files, as only the code within the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded diff --git a/extras/JuceDemo/Source/demos/AudioDemoRecordPage.h b/extras/JuceDemo/Source/demos/AudioDemoRecordPage.h index 4ab42d9441..96ce3b92b5 100644 --- a/extras/JuceDemo/Source/demos/AudioDemoRecordPage.h +++ b/extras/JuceDemo/Source/demos/AudioDemoRecordPage.h @@ -3,7 +3,7 @@ This is an automatically generated file created by the Jucer! - Creation date: 1 May 2011 12:08:25pm + Creation date: 20 Sep 2012 1:43:57pm Be careful when adding custom code to these files, as only the code within the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded @@ -19,8 +19,8 @@ ============================================================================== */ -#ifndef __JUCER_HEADER_AUDIODEMORECORDPAGE_AUDIODEMORECORDPAGE_E12E1947__ -#define __JUCER_HEADER_AUDIODEMORECORDPAGE_AUDIODEMORECORDPAGE_E12E1947__ +#ifndef __JUCER_HEADER_AUDIODEMORECORDPAGE_AUDIODEMORECORDPAGE_9CE2EC8__ +#define __JUCER_HEADER_AUDIODEMORECORDPAGE_AUDIODEMORECORDPAGE_9CE2EC8__ //[Headers] -- You can add your own extra header files here -- #include "../jucedemo_headers.h" @@ -57,9 +57,6 @@ public: - //============================================================================== - juce_UseDebuggingNewOperator - private: //[UserVariables] -- You can add your own custom variables in this section. AudioDeviceManager& deviceManager; @@ -73,10 +70,8 @@ private: //============================================================================== - // (prevent copy constructor and operator= being generated..) - AudioDemoRecordPage (const AudioDemoRecordPage&); - const AudioDemoRecordPage& operator= (const AudioDemoRecordPage&); + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioDemoRecordPage); }; -#endif // __JUCER_HEADER_AUDIODEMORECORDPAGE_AUDIODEMORECORDPAGE_E12E1947__ +#endif // __JUCER_HEADER_AUDIODEMORECORDPAGE_AUDIODEMORECORDPAGE_9CE2EC8__ diff --git a/extras/JuceDemo/Source/demos/AudioDemoSetupPage.cpp b/extras/JuceDemo/Source/demos/AudioDemoSetupPage.cpp index 18bfd52e8c..fae0e93b66 100644 --- a/extras/JuceDemo/Source/demos/AudioDemoSetupPage.cpp +++ b/extras/JuceDemo/Source/demos/AudioDemoSetupPage.cpp @@ -3,7 +3,7 @@ This is an automatically generated file created by the Jucer! - Creation date: 1 May 2011 1:54:18pm + Creation date: 20 Sep 2012 1:44:04pm Be careful when adding custom code to these files, as only the code within the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded diff --git a/extras/JuceDemo/Source/demos/AudioDemoSetupPage.h b/extras/JuceDemo/Source/demos/AudioDemoSetupPage.h index ee651a2ee8..e81169bf4d 100644 --- a/extras/JuceDemo/Source/demos/AudioDemoSetupPage.h +++ b/extras/JuceDemo/Source/demos/AudioDemoSetupPage.h @@ -3,7 +3,7 @@ This is an automatically generated file created by the Jucer! - Creation date: 1 May 2011 1:54:18pm + Creation date: 20 Sep 2012 1:44:04pm Be careful when adding custom code to these files, as only the code within the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded @@ -19,8 +19,8 @@ ============================================================================== */ -#ifndef __JUCER_HEADER_AUDIODEMOSETUPPAGE_AUDIODEMOSETUPPAGE_A3545895__ -#define __JUCER_HEADER_AUDIODEMOSETUPPAGE_AUDIODEMOSETUPPAGE_A3545895__ +#ifndef __JUCER_HEADER_AUDIODEMOSETUPPAGE_AUDIODEMOSETUPPAGE_31046283__ +#define __JUCER_HEADER_AUDIODEMOSETUPPAGE_AUDIODEMOSETUPPAGE_31046283__ //[Headers] -- You can add your own extra header files here -- #include "../jucedemo_headers.h" @@ -52,9 +52,6 @@ public: - //============================================================================== - juce_UseDebuggingNewOperator - private: //[UserVariables] -- You can add your own custom variables in this section. AudioDeviceManager& deviceManager; @@ -65,10 +62,8 @@ private: //============================================================================== - // (prevent copy constructor and operator= being generated..) - AudioDemoSetupPage (const AudioDemoSetupPage&); - const AudioDemoSetupPage& operator= (const AudioDemoSetupPage&); + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioDemoSetupPage); }; -#endif // __JUCER_HEADER_AUDIODEMOSETUPPAGE_AUDIODEMOSETUPPAGE_A3545895__ +#endif // __JUCER_HEADER_AUDIODEMOSETUPPAGE_AUDIODEMOSETUPPAGE_31046283__ diff --git a/extras/JuceDemo/Source/demos/AudioDemoSynthPage.cpp b/extras/JuceDemo/Source/demos/AudioDemoSynthPage.cpp index 8c2f3d0f4f..2ac538868b 100644 --- a/extras/JuceDemo/Source/demos/AudioDemoSynthPage.cpp +++ b/extras/JuceDemo/Source/demos/AudioDemoSynthPage.cpp @@ -3,7 +3,7 @@ This is an automatically generated file created by the Jucer! - Creation date: 1 May 2011 12:06:00pm + Creation date: 20 Sep 2012 1:44:13pm Be careful when adding custom code to these files, as only the code within the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded diff --git a/extras/JuceDemo/Source/demos/AudioDemoSynthPage.h b/extras/JuceDemo/Source/demos/AudioDemoSynthPage.h index a6bf5cf9df..2f95cf0819 100644 --- a/extras/JuceDemo/Source/demos/AudioDemoSynthPage.h +++ b/extras/JuceDemo/Source/demos/AudioDemoSynthPage.h @@ -3,7 +3,7 @@ This is an automatically generated file created by the Jucer! - Creation date: 1 May 2011 12:06:00pm + Creation date: 20 Sep 2012 1:44:13pm Be careful when adding custom code to these files, as only the code within the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded @@ -19,8 +19,8 @@ ============================================================================== */ -#ifndef __JUCER_HEADER_AUDIODEMOSYNTHPAGE_AUDIODEMOSYNTHPAGE_1E55DCCB__ -#define __JUCER_HEADER_AUDIODEMOSYNTHPAGE_AUDIODEMOSYNTHPAGE_1E55DCCB__ +#ifndef __JUCER_HEADER_AUDIODEMOSYNTHPAGE_AUDIODEMOSYNTHPAGE_B0883FF1__ +#define __JUCER_HEADER_AUDIODEMOSYNTHPAGE_AUDIODEMOSYNTHPAGE_B0883FF1__ //[Headers] -- You can add your own extra header files here -- #include "../jucedemo_headers.h" @@ -56,9 +56,6 @@ public: - //============================================================================== - juce_UseDebuggingNewOperator - private: //[UserVariables] -- You can add your own custom variables in this section. AudioDeviceManager& deviceManager; @@ -75,10 +72,8 @@ private: //============================================================================== - // (prevent copy constructor and operator= being generated..) - AudioDemoSynthPage (const AudioDemoSynthPage&); - const AudioDemoSynthPage& operator= (const AudioDemoSynthPage&); + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioDemoSynthPage); }; -#endif // __JUCER_HEADER_AUDIODEMOSYNTHPAGE_AUDIODEMOSYNTHPAGE_1E55DCCB__ +#endif // __JUCER_HEADER_AUDIODEMOSYNTHPAGE_AUDIODEMOSYNTHPAGE_B0883FF1__ diff --git a/extras/JuceDemo/Source/demos/AudioDemoTabComponent.cpp b/extras/JuceDemo/Source/demos/AudioDemoTabComponent.cpp index 09ea5b0cdb..4974d967e1 100644 --- a/extras/JuceDemo/Source/demos/AudioDemoTabComponent.cpp +++ b/extras/JuceDemo/Source/demos/AudioDemoTabComponent.cpp @@ -3,7 +3,7 @@ This is an automatically generated file created by the Jucer! - Creation date: 1 May 2011 12:07:35pm + Creation date: 20 Sep 2012 1:44:23pm Be careful when adding custom code to these files, as only the code within the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded diff --git a/extras/JuceDemo/Source/demos/AudioDemoTabComponent.h b/extras/JuceDemo/Source/demos/AudioDemoTabComponent.h index e2c3fba3ec..4fc86f630b 100644 --- a/extras/JuceDemo/Source/demos/AudioDemoTabComponent.h +++ b/extras/JuceDemo/Source/demos/AudioDemoTabComponent.h @@ -3,7 +3,7 @@ This is an automatically generated file created by the Jucer! - Creation date: 1 May 2011 12:07:35pm + Creation date: 20 Sep 2012 1:44:23pm Be careful when adding custom code to these files, as only the code within the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded @@ -19,8 +19,8 @@ ============================================================================== */ -#ifndef __JUCER_HEADER_AUDIODEMOTABCOMPONENT_AUDIODEMOTABCOMPONENT_ADE99E0E__ -#define __JUCER_HEADER_AUDIODEMOTABCOMPONENT_AUDIODEMOTABCOMPONENT_ADE99E0E__ +#ifndef __JUCER_HEADER_AUDIODEMOTABCOMPONENT_AUDIODEMOTABCOMPONENT_E13E3004__ +#define __JUCER_HEADER_AUDIODEMOTABCOMPONENT_AUDIODEMOTABCOMPONENT_E13E3004__ //[Headers] -- You can add your own extra header files here -- #include "../jucedemo_headers.h" @@ -82,9 +82,6 @@ public: - //============================================================================== - juce_UseDebuggingNewOperator - private: //[UserVariables] -- You can add your own custom variables in this section. AudioDeviceManager deviceManager; @@ -95,10 +92,8 @@ private: //============================================================================== - // (prevent copy constructor and operator= being generated..) - AudioDemoTabComponent (const AudioDemoTabComponent&); - const AudioDemoTabComponent& operator= (const AudioDemoTabComponent&); + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioDemoTabComponent); }; -#endif // __JUCER_HEADER_AUDIODEMOTABCOMPONENT_AUDIODEMOTABCOMPONENT_ADE99E0E__ +#endif // __JUCER_HEADER_AUDIODEMOTABCOMPONENT_AUDIODEMOTABCOMPONENT_E13E3004__ diff --git a/extras/JuceDemo/Source/demos/RenderingTestComponent.cpp b/extras/JuceDemo/Source/demos/RenderingTestComponent.cpp index cadef5df2f..91050ed399 100644 --- a/extras/JuceDemo/Source/demos/RenderingTestComponent.cpp +++ b/extras/JuceDemo/Source/demos/RenderingTestComponent.cpp @@ -3,7 +3,7 @@ This is an automatically generated file created by the Jucer! - Creation date: 1 May 2011 12:07:57pm + Creation date: 20 Sep 2012 1:44:35pm Be careful when adding custom code to these files, as only the code within the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded @@ -43,8 +43,7 @@ public: glyphs.addFittedText (Font (20.0f), "The Quick Brown Fox Jumped Over The Lazy Dog", -120, -50, 240, 100, Justification::centred, 2, 1.0f); - int i; - for (i = 0; i < numElementsInArray (bouncingPointX); ++i) + for (int i = 0; i < numElementsInArray (bouncingPointX); ++i) { bouncingPointX[i] = (float) Random::getSystemRandom().nextInt (200); bouncingPointY[i] = (float) Random::getSystemRandom().nextInt (200); @@ -52,13 +51,13 @@ public: bouncingPointDY[i] = (Random::getSystemRandom().nextFloat() - 0.5f) * 6.0f; } - for (i = 0; i < numElementsInArray (bouncingNumber); ++i) + for (int i = 0; i < numElementsInArray (bouncingNumber); ++i) { bouncingNumber[i] = Random::getSystemRandom().nextFloat(); bouncingNumberDelta[i] = (Random::getSystemRandom().nextFloat() - 0.5f) * 0.03f; } - for (i = 0; i < numElementsInArray (speeds); ++i) + for (int i = 0; i < numElementsInArray (speeds); ++i) speeds[i] = 0.02f; int redrawFramesPerSecond = 60; @@ -109,14 +108,13 @@ public: { repaint(); - int i; - for (i = 0; i < numElementsInArray (bouncingPointX); ++i) + for (int i = 0; i < numElementsInArray (bouncingPointX); ++i) { bounce (bouncingPointX[i], bouncingPointDX[i], (float) getWidth()); bounce (bouncingPointY[i], bouncingPointDY[i], (float) getHeight()); } - for (i = 0; i < numElementsInArray (bouncingNumber); ++i) + for (int i = 0; i < numElementsInArray (bouncingNumber); ++i) bounce (bouncingNumber[i], bouncingNumberDelta[i], 1.0f); owner.speedLabel->setText (String (getWidth()) + "x" + String (getHeight()) @@ -591,28 +589,28 @@ void RenderingTestComponent::paint (Graphics& g) void RenderingTestComponent::resized() { - testTypeComboBox->setBounds (proportionOfWidth (0.1647f), 16, proportionOfWidth (0.3426f), 24); - testTypeLabel->setBounds (proportionOfWidth (0.0277f), 16, proportionOfWidth (0.1291f), 24); - speedLabel->setBounds (proportionOfWidth (0.5375f), 16, proportionOfWidth (0.4308f), 24); + testTypeComboBox->setBounds (proportionOfWidth (0.1652f), 16, proportionOfWidth (0.3429f), 24); + testTypeLabel->setBounds (proportionOfWidth (0.0269f), 16, proportionOfWidth (0.1293f), 24); + speedLabel->setBounds (proportionOfWidth (0.5368f), 16, proportionOfWidth (0.4309f), 24); testCanvas->setBounds (20, 56, getWidth() - 40, getHeight() - 215); - opacitySlider->setBounds (proportionOfWidth (0.5995f), getHeight() - 141, proportionOfWidth (0.3781f), 24); - highQualityToggle->setBounds (proportionOfWidth (0.0224f), getHeight() - 141, proportionOfWidth (0.4453f), 24); - animateSizeToggle->setBounds (proportionOfWidth (0.7576f), getHeight() - 85, proportionOfWidth (0.2240f), 24); - animateRotationToggle->setBounds (proportionOfWidth (0.7576f), getHeight() - 61, proportionOfWidth (0.2240f), 24); - animatePositionToggle->setBounds (proportionOfWidth (0.7576f), getHeight() - 109, proportionOfWidth (0.2240f), 24); - animateFillToggle->setBounds (proportionOfWidth (0.7576f), getHeight() - 37, proportionOfWidth (0.2345f), 24); - opacityLabel->setBounds ((proportionOfWidth (0.5995f)) + -66, getHeight() - 141, 64, 24); - xSlider->setBounds (proportionOfWidth (0.3610f), getHeight() - 109, proportionOfWidth (0.3781f), 24); - ySlider->setBounds (proportionOfWidth (0.3610f), getHeight() - 85, proportionOfWidth (0.3781f), 24); - sizeSlider->setBounds (proportionOfWidth (0.3610f), getHeight() - 61, proportionOfWidth (0.3781f), 24); - angleSlider->setBounds (proportionOfWidth (0.3610f), getHeight() - 37, proportionOfWidth (0.3781f), 24); - xSliderLabel->setBounds (proportionOfWidth (0.2490f), getHeight() - 109, proportionOfWidth (0.1067f), 24); - ySliderLabel->setBounds (proportionOfWidth (0.2490f), getHeight() - 85, proportionOfWidth (0.1067f), 24); - sizeSliderLabel->setBounds (proportionOfWidth (0.2490f), getHeight() - 61, proportionOfWidth (0.1067f), 24); - angleSliderLabel->setBounds (proportionOfWidth (0.2490f), getHeight() - 37, proportionOfWidth (0.1067f), 24); - clipToRectangleToggle->setBounds (proportionOfWidth (0.0224f), getHeight() - 109, 144, 24); - clipToPathToggle->setBounds (proportionOfWidth (0.0224f), getHeight() - 85, 144, 24); - clipToImageToggle->setBounds (proportionOfWidth (0.0224f), getHeight() - 61, 144, 24); + opacitySlider->setBounds (proportionOfWidth (0.5996f), getHeight() - 141, proportionOfWidth (0.3788f), 24); + highQualityToggle->setBounds (proportionOfWidth (0.0215f), getHeight() - 141, proportionOfWidth (0.4452f), 24); + animateSizeToggle->setBounds (proportionOfWidth (0.7576f), getHeight() - 85, proportionOfWidth (0.2244f), 24); + animateRotationToggle->setBounds (proportionOfWidth (0.7576f), getHeight() - 61, proportionOfWidth (0.2244f), 24); + animatePositionToggle->setBounds (proportionOfWidth (0.7576f), getHeight() - 109, proportionOfWidth (0.2244f), 24); + animateFillToggle->setBounds (proportionOfWidth (0.7576f), getHeight() - 37, proportionOfWidth (0.2352f), 24); + opacityLabel->setBounds ((proportionOfWidth (0.5996f)) + -66, getHeight() - 141, 64, 24); + xSlider->setBounds (proportionOfWidth (0.3609f), getHeight() - 109, proportionOfWidth (0.3788f), 24); + ySlider->setBounds (proportionOfWidth (0.3609f), getHeight() - 85, proportionOfWidth (0.3788f), 24); + sizeSlider->setBounds (proportionOfWidth (0.3609f), getHeight() - 61, proportionOfWidth (0.3788f), 24); + angleSlider->setBounds (proportionOfWidth (0.3609f), getHeight() - 37, proportionOfWidth (0.3788f), 24); + xSliderLabel->setBounds (proportionOfWidth (0.2495f), getHeight() - 109, proportionOfWidth (0.1059f), 24); + ySliderLabel->setBounds (proportionOfWidth (0.2495f), getHeight() - 85, proportionOfWidth (0.1059f), 24); + sizeSliderLabel->setBounds (proportionOfWidth (0.2495f), getHeight() - 61, proportionOfWidth (0.1059f), 24); + angleSliderLabel->setBounds (proportionOfWidth (0.2495f), getHeight() - 37, proportionOfWidth (0.1059f), 24); + clipToRectangleToggle->setBounds (proportionOfWidth (0.0215f), getHeight() - 109, 144, 24); + clipToPathToggle->setBounds (proportionOfWidth (0.0215f), getHeight() - 85, 144, 24); + clipToImageToggle->setBounds (proportionOfWidth (0.0215f), getHeight() - 61, 144, 24); //[UserResized] Add your own custom resize handling here.. //[/UserResized] } @@ -687,16 +685,16 @@ BEGIN_JUCER_METADATA fixedSize="0" initialWidth="600" initialHeight="400">