Audacity 3.2.0
Functions | Variables
anonymous_namespace{TimelineMenus.cpp} Namespace Reference

Functions

void SetTimeDisplayMode (const CommandContext &context, TimeDisplayMode type)
 
void OnSetMinutesSeconds (const CommandContext &context)
 
void OnSetBeatsAndMeasures (const CommandContext &context)
 
TimeDisplayMode GetTimeDisplayMode (const AudacityProject &project)
 
auto ExtraSelectionMenu ()
 

Variables

AttachedItem sAttachment2
 

Detailed Description


Audacity: A Digital Audio Editor

TimelineMenus.cpp

Dmitry Vedenko

Function Documentation

◆ ExtraSelectionMenu()

auto anonymous_namespace{TimelineMenus.cpp}::ExtraSelectionMenu ( )

Definition at line 48 of file TimelineMenus.cpp.

49{
50 static auto menu = std::shared_ptr{ Menu(
51 wxT("Timeline"), XXO("Tim&eline"),
52 Command(
53 wxT("MinutesAndSeconds"), XXO("Minutes and Seconds"),
56 [](const AudacityProject& project) {
59 })),
60 Command(
61 wxT("BeatsAndMeasures"), XXO("Beats and Measures"),
64 [](const AudacityProject& project) {
67 }))) };
68 return menu;
69}
wxT("CloseDown"))
constexpr CommandFlag AlwaysEnabledFlag
Definition: CommandFlag.h:34
XXO("&Cut/Copy/Paste Toolbar")
const auto project
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:90
constexpr auto Command
Definition: MenuRegistry.h:456
constexpr auto Menu
Items will appear in a main toolbar menu or in a sub-menu.
Definition: MenuRegistry.h:445
void OnSetBeatsAndMeasures(const CommandContext &context)
TimeDisplayMode GetTimeDisplayMode(const AudacityProject &project)
void OnSetMinutesSeconds(const CommandContext &context)
Options && CheckTest(const CheckFn &fn) &&
Definition: MenuRegistry.h:74

References AlwaysEnabledFlag, BeatsAndMeasures, MenuRegistry::Options::CheckTest(), MenuRegistry::Command, GetTimeDisplayMode(), MenuRegistry::Menu, MinutesAndSeconds, OnSetBeatsAndMeasures(), OnSetMinutesSeconds(), project, wxT(), and XXO().

Here is the call graph for this function:

◆ GetTimeDisplayMode()

TimeDisplayMode anonymous_namespace{TimelineMenus.cpp}::GetTimeDisplayMode ( const AudacityProject project)

Definition at line 40 of file TimelineMenus.cpp.

41{
42 auto& panel = AdornedRulerPanel::Get(project);
43 return panel.GetTimeDisplayMode();
44}
static AdornedRulerPanel & Get(AudacityProject &project)

References AdornedRulerPanel::Get(), and project.

Referenced by ExtraSelectionMenu().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnSetBeatsAndMeasures()

void anonymous_namespace{TimelineMenus.cpp}::OnSetBeatsAndMeasures ( const CommandContext context)

Definition at line 35 of file TimelineMenus.cpp.

36{
38}
void SetTimeDisplayMode(const CommandContext &context, TimeDisplayMode type)

References BeatsAndMeasures, and SetTimeDisplayMode().

Referenced by ExtraSelectionMenu().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnSetMinutesSeconds()

void anonymous_namespace{TimelineMenus.cpp}::OnSetMinutesSeconds ( const CommandContext context)

Definition at line 30 of file TimelineMenus.cpp.

References MinutesAndSeconds, and SetTimeDisplayMode().

Referenced by ExtraSelectionMenu().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetTimeDisplayMode()

void anonymous_namespace{TimelineMenus.cpp}::SetTimeDisplayMode ( const CommandContext context,
TimeDisplayMode  type 
)

Definition at line 20 of file TimelineMenus.cpp.

21{
22 auto& project = context.project;
23
25 ruler.SetTimeDisplayMode(type);
26
28}
AudacityProject & project
static CommandManager & Get(AudacityProject &project)

References CommandManager::Get(), AdornedRulerPanel::Get(), CommandContext::project, project, anonymous_namespace{TimeTrackVRulerControls.cpp}::ruler(), and CommandManager::UpdateCheckmarks().

Referenced by OnSetBeatsAndMeasures(), and OnSetMinutesSeconds().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ sAttachment2

AttachedItem anonymous_namespace{TimelineMenus.cpp}::sAttachment2
Initial value:
wxT("View/Other/Toolbars") }
std::unique_ptr< detail::IndirectItem< Item > > Indirect(const std::shared_ptr< Item > &ptr)
A convenience function.
Definition: Registry.h:175

Definition at line 71 of file TimelineMenus.cpp.