Browse Source

Fixed VC warning. Tweak to mouse cursor snap-back in sliders. Added an introjucer option to avoid adding the BinaryData.h header to AppConfig.h

tags/2021-05-28
jules 11 years ago
parent
commit
ec524a437d
15 changed files with 53 additions and 41 deletions
  1. +1
    -1
      extras/Introjucer/Source/ComponentEditor/jucer_JucerDocument.cpp
  2. +1
    -1
      extras/Introjucer/Source/Project Saving/jucer_ProjectSaver.h
  3. +6
    -0
      extras/Introjucer/Source/Project/jucer_Project.cpp
  4. +1
    -0
      extras/Introjucer/Source/Project/jucer_Project.h
  5. +1
    -0
      extras/Introjucer/Source/Utility/jucer_PresetIDs.h
  6. +1
    -1
      extras/JuceDemo/Juce Demo.jucer
  7. +1
    -1
      extras/JuceDemo/Source/demos/AudioDemoLatencyPage.cpp
  8. +1
    -1
      extras/JuceDemo/Source/demos/AudioDemoPlaybackPage.cpp
  9. +1
    -1
      extras/JuceDemo/Source/demos/AudioDemoRecordPage.cpp
  10. +1
    -1
      extras/JuceDemo/Source/demos/AudioDemoSetupPage.cpp
  11. +1
    -1
      extras/JuceDemo/Source/demos/AudioDemoSynthPage.cpp
  12. +1
    -1
      extras/JuceDemo/Source/demos/AudioDemoTabComponent.cpp
  13. +34
    -30
      extras/JuceDemo/Source/demos/RenderingTestComponent.cpp
  14. +1
    -1
      modules/juce_core/text/juce_StringRef.h
  15. +1
    -1
      modules/juce_gui_basics/widgets/juce_Slider.cpp

+ 1
- 1
extras/Introjucer/Source/ComponentEditor/jucer_JucerDocument.cpp View File

@@ -348,7 +348,7 @@ XmlElement* JucerDocument::createXml() const
doc->setAttribute ("snapPixels", snapGridPixels);
doc->setAttribute ("snapActive", snapActive);
doc->setAttribute ("snapShown", snapShown);
doc->setAttribute ("overlayOpacity", (double) componentOverlayOpacity);
doc->setAttribute ("overlayOpacity", String (componentOverlayOpacity, 3));
doc->setAttribute ("fixedSize", fixedSize);
doc->setAttribute ("initialWidth", initialWidth);
doc->setAttribute ("initialHeight", initialHeight);


+ 1
- 1
extras/Introjucer/Source/Project Saving/jucer_ProjectSaver.h View File

@@ -432,7 +432,7 @@ private:
for (int i = 0; i < modules.size(); ++i)
modules.getUnchecked(i)->writeIncludes (*this, out);
if (hasBinaryData)
if (hasBinaryData && project.shouldIncludeBinaryInAppConfig().getValue())
out << CodeHelpers::createIncludeStatement (project.getBinaryDataHeaderFile(), appConfigFile) << newLine;
out << newLine


+ 6
- 0
extras/Introjucer/Source/Project/jucer_Project.cpp View File

@@ -127,6 +127,9 @@ void Project::setMissingDefaultValues()
if (getBundleIdentifier().toString().isEmpty())
getBundleIdentifier() = getDefaultBundleIdentifier();
if (shouldIncludeBinaryInAppConfig() == var::null)
shouldIncludeBinaryInAppConfig() = true;
IntrojucerApp::getApp().updateNewlyOpenedProject (*this);
}
@@ -405,6 +408,9 @@ void Project::createPropertyEditors (PropertyListBuilder& props)
"(Note that individual resource files which are larger than this size cannot be split across multiple cpp files).");
}
props.add (new BooleanPropertyComponent (shouldIncludeBinaryInAppConfig(), "Include Binary",
"Include BinaryData.h in the AppConfig.h file"));
props.add (new TextPropertyComponent (getProjectPreprocessorDefs(), "Preprocessor definitions", 32768, true),
"Global preprocessor definitions. Use the form \"NAME1=value NAME2=value\", using whitespace, commas, or "
"new-lines to separate the items - to include a space or comma in a definition, precede it with a backslash.");


+ 1
- 0
extras/Introjucer/Source/Project/jucer_Project.h View File

@@ -107,6 +107,7 @@ public:
File getBinaryDataCppFile (int index) const;
File getBinaryDataHeaderFile() const { return getBinaryDataCppFile (0).withFileExtension (".h"); }
Value getMaxBinaryFileSize() { return getProjectValue (Ids::maxBinaryFileSize); }
Value shouldIncludeBinaryInAppConfig() { return getProjectValue (Ids::includeBinaryInAppConfig); }
//==============================================================================
String getAmalgamatedHeaderFileName() const { return "juce_amalgamated.h"; }


+ 1
- 0
extras/Introjucer/Source/Utility/jucer_PresetIDs.h View File

@@ -134,6 +134,7 @@ namespace Ids
DECLARE_ID (colour);
DECLARE_ID (userNotes);
DECLARE_ID (maxBinaryFileSize);
DECLARE_ID (includeBinaryInAppConfig);
DECLARE_ID (characterSet);
const Identifier ID ("id");
const Identifier class_ ("class");


+ 1
- 1
extras/JuceDemo/Juce Demo.jucer View File

@@ -8,7 +8,7 @@
pluginWantsMidiIn="0" pluginProducesMidiOut="0" pluginSilenceInIsSilenceOut="0"
pluginTailLength="0" pluginEditorRequiresKeys="0" pluginAUExportPrefix="JuceDemoAU"
pluginAUViewClass="JuceDemoAU_V1" pluginRTASCategory="" icon="Duj062Top"
companyName="Raw Material Software Ltd.">
companyName="Raw Material Software Ltd." includeBinaryInAppConfig="1">
<EXPORTFORMATS>
<XCODE_MAC targetFolder="Builds/MacOSX" vstFolder="~/SDKs/vstsdk2.4" rtasFolder="~/SDKs/PT_80_SDK"
juceFolder="../../../juce" objCExtraSuffix="JSLvvV6j" bigIcon="f4hwldS"


+ 1
- 1
extras/JuceDemo/Source/demos/AudioDemoLatencyPage.cpp View File

@@ -384,7 +384,7 @@ BEGIN_JUCER_METADATA
<JUCER_COMPONENT documentType="Component" className="AudioDemoLatencyPage" componentName=""
parentClasses="public Component" constructorParams="AudioDeviceManager&amp; deviceManager_"
variableInitialisers="deviceManager (deviceManager_)" snapPixels="8"
snapActive="1" snapShown="1" overlayOpacity="0.330000013" fixedSize="0"
snapActive="1" snapShown="1" overlayOpacity="0.330" fixedSize="0"
initialWidth="600" initialHeight="400">
<BACKGROUND backgroundColour="ffd3d3d3"/>
<GENERICCOMPONENT name="" id="7d70eb2617f56220" memberName="liveAudioDisplayComp"


+ 1
- 1
extras/JuceDemo/Source/demos/AudioDemoPlaybackPage.cpp View File

@@ -377,7 +377,7 @@ BEGIN_JUCER_METADATA
<JUCER_COMPONENT documentType="Component" className="AudioDemoPlaybackPage" componentName=""
parentClasses="public Component, public FileBrowserListener"
constructorParams="AudioDeviceManager&amp; deviceManager_" variableInitialisers="deviceManager (deviceManager_),&#10;thread (&quot;audio file preview&quot;),&#10;directoryList (nullptr, thread)"
snapPixels="8" snapActive="1" snapShown="1" overlayOpacity="0.330000013"
snapPixels="8" snapActive="1" snapShown="1" overlayOpacity="0.330"
fixedSize="0" initialWidth="600" initialHeight="400">
<BACKGROUND backgroundColour="ffd3d3d3"/>
<LABEL name="" id="d4f78f975d81c8d3" memberName="zoomLabel" virtualName=""


+ 1
- 1
extras/JuceDemo/Source/demos/AudioDemoRecordPage.cpp View File

@@ -264,7 +264,7 @@ BEGIN_JUCER_METADATA
<JUCER_COMPONENT documentType="Component" className="AudioDemoRecordPage" componentName=""
parentClasses="public Component" constructorParams="AudioDeviceManager&amp; deviceManager_"
variableInitialisers="deviceManager (deviceManager_)" snapPixels="8"
snapActive="1" snapShown="1" overlayOpacity="0.330000013" fixedSize="0"
snapActive="1" snapShown="1" overlayOpacity="0.330" fixedSize="0"
initialWidth="600" initialHeight="400">
<METHODS>
<METHOD name="visibilityChanged()"/>


+ 1
- 1
extras/JuceDemo/Source/demos/AudioDemoSetupPage.cpp View File

@@ -92,7 +92,7 @@ BEGIN_JUCER_METADATA
<JUCER_COMPONENT documentType="Component" className="AudioDemoSetupPage" componentName=""
parentClasses="public Component" constructorParams="AudioDeviceManager&amp; deviceManager_"
variableInitialisers="deviceManager (deviceManager_)" snapPixels="8"
snapActive="1" snapShown="1" overlayOpacity="0.330000013" fixedSize="0"
snapActive="1" snapShown="1" overlayOpacity="0.330" fixedSize="0"
initialWidth="600" initialHeight="400">
<BACKGROUND backgroundColour="ffd3d3d3"/>
<GENERICCOMPONENT name="" id="a04c56de9f3fc537" memberName="deviceSelector" virtualName=""


+ 1
- 1
extras/JuceDemo/Source/demos/AudioDemoSynthPage.cpp View File

@@ -361,7 +361,7 @@ BEGIN_JUCER_METADATA
<JUCER_COMPONENT documentType="Component" className="AudioDemoSynthPage" componentName=""
parentClasses="public Component" constructorParams="AudioDeviceManager&amp; deviceManager_"
variableInitialisers="deviceManager (deviceManager_)" snapPixels="8"
snapActive="1" snapShown="1" overlayOpacity="0.330000013" fixedSize="0"
snapActive="1" snapShown="1" overlayOpacity="0.330" fixedSize="0"
initialWidth="600" initialHeight="400">
<BACKGROUND backgroundColour="ffd3d3d3"/>
<GENERICCOMPONENT name="" id="86605ec4f02c4320" memberName="keyboardComponent"


+ 1
- 1
extras/JuceDemo/Source/demos/AudioDemoTabComponent.cpp View File

@@ -190,7 +190,7 @@ BEGIN_JUCER_METADATA
<JUCER_COMPONENT documentType="Component" className="AudioDemoTabComponent" componentName=""
parentClasses="public Component" constructorParams="" variableInitialisers=""
snapPixels="8" snapActive="1" snapShown="1" overlayOpacity="0.330000013"
snapPixels="8" snapActive="1" snapShown="1" overlayOpacity="0.330"
fixedSize="0" initialWidth="600" initialHeight="400">
<BACKGROUND backgroundColour="ffffffff"/>
<TABBEDCOMPONENT name="new tabbed component" id="83c980d7793cdced" memberName="tabbedComponent"


+ 34
- 30
extras/JuceDemo/Source/demos/RenderingTestComponent.cpp View File

@@ -1485,20 +1485,20 @@ BEGIN_JUCER_METADATA
<JUCER_COMPONENT documentType="Component" className="RenderingTestComponent" componentName=""
parentClasses="public Component" constructorParams="" variableInitialisers=""
snapPixels="8" snapActive="1" snapShown="1" overlayOpacity="0.330000013"
snapPixels="8" snapActive="1" snapShown="1" overlayOpacity="0.330"
fixedSize="0" initialWidth="600" initialHeight="400">
<BACKGROUND backgroundColour="ffffffff"/>
<COMBOBOX name="" id="216a392b47348589" memberName="testTypeComboBox" virtualName=""
explicitFocusOrder="0" pos="16.461% 16 34.362% 24" editable="0"
explicitFocusOrder="0" pos="16.42% 16 34.32% 24" editable="0"
layout="33" items="Paths - Solid&#10;Paths - Linear gradient&#10;Paths - Radial gradient&#10;Paths - Stroked&#10;Images - RGB&#10;Images - ARGB&#10;Tiled Images - RGB&#10;Tiled Images - ARGB&#10;Glyphs&#10;SVG&#10;Lines"
textWhenNonSelected="" textWhenNoItems="(no choices)"/>
<LABEL name="" id="193cb8e961baa02a" memberName="testTypeLabel" virtualName=""
explicitFocusOrder="0" pos="2.881% 16 12.963% 24" edTextCol="ff000000"
explicitFocusOrder="0" pos="2.811% 16 13.018% 24" edTextCol="ff000000"
edBkgCol="0" labelText="Test type:" editableSingleClick="0" editableDoubleClick="0"
focusDiscardsChanges="0" fontname="Default font" fontsize="15"
bold="0" italic="0" justification="34"/>
<LABEL name="" id="c4977cdfea8776fb" memberName="speedLabel" virtualName=""
explicitFocusOrder="0" pos="53.498% 16 43.21% 24" edTextCol="ff000000"
explicitFocusOrder="0" pos="53.55% 16 43.195% 24" edTextCol="ff000000"
edBkgCol="0" labelText="speed" editableSingleClick="0" editableDoubleClick="0"
focusDiscardsChanges="0" fontname="Default font" fontsize="15"
bold="0" italic="0" justification="33"/>
@@ -1506,27 +1506,27 @@ BEGIN_JUCER_METADATA
explicitFocusOrder="0" pos="20 56 40M 215M" class="RenderingTestCanvas"
params="*this"/>
<SLIDER name="" id="e970a33ca991909e" memberName="opacitySlider" virtualName=""
explicitFocusOrder="0" pos="60.082% 141R 37.86% 24" min="0" max="1"
int="0.001" style="LinearHorizontal" textBoxPos="TextBoxLeft"
explicitFocusOrder="0" pos="60.059% 141R 37.87% 24" min="0" max="1"
int="0.0010000000000000000208" style="LinearHorizontal" textBoxPos="TextBoxLeft"
textBoxEditable="1" textBoxWidth="70" textBoxHeight="20" skewFactor="1"/>
<TOGGLEBUTTON name="" id="2d368b2ffc99beef" memberName="highQualityToggle"
virtualName="" explicitFocusOrder="0" pos="2.263% 141R 44.444% 24"
virtualName="" explicitFocusOrder="0" pos="2.219% 141R 44.379% 24"
buttonText="Higher quality image interpolation" connectedEdges="0"
needsCallback="0" radioGroupId="0" state="0"/>
<TOGGLEBUTTON name="" id="3b7c06ef24935a72" memberName="animateSizeToggle"
virtualName="" explicitFocusOrder="0" pos="75.72% 85R 22.428% 24"
virtualName="" explicitFocusOrder="0" pos="75.74% 85R 22.485% 24"
buttonText="Animate size" connectedEdges="0" needsCallback="0"
radioGroupId="0" state="0"/>
<TOGGLEBUTTON name="" id="acf40ac0130d68eb" memberName="animateRotationToggle"
virtualName="" explicitFocusOrder="0" pos="75.72% 61R 22.428% 24"
virtualName="" explicitFocusOrder="0" pos="75.74% 61R 22.485% 24"
buttonText="Animate rotation" connectedEdges="0" needsCallback="0"
radioGroupId="0" state="0"/>
<TOGGLEBUTTON name="" id="afe7d31210a544cb" memberName="animatePositionToggle"
virtualName="" explicitFocusOrder="0" pos="75.72% 109R 22.428% 24"
virtualName="" explicitFocusOrder="0" pos="75.74% 109R 22.485% 24"
buttonText="Animate position" connectedEdges="0" needsCallback="0"
radioGroupId="0" state="0"/>
<TOGGLEBUTTON name="" id="20466306ead4c6c2" memberName="animateFillToggle"
virtualName="" explicitFocusOrder="0" pos="75.72% 37R 23.663% 24"
virtualName="" explicitFocusOrder="0" pos="75.74% 37R 23.669% 24"
buttonText="Animate gradient" connectedEdges="0" needsCallback="0"
radioGroupId="0" state="0"/>
<LABEL name="" id="ff3fb4acd2101aa5" memberName="opacityLabel" virtualName=""
@@ -1535,50 +1535,54 @@ BEGIN_JUCER_METADATA
editableDoubleClick="0" focusDiscardsChanges="0" fontname="Default font"
fontsize="15" bold="0" italic="0" justification="34"/>
<SLIDER name="" id="549cfd1459f09c12" memberName="xSlider" virtualName=""
explicitFocusOrder="0" pos="36.008% 109R 37.86% 24" min="-100"
max="100" int="0.1" style="LinearHorizontal" textBoxPos="TextBoxLeft"
textBoxEditable="1" textBoxWidth="80" textBoxHeight="20" skewFactor="1"/>
explicitFocusOrder="0" pos="35.947% 109R 37.87% 24" min="-100"
max="100" int="0.10000000000000000555" style="LinearHorizontal"
textBoxPos="TextBoxLeft" textBoxEditable="1" textBoxWidth="80"
textBoxHeight="20" skewFactor="1"/>
<SLIDER name="" id="49b53bab0eca9967" memberName="ySlider" virtualName=""
explicitFocusOrder="0" pos="36.008% 85R 37.86% 24" min="-100"
max="100" int="0.1" style="LinearHorizontal" textBoxPos="TextBoxLeft"
textBoxEditable="1" textBoxWidth="80" textBoxHeight="20" skewFactor="1"/>
explicitFocusOrder="0" pos="35.947% 85R 37.87% 24" min="-100"
max="100" int="0.10000000000000000555" style="LinearHorizontal"
textBoxPos="TextBoxLeft" textBoxEditable="1" textBoxWidth="80"
textBoxHeight="20" skewFactor="1"/>
<SLIDER name="" id="d89d3e0269c1aef4" memberName="sizeSlider" virtualName=""
explicitFocusOrder="0" pos="36.008% 61R 37.86% 24" min="0.01"
max="10" int="0.01" style="LinearHorizontal" textBoxPos="TextBoxLeft"
textBoxEditable="1" textBoxWidth="80" textBoxHeight="20" skewFactor="0.4"/>
explicitFocusOrder="0" pos="35.947% 61R 37.87% 24" min="0.010000000000000000208"
max="10" int="0.010000000000000000208" style="LinearHorizontal"
textBoxPos="TextBoxLeft" textBoxEditable="1" textBoxWidth="80"
textBoxHeight="20" skewFactor="0.4000000000000000222"/>
<SLIDER name="" id="a68c75ae0f41c437" memberName="angleSlider" virtualName=""
explicitFocusOrder="0" pos="36.008% 37R 37.86% 24" min="-180"
max="180" int="0.1" style="LinearHorizontal" textBoxPos="TextBoxLeft"
textBoxEditable="1" textBoxWidth="80" textBoxHeight="20" skewFactor="1"/>
explicitFocusOrder="0" pos="35.947% 37R 37.87% 24" min="-180"
max="180" int="0.10000000000000000555" style="LinearHorizontal"
textBoxPos="TextBoxLeft" textBoxEditable="1" textBoxWidth="80"
textBoxHeight="20" skewFactor="1"/>
<LABEL name="" id="61972b44db6093d7" memberName="xSliderLabel" virtualName=""
explicitFocusOrder="0" pos="24.897% 109R 10.7% 24" edTextCol="ff000000"
explicitFocusOrder="0" pos="24.852% 109R 10.651% 24" edTextCol="ff000000"
edBkgCol="0" labelText="X offset:" editableSingleClick="0" editableDoubleClick="0"
focusDiscardsChanges="0" fontname="Default font" fontsize="15"
bold="0" italic="0" justification="34"/>
<LABEL name="" id="fd87229f56908c79" memberName="ySliderLabel" virtualName=""
explicitFocusOrder="0" pos="24.897% 85R 10.7% 24" edTextCol="ff000000"
explicitFocusOrder="0" pos="24.852% 85R 10.651% 24" edTextCol="ff000000"
edBkgCol="0" labelText="Y offset:" editableSingleClick="0" editableDoubleClick="0"
focusDiscardsChanges="0" fontname="Default font" fontsize="15"
bold="0" italic="0" justification="34"/>
<LABEL name="" id="889901f3d351ac41" memberName="sizeSliderLabel" virtualName=""
explicitFocusOrder="0" pos="24.897% 61R 10.7% 24" edTextCol="ff000000"
explicitFocusOrder="0" pos="24.852% 61R 10.651% 24" edTextCol="ff000000"
edBkgCol="0" labelText="Size:" editableSingleClick="0" editableDoubleClick="0"
focusDiscardsChanges="0" fontname="Default font" fontsize="15"
bold="0" italic="0" justification="34"/>
<LABEL name="" id="98c096221f161097" memberName="angleSliderLabel" virtualName=""
explicitFocusOrder="0" pos="24.897% 37R 10.7% 24" edTextCol="ff000000"
explicitFocusOrder="0" pos="24.852% 37R 10.651% 24" edTextCol="ff000000"
edBkgCol="0" labelText="Angle:" editableSingleClick="0" editableDoubleClick="0"
focusDiscardsChanges="0" fontname="Default font" fontsize="15"
bold="0" italic="0" justification="34"/>
<TOGGLEBUTTON name="" id="dc21f241b7188003" memberName="clipToRectangleToggle"
virtualName="" explicitFocusOrder="0" pos="2.263% 109R 144 24"
virtualName="" explicitFocusOrder="0" pos="2.219% 109R 144 24"
buttonText="Clip to rectangle" connectedEdges="0" needsCallback="0"
radioGroupId="0" state="0"/>
<TOGGLEBUTTON name="" id="e242a0decedf4fbd" memberName="clipToPathToggle" virtualName=""
explicitFocusOrder="0" pos="2.263% 85R 144 24" buttonText="Clip to path"
explicitFocusOrder="0" pos="2.219% 85R 144 24" buttonText="Clip to path"
connectedEdges="0" needsCallback="0" radioGroupId="0" state="0"/>
<TOGGLEBUTTON name="" id="2c40de62d77841ae" memberName="clipToImageToggle"
virtualName="" explicitFocusOrder="0" pos="2.263% 61R 144 24"
virtualName="" explicitFocusOrder="0" pos="2.219% 61R 144 24"
buttonText="Clip to image" connectedEdges="0" needsCallback="0"
radioGroupId="0" state="0"/>
</JUCER_COMPONENT>


+ 1
- 1
modules/juce_core/text/juce_StringRef.h View File

@@ -97,7 +97,7 @@ public:
/** Returns true if the string is not empty. */
bool isNotEmpty() const noexcept { return ! text.isEmpty(); }
/** Returns the number of characters in the string. */
int length() const noexcept { return text.length(); }
int length() const noexcept { return (int) text.length(); }
/** Compares this StringRef with a String. */
bool operator== (const String& s) const noexcept { return text.compare (s.getCharPointer()) == 0; }


+ 1
- 1
modules/juce_gui_basics/widgets/juce_Slider.cpp View File

@@ -1050,7 +1050,7 @@ public:
else if (style == RotaryVerticalDrag) mousePos += Point<int> (0, delta);
else mousePos += Point<int> (delta / -2, delta / 2);
mousePos = owner.getScreenBounds().getConstrainedPoint (mousePos);
mousePos = owner.getScreenBounds().reduced (4).getConstrainedPoint (mousePos);
}
else
{


Loading…
Cancel
Save