1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-23 09:20:16 +01:00

IdentInterfaceSymbol to distinguish internal vs visible enum settings

This commit is contained in:
Paul Licameli
2018-03-26 22:03:45 -04:00
parent 595cf05d42
commit 2065eebff6
21 changed files with 205 additions and 198 deletions

View File

@@ -343,7 +343,7 @@ void ShuttleParams::Define( float & var, const wxChar * key, const float vdef
void ShuttleParams::Define( double & var, const wxChar * key, const float vdefault, const float vmin, const float vmax, const float vscl ){;};
void ShuttleParams::Define( double & var, const wxChar * key, const double vdefault, const double vmin, const double vmax, const double vscl ){;};
void ShuttleParams::Define( wxString &var, const wxChar * key, const wxString vdefault, const wxString vmin, const wxString vmax, const wxString vscl ){;};
void ShuttleParams::DefineEnum( int &var, const wxChar * key, const int vdefault, const wxString strings[], size_t nStrings ){;};
void ShuttleParams::DefineEnum( int &var, const wxChar * key, const int vdefault, const IdentInterfaceSymbol strings[], size_t nStrings ){;};
@@ -403,10 +403,10 @@ void ShuttleGetAutomation::Define( wxString &var, const wxChar * key, const wxSt
}
void ShuttleGetAutomation::DefineEnum( int &var, const wxChar * key, const int vdefault, const wxString strings[], size_t nStrings )
void ShuttleGetAutomation::DefineEnum( int &var, const wxChar * key, const int vdefault, const IdentInterfaceSymbol strings[], size_t nStrings )
{
if( !ShouldSet() ) return;
mpEap->Write(key, strings[var]);
mpEap->Write(key, strings[var].Internal());
}
@@ -513,7 +513,7 @@ void ShuttleSetAutomation::Define( wxString &var, const wxChar * key, const wxSt
}
void ShuttleSetAutomation::DefineEnum( int &var, const wxChar * key, const int vdefault, const wxString strings[], size_t nStrings )
void ShuttleSetAutomation::DefineEnum( int &var, const wxChar * key, const int vdefault, const IdentInterfaceSymbol strings[], size_t nStrings )
{
CouldGet( key );
if( !bOK )
@@ -630,7 +630,7 @@ void ShuttleGetDefinition::Define( wxString &var, const wxChar * key, const wxSt
void ShuttleGetDefinition::DefineEnum( int &var,
const wxChar * key, const int vdefault,
const wxString strings[], size_t nStrings )
const IdentInterfaceSymbol strings[], size_t nStrings )
{
StartStruct();
AddItem( wxString(key), "key" );
@@ -638,11 +638,11 @@ void ShuttleGetDefinition::DefineEnum( int &var,
if( IsOptional() )
AddItem( "unchanged", "default" );
else
AddItem( strings[vdefault], "default" );
AddItem( strings[vdefault].Internal(), "default" );
StartField( "enum" );
StartArray();
for( size_t i = 0; i < nStrings; i++ )
AddItem( strings[i] );
AddItem( strings[i].Internal() );
EndArray();
EndField();
EndStruct();