Audacity  3.0.3
wxWidgetsBasicUI.h
Go to the documentation of this file.
1 /*!********************************************************************
2 
3 Audacity: A Digital Audio Editor
4 
5 @file wxWidgetsBasicUI.h
6 @brief Implementation of BasicUI using wxWidgets
7 
8 Paul Licameli
9 
10 **********************************************************************/
11 #ifndef __WXWIDGETS_BASIC_UI__
12 #define __WXWIDGETS_BASIC_UI__
13 
14 #include "BasicUI.h"
15 
16 class wxWindow;
17 
19 struct AUDACITY_DLL_API wxWidgetsWindowPlacement final
22  explicit wxWidgetsWindowPlacement( wxWindow *pWindow )
23  : pWindow{ pWindow }
24  {}
25 
27  wxWindow *pWindow{};
28 };
29 
31 
32 class wxWidgetsBasicUI final : public BasicUI::Services {
33 public:
34  ~wxWidgetsBasicUI() override;
35 
36 protected:
37  void DoCallAfter(const BasicUI::Action &action) override;
38  void DoYield() override;
39  void DoShowErrorDialog(const BasicUI::WindowPlacement &placement,
40  const TranslatableString &dlogTitle,
41  const TranslatableString &message,
42  const ManualPageID &helpPage,
43  const BasicUI::ErrorDialogOptions &options) override;
45  const TranslatableString &message,
46  BasicUI::MessageBoxOptions options) override;
47  std::unique_ptr<BasicUI::ProgressDialog>
49  const TranslatableString &message,
50  unsigned flags,
51  const TranslatableString &remainingLabelText) override;
52  std::unique_ptr<BasicUI::GenericProgressDialog>
55  const TranslatableString &message) override;
56 };
57 
58 #endif
TranslatableString
Holds a msgid for the translation catalog; may also bind format arguments.
Definition: TranslatableString.h:32
BasicUI::MessageBoxOptions
Definition: BasicUI.h:91
wxWidgetsBasicUI::DoMessageBox
BasicUI::MessageBoxResult DoMessageBox(const TranslatableString &message, BasicUI::MessageBoxOptions options) override
Definition: wxWidgetsBasicUI.cpp:97
wxWidgetsBasicUI::~wxWidgetsBasicUI
~wxWidgetsBasicUI() override
wxWidgetsBasicUI::DoShowErrorDialog
void DoShowErrorDialog(const BasicUI::WindowPlacement &placement, const TranslatableString &dlogTitle, const TranslatableString &message, const ManualPageID &helpPage, const BasicUI::ErrorDialogOptions &options) override
Definition: wxWidgetsBasicUI.cpp:48
BasicUI::Action
std::function< void()> Action
Definition: BasicUI.h:24
BasicUI::MessageBoxResult
MessageBoxResult
Definition: BasicUI.h:129
wxWidgetsWindowPlacement::wxWidgetsWindowPlacement
wxWidgetsWindowPlacement()=default
wxWidgetsWindowPlacement
Window placement information for wxWidgetsBasicUI can be constructed from a wxWindow pointer.
Definition: wxWidgetsBasicUI.h:20
wxWidgetsBasicUI::DoMakeGenericProgress
std::unique_ptr< BasicUI::GenericProgressDialog > DoMakeGenericProgress(const BasicUI::WindowPlacement &placement, const TranslatableString &title, const TranslatableString &message) override
Definition: wxWidgetsBasicUI.cpp:229
wxWidgetsBasicUI
An implementation of BasicUI::Services in terms of the wxWidgets toolkit.
Definition: wxWidgetsBasicUI.h:32
wxWidgetsBasicUI::DoYield
void DoYield() override
Definition: wxWidgetsBasicUI.cpp:33
BasicUI::WindowPlacement
Subclasses may hold information such as a parent window pointer for a dialog.
Definition: BasicUI.h:29
title
static const auto title
Definition: UpdateNoticeDialog.cpp:23
BasicUI::ErrorDialogOptions
Options for variations of error dialogs; the default is for modal dialogs.
Definition: BasicUI.h:49
wxWidgetsBasicUI::DoMakeProgress
std::unique_ptr< BasicUI::ProgressDialog > DoMakeProgress(const TranslatableString &title, const TranslatableString &message, unsigned flags, const TranslatableString &remainingLabelText) override
Definition: wxWidgetsBasicUI.cpp:186
BasicUI.h
Toolkit-neutral facade for basic user interface services.
TaggedIdentifier< ManualPageIDTag >
wxWidgetsBasicUI::DoCallAfter
void DoCallAfter(const BasicUI::Action &action) override
Definition: wxWidgetsBasicUI.cpp:28
wxWidgetsWindowPlacement::~wxWidgetsWindowPlacement
~wxWidgetsWindowPlacement() override
BasicUI::Services
Abstract class defines a few user interface services, not mentioning particular toolkits.
Definition: BasicUI.h:180
wxWidgetsWindowPlacement::wxWidgetsWindowPlacement
wxWidgetsWindowPlacement(wxWindow *pWindow)
Definition: wxWidgetsBasicUI.h:22