1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-21 06:01:13 +02:00

Add DragCommand. Default Y/N on optional fields. Open/Save project items.

- More Y/N in Optional, making it easier to omit parameters.
- AT removed from Envelope, since T already gives it.
This commit is contained in:
James Crook
2018-02-17 13:29:46 +00:00
committed by Paul Licameli
parent bcf0865c1a
commit e3ef968d57
27 changed files with 286 additions and 67 deletions

View File

@@ -74,6 +74,8 @@ public:
bool ExchangeWithMaster(const wxString & Name) override;
bool ShouldSet();
virtual ShuttleParams & Optional( bool & var ){ pOptionalFlag = NULL;return *this;};
virtual ShuttleParams & OptionalY( bool & var ){ return Optional( var );};
virtual ShuttleParams & OptionalN( bool & var ){ return Optional( var );};
virtual void Define( bool & var, const wxChar * key, const bool vdefault, const bool vmin=false, const bool vmax=false, const bool vscl=false );
virtual void Define( size_t & var, const wxChar * key, const int vdefault, const int vmin=0, const int vmax=100000, const int vscl=1 );
virtual void Define( int & var, const wxChar * key, const int vdefault, const int vmin=0, const int vmax=100000, const int vscl=1 );
@@ -156,6 +158,10 @@ class ShuttleDefaults : public ShuttleParams
{
public:
wxString Result;
virtual ShuttleParams & Optional( bool & var )override{ var = true; pOptionalFlag = NULL;return *this;};
virtual ShuttleParams & OptionalY( bool & var )override{ var = true; pOptionalFlag = NULL;return *this;};
virtual ShuttleParams & OptionalN( bool & var )override{ var = false;pOptionalFlag = NULL;return *this;};
void Define( bool & var, const wxChar * WXUNUSED(key), const bool vdefault,
const bool WXUNUSED(vmin), const bool WXUNUSED(vmax), const bool WXUNUSED(vscl) )
override { var = vdefault;};