Audacity 3.2.0
ExportProgressUI.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 ExportProgressUI.h
6
7 Vitaly Sverchinsky
8
9**********************************************************************/
10
11#pragma once
12
13#include <future>
14
15#include "Export.h"
16#include "ExportTypes.h"
17#include "BasicUI.h"
18#include "ExportPlugin.h"
19#include "wxFileNameWrapper.h"
20
22class Exporter;
23
25{
26IMPORT_EXPORT_API ExportResult Show(ExportTask exportTask);
27
28template <typename Callable>
30{
31 try
32 {
33 callable();
34 }
35 catch (ExportDiskFullError& e)
36 {
38 }
39 catch (ExportErrorException& e)
40 {
42 e.GetMessage(), XO("Warning"), e.GetHelpPageId(), true);
43 }
44 catch (ExportException& e)
45 {
47 }
48 catch (...)
49 {
50 BasicUI::ShowMessageBox(XO("Export error"));
51 }
52}
53
54} // namespace ExportProgressUI
Toolkit-neutral facade for basic user interface services.
void ShowDiskFullExportErrorDialog(const wxFileNameWrapper &fileName)
Definition: Export.cpp:135
void ShowExportErrorDialog(const TranslatableString &message, const TranslatableString &caption, bool allowReporting)
Definition: Export.cpp:144
std::packaged_task< ExportResult(ExportProcessorDelegate &)> ExportTask
Definition: ExportTypes.h:31
ExportResult
Definition: ExportTypes.h:24
XO("Cut/Copy/Paste")
const wxFileNameWrapper & GetFileName() const noexcept
Holds a msgid for the translation catalog; may also bind format arguments.
MessageBoxResult ShowMessageBox(const TranslatableString &message, MessageBoxOptions options={})
Show a modal message box with either Ok or Yes and No, and optionally Cancel.
Definition: BasicUI.h:279
IMPORT_EXPORT_API ExportResult Show(ExportTask exportTask)
void ExceptionWrappedCall(Callable callable)