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{
26 ExportResult Show(ExportTask exportTask);
27
28 template<typename Callable>
30 {
31 try
32 {
33 callable();
34 }
35 catch(ExportDiskFullError& e)
36 {
38 }
39 catch(ExportErrorException& e)
40 {
41 ShowExportErrorDialog(e.GetMessage(),
42 XO("Warning"),
43 e.GetHelpPageId(),
44 true);
45 }
46 catch(ExportException& e)
47 {
49 }
50 catch(...)
51 {
52 BasicUI::ShowMessageBox(XO("Export error"));
53 }
54 }
55
56
57
58}
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:277
ExportResult Show(ExportTask exportTask)
void ExceptionWrappedCall(Callable callable)