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

Functions

void OnSaveToCloud (const CommandContext &context)
 
void OnOpenFromCloud (const CommandContext &context)
 
void OnUpdateMixdown (const CommandContext &context)
 
void OnShareAudio (const CommandContext &context)
 
const ReservedCommandFlagIsCloudProjectFlag ()
 

Variables

AttachedItem sSaveAttachment
 
AttachedItem sMixdownAttachment
 
AttachedItem sOpenAttachment
 
AttachedItem sShareAttachment
 

Detailed Description


Audacity: A Digital Audio Editor

AudioComMenus.cpp

Dmitry Vedenko

Function Documentation

◆ IsCloudProjectFlag()

const ReservedCommandFlag & anonymous_namespace{AudioComMenus.cpp}::IsCloudProjectFlag ( )

Definition at line 75 of file AudioComMenus.cpp.

76{
78 [](const AudacityProject& project)
79 { return ProjectCloudExtension::Get(project).IsCloudProject(); },
81 return XO("Previews can be updated only for Cloud projects");
82 } }.QuickTest()
83 .Priority(1)
84 };
85 return flag;
86}
XO("Cut/Copy/Paste")
const auto project
static std::once_flag flag
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:90
Holds a msgid for the translation catalog; may also bind format arguments.
Services * Get()
Fetch the global instance, or nullptr if none is yet installed.
Definition: BasicUI.cpp:202

References flag, BasicUI::Get(), project, and XO().

Here is the call graph for this function:

◆ OnOpenFromCloud()

void anonymous_namespace{AudioComMenus.cpp}::OnOpenFromCloud ( const CommandContext context)

Definition at line 39 of file AudioComMenus.cpp.

40{
42 &context.project };
43
44 dialog.ShowModal();
45}
AudacityProject & project
static ProjectWindow * Find(AudacityProject *pProject)

References ProjectWindow::Find(), and CommandContext::project.

Here is the call graph for this function:

◆ OnSaveToCloud()

void anonymous_namespace{AudioComMenus.cpp}::OnSaveToCloud ( const CommandContext context)

Definition at line 34 of file AudioComMenus.cpp.

35{
36 SaveToCloud(context.project, UploadMode::Normal);
37}
void SaveToCloud(AudacityProject &project, UploadMode mode, CreateSnapshotCallback snapshotCallback)

References CommandContext::project, and audacity::cloud::audiocom::sync::SaveToCloud().

Here is the call graph for this function:

◆ OnShareAudio()

void anonymous_namespace{AudioComMenus.cpp}::OnShareAudio ( const CommandContext context)

Definition at line 64 of file AudioComMenus.cpp.

65{
66 ShareAudioDialog dialog {
67 context.project,
70 };
71
72 dialog.ShowModal();
73}

References ProjectWindow::Find(), CommandContext::project, and ShareAudioMenu.

Here is the call graph for this function:

◆ OnUpdateMixdown()

void anonymous_namespace{AudioComMenus.cpp}::OnUpdateMixdown ( const CommandContext context)

Definition at line 47 of file AudioComMenus.cpp.

48{
50 context.project,
51 [](auto& project, auto state)
52 {
53 if (state != MixdownState::Succeeded)
54 return;
55
56 auto& projectCloudExtension = ProjectCloudExtension::Get(project);
57
58 BasicUI::OpenInDefaultBrowser(
59 projectCloudExtension.GetCloudProjectPage(
60 AudiocomTrace::UpdateCloudAudioPreviewMenu));
61 });
62}
void UploadMixdown(AudacityProject &project, std::function< void(AudacityProject &, MixdownState)> onComplete)

References CommandContext::project, project, and audacity::cloud::audiocom::sync::UploadMixdown().

Here is the call graph for this function:

Variable Documentation

◆ sMixdownAttachment

AttachedItem anonymous_namespace{AudioComMenus.cpp}::sMixdownAttachment
Initial value:
wxT("UpdateMixdown"),
XXO("&Update Cloud Audio Preview"),
wxT("File/Save") }
wxT("CloseDown"))
XXO("&Cut/Copy/Paste Toolbar")
constexpr auto Command
Definition: MenuRegistry.h:456
const ReservedCommandFlag & IsCloudProjectFlag()
void OnUpdateMixdown(const CommandContext &context)

Definition at line 95 of file AudioComMenus.cpp.

◆ sOpenAttachment

AttachedItem anonymous_namespace{AudioComMenus.cpp}::sOpenAttachment
Initial value:
wxT("OpenFromCloud"),
XXO("Open Fro&m Cloud..."), OnOpenFromCloud,
wxT("File/Basic") }
constexpr CommandFlag AlwaysEnabledFlag
Definition: CommandFlag.h:34
void OnOpenFromCloud(const CommandContext &context)

Definition at line 101 of file AudioComMenus.cpp.

◆ sSaveAttachment

AttachedItem anonymous_namespace{AudioComMenus.cpp}::sSaveAttachment
Initial value:
wxT("SaveToCloud"), XXO("Save &To Cloud..."),
wxT("File/Save") }
void OnSaveToCloud(const CommandContext &context)

Definition at line 90 of file AudioComMenus.cpp.

◆ sShareAttachment

AttachedItem anonymous_namespace{AudioComMenus.cpp}::sShareAttachment
Initial value:
wxT("ShareAudio"), XXO("S&hare Audio..."),
wxT("File/Import-Export") }
const ReservedCommandFlag & WaveTracksExistFlag()
void OnShareAudio(const CommandContext &context)

Definition at line 107 of file AudioComMenus.cpp.