Audacity 3.2.0
wxWidgetsBasicUI.h
Go to the documentation of this file.
1/*!********************************************************************
2
3Audacity: A Digital Audio Editor
4
5@file wxWidgetsBasicUI.h
6@brief Implementation of BasicUI using wxWidgets
7
8Paul Licameli
9
10**********************************************************************/
11#ifndef __WXWIDGETS_BASIC_UI__
12#define __WXWIDGETS_BASIC_UI__
13
14#include "BasicUI.h"
15
16class wxWindow;
17
19
20class WX_INIT_API wxWidgetsBasicUI final : public BasicUI::Services {
21public:
23
24protected:
25 void DoCallAfter(const BasicUI::Action &action) override;
26 void DoYield() override;
27 void DoShowErrorDialog(const BasicUI::WindowPlacement &placement,
28 const TranslatableString &dlogTitle,
29 const TranslatableString &message,
30 const ManualPageID &helpPage,
31 const BasicUI::ErrorDialogOptions &options) override;
33 const TranslatableString &message,
34 BasicUI::MessageBoxOptions options) override;
35 std::unique_ptr<BasicUI::ProgressDialog>
37 const TranslatableString &message,
38 unsigned flags,
39 const TranslatableString &remainingLabelText) override;
40 std::unique_ptr<BasicUI::GenericProgressDialog>
43 const TranslatableString &message) override;
44 int DoMultiDialog(const TranslatableString &message,
46 const TranslatableStrings &buttons,
47 const ManualPageID &helpPage,
48 const TranslatableString &boxMsg, bool log) override;
49
50 bool DoOpenInDefaultBrowser(const wxString &url) override;
51
52 std::unique_ptr<BasicUI::WindowPlacement> DoFindFocus() override;
53 void DoSetFocus(const BasicUI::WindowPlacement &focus) override;
54
55 bool IsUsingRtlLayout() const override;
56};
57
58#endif
Toolkit-neutral facade for basic user interface services.
static const auto title
std::vector< TranslatableString > TranslatableStrings
Abstract class defines a few user interface services, not mentioning particular toolkits.
Definition: BasicUI.h:192
virtual std::unique_ptr< GenericProgressDialog > DoMakeGenericProgress(const WindowPlacement &placement, const TranslatableString &title, const TranslatableString &message)=0
virtual std::unique_ptr< WindowPlacement > DoFindFocus()=0
virtual void DoShowErrorDialog(const WindowPlacement &placement, const TranslatableString &dlogTitle, const TranslatableString &message, const ManualPageID &helpPage, const ErrorDialogOptions &options)=0
virtual void DoSetFocus(const WindowPlacement &focus)=0
virtual bool IsUsingRtlLayout() const =0
virtual std::unique_ptr< ProgressDialog > DoMakeProgress(const TranslatableString &title, const TranslatableString &message, unsigned flag, const TranslatableString &remainingLabelText)=0
virtual MessageBoxResult DoMessageBox(const TranslatableString &message, MessageBoxOptions options)=0
virtual int DoMultiDialog(const TranslatableString &message, const TranslatableString &title, const TranslatableStrings &buttons, const ManualPageID &helpPage, const TranslatableString &boxMsg, bool log)=0
virtual void DoCallAfter(const Action &action)=0
virtual bool DoOpenInDefaultBrowser(const wxString &url)=0
virtual void DoYield()=0
Subclasses may hold information such as a parent window pointer for a dialog.
Definition: BasicUI.h:30
Holds a msgid for the translation catalog; may also bind format arguments.
An implementation of BasicUI::Services in terms of the wxWidgets toolkit.
~wxWidgetsBasicUI() override
std::function< void()> Action
Definition: BasicUI.h:24
MessageBoxResult
Definition: BasicUI.h:132
Options for variations of error dialogs; the default is for modal dialogs.
Definition: BasicUI.h:52