Audacity
3.2.0
src
commands
SetLabelCommand.h
Go to the documentation of this file.
1
/**********************************************************************
2
3
Audacity - A Digital Audio Editor
4
Copyright 1999-2018 Audacity Team
5
License: wxwidgets
6
7
James Crook
8
9
******************************************************************/
/*******************************************************************/
15
16
#ifndef __SET_LABEL_COMMAND__
17
#define __SET_LABEL_COMMAND__
18
19
#include "
Command.h
"
20
#include "
CommandType.h
"
21
22
class
SetLabelCommand
:
public
AudacityCommand
23
{
24
public
:
25
static
const
ComponentInterfaceSymbol
Symbol
;
26
27
SetLabelCommand
();
28
// ComponentInterface overrides
29
ComponentInterfaceSymbol
GetSymbol
()
const override
{
return
Symbol
;};
30
TranslatableString
GetDescription
()
const override
{
return
XO
(
"Sets various values for a label."
);};
31
template
<
bool
Const>
bool
VisitSettings
(
SettingsVisitorBase<Const>
&
S
);
32
bool
VisitSettings
(
SettingsVisitor
&
S
)
override
;
33
bool
VisitSettings
(
ConstSettingsVisitor
&
S
)
override
;
34
void
PopulateOrExchange
(
ShuttleGui
&
S
)
override
;
35
36
// AudacityCommand overrides
37
ManualPageID
ManualPage
()
override
{
return
L
"Extra_Menu:_Scriptables_I#set_label"
;}
38
39
bool
Apply
(
const
CommandContext
& context)
override
;
40
41
public
:
42
// zero-based index of the desired label, within the concatenation of the
43
// arrays of labels of all label tracks
44
int
mLabelIndex
;
45
wxString
mText
;
46
double
mT0
;
47
double
mT1
;
48
bool
mbSelected
;
49
50
// For tracking optional parameters.
51
bool
bHasText
;
52
bool
bHasT0
;
53
bool
bHasT1
;
54
bool
bHasSelected
;
55
};
56
57
58
#endif
/* End of include guard: __SETTRACKINFOCOMMAND__ */
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
SetLabelCommand
Command that sets label information.
Definition:
SetLabelCommand.h:23
SetLabelCommand::GetSymbol
ComponentInterfaceSymbol GetSymbol() const override
Definition:
SetLabelCommand.h:29
SetLabelCommand::mT0
double mT0
Definition:
SetLabelCommand.h:46
SetLabelCommand::bHasT0
bool bHasT0
Definition:
SetLabelCommand.h:52
SetLabelCommand::SetLabelCommand
SetLabelCommand()
Definition:
SetLabelCommand.cpp:40
SetLabelCommand::mbSelected
bool mbSelected
Definition:
SetLabelCommand.h:48
SetLabelCommand::bHasT1
bool bHasT1
Definition:
SetLabelCommand.h:53
SetLabelCommand::GetDescription
TranslatableString GetDescription() const override
Definition:
SetLabelCommand.h:30
SetLabelCommand::ManualPage
ManualPageID ManualPage() override
Definition:
SetLabelCommand.h:37
SetLabelCommand::Apply
bool Apply(const CommandContext &context) override
Definition:
SetLabelCommand.cpp:79
SetLabelCommand::bHasText
bool bHasText
Definition:
SetLabelCommand.h:51
SetLabelCommand::VisitSettings
bool VisitSettings(SettingsVisitorBase< Const > &S)
Definition:
SetLabelCommand.cpp:45
SetLabelCommand::mLabelIndex
int mLabelIndex
Definition:
SetLabelCommand.h:44
SetLabelCommand::mT1
double mT1
Definition:
SetLabelCommand.h:47
SetLabelCommand::bHasSelected
bool bHasSelected
Definition:
SetLabelCommand.h:54
SetLabelCommand::PopulateOrExchange
void PopulateOrExchange(ShuttleGui &S) override
Definition:
SetLabelCommand.cpp:60
SetLabelCommand::mText
wxString mText
Definition:
SetLabelCommand.h:45
SetLabelCommand::Symbol
static const ComponentInterfaceSymbol Symbol
Definition:
SetLabelCommand.h:25
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