mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-02 17:09:26 +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:
parent
bcf0865c1a
commit
e3ef968d57
@ -1272,6 +1272,7 @@
|
|||||||
5EF3E65B203FDACE006C6882 /* SetLabelCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5EF3E656203FDACE006C6882 /* SetLabelCommand.cpp */; };
|
5EF3E65B203FDACE006C6882 /* SetLabelCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5EF3E656203FDACE006C6882 /* SetLabelCommand.cpp */; };
|
||||||
5EF3E65C203FDACE006C6882 /* SetProjectCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5EF3E658203FDACE006C6882 /* SetProjectCommand.cpp */; };
|
5EF3E65C203FDACE006C6882 /* SetProjectCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5EF3E658203FDACE006C6882 /* SetProjectCommand.cpp */; };
|
||||||
5EF3E65F203FDFE9006C6882 /* SetEnvelopeCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5EF3E65D203FDFE9006C6882 /* SetEnvelopeCommand.cpp */; };
|
5EF3E65F203FDFE9006C6882 /* SetEnvelopeCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5EF3E65D203FDFE9006C6882 /* SetEnvelopeCommand.cpp */; };
|
||||||
|
5EF3E662203FE73C006C6882 /* DragCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5EF3E660203FE73C006C6882 /* DragCommand.cpp */; };
|
||||||
5EF958851DEB121800191280 /* InconsistencyException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5EF958831DEB121800191280 /* InconsistencyException.cpp */; };
|
5EF958851DEB121800191280 /* InconsistencyException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5EF958831DEB121800191280 /* InconsistencyException.cpp */; };
|
||||||
8406A93812D0F2510011EA01 /* EQDefaultCurves.xml in Resources */ = {isa = PBXBuildFile; fileRef = 8406A93712D0F2510011EA01 /* EQDefaultCurves.xml */; };
|
8406A93812D0F2510011EA01 /* EQDefaultCurves.xml in Resources */ = {isa = PBXBuildFile; fileRef = 8406A93712D0F2510011EA01 /* EQDefaultCurves.xml */; };
|
||||||
8484F31413086237002DF7F0 /* DeviceManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8484F31213086237002DF7F0 /* DeviceManager.cpp */; };
|
8484F31413086237002DF7F0 /* DeviceManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8484F31213086237002DF7F0 /* DeviceManager.cpp */; };
|
||||||
@ -3179,6 +3180,8 @@
|
|||||||
5EF3E659203FDACE006C6882 /* SetProjectCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SetProjectCommand.h; sourceTree = "<group>"; };
|
5EF3E659203FDACE006C6882 /* SetProjectCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SetProjectCommand.h; sourceTree = "<group>"; };
|
||||||
5EF3E65D203FDFE9006C6882 /* SetEnvelopeCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SetEnvelopeCommand.cpp; sourceTree = "<group>"; };
|
5EF3E65D203FDFE9006C6882 /* SetEnvelopeCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SetEnvelopeCommand.cpp; sourceTree = "<group>"; };
|
||||||
5EF3E65E203FDFE9006C6882 /* SetEnvelopeCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SetEnvelopeCommand.h; sourceTree = "<group>"; };
|
5EF3E65E203FDFE9006C6882 /* SetEnvelopeCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SetEnvelopeCommand.h; sourceTree = "<group>"; };
|
||||||
|
5EF3E660203FE73C006C6882 /* DragCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DragCommand.cpp; sourceTree = "<group>"; };
|
||||||
|
5EF3E661203FE73C006C6882 /* DragCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DragCommand.h; sourceTree = "<group>"; };
|
||||||
5EF958831DEB121800191280 /* InconsistencyException.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InconsistencyException.cpp; sourceTree = "<group>"; };
|
5EF958831DEB121800191280 /* InconsistencyException.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InconsistencyException.cpp; sourceTree = "<group>"; };
|
||||||
5EF958841DEB121800191280 /* InconsistencyException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InconsistencyException.h; sourceTree = "<group>"; };
|
5EF958841DEB121800191280 /* InconsistencyException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InconsistencyException.h; sourceTree = "<group>"; };
|
||||||
82FF184D13CF01A600C1B664 /* dBTable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = dBTable.cpp; path = sbsms/src/dBTable.cpp; sourceTree = "<group>"; };
|
82FF184D13CF01A600C1B664 /* dBTable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = dBTable.cpp; path = sbsms/src/dBTable.cpp; sourceTree = "<group>"; };
|
||||||
@ -3782,6 +3785,7 @@
|
|||||||
28851F9F1027F16400152EE1 /* CommandType.cpp */,
|
28851F9F1027F16400152EE1 /* CommandType.cpp */,
|
||||||
28851FA11027F16400152EE1 /* CompareAudioCommand.cpp */,
|
28851FA11027F16400152EE1 /* CompareAudioCommand.cpp */,
|
||||||
5EF3E647203FBAFB006C6882 /* Demo.cpp */,
|
5EF3E647203FBAFB006C6882 /* Demo.cpp */,
|
||||||
|
5EF3E660203FE73C006C6882 /* DragCommand.cpp */,
|
||||||
5EF3E649203FBAFB006C6882 /* GetInfoCommand.cpp */,
|
5EF3E649203FBAFB006C6882 /* GetInfoCommand.cpp */,
|
||||||
28851FA31027F16400152EE1 /* GetTrackInfoCommand.cpp */,
|
28851FA31027F16400152EE1 /* GetTrackInfoCommand.cpp */,
|
||||||
28851FA51027F16400152EE1 /* HelpCommand.cpp */,
|
28851FA51027F16400152EE1 /* HelpCommand.cpp */,
|
||||||
@ -3817,6 +3821,7 @@
|
|||||||
28851FA01027F16400152EE1 /* CommandType.h */,
|
28851FA01027F16400152EE1 /* CommandType.h */,
|
||||||
28851FA21027F16400152EE1 /* CompareAudioCommand.h */,
|
28851FA21027F16400152EE1 /* CompareAudioCommand.h */,
|
||||||
5EF3E648203FBAFB006C6882 /* Demo.h */,
|
5EF3E648203FBAFB006C6882 /* Demo.h */,
|
||||||
|
5EF3E661203FE73C006C6882 /* DragCommand.h */,
|
||||||
5EF3E64A203FBAFB006C6882 /* GetInfoCommand.h */,
|
5EF3E64A203FBAFB006C6882 /* GetInfoCommand.h */,
|
||||||
28851FA41027F16400152EE1 /* GetTrackInfoCommand.h */,
|
28851FA41027F16400152EE1 /* GetTrackInfoCommand.h */,
|
||||||
28851FA61027F16400152EE1 /* HelpCommand.h */,
|
28851FA61027F16400152EE1 /* HelpCommand.h */,
|
||||||
@ -7866,6 +7871,7 @@
|
|||||||
5EF3E64E203FBAFB006C6882 /* CommandContext.cpp in Sources */,
|
5EF3E64E203FBAFB006C6882 /* CommandContext.cpp in Sources */,
|
||||||
2897F6F70AB3DB5A003C20C5 /* ToolManager.cpp in Sources */,
|
2897F6F70AB3DB5A003C20C5 /* ToolManager.cpp in Sources */,
|
||||||
2897F6F80AB3DB5A003C20C5 /* ToolsToolBar.cpp in Sources */,
|
2897F6F80AB3DB5A003C20C5 /* ToolsToolBar.cpp in Sources */,
|
||||||
|
5EF3E662203FE73C006C6882 /* DragCommand.cpp in Sources */,
|
||||||
2897F6F90AB3DB5A003C20C5 /* TranscriptionToolBar.cpp in Sources */,
|
2897F6F90AB3DB5A003C20C5 /* TranscriptionToolBar.cpp in Sources */,
|
||||||
2897F6FE0AB3DCD0003C20C5 /* Grabber.cpp in Sources */,
|
2897F6FE0AB3DCD0003C20C5 /* Grabber.cpp in Sources */,
|
||||||
283DE1360AC0D4FD00E8C3AE /* XMLWriter.cpp in Sources */,
|
283DE1360AC0D4FD00E8C3AE /* XMLWriter.cpp in Sources */,
|
||||||
|
@ -1611,6 +1611,12 @@ void AudacityProject::CreateMenusAndCommands()
|
|||||||
AudioIONotBusyFlag, AudioIONotBusyFlag);
|
AudioIONotBusyFlag, AudioIONotBusyFlag);
|
||||||
c->AddItem(wxT("Export2"), _("Export..."), FN(OnAudacityCommand),
|
c->AddItem(wxT("Export2"), _("Export..."), FN(OnAudacityCommand),
|
||||||
AudioIONotBusyFlag, AudioIONotBusyFlag);
|
AudioIONotBusyFlag, AudioIONotBusyFlag);
|
||||||
|
c->AddItem(wxT("OpenProject"), _("Open Project..."), FN(OnAudacityCommand),
|
||||||
|
AudioIONotBusyFlag, AudioIONotBusyFlag);
|
||||||
|
c->AddItem(wxT("SaveProject"), _("Save Project..."), FN(OnAudacityCommand),
|
||||||
|
AudioIONotBusyFlag, AudioIONotBusyFlag);
|
||||||
|
c->AddItem(wxT("Drag"), _("Mousing About..."), FN(OnAudacityCommand),
|
||||||
|
AudioIONotBusyFlag, AudioIONotBusyFlag);
|
||||||
c->AddItem(wxT("CompareAudio"), _("Compare Audio..."), FN(OnAudacityCommand),
|
c->AddItem(wxT("CompareAudio"), _("Compare Audio..."), FN(OnAudacityCommand),
|
||||||
AudioIONotBusyFlag, AudioIONotBusyFlag);
|
AudioIONotBusyFlag, AudioIONotBusyFlag);
|
||||||
c->AddItem(wxT("GetPreference"), _("Get Preference..."), FN(OnAudacityCommand),
|
c->AddItem(wxT("GetPreference"), _("Get Preference..."), FN(OnAudacityCommand),
|
||||||
|
@ -74,6 +74,8 @@ public:
|
|||||||
bool ExchangeWithMaster(const wxString & Name) override;
|
bool ExchangeWithMaster(const wxString & Name) override;
|
||||||
bool ShouldSet();
|
bool ShouldSet();
|
||||||
virtual ShuttleParams & Optional( bool & var ){ pOptionalFlag = NULL;return *this;};
|
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( 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( 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 );
|
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:
|
public:
|
||||||
wxString Result;
|
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,
|
void Define( bool & var, const wxChar * WXUNUSED(key), const bool vdefault,
|
||||||
const bool WXUNUSED(vmin), const bool WXUNUSED(vmax), const bool WXUNUSED(vscl) )
|
const bool WXUNUSED(vmin), const bool WXUNUSED(vmax), const bool WXUNUSED(vscl) )
|
||||||
override { var = vdefault;};
|
override { var = vdefault;};
|
||||||
|
@ -2197,6 +2197,8 @@ void TrackInfo::GainSliderDrawFunction
|
|||||||
auto target = dynamic_cast<GainSliderHandle*>( context.target.get() );
|
auto target = dynamic_cast<GainSliderHandle*>( context.target.get() );
|
||||||
auto dc = &context.dc;
|
auto dc = &context.dc;
|
||||||
bool hit = target && target->GetTrack().get() == pTrack;
|
bool hit = target && target->GetTrack().get() == pTrack;
|
||||||
|
if( hit )
|
||||||
|
hit=hit;
|
||||||
bool captured = hit && target->IsClicked();
|
bool captured = hit && target->IsClicked();
|
||||||
SliderDrawFunction<WaveTrack>
|
SliderDrawFunction<WaveTrack>
|
||||||
( &TrackInfo::GainSlider, dc, rect, pTrack, captured, hit);
|
( &TrackInfo::GainSlider, dc, rect, pTrack, captured, hit);
|
||||||
|
@ -295,6 +295,7 @@ bool CommandImplementation::Apply(const CommandContext & WXUNUSED(context))
|
|||||||
#include "SetLabelCommand.cpp"
|
#include "SetLabelCommand.cpp"
|
||||||
#include "SetProjectCommand.cpp"
|
#include "SetProjectCommand.cpp"
|
||||||
#include "SetEnvelopeCommand.cpp"
|
#include "SetEnvelopeCommand.cpp"
|
||||||
|
#include "DragCommand.cpp"
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -313,6 +313,7 @@ LongMessageDialog::LongMessageDialog(wxWindow * parent,
|
|||||||
{
|
{
|
||||||
mType = type;
|
mType = type;
|
||||||
mAdditionalButtons = additionalButtons;
|
mAdditionalButtons = additionalButtons;
|
||||||
|
SetName( "Long Message" );
|
||||||
}
|
}
|
||||||
|
|
||||||
LongMessageDialog::~LongMessageDialog(){
|
LongMessageDialog::~LongMessageDialog(){
|
||||||
|
121
src/commands/DragCommand.cpp
Normal file
121
src/commands/DragCommand.cpp
Normal file
@ -0,0 +1,121 @@
|
|||||||
|
/**********************************************************************
|
||||||
|
|
||||||
|
Audacity - A Digital Audio Editor
|
||||||
|
Copyright 1999-2018 Audacity Team
|
||||||
|
License: wxwidgets
|
||||||
|
|
||||||
|
James Crook
|
||||||
|
|
||||||
|
******************************************************************//**
|
||||||
|
|
||||||
|
\file DragCommand.cpp
|
||||||
|
\brief Definitions for DragCommand
|
||||||
|
|
||||||
|
\class DragCommand
|
||||||
|
\brief Command that sets clip information
|
||||||
|
|
||||||
|
*//*******************************************************************/
|
||||||
|
|
||||||
|
#include "../Audacity.h"
|
||||||
|
#include "DragCommand.h"
|
||||||
|
#include "../Project.h"
|
||||||
|
#include "../Track.h"
|
||||||
|
#include "../TrackPanel.h"
|
||||||
|
#include "../WaveTrack.h"
|
||||||
|
#include "../ShuttleGui.h"
|
||||||
|
#include "CommandContext.h"
|
||||||
|
|
||||||
|
DragCommand::DragCommand()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
enum kCoordTypes
|
||||||
|
{
|
||||||
|
kPanel,
|
||||||
|
kApp,
|
||||||
|
kTrack0,
|
||||||
|
kTrack1,
|
||||||
|
nCoordTypes
|
||||||
|
};
|
||||||
|
|
||||||
|
static const wxString kCoordTypeStrings[nCoordTypes] =
|
||||||
|
{
|
||||||
|
XO("Panel"),
|
||||||
|
XO("App"),
|
||||||
|
XO("Track0"),
|
||||||
|
XO("Track1"),
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
bool DragCommand::DefineParams( ShuttleParams & S ){
|
||||||
|
wxArrayString coords( nCoordTypes, kCoordTypeStrings );
|
||||||
|
S.OptionalN( bHasId ).Define( mId, wxT("Id"), 0.0, 11000.0, 1000000.0);
|
||||||
|
S.OptionalY( bHasWinName ).Define( mWinName, wxT("Window"), "Timeline");
|
||||||
|
S.OptionalY( bHasFromX ).Define( mFromX, wxT("FromX"), 200.0, 0.0, 1000000.0);
|
||||||
|
S.OptionalY( bHasFromY ).Define( mFromY, wxT("FromY"), 10.0, 0.0, 1000000.0);
|
||||||
|
S.OptionalN( bHasToX ).Define( mToX, wxT("ToX"), 400.0, 0.0, 1000000.0);
|
||||||
|
S.OptionalN( bHasToY ).Define( mToY, wxT("ToY"), 10.0, 0.0, 1000000.0);
|
||||||
|
S.OptionalN( bHasRelativeTo ).DefineEnum( mRelativeTo, wxT("RelativeTo"), kPanel, coords );
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
|
void DragCommand::PopulateOrExchange(ShuttleGui & S)
|
||||||
|
{
|
||||||
|
wxArrayString coords( nCoordTypes, kCoordTypeStrings );
|
||||||
|
|
||||||
|
S.AddSpace(0, 5);
|
||||||
|
|
||||||
|
S.StartMultiColumn(3, wxALIGN_CENTER);
|
||||||
|
{
|
||||||
|
S.Optional( bHasId ).TieNumericTextBox( _("Id:"), mId );
|
||||||
|
S.Optional( bHasWinName ).TieTextBox( _("Window Name:"), mWinName );
|
||||||
|
S.Optional( bHasFromX ).TieNumericTextBox( _("From X:"), mFromX );
|
||||||
|
S.Optional( bHasFromY ).TieNumericTextBox( _("From Y:"), mFromY );
|
||||||
|
S.Optional( bHasToX ).TieNumericTextBox( _("To X:"), mToX );
|
||||||
|
S.Optional( bHasToY ).TieNumericTextBox( _("To Y:"), mToY );
|
||||||
|
S.Optional( bHasRelativeTo ).TieChoice( _("Relative To:"), mRelativeTo, &coords );
|
||||||
|
}
|
||||||
|
S.EndMultiColumn();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool DragCommand::Apply(const CommandContext & context)
|
||||||
|
{
|
||||||
|
wxWindow * pWin = context.GetProject();
|
||||||
|
wxWindow * pWin1 = nullptr;
|
||||||
|
wxMouseEvent Evt( wxEVT_MOTION );
|
||||||
|
Evt.m_x = mFromX;
|
||||||
|
Evt.m_y = mFromY;
|
||||||
|
if( bHasId )
|
||||||
|
pWin1 = pWin->FindWindowById( mId );
|
||||||
|
if( bHasWinName )
|
||||||
|
pWin1 = pWin->FindWindowByName( mWinName );
|
||||||
|
if( pWin1 )
|
||||||
|
pWin = pWin1;
|
||||||
|
// Process twice - possible bug in Audacity being worked around
|
||||||
|
// where we need an event to enter AND an event to move.
|
||||||
|
// AdornedRuler Quick-Play bug.
|
||||||
|
pWin->GetEventHandler()->ProcessEvent( Evt );
|
||||||
|
pWin->GetEventHandler()->ProcessEvent( Evt );
|
||||||
|
if( bHasToX ){
|
||||||
|
wxMouseEvent Evt2( wxEVT_LEFT_DOWN );
|
||||||
|
Evt2.m_leftDown = true;
|
||||||
|
Evt2.m_x = mFromX;
|
||||||
|
Evt2.m_y = mFromY;
|
||||||
|
Evt2.m_aux2Down = true;
|
||||||
|
pWin->GetEventHandler()->ProcessEvent( Evt2 );
|
||||||
|
wxMouseEvent Evt3( wxEVT_MOTION );
|
||||||
|
Evt3.m_leftDown = true;
|
||||||
|
Evt2.m_aux2Down = true;
|
||||||
|
Evt3.m_x = mToX;
|
||||||
|
Evt3.m_y = mToY;
|
||||||
|
// AdornedRuler Quick-Play bug again.
|
||||||
|
pWin->GetEventHandler()->ProcessEvent( Evt3 );
|
||||||
|
pWin->GetEventHandler()->ProcessEvent( Evt3 );
|
||||||
|
wxMouseEvent Evt4( wxEVT_LEFT_UP );
|
||||||
|
Evt2.m_aux2Down = true;
|
||||||
|
Evt4.m_x = mToX;
|
||||||
|
Evt4.m_y = mToY;
|
||||||
|
pWin->GetEventHandler()->ProcessEvent( Evt4 );
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
59
src/commands/DragCommand.h
Normal file
59
src/commands/DragCommand.h
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
/**********************************************************************
|
||||||
|
|
||||||
|
Audacity - A Digital Audio Editor
|
||||||
|
Copyright 1999-2009 Audacity Team
|
||||||
|
License: wxwidgets
|
||||||
|
|
||||||
|
James Crook
|
||||||
|
|
||||||
|
******************************************************************//**
|
||||||
|
|
||||||
|
\file DragCommand.h
|
||||||
|
\brief Declarations of DragCommand and DragCommandType classes
|
||||||
|
|
||||||
|
*//*******************************************************************/
|
||||||
|
|
||||||
|
#ifndef __DRAG_COMMAND__
|
||||||
|
#define __DRAG_COMMAND__
|
||||||
|
|
||||||
|
#include "Command.h"
|
||||||
|
#include "CommandType.h"
|
||||||
|
|
||||||
|
#define DRAG_PLUGIN_SYMBOL XO("Drag")
|
||||||
|
|
||||||
|
class DragCommand : public AudacityCommand
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
DragCommand();
|
||||||
|
// CommandDefinitionInterface overrides
|
||||||
|
wxString GetSymbol() override {return DRAG_PLUGIN_SYMBOL;};
|
||||||
|
wxString GetDescription() override {return _("Drags mouse from one place to another.");};
|
||||||
|
bool DefineParams( ShuttleParams & S ) override;
|
||||||
|
void PopulateOrExchange(ShuttleGui & S) override;
|
||||||
|
|
||||||
|
// AudacityCommand overrides
|
||||||
|
wxString ManualPage() override {return wxT("Extra_Menu:_Automation#drag");};
|
||||||
|
|
||||||
|
bool Apply(const CommandContext & context) override;
|
||||||
|
|
||||||
|
public:
|
||||||
|
double mFromX;
|
||||||
|
double mFromY;
|
||||||
|
double mToX;
|
||||||
|
double mToY;
|
||||||
|
int mRelativeTo;
|
||||||
|
int mId;
|
||||||
|
wxString mWinName;
|
||||||
|
|
||||||
|
bool bHasFromX;
|
||||||
|
bool bHasFromY;
|
||||||
|
bool bHasToX;
|
||||||
|
bool bHasToY;
|
||||||
|
bool bHasRelativeTo;
|
||||||
|
bool bHasId;
|
||||||
|
bool bHasWinName;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* End of include guard: __DRAG_COMMAND__ */
|
@ -311,7 +311,7 @@ bool GetInfoCommand::SendEnvelopes(const CommandContext &context)
|
|||||||
context.StartField( "points" );
|
context.StartField( "points" );
|
||||||
context.StartArray();
|
context.StartArray();
|
||||||
double offset = pEnv->mOffset;
|
double offset = pEnv->mOffset;
|
||||||
for( int k=0;k<pEnv->mEnv.size(); k++)
|
for( size_t k=0;k<pEnv->mEnv.size(); k++)
|
||||||
{
|
{
|
||||||
context.StartStruct( );
|
context.StartStruct( );
|
||||||
context.AddItem( pEnv->mEnv[k].GetT()+offset, "t" );
|
context.AddItem( pEnv->mEnv[k].GetT()+offset, "t" );
|
||||||
@ -587,6 +587,7 @@ void GetInfoCommand::ExploreWindows( const CommandContext &context,
|
|||||||
context.AddItem( R.GetRight() );
|
context.AddItem( R.GetRight() );
|
||||||
context.AddItem( R.GetBottom() );
|
context.AddItem( R.GetBottom() );
|
||||||
context.AddItem( Name );
|
context.AddItem( Name );
|
||||||
|
context.AddItem( item->GetId() );
|
||||||
context.EndArray();
|
context.EndArray();
|
||||||
|
|
||||||
ExploreWindows( context, P, item, item->GetId(), depth+1 );
|
ExploreWindows( context, P, item, item->GetId(), depth+1 );
|
||||||
|
@ -37,7 +37,7 @@ modelled on BuiltinEffectsModule
|
|||||||
#include "../commands/SetEnvelopeCommand.h"
|
#include "../commands/SetEnvelopeCommand.h"
|
||||||
#include "../commands/SetClipCommand.h"
|
#include "../commands/SetClipCommand.h"
|
||||||
#include "../commands/SetProjectCommand.h"
|
#include "../commands/SetProjectCommand.h"
|
||||||
|
#include "../commands/DragCommand.h"
|
||||||
|
|
||||||
//
|
//
|
||||||
// Define the list of COMMANDs that will be autoregistered and how to instantiate each
|
// Define the list of COMMANDs that will be autoregistered and how to instantiate each
|
||||||
@ -46,6 +46,7 @@ modelled on BuiltinEffectsModule
|
|||||||
COMMAND( DEMO, DemoCommand, () ) \
|
COMMAND( DEMO, DemoCommand, () ) \
|
||||||
COMMAND( MESSAGE, MessageCommand, () ) \
|
COMMAND( MESSAGE, MessageCommand, () ) \
|
||||||
COMMAND( SCREENSHOT, ScreenshotCommand, () ) \
|
COMMAND( SCREENSHOT, ScreenshotCommand, () ) \
|
||||||
|
COMMAND( DRAG, DragCommand, () ) \
|
||||||
COMMAND( COMPARE_AUDIO, CompareAudioCommand, () ) \
|
COMMAND( COMPARE_AUDIO, CompareAudioCommand, () ) \
|
||||||
COMMAND( SET_TRACK, SetTrackCommand, () ) \
|
COMMAND( SET_TRACK, SetTrackCommand, () ) \
|
||||||
COMMAND( SET_ENVELOPE, SetEnvelopeCommand, () ) \
|
COMMAND( SET_ENVELOPE, SetEnvelopeCommand, () ) \
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
bool OpenProjectCommand::DefineParams( ShuttleParams & S ){
|
bool OpenProjectCommand::DefineParams( ShuttleParams & S ){
|
||||||
S.Define( mFileName, wxT("Filename"), "test.aup" );
|
S.Define( mFileName, wxT("Filename"), "test.aup" );
|
||||||
S.Define( mbAddToHistory, wxT("AddToHistory"), false );
|
S.OptionalN(bHasAddToHistory).Define( mbAddToHistory, wxT("AddToHistory"), false );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -62,8 +62,8 @@ bool OpenProjectCommand::Apply(const CommandContext & context){
|
|||||||
|
|
||||||
bool SaveProjectCommand::DefineParams( ShuttleParams & S ){
|
bool SaveProjectCommand::DefineParams( ShuttleParams & S ){
|
||||||
S.Define( mFileName, wxT("Filename"), "name.aup" );
|
S.Define( mFileName, wxT("Filename"), "name.aup" );
|
||||||
S.Define( mbAddToHistory, wxT("AddToHistory"), false );
|
S.OptionalN(bHasAddToHistory).Define( mbAddToHistory, wxT("AddToHistory"), false );
|
||||||
S.Define( mbCompress, wxT("Compress"), false );
|
S.OptionalN(bHasCompress).Define( mbCompress, wxT("Compress"), false );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,6 +38,7 @@ public:
|
|||||||
public:
|
public:
|
||||||
wxString mFileName;
|
wxString mFileName;
|
||||||
bool mbAddToHistory;
|
bool mbAddToHistory;
|
||||||
|
bool bHasAddToHistory;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define SAVE_PROJECT_PLUGIN_SYMBOL XO("Save Project")
|
#define SAVE_PROJECT_PLUGIN_SYMBOL XO("Save Project")
|
||||||
@ -58,4 +59,6 @@ public:
|
|||||||
wxString mFileName;
|
wxString mFileName;
|
||||||
bool mbAddToHistory;
|
bool mbAddToHistory;
|
||||||
bool mbCompress;
|
bool mbCompress;
|
||||||
|
bool bHasAddToHistory;
|
||||||
|
bool bHasCompress;
|
||||||
};
|
};
|
@ -52,7 +52,7 @@ bool GetPreferenceCommand::Apply(const CommandContext & context)
|
|||||||
bool SetPreferenceCommand::DefineParams( ShuttleParams & S ){
|
bool SetPreferenceCommand::DefineParams( ShuttleParams & S ){
|
||||||
S.Define( mName, wxT("Name"), wxT("") );
|
S.Define( mName, wxT("Name"), wxT("") );
|
||||||
S.Define( mValue, wxT("Value"), wxT("") );
|
S.Define( mValue, wxT("Value"), wxT("") );
|
||||||
S.Define( mbReload, wxT("Reload"), false );
|
S.OptionalN(bHasReload).Define( mbReload, wxT("Reload"), false );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,6 +63,7 @@ public:
|
|||||||
wxString mName;
|
wxString mName;
|
||||||
wxString mValue;
|
wxString mValue;
|
||||||
bool mbReload;
|
bool mbReload;
|
||||||
|
bool bHasReload;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* End of include guard: __PREFERENCE_COMMANDS__ */
|
#endif /* End of include guard: __PREFERENCE_COMMANDS__ */
|
||||||
|
@ -139,9 +139,9 @@ static const wxString kBackgroundStrings[nBackgrounds] =
|
|||||||
bool ScreenshotCommand::DefineParams( ShuttleParams & S ){
|
bool ScreenshotCommand::DefineParams( ShuttleParams & S ){
|
||||||
wxArrayString whats(nCaptureWhats, kCaptureWhatStrings);
|
wxArrayString whats(nCaptureWhats, kCaptureWhatStrings);
|
||||||
wxArrayString backs(nBackgrounds, kBackgroundStrings);
|
wxArrayString backs(nBackgrounds, kBackgroundStrings);
|
||||||
S.Define( mPath, wxT("Path"), wxT(""), wxT(""), wxT(""), wxT(""));
|
S.Define( mPath, wxT("Path"), wxT(""));
|
||||||
S.DefineEnum( mWhat, wxT("CaptureWhat"), wxT("Window"), whats );
|
S.DefineEnum( mWhat, wxT("CaptureWhat"), wxT("Window"), whats );
|
||||||
S.DefineEnum( mBack, wxT("Background"), wxT("None"), backs );
|
S.OptionalN(bHasBackground).DefineEnum( mBack, wxT("Background"), wxT("None"), backs );
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -483,7 +483,8 @@ void ScreenshotCommand::CaptureWindowOnIdle(
|
|||||||
void ScreenshotCommand::CapturePreferences(
|
void ScreenshotCommand::CapturePreferences(
|
||||||
const CommandContext & context,
|
const CommandContext & context,
|
||||||
AudacityProject * pProject, const wxString &mFileName ){
|
AudacityProject * pProject, const wxString &mFileName ){
|
||||||
mFileName;//compiler food.
|
(void)&mFileName;//compiler food.
|
||||||
|
(void)&context;
|
||||||
CommandManager * pMan = pProject->GetCommandManager();
|
CommandManager * pMan = pProject->GetCommandManager();
|
||||||
|
|
||||||
// Yucky static variables. Is there a better way? The problem is that we need the
|
// Yucky static variables. Is there a better way? The problem is that we need the
|
||||||
@ -512,7 +513,8 @@ void ScreenshotCommand::CapturePreferences(
|
|||||||
void ScreenshotCommand::CaptureEffects(
|
void ScreenshotCommand::CaptureEffects(
|
||||||
const CommandContext & context,
|
const CommandContext & context,
|
||||||
AudacityProject * pProject, const wxString &mFileName ){
|
AudacityProject * pProject, const wxString &mFileName ){
|
||||||
mFileName;//compiler food.
|
(void)&mFileName;//compiler food.
|
||||||
|
(void)&context;
|
||||||
CommandManager * pMan = pProject->GetCommandManager();
|
CommandManager * pMan = pProject->GetCommandManager();
|
||||||
wxString Str;
|
wxString Str;
|
||||||
// Yucky static variables. Is there a better way? The problem is that we need the
|
// Yucky static variables. Is there a better way? The problem is that we need the
|
||||||
|
@ -46,6 +46,7 @@ private:
|
|||||||
wxString mWhat;
|
wxString mWhat;
|
||||||
wxString mBack;
|
wxString mBack;
|
||||||
wxString mPath;
|
wxString mPath;
|
||||||
|
bool bHasBackground;
|
||||||
friend class ScreenshotCommand;
|
friend class ScreenshotCommand;
|
||||||
friend class ScreenFrame;
|
friend class ScreenFrame;
|
||||||
|
|
||||||
|
@ -40,9 +40,9 @@ explicitly code all three.
|
|||||||
#include "CommandContext.h"
|
#include "CommandContext.h"
|
||||||
|
|
||||||
bool SelectTimeCommand::DefineParams( ShuttleParams & S ){
|
bool SelectTimeCommand::DefineParams( ShuttleParams & S ){
|
||||||
S.Optional( bHasT0 ).Define( mT0, wxT("Start"), 0.0, 0.0, (double)FLT_MAX);
|
S.OptionalY( bHasT0 ).Define( mT0, wxT("Start"), 0.0, 0.0, (double)FLT_MAX);
|
||||||
S.Optional( bHasT1 ).Define( mT1, wxT("End"), 0.0, 0.0, (double)FLT_MAX);
|
S.OptionalY( bHasT1 ).Define( mT1, wxT("End"), 0.0, 0.0, (double)FLT_MAX);
|
||||||
S.Define( mFromEnd, wxT("FromEnd"), false );
|
S.OptionalY( bHasFromEnd).Define( mFromEnd, wxT("FromEnd"), false );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -58,6 +58,7 @@ void SelectTimeCommand::PopulateOrExchange(ShuttleGui & S)
|
|||||||
S.EndMultiColumn();
|
S.EndMultiColumn();
|
||||||
S.StartMultiColumn(2, wxALIGN_CENTER);
|
S.StartMultiColumn(2, wxALIGN_CENTER);
|
||||||
{
|
{
|
||||||
|
// Always used, so no optional checkbox.
|
||||||
S.TieCheckBox(_("From End:"), mFromEnd );
|
S.TieCheckBox(_("From End:"), mFromEnd );
|
||||||
}
|
}
|
||||||
S.EndMultiColumn();
|
S.EndMultiColumn();
|
||||||
@ -77,8 +78,8 @@ bool SelectTimeCommand::Apply(const CommandContext & context){
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool SelectFrequenciesCommand::DefineParams( ShuttleParams & S ){
|
bool SelectFrequenciesCommand::DefineParams( ShuttleParams & S ){
|
||||||
S.Optional( bHasTop ).Define( mTop, wxT("High"), 0.0, 0.0, (double)FLT_MAX);
|
S.OptionalN( bHasTop ).Define( mTop, wxT("High"), 0.0, 0.0, (double)FLT_MAX);
|
||||||
S.Optional( bHasBottom ).Define( mBottom, wxT("Low"), 0.0, 0.0, (double)FLT_MAX);
|
S.OptionalN( bHasBottom ).Define( mBottom, wxT("Low"), 0.0, 0.0, (double)FLT_MAX);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -113,9 +114,9 @@ static const wxString kModes[nModes] =
|
|||||||
|
|
||||||
bool SelectTracksCommand::DefineParams( ShuttleParams & S ){
|
bool SelectTracksCommand::DefineParams( ShuttleParams & S ){
|
||||||
wxArrayString modes( nModes, kModes );
|
wxArrayString modes( nModes, kModes );
|
||||||
S.Optional( bHasFirstTrack).Define( mFirstTrack, wxT("First"), 0, 0, 100);
|
S.OptionalN( bHasFirstTrack).Define( mFirstTrack, wxT("First"), 0, 0, 100);
|
||||||
S.Optional( bHasLastTrack ).Define( mLastTrack, wxT("Last"), 0, 0, 100);
|
S.OptionalN( bHasLastTrack ).Define( mLastTrack, wxT("Last"), 0, 0, 100);
|
||||||
S.DefineEnum( mMode, wxT("Mode"), 0, modes );
|
S.OptionalY( bHasMode ).DefineEnum( mMode, wxT("Mode"), 0, modes );
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -133,6 +134,7 @@ void SelectTracksCommand::PopulateOrExchange(ShuttleGui & S)
|
|||||||
S.EndMultiColumn();
|
S.EndMultiColumn();
|
||||||
S.StartMultiColumn(2, wxALIGN_CENTER);
|
S.StartMultiColumn(2, wxALIGN_CENTER);
|
||||||
{
|
{
|
||||||
|
// Always used, so no check box.
|
||||||
S.TieChoice( _("Mode:"), mMode, &modes);
|
S.TieChoice( _("Mode:"), mMode, &modes);
|
||||||
}
|
}
|
||||||
S.EndMultiColumn();
|
S.EndMultiColumn();
|
||||||
|
@ -45,6 +45,7 @@ public:
|
|||||||
|
|
||||||
bool bHasT0;
|
bool bHasT0;
|
||||||
bool bHasT1;
|
bool bHasT1;
|
||||||
|
bool bHasFromEnd;
|
||||||
|
|
||||||
double mT0;
|
double mT0;
|
||||||
double mT1;
|
double mT1;
|
||||||
@ -86,6 +87,7 @@ public:
|
|||||||
|
|
||||||
bool bHasFirstTrack;
|
bool bHasFirstTrack;
|
||||||
bool bHasLastTrack;
|
bool bHasLastTrack;
|
||||||
|
bool bHasMode;
|
||||||
|
|
||||||
int mFirstTrack;
|
int mFirstTrack;
|
||||||
int mLastTrack;
|
int mLastTrack;
|
||||||
|
@ -49,13 +49,13 @@ static const wxString kColourStrings[nColours] =
|
|||||||
|
|
||||||
bool SetClipCommand::DefineParams( ShuttleParams & S ){
|
bool SetClipCommand::DefineParams( ShuttleParams & S ){
|
||||||
wxArrayString colours( nColours, kColourStrings );
|
wxArrayString colours( nColours, kColourStrings );
|
||||||
S.Optional( bHasTrackIndex ).Define( mTrackIndex, wxT("Track"), 0, 0, 100 );
|
S.OptionalY( bHasTrackIndex ).Define( mTrackIndex, wxT("Track"), 0, 0, 100 );
|
||||||
S.Optional( bHasChannelIndex ).Define( mChannelIndex, wxT("Channel"), 0, 0, 100 );
|
S.OptionalN( bHasChannelIndex ).Define( mChannelIndex, wxT("Channel"), 0, 0, 100 );
|
||||||
S.Optional( bHasContainsTime ).Define( mContainsTime, wxT("At"), 0.0, 0.0, 100000.0 );
|
S.OptionalY( bHasContainsTime ).Define( mContainsTime, wxT("At"), 0.0, 0.0, 100000.0 );
|
||||||
S.Optional( bHasColour ).DefineEnum( mColour, wxT("Color"), kColour0, colours );
|
S.OptionalN( bHasColour ).DefineEnum( mColour, wxT("Color"), kColour0, colours );
|
||||||
// Allowing a negative start time is not a mistake.
|
// Allowing a negative start time is not a mistake.
|
||||||
// It will be used in demonstrating time before zero.
|
// It will be used in demonstrating time before zero.
|
||||||
S.Optional( bHasT0 ).Define( mT0, wxT("Start"), 0.0, -5.0, 1000000.0);
|
S.OptionalN( bHasT0 ).Define( mT0, wxT("Start"), 0.0, -5.0, 1000000.0);
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -32,12 +32,11 @@ SetEnvelopeCommand::SetEnvelopeCommand()
|
|||||||
|
|
||||||
|
|
||||||
bool SetEnvelopeCommand::DefineParams( ShuttleParams & S ){
|
bool SetEnvelopeCommand::DefineParams( ShuttleParams & S ){
|
||||||
S.Optional( bHasTrackIndex ).Define( mTrackIndex, wxT("Track"), 0, 0, 100 );
|
S.OptionalY( bHasTrackIndex ).Define( mTrackIndex, wxT("Track"), 0, 0, 100 );
|
||||||
S.Optional( bHasChannelIndex ).Define( mChannelIndex, wxT("Channel"), 0, 0, 100 );
|
S.OptionalN( bHasChannelIndex ).Define( mChannelIndex, wxT("Channel"), 0, 0, 100 );
|
||||||
S.Optional( bHasContainsTime ).Define( mContainsTime, wxT("At"), 0.0, 0.0, 100000.0 );
|
S.OptionalY( bHasT ).Define( mT, wxT("Time"), 0.0, 0.0, 100000.0);
|
||||||
S.Optional( bHasT ).Define( mT, wxT("Time"), 0.0, 0.0, 100000.0);
|
S.OptionalY( bHasV ).Define( mV, wxT("Value"), 0.0, 0.0, 2.0);
|
||||||
S.Optional( bHasV ).Define( mV, wxT("Value"), 0.0, 0.0, 2.0);
|
S.OptionalN( bHasDelete ).Define( mbDelete, wxT("Delete"), false );
|
||||||
S.Optional( bHasDelete ).Define( mbDelete, wxT("Delete"), false );
|
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -49,7 +48,6 @@ void SetEnvelopeCommand::PopulateOrExchange(ShuttleGui & S)
|
|||||||
{
|
{
|
||||||
S.Optional( bHasTrackIndex ).TieNumericTextBox( _("Track Index:"), mTrackIndex );
|
S.Optional( bHasTrackIndex ).TieNumericTextBox( _("Track Index:"), mTrackIndex );
|
||||||
S.Optional( bHasChannelIndex).TieNumericTextBox( _("Channel Index:"), mChannelIndex );
|
S.Optional( bHasChannelIndex).TieNumericTextBox( _("Channel Index:"), mChannelIndex );
|
||||||
S.Optional( bHasContainsTime).TieNumericTextBox( _("At:"), mContainsTime );
|
|
||||||
S.Optional( bHasT ).TieNumericTextBox( _("Time:"), mT );
|
S.Optional( bHasT ).TieNumericTextBox( _("Time:"), mT );
|
||||||
S.Optional( bHasV ).TieNumericTextBox( _("Value:"), mV );
|
S.Optional( bHasV ).TieNumericTextBox( _("Value:"), mV );
|
||||||
S.Optional( bHasDelete ).TieCheckBox( _("Delete:"), mbDelete );
|
S.Optional( bHasDelete ).TieCheckBox( _("Delete:"), mbDelete );
|
||||||
@ -85,9 +83,9 @@ bool SetEnvelopeCommand::Apply(const CommandContext & context)
|
|||||||
for(auto it = ptrs.begin(); (it != ptrs.end()); it++ ){
|
for(auto it = ptrs.begin(); (it != ptrs.end()); it++ ){
|
||||||
pClip = *it;
|
pClip = *it;
|
||||||
bFound =
|
bFound =
|
||||||
!bHasContainsTime || (
|
!bHasT || (
|
||||||
( pClip->GetStartTime() <= mContainsTime ) &&
|
( pClip->GetStartTime() <= mT) &&
|
||||||
( pClip->GetEndTime() >= mContainsTime )
|
( pClip->GetEndTime() >= mT )
|
||||||
);
|
);
|
||||||
if( bFound )
|
if( bFound )
|
||||||
{
|
{
|
||||||
|
@ -39,14 +39,12 @@ public:
|
|||||||
public:
|
public:
|
||||||
int mTrackIndex;
|
int mTrackIndex;
|
||||||
int mChannelIndex;
|
int mChannelIndex;
|
||||||
double mContainsTime;
|
|
||||||
double mT;
|
double mT;
|
||||||
double mV;
|
double mV;
|
||||||
bool mbDelete;
|
bool mbDelete;
|
||||||
|
|
||||||
bool bHasTrackIndex;
|
bool bHasTrackIndex;
|
||||||
bool bHasChannelIndex;
|
bool bHasChannelIndex;
|
||||||
bool bHasContainsTime;
|
|
||||||
bool bHasT;
|
bool bHasT;
|
||||||
bool bHasV;
|
bool bHasV;
|
||||||
bool bHasDelete;
|
bool bHasDelete;
|
||||||
|
@ -33,10 +33,10 @@ SetLabelCommand::SetLabelCommand()
|
|||||||
|
|
||||||
bool SetLabelCommand::DefineParams( ShuttleParams & S ){
|
bool SetLabelCommand::DefineParams( ShuttleParams & S ){
|
||||||
S.Define( mLabelIndex, wxT("Label"), 0, 0, 100 );
|
S.Define( mLabelIndex, wxT("Label"), 0, 0, 100 );
|
||||||
S.Optional( bHasText ).Define( mText, wxT("Text"), wxT("empty") );
|
S.OptionalY( bHasText ).Define( mText, wxT("Text"), wxT("empty") );
|
||||||
S.Optional( bHasT0 ).Define( mT0, wxT("Start"), 0.0, 0.0, 100000.0);
|
S.OptionalY( bHasT0 ).Define( mT0, wxT("Start"), 0.0, 0.0, 100000.0);
|
||||||
S.Optional( bHasT1 ).Define( mT1, wxT("End"), 0.0, 0.0, 100000.0);
|
S.OptionalY( bHasT1 ).Define( mT1, wxT("End"), 0.0, 0.0, 100000.0);
|
||||||
S.Optional( bHasSelected ).Define( mbSelected, wxT("Selected"), false );
|
S.OptionalN( bHasSelected ).Define( mbSelected, wxT("Selected"), false );
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -32,11 +32,11 @@ SetProjectCommand::SetProjectCommand()
|
|||||||
|
|
||||||
|
|
||||||
bool SetProjectCommand::DefineParams( ShuttleParams & S ){
|
bool SetProjectCommand::DefineParams( ShuttleParams & S ){
|
||||||
S.Optional( bHasName ).Define( mName, wxT("Name"), _("Project") );
|
S.OptionalN( bHasName ).Define( mName, wxT("Name"), _("Project") );
|
||||||
S.Optional( bHasSizing ).Define( mPosX, wxT("X"), 10.0, 0.0, 2000.0);
|
S.OptionalY( bHasSizing ).Define( mPosX, wxT("X"), 10.0, 0.0, 2000.0);
|
||||||
S.Optional( bHasSizing ).Define( mPosY, wxT("Y"), 10.0, 0.0, 2000.0);
|
S.OptionalY( bHasSizing ).Define( mPosY, wxT("Y"), 10.0, 0.0, 2000.0);
|
||||||
S.Optional( bHasSizing ).Define( mWidth, wxT("Width"), 1000.0, 200.0, 4000.0);
|
S.OptionalY( bHasSizing ).Define( mWidth, wxT("Width"), 1000.0, 200.0, 4000.0);
|
||||||
S.Optional( bHasSizing ).Define( mHeight, wxT("Height"), 900.0, 200.0, 4000.0);
|
S.OptionalY( bHasSizing ).Define( mHeight, wxT("Height"), 900.0, 200.0, 4000.0);
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -82,22 +82,22 @@ bool SetTrackCommand::DefineParams( ShuttleParams & S ){
|
|||||||
wxArrayString displays( nDisplayTypes, kDisplayTypeStrings );
|
wxArrayString displays( nDisplayTypes, kDisplayTypeStrings );
|
||||||
wxArrayString scales( nScaleTypes, kScaleTypeStrings );
|
wxArrayString scales( nScaleTypes, kScaleTypeStrings );
|
||||||
|
|
||||||
S.Optional( bHasTrackIndex ).Define( mTrackIndex, wxT("Track"), 0, 0, 100 );
|
S.OptionalY( bHasTrackIndex ).Define( mTrackIndex, wxT("Track"), 0, 0, 100 );
|
||||||
S.Optional( bHasChannelIndex ).Define( mChannelIndex, wxT("Channel"), 0, 0, 100 );
|
S.OptionalN( bHasChannelIndex ).Define( mChannelIndex, wxT("Channel"), 0, 0, 100 );
|
||||||
S.Optional( bHasTrackName ).Define( mTrackName, wxT("Name"), wxT("Unnamed") );
|
S.OptionalN( bHasTrackName ).Define( mTrackName, wxT("Name"), wxT("Unnamed") );
|
||||||
S.Optional( bHasPan ).Define( mPan, wxT("Pan"), 0.0, -1.0, 1.0);
|
S.OptionalN( bHasPan ).Define( mPan, wxT("Pan"), 0.0, -1.0, 1.0);
|
||||||
S.Optional( bHasGain ).Define( mGain, wxT("Gain"), 1.0, 0.0, 10.0);
|
S.OptionalN( bHasGain ).Define( mGain, wxT("Gain"), 1.0, 0.0, 10.0);
|
||||||
S.Optional( bHasHeight ).Define( mHeight, wxT("Height"), 120, 44, 700 );
|
S.OptionalN( bHasHeight ).Define( mHeight, wxT("Height"), 120, 44, 700 );
|
||||||
S.Optional( bHasDisplayType ).DefineEnum( mDisplayType, wxT("Display"), kWaveform, displays );
|
S.OptionalN( bHasDisplayType ).DefineEnum( mDisplayType, wxT("Display"), kWaveform, displays );
|
||||||
S.Optional( bHasScaleType ).DefineEnum( mScaleType, wxT("Scale"), kLinear, scales );
|
S.OptionalN( bHasScaleType ).DefineEnum( mScaleType, wxT("Scale"), kLinear, scales );
|
||||||
S.Optional( bHasColour ).DefineEnum( mColour, wxT("Color"), kColour0, colours );
|
S.OptionalN( bHasColour ).DefineEnum( mColour, wxT("Color"), kColour0, colours );
|
||||||
S.Optional( bHasSpectralSelect ).Define( bSpectralSelect, wxT("SpectralSel"),true );
|
S.OptionalN( bHasSpectralSelect ).Define( bSpectralSelect, wxT("SpectralSel"),true );
|
||||||
S.Optional( bHasGrayScale ).Define( bGrayScale, wxT("GrayScale"), false );
|
S.OptionalN( bHasGrayScale ).Define( bGrayScale, wxT("GrayScale"), false );
|
||||||
// There is also a select command. This is an alternative.
|
// There is also a select command. This is an alternative.
|
||||||
S.Optional( bHasSelected ).Define( bSelected, wxT("Selected"), false );
|
S.OptionalN( bHasSelected ).Define( bSelected, wxT("Selected"), false );
|
||||||
S.Optional( bHasFocused ).Define( bFocused, wxT("Focused"), false );
|
S.OptionalN( bHasFocused ).Define( bFocused, wxT("Focused"), false );
|
||||||
S.Optional( bHasSolo ).Define( bSolo, wxT("Solo"), false );
|
S.OptionalN( bHasSolo ).Define( bSolo, wxT("Solo"), false );
|
||||||
S.Optional( bHasMute ).Define( bMute, wxT("Mute"), false );
|
S.OptionalN( bHasMute ).Define( bMute, wxT("Mute"), false );
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2636,7 +2636,7 @@ void AdornedRulerPanel::HandleQPDrag(wxMouseEvent &/*event*/, wxCoord mousePosX)
|
|||||||
case mesDraggingPlayRegionStart:
|
case mesDraggingPlayRegionStart:
|
||||||
HideQuickPlayIndicator();
|
HideQuickPlayIndicator();
|
||||||
|
|
||||||
// Don't start dragging until beyond tollerance initial playback start
|
// Don't start dragging until beyond tolerance initial playback start
|
||||||
if (!mIsDragging && isWithinStart)
|
if (!mIsDragging && isWithinStart)
|
||||||
mQuickPlayPos = mOldPlayRegionStart;
|
mQuickPlayPos = mOldPlayRegionStart;
|
||||||
else
|
else
|
||||||
|
@ -141,6 +141,7 @@
|
|||||||
<ClCompile Include="..\..\..\src\commands\CommandContext.cpp" />
|
<ClCompile Include="..\..\..\src\commands\CommandContext.cpp" />
|
||||||
<ClCompile Include="..\..\..\src\commands\CommandTargets.cpp" />
|
<ClCompile Include="..\..\..\src\commands\CommandTargets.cpp" />
|
||||||
<ClCompile Include="..\..\..\src\commands\Demo.cpp" />
|
<ClCompile Include="..\..\..\src\commands\Demo.cpp" />
|
||||||
|
<ClCompile Include="..\..\..\src\commands\DragCommand.cpp" />
|
||||||
<ClCompile Include="..\..\..\src\commands\LoadCommands.cpp" />
|
<ClCompile Include="..\..\..\src\commands\LoadCommands.cpp" />
|
||||||
<ClCompile Include="..\..\..\src\commands\OpenSaveCommands.cpp" />
|
<ClCompile Include="..\..\..\src\commands\OpenSaveCommands.cpp" />
|
||||||
<ClCompile Include="..\..\..\src\commands\SetClipCommand.cpp" />
|
<ClCompile Include="..\..\..\src\commands\SetClipCommand.cpp" />
|
||||||
@ -483,6 +484,7 @@
|
|||||||
<ClInclude Include="..\..\..\src\commands\CommandFlag.h" />
|
<ClInclude Include="..\..\..\src\commands\CommandFlag.h" />
|
||||||
<ClInclude Include="..\..\..\src\commands\CommandFunctors.h" />
|
<ClInclude Include="..\..\..\src\commands\CommandFunctors.h" />
|
||||||
<ClInclude Include="..\..\..\src\commands\Demo.h" />
|
<ClInclude Include="..\..\..\src\commands\Demo.h" />
|
||||||
|
<ClInclude Include="..\..\..\src\commands\DragCommand.h" />
|
||||||
<ClInclude Include="..\..\..\src\commands\LoadCommands.h" />
|
<ClInclude Include="..\..\..\src\commands\LoadCommands.h" />
|
||||||
<ClInclude Include="..\..\..\src\commands\OpenSaveCommands.h" />
|
<ClInclude Include="..\..\..\src\commands\OpenSaveCommands.h" />
|
||||||
<ClInclude Include="..\..\..\src\commands\SetClipCommand.h" />
|
<ClInclude Include="..\..\..\src\commands\SetClipCommand.h" />
|
||||||
|
@ -1076,6 +1076,9 @@
|
|||||||
<ClCompile Include="..\..\..\src\commands\SetEnvelopeCommand.cpp">
|
<ClCompile Include="..\..\..\src\commands\SetEnvelopeCommand.cpp">
|
||||||
<Filter>src\commands</Filter>
|
<Filter>src\commands</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\..\src\commands\DragCommand.cpp">
|
||||||
|
<Filter>src\commands</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="..\..\..\src\AboutDialog.h">
|
<ClInclude Include="..\..\..\src\AboutDialog.h">
|
||||||
@ -2146,6 +2149,9 @@
|
|||||||
<ClInclude Include="..\..\..\src\commands\SetEnvelopeCommand.h">
|
<ClInclude Include="..\..\..\src\commands\SetEnvelopeCommand.h">
|
||||||
<Filter>src\commands</Filter>
|
<Filter>src\commands</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\..\src\commands\DragCommand.h">
|
||||||
|
<Filter>src\commands</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Image Include="..\..\audacity.ico">
|
<Image Include="..\..\audacity.ico">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user