Audacity  3.0.3
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 
33 const int nTypes =3;
34 static const EnumValueSymbol kTypes[nTypes] =
35 {
36  { XO("Tracks") },
37  { XO("Clips") },
38  { XO("Labels") },
39 };
40 
41 
43 {
44  mInfoType = 0;
45 }
46 
48  S.DefineEnum( mInfoType, wxT("Type"), 0, kTypes, nTypes );
49 
50  return true;
51 }
52 
54 {
55  S.AddSpace(0, 5);
56 
57  S.StartMultiColumn(2, wxALIGN_CENTER);
58  {
59  S.TieChoice( XXO("Types:"), mInfoType, Msgids( kTypes, nTypes ));
60  }
61  S.EndMultiColumn();
62 }
63 
64 
65 
67 {
68  return false;
69 }
GetTrackInfoCommand::mInfoType
int mInfoType
Definition: GetTrackInfoCommand.h:39
GetTrackInfoCommand.h
Declarations of GetTrackInfoCommand and GetTrackInfoCommandType classes.
LoadCommands.h
GetTrackInfoCommand::GetTrackInfoCommand
GetTrackInfoCommand()
Definition: GetTrackInfoCommand.cpp:42
ShuttleGui::AddSpace
wxSizerItem * AddSpace(int width, int height, int prop=0)
Definition: ShuttleGui.cpp:2447
XO
#define XO(s)
Definition: Internat.h:31
ShuttleParams
Shuttle that deals with parameters. This is a base class with lots of virtual functions that do nothi...
Definition: Shuttle.h:62
GetTrackInfoCommand::DefineParams
bool DefineParams(ShuttleParams &S) override
Definition: GetTrackInfoCommand.cpp:47
ShuttleGuiBase::EndMultiColumn
void EndMultiColumn()
Definition: ShuttleGui.cpp:1238
nTypes
const int nTypes
Definition: GetTrackInfoCommand.cpp:33
ComponentInterfaceSymbol
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
Definition: ComponentInterfaceSymbol.h:27
GetTrackInfoCommand::PopulateOrExchange
void PopulateOrExchange(ShuttleGui &S) override
Definition: GetTrackInfoCommand.cpp:53
CommandContext.h
XXO
#define XXO(s)
Definition: Internat.h:44
CommandContext
CommandContext provides additional information to an 'Apply()' command. It provides the project,...
Definition: CommandContext.h:22
ShuttleGuiBase::StartMultiColumn
void StartMultiColumn(int nCols, int PositionFlags=wxALIGN_LEFT)
Definition: ShuttleGui.cpp:1229
ShuttleParams::DefineEnum
virtual void DefineEnum(int &var, const wxChar *key, const int vdefault, const EnumValueSymbol strings[], size_t nStrings)
Definition: Shuttle.cpp:339
Msgids
TranslatableStrings Msgids(const EnumValueSymbol strings[], size_t nStrings)
Convenience function often useful when adding choice controls.
Definition: ShuttleGui.cpp:2510
GetTrackInfoCommand::Apply
bool Apply(const CommandContext &context) override
Definition: GetTrackInfoCommand.cpp:66
kTypes
kTypes
Definition: Noise.cpp:34
ShuttleGuiBase::TieChoice
wxChoice * TieChoice(const TranslatableString &Prompt, TranslatableString &Selected, const TranslatableStrings &choices)
Definition: ShuttleGui.cpp:1727
ShuttleGui
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:631
GetTrackInfoCommand::Symbol
static const ComponentInterfaceSymbol Symbol
Definition: GetTrackInfoCommand.h:25