Audacity 3.2.0
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 "../Shuttle.h"
24#include "../ShuttleGui.h"
25#include "CommandContext.h"
26
28{ XO("Get Track Info") };
29
30// GET_TRACK_INFO subsumed by GET_INFO
31// namespace{ BuiltinCommandsModule::Registration< GetTrackInfoCommand > reg; }
32
33const int nTypes =3;
35{
36 { XO("Tracks") },
37 { XO("Clips") },
38 { XO("Labels") },
39};
40
41
43{
44 mInfoType = 0;
45}
46
47template<bool Const>
49 S.DefineEnum( mInfoType, wxT("Type"), 0, kTypes, nTypes );
50
51 return true;
52}
53
55 { return VisitSettings<false>(S); }
56
58 { return VisitSettings<true>(S); }
59
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
74{
75 return false;
76}
static const EnumValueSymbol kTypes[nTypes]
const int nTypes
Declarations of GetTrackInfoCommand and GetTrackInfoCommandType classes.
#define XXO(s)
Definition: Internat.h:44
#define XO(s)
Definition: Internat.h:31
TranslatableStrings Msgids(const EnumValueSymbol strings[], size_t nStrings)
Convenience function often useful when adding choice controls.
#define S(N)
Definition: ToChars.cpp:64
CommandContext provides additional information to an 'Apply()' command. It provides the project,...
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
static const ComponentInterfaceSymbol Symbol
bool Apply(const CommandContext &context) override
bool VisitSettings(SettingsVisitorBase< Const > &S)
void PopulateOrExchange(ShuttleGui &S) override
Visitor of effect or command parameters. This is a base class with lots of virtual functions that do ...
Definition: Shuttle.h:115
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:631