Audacity
3.2.0
src
commands
GetTrackInfoCommand.cpp
Go to the documentation of this file.
1
/**********************************************************************
2
3
Audacity - A Digital Audio Editor
4
Copyright 1999-2009 Audacity Team
5
License: wxwidgets
6
7
Dan Horgan
8
Marty Goddard
9
******************************************************************/
/*******************************************************************/
18
19
20
#include "
GetTrackInfoCommand.h
"
21
22
#include "
LoadCommands.h
"
23
#include "
SettingsVisitor.h
"
24
#include "
ShuttleGui.h
"
25
#include "
CommandContext.h
"
26
27
const
ComponentInterfaceSymbol
GetTrackInfoCommand::Symbol
28
{
XO
(
"Get Track Info"
) };
29
30
// GET_TRACK_INFO subsumed by GET_INFO
31
// namespace{ BuiltinCommandsModule::Registration< GetTrackInfoCommand > reg; }
32
33
const
int
nTypes
=3;
34
static
const
EnumValueSymbol
kTypes
[
nTypes
] =
35
{
36
{
XO
(
"Tracks"
) },
37
{
XO
(
"Clips"
) },
38
{
XO
(
"Labels"
) },
39
};
40
41
42
GetTrackInfoCommand::GetTrackInfoCommand
()
43
{
44
mInfoType
= 0;
45
}
46
47
template
<
bool
Const>
48
bool
GetTrackInfoCommand::VisitSettings
(
SettingsVisitorBase<Const>
&
S
){
49
S
.DefineEnum(
mInfoType
,
wxT
(
"Type"
), 0,
kTypes
,
nTypes
);
50
51
return
true
;
52
}
53
54
bool
GetTrackInfoCommand::VisitSettings
(
SettingsVisitor
&
S
)
55
{
return
VisitSettings<false>(
S
); }
56
57
bool
GetTrackInfoCommand::VisitSettings
(
ConstSettingsVisitor
&
S
)
58
{
return
VisitSettings<true>(
S
); }
59
60
void
GetTrackInfoCommand::PopulateOrExchange
(
ShuttleGui
&
S
)
61
{
62
S
.AddSpace(0, 5);
63
64
S
.StartMultiColumn(2, wxALIGN_CENTER);
65
{
66
S
.TieChoice(
XXO
(
"Types:"
),
mInfoType
,
Msgids
(
kTypes
,
nTypes
));
67
}
68
S
.EndMultiColumn();
69
}
70
71
72
73
bool
GetTrackInfoCommand::Apply
(
const
CommandContext
&context)
74
{
75
return
false
;
76
}
wxT
wxT("CloseDown"))
CommandContext.h
XO
XO("Cut/Copy/Paste")
XXO
XXO("&Cut/Copy/Paste Toolbar")
kTypes
static const EnumValueSymbol kTypes[nTypes]
Definition:
GetTrackInfoCommand.cpp:34
nTypes
const int nTypes
Definition:
GetTrackInfoCommand.cpp:33
GetTrackInfoCommand.h
Declarations of GetTrackInfoCommand and GetTrackInfoCommandType classes.
LoadCommands.h
SettingsVisitor.h
Msgids
TranslatableStrings Msgids(const EnumValueSymbol strings[], size_t nStrings)
Convenience function often useful when adding choice controls.
Definition:
ShuttleGui.cpp:2587
ShuttleGui.h
S
#define S(N)
Definition:
ToChars.cpp:64
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
GetTrackInfoCommand::Symbol
static const ComponentInterfaceSymbol Symbol
Definition:
GetTrackInfoCommand.h:25
GetTrackInfoCommand::Apply
bool Apply(const CommandContext &context) override
Definition:
GetTrackInfoCommand.cpp:73
GetTrackInfoCommand::GetTrackInfoCommand
GetTrackInfoCommand()
Definition:
GetTrackInfoCommand.cpp:42
GetTrackInfoCommand::mInfoType
int mInfoType
Definition:
GetTrackInfoCommand.h:41
GetTrackInfoCommand::VisitSettings
bool VisitSettings(SettingsVisitorBase< Const > &S)
Definition:
GetTrackInfoCommand.cpp:48
GetTrackInfoCommand::PopulateOrExchange
void PopulateOrExchange(ShuttleGui &S) override
Definition:
GetTrackInfoCommand.cpp:60
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
Generated by
1.9.3