Audacity
3.2.0
src
commands
ImportExportCommands.h
Go to the documentation of this file.
1
/**********************************************************************
2
3
Audacity: A Digital Audio Editor
4
Audacity(R) is copyright (c) 1999-2018 Audacity Team.
5
File License: wxwidgets
6
7
ImportExportCommands.h
8
Dan Horgan
9
James Crook
10
11
******************************************************************/
/*******************************************************************/
20
21
#include "
Command.h
"
22
#include "
CommandType.h
"
23
24
// Import
25
26
class
ImportCommand
:
public
AudacityCommand
27
{
28
public
:
29
static
const
ComponentInterfaceSymbol
Symbol
;
30
31
// ComponentInterface overrides
32
ComponentInterfaceSymbol
GetSymbol
()
const override
{
return
Symbol
;};
33
TranslatableString
GetDescription
()
const override
{
return
XO
(
"Imports from a file."
);};
34
template
<
bool
Const>
bool
VisitSettings
(
SettingsVisitorBase<Const>
&
S
);
35
bool
VisitSettings
(
SettingsVisitor
&
S
)
override
;
36
bool
VisitSettings
(
ConstSettingsVisitor
&
S
)
override
;
37
void
PopulateOrExchange
(
ShuttleGui
&
S
)
override
;
38
bool
Apply
(
const
CommandContext
& context)
override
;
39
40
// AudacityCommand overrides
41
ManualPageID
ManualPage
()
override
{
return
L
"Extra_Menu:_Scriptables_II#import"
;}
42
public
:
43
wxString
mFileName
;
44
};
45
46
class
ExportCommand
:
public
AudacityCommand
47
{
48
public
:
49
static
const
ComponentInterfaceSymbol
Symbol
;
50
51
// ComponentInterface overrides
52
ComponentInterfaceSymbol
GetSymbol
()
const override
{
return
Symbol
;};
53
TranslatableString
GetDescription
()
const override
{
return
XO
(
"Exports to a file."
);};
54
template
<
bool
Const>
bool
VisitSettings
(
SettingsVisitorBase<Const>
&
S
);
55
bool
VisitSettings
(
SettingsVisitor
&
S
)
override
;
56
bool
VisitSettings
(
ConstSettingsVisitor
&
S
)
override
;
57
void
PopulateOrExchange
(
ShuttleGui
&
S
)
override
;
58
bool
Apply
(
const
CommandContext
& context)
override
;
59
60
// AudacityCommand overrides
61
ManualPageID
ManualPage
()
override
{
return
L
"Extra_Menu:_Scriptables_II#export"
;}
62
public
:
63
wxString
mFileName
;
64
int
mnChannels
;
65
};
Command.h
Contains declaration of Command base class.
CommandType.h
Contains declarations for CommandType class.
XO
XO("Cut/Copy/Paste")
S
#define S(N)
Definition:
ToChars.cpp:64
AudacityCommand
Base class for command in Audacity.
Definition:
AudacityCommand.h:40
CommandContext
CommandContext provides additional information to an 'Apply()' command. It provides the project,...
Definition:
CommandContext.h:37
ComponentInterfaceSymbol
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
Definition:
ComponentInterfaceSymbol.h:27
ExportCommand
Command for exporting audio.
Definition:
ImportExportCommands.h:47
ExportCommand::Symbol
static const ComponentInterfaceSymbol Symbol
Definition:
ImportExportCommands.h:49
ExportCommand::mnChannels
int mnChannels
Definition:
ImportExportCommands.h:64
ExportCommand::GetSymbol
ComponentInterfaceSymbol GetSymbol() const override
Definition:
ImportExportCommands.h:52
ExportCommand::mFileName
wxString mFileName
Definition:
ImportExportCommands.h:63
ExportCommand::Apply
bool Apply(const CommandContext &context) override
Definition:
ImportExportCommands.cpp:111
ExportCommand::PopulateOrExchange
void PopulateOrExchange(ShuttleGui &S) override
Definition:
ImportExportCommands.cpp:99
ExportCommand::GetDescription
TranslatableString GetDescription() const override
Definition:
ImportExportCommands.h:53
ExportCommand::ManualPage
ManualPageID ManualPage() override
Definition:
ImportExportCommands.h:61
ExportCommand::VisitSettings
bool VisitSettings(SettingsVisitorBase< Const > &S)
Definition:
ImportExportCommands.cpp:80
ImportCommand
Command for importing audio.
Definition:
ImportExportCommands.h:27
ImportCommand::mFileName
wxString mFileName
Definition:
ImportExportCommands.h:43
ImportCommand::Apply
bool Apply(const CommandContext &context) override
Definition:
ImportExportCommands.cpp:67
ImportCommand::ManualPage
ManualPageID ManualPage() override
Definition:
ImportExportCommands.h:41
ImportCommand::VisitSettings
bool VisitSettings(SettingsVisitorBase< Const > &S)
Definition:
ImportExportCommands.cpp:45
ImportCommand::PopulateOrExchange
void PopulateOrExchange(ShuttleGui &S) override
Definition:
ImportExportCommands.cpp:56
ImportCommand::GetSymbol
ComponentInterfaceSymbol GetSymbol() const override
Definition:
ImportExportCommands.h:32
ImportCommand::Symbol
static const ComponentInterfaceSymbol Symbol
Definition:
ImportExportCommands.h:29
ImportCommand::GetDescription
TranslatableString GetDescription() const override
Definition:
ImportExportCommands.h:33
SettingsVisitorBase
Visitor of effect or command parameters. This is a base class with lots of virtual functions that do ...
Definition:
SettingsVisitor.h:79
ShuttleGui
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition:
ShuttleGui.h:640
TaggedIdentifier< ManualPageIDTag >
TranslatableString
Holds a msgid for the translation catalog; may also bind format arguments.
Definition:
TranslatableString.h:32
Generated by
1.9.3