Browse Source

Projucer: Update TextPropertyComponentWithEnablement and ChoicePropertyComponentWithEnablement to use ValueWithDefault

tags/2021-05-28
ed 7 years ago
parent
commit
1603f21976
3 changed files with 32 additions and 29 deletions
  1. +9
    -10
      extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_MSVC.h
  2. +11
    -11
      extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h
  3. +12
    -8
      extras/Projucer/Source/Utility/UI/PropertyComponents/jucer_PropertyComponentsWithEnablement.h

+ 9
- 10
extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_MSVC.h View File

@@ -221,8 +221,7 @@ public:
props.add (new ChoicePropertyComponentWithEnablement (debugInformationFormatValue,
isDebug() ? isDebugValue.getPropertyAsValue()
: generateDebugSymbolsValue.getPropertyAsValue(),
isDebug() ? isDebugValue : generateDebugSymbolsValue,
"Debug Information Format",
{ "None", "C7 Compatible (/Z7)", "Program Database (/Zi)", "Program Database for Edit And Continue (/ZI)" },
{ "None", "OldStyle", "ProgramDatabase", "EditAndContinue" }),
@@ -307,23 +306,23 @@ public:
"Enable this to copy plugin binaries to a specified folder after building.");
if (project.shouldBuildVST())
props.add (new TextPropertyComponentWithEnablement (vstBinaryLocation, pluginBinaryCopyStepValue.getPropertyAsValue(),
"VST Binary Location", 1024, false),
props.add (new TextPropertyComponentWithEnablement (vstBinaryLocation, pluginBinaryCopyStepValue, "VST Binary Location",
1024, false),
"The folder in which the compiled VST binary should be placed.");
if (project.shouldBuildVST3())
props.add (new TextPropertyComponentWithEnablement (vst3BinaryLocation, pluginBinaryCopyStepValue.getPropertyAsValue(),
"VST3 Binary Location", 1024, false),
props.add (new TextPropertyComponentWithEnablement (vst3BinaryLocation, pluginBinaryCopyStepValue, "VST3 Binary Location",
1024, false),
"The folder in which the compiled VST3 binary should be placed.");
if (project.shouldBuildRTAS())
props.add (new TextPropertyComponentWithEnablement (rtasBinaryLocation, pluginBinaryCopyStepValue.getPropertyAsValue(),
"RTAS Binary Location", 1024, false),
props.add (new TextPropertyComponentWithEnablement (rtasBinaryLocation, pluginBinaryCopyStepValue, "RTAS Binary Location",
1024, false),
"The folder in which the compiled RTAS binary should be placed.");
if (project.shouldBuildAAX())
props.add (new TextPropertyComponentWithEnablement (aaxBinaryLocation, pluginBinaryCopyStepValue.getPropertyAsValue(),
"AAX Binary Location", 1024, false),
props.add (new TextPropertyComponentWithEnablement (aaxBinaryLocation, pluginBinaryCopyStepValue, "AAX Binary Location",
1024, false),
"The folder in which the compiled AAX binary should be placed.");
}


+ 11
- 11
extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h View File

@@ -286,7 +286,7 @@ public:
"You can find this string in the OS X app Keychain Access under \"Certificates\".");
if (iOS)
props.add (new TextPropertyComponentWithEnablement (iosAppGroupsIDValue, iosAppGroupsValue.getPropertyAsValue(), "App Group ID", 256, false),
props.add (new TextPropertyComponentWithEnablement (iosAppGroupsIDValue, iosAppGroupsValue, "App Group ID", 256, false),
"The App Group ID to be used for allowing multiple apps to access a shared resource folder. Multiple IDs can be "
"added separated by a semicolon.");
@@ -544,28 +544,28 @@ protected:
"Enable this to copy plugin binaries to the specified folder after building.");
if (project.shouldBuildVST())
props.add (new TextPropertyComponentWithEnablement (vstBinaryLocation, pluginBinaryCopyStepEnabled.getPropertyAsValue(),
"VST Binary Location", 1024, false),
props.add (new TextPropertyComponentWithEnablement (vstBinaryLocation, pluginBinaryCopyStepEnabled, "VST Binary Location",
1024, false),
"The folder in which the compiled VST binary should be placed.");
if (project.shouldBuildVST3())
props.add (new TextPropertyComponentWithEnablement (vst3BinaryLocation, pluginBinaryCopyStepEnabled.getPropertyAsValue(),
"VST3 Binary Location", 1024, false),
props.add (new TextPropertyComponentWithEnablement (vst3BinaryLocation, pluginBinaryCopyStepEnabled, "VST3 Binary Location",
1024, false),
"The folder in which the compiled VST3 binary should be placed.");
if (project.shouldBuildAU())
props.add (new TextPropertyComponentWithEnablement (auBinaryLocation, pluginBinaryCopyStepEnabled.getPropertyAsValue(),
"AU Binary Location", 1024, false),
props.add (new TextPropertyComponentWithEnablement (auBinaryLocation, pluginBinaryCopyStepEnabled, "AU Binary Location",
1024, false),
"The folder in which the compiled AU binary should be placed.");
if (project.shouldBuildRTAS())
props.add (new TextPropertyComponentWithEnablement (rtasBinaryLocation, pluginBinaryCopyStepEnabled.getPropertyAsValue(),
"RTAS Binary Location", 1024, false),
props.add (new TextPropertyComponentWithEnablement (rtasBinaryLocation, pluginBinaryCopyStepEnabled, "RTAS Binary Location",
1024, false),
"The folder in which the compiled RTAS binary should be placed.");
if (project.shouldBuildAAX())
props.add (new TextPropertyComponentWithEnablement (aaxBinaryLocation, pluginBinaryCopyStepEnabled.getPropertyAsValue(),
"AAX Binary Location", 1024, false),
props.add (new TextPropertyComponentWithEnablement (aaxBinaryLocation, pluginBinaryCopyStepEnabled, "AAX Binary Location",
1024, false),
"The folder in which the compiled AAX binary should be placed.");
}


+ 12
- 8
extras/Projucer/Source/Utility/UI/PropertyComponents/jucer_PropertyComponentsWithEnablement.h View File

@@ -33,23 +33,25 @@ class TextPropertyComponentWithEnablement : public TextPropertyComponent,
{
public:
TextPropertyComponentWithEnablement (const ValueWithDefault& valueToControl,
const Value& valueToListenTo,
ValueWithDefault valueToListenTo,
const String& propertyName,
int maxNumChars,
bool isMultiLine)
: TextPropertyComponent (valueToControl, propertyName, maxNumChars, isMultiLine),
value (valueToListenTo)
valueWithDefault (valueToListenTo),
value (valueWithDefault.getPropertyAsValue())
{
value.addListener (this);
setEnabled (value.getValue());
setEnabled (valueWithDefault.get());
}
~TextPropertyComponentWithEnablement() { value.removeListener (this); }
private:
ValueWithDefault valueWithDefault;
Value value;
void valueChanged (Value& v) override { setEnabled (v.getValue()); }
void valueChanged (Value&) override { setEnabled (valueWithDefault.get()); }
};
//==============================================================================
@@ -58,21 +60,23 @@ class ChoicePropertyComponentWithEnablement : public ChoicePropertyComponent,
{
public:
ChoicePropertyComponentWithEnablement (const ValueWithDefault& valueToControl,
const Value& valueToListenTo,
ValueWithDefault valueToListenTo,
const String& propertyName,
const StringArray& choices,
const Array<var>& correspondingValues)
: ChoicePropertyComponent (valueToControl, propertyName, choices, correspondingValues),
value (valueToListenTo)
valueWithDefault (valueToListenTo),
value (valueToListenTo.getPropertyAsValue())
{
value.addListener (this);
setEnabled (value.getValue());
setEnabled (valueWithDefault.get());
}
~ChoicePropertyComponentWithEnablement() { value.removeListener (this); }
private:
ValueWithDefault valueWithDefault;
Value value;
void valueChanged (Value& v) override { setEnabled (v.getValue()); }
void valueChanged (Value&) override { setEnabled (valueWithDefault.get()); }
};

Loading…
Cancel
Save