Fix TAB key navigation on Mac for all dialogs (not only for panels)

This commit is contained in:
Paul Licameli 2016-07-10 17:10:50 -04:00
parent e0f6ed9972
commit 84c0337aba
79 changed files with 206 additions and 207 deletions

View File

@ -217,11 +217,11 @@ void AboutDialog::CreateCreditsList()
// ----------------------------------------------------------------------------
BEGIN_EVENT_TABLE(AboutDialog, wxDialog)
BEGIN_EVENT_TABLE(AboutDialog, wxDialogWrapper)
EVT_BUTTON(wxID_OK, AboutDialog::OnOK)
END_EVENT_TABLE()
IMPLEMENT_CLASS(AboutDialog, wxDialog)
IMPLEMENT_CLASS(AboutDialog, wxDialogWrapper)
namespace {
AboutDialog *sActiveInstance{};
@ -233,7 +233,7 @@ AboutDialog *AboutDialog::ActiveIntance()
}
AboutDialog::AboutDialog(wxWindow * parent)
: wxDialog(parent, -1, _("About Audacity"),
: wxDialogWrapper(parent, -1, _("About Audacity"),
wxDefaultPosition, wxDefaultSize,
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
{

View File

@ -13,10 +13,10 @@
#include "MemoryX.h"
#include <vector>
#include <wx/dialog.h>
#include <wx/sizer.h>
#include <wx/statbmp.h>
#include <wx/bitmap.h>
#include "widgets/wxPanelWrapper.h"
class ShuttleGui;
@ -49,7 +49,7 @@ struct AboutDialogCreditItem {
using AboutDialogCreditItemsList = std::vector<AboutDialogCreditItem>;
class AboutDialog final : public wxDialog {
class AboutDialog final : public wxDialogWrapper {
DECLARE_DYNAMIC_CLASS(AboutDialog)
public:

View File

@ -51,7 +51,6 @@ class AudioThread;
class Meter;
class SelectedRegion;
class TimeTrack;
class wxDialog;
class AudacityProject;
class WaveTrackArray;

View File

@ -37,7 +37,7 @@ enum {
ID_FILE_LIST
};
class AutoRecoveryDialog final : public wxDialog
class AutoRecoveryDialog final : public wxDialogWrapper
{
public:
AutoRecoveryDialog(wxWindow *parent);
@ -57,7 +57,7 @@ public:
};
AutoRecoveryDialog::AutoRecoveryDialog(wxWindow *parent) :
wxDialog(parent, -1, _("Automatic Crash Recovery"),
wxDialogWrapper(parent, -1, _("Automatic Crash Recovery"),
wxDefaultPosition, wxDefaultSize,
wxDEFAULT_DIALOG_STYLE & (~wxCLOSE_BOX)) // no close box
{
@ -66,7 +66,7 @@ AutoRecoveryDialog::AutoRecoveryDialog(wxWindow *parent) :
PopulateOrExchange(S);
}
BEGIN_EVENT_TABLE(AutoRecoveryDialog, wxDialog)
BEGIN_EVENT_TABLE(AutoRecoveryDialog, wxDialogWrapper)
EVT_BUTTON(ID_RECOVER_ALL, AutoRecoveryDialog::OnRecoverAll)
EVT_BUTTON(ID_RECOVER_NONE, AutoRecoveryDialog::OnRecoverNone)
EVT_BUTTON(ID_QUIT_AUDACITY, AutoRecoveryDialog::OnQuitAudacity)

View File

@ -47,7 +47,7 @@ selected command.
#define EditParamsButtonID 7002
#define UsePresetButtonID 7003
BEGIN_EVENT_TABLE(BatchCommandDialog, wxDialog)
BEGIN_EVENT_TABLE(BatchCommandDialog, wxDialogWrapper)
EVT_BUTTON(wxID_OK, BatchCommandDialog::OnOk)
EVT_BUTTON(wxID_CANCEL, BatchCommandDialog::OnCancel)
EVT_BUTTON(EditParamsButtonID, BatchCommandDialog::OnEditParams)
@ -57,7 +57,7 @@ BEGIN_EVENT_TABLE(BatchCommandDialog, wxDialog)
END_EVENT_TABLE();
BatchCommandDialog::BatchCommandDialog(wxWindow * parent, wxWindowID id):
wxDialog(parent, id, _("Select Command"),
wxDialogWrapper(parent, id, _("Select Command"),
wxDefaultPosition, wxDefaultSize,
wxCAPTION | wxRESIZE_BORDER)
{

View File

@ -36,7 +36,7 @@ class wxListEvent;
class wxButton;
class ShuttleGui;
class BatchCommandDialog final : public wxDialog {
class BatchCommandDialog final : public wxDialogWrapper {
public:
// constructors and destructors
BatchCommandDialog(wxWindow *parent, wxWindowID id);

View File

@ -56,14 +56,14 @@
#define ApplyToProjectID 7003
#define ApplyToFilesID 7004
BEGIN_EVENT_TABLE(BatchProcessDialog, wxDialog)
BEGIN_EVENT_TABLE(BatchProcessDialog, wxDialogWrapper)
EVT_BUTTON(ApplyToProjectID, BatchProcessDialog::OnApplyToProject)
EVT_BUTTON(ApplyToFilesID, BatchProcessDialog::OnApplyToFiles)
EVT_BUTTON(wxID_CANCEL, BatchProcessDialog::OnCancel)
END_EVENT_TABLE()
BatchProcessDialog::BatchProcessDialog(wxWindow * parent):
wxDialog(parent, wxID_ANY, _("Apply Chain"),
wxDialogWrapper(parent, wxID_ANY, _("Apply Chain"),
wxDefaultPosition, wxDefaultSize,
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
{
@ -153,7 +153,7 @@ void BatchProcessDialog::OnApplyToProject(wxCommandEvent & WXUNUSED(event))
}
wxString name = mChains->GetItemText(item);
wxDialog * pD = safenew wxDialog(this, wxID_ANY, GetTitle());
wxDialog * pD = safenew wxDialogWrapper(this, wxID_ANY, GetTitle());
pD->SetName(pD->GetTitle());
ShuttleGui S(pD, eIsCreating);
@ -294,7 +294,7 @@ void BatchProcessDialog::OnApplyToFiles(wxCommandEvent & WXUNUSED(event))
files.Sort();
wxDialog * pD = safenew wxDialog(this, wxID_ANY, GetTitle());
wxDialog * pD = safenew wxDialogWrapper(this, wxID_ANY, GetTitle());
pD->SetName(pD->GetTitle());
ShuttleGui S(pD, eIsCreating);
@ -423,7 +423,7 @@ enum {
RenameButtonID
};
BEGIN_EVENT_TABLE(EditChainsDialog, wxDialog)
BEGIN_EVENT_TABLE(EditChainsDialog, wxDialogWrapper)
EVT_LIST_ITEM_SELECTED(ChainsListID, EditChainsDialog::OnChainSelected)
EVT_LIST_ITEM_SELECTED(CommandsListID, EditChainsDialog::OnListSelected)
EVT_LIST_BEGIN_LABEL_EDIT(ChainsListID, EditChainsDialog::OnChainsBeginEdit)
@ -455,7 +455,7 @@ enum {
/// Constructor
EditChainsDialog::EditChainsDialog(wxWindow * parent):
wxDialog(parent, wxID_ANY, _("Edit Chains"),
wxDialogWrapper(parent, wxID_ANY, _("Edit Chains"),
wxDefaultPosition, wxDefaultSize,
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
{

View File

@ -38,7 +38,7 @@ class wxListEvent;
class wxButton;
class ShuttleGui;
class BatchProcessDialog final : public wxDialog {
class BatchProcessDialog final : public wxDialogWrapper {
public:
// constructors and destructors
BatchProcessDialog(wxWindow * parent);
@ -62,7 +62,7 @@ class BatchProcessDialog final : public wxDialog {
DECLARE_EVENT_TABLE()
};
class EditChainsDialog final : public wxDialog
class EditChainsDialog final : public wxDialogWrapper
{
public:
EditChainsDialog(wxWindow * parent);

View File

@ -42,7 +42,7 @@ of the BlockFile system.
#include "FileDialog.h"
class BenchmarkDialog final : public wxDialog
class BenchmarkDialog final : public wxDialogWrapper
{
public:
// constructors and destructors
@ -117,7 +117,7 @@ enum {
RandSeedID
};
BEGIN_EVENT_TABLE(BenchmarkDialog,wxDialog)
BEGIN_EVENT_TABLE(BenchmarkDialog, wxDialogWrapper)
EVT_BUTTON( RunID, BenchmarkDialog::OnRun )
EVT_BUTTON( BSaveID, BenchmarkDialog::OnSave )
EVT_BUTTON( ClearID, BenchmarkDialog::OnClear )
@ -125,7 +125,7 @@ BEGIN_EVENT_TABLE(BenchmarkDialog,wxDialog)
END_EVENT_TABLE()
BenchmarkDialog::BenchmarkDialog(wxWindow *parent):
wxDialog( parent, 0, wxT("Benchmark"),
wxDialogWrapper( parent, 0, wxT("Benchmark"),
wxDefaultPosition, wxDefaultSize,
wxDEFAULT_DIALOG_STYLE |
wxRESIZE_BORDER)

View File

@ -235,7 +235,7 @@ static void RemoveDependencies(AudacityProject *project,
// DependencyDialog
//
class DependencyDialog final : public wxDialog
class DependencyDialog final : public wxDialogWrapper
{
public:
DependencyDialog(wxWindow *parent,
@ -281,7 +281,7 @@ enum {
FutureActionChoiceID
};
BEGIN_EVENT_TABLE(DependencyDialog, wxDialog)
BEGIN_EVENT_TABLE(DependencyDialog, wxDialogWrapper)
EVT_LIST_ITEM_SELECTED(FileListID, DependencyDialog::OnList)
EVT_LIST_ITEM_DESELECTED(FileListID, DependencyDialog::OnList)
EVT_BUTTON(CopySelectedFilesButtonID, DependencyDialog::OnCopySelectedFiles)
@ -296,7 +296,7 @@ DependencyDialog::DependencyDialog(wxWindow *parent,
AudacityProject *project,
AliasedFileArray &aliasedFiles,
bool isSaving)
: wxDialog(parent, id, _("Project Depends on Other Audio Files"),
: wxDialogWrapper(parent, id, _("Project Depends on Other Audio Files"),
wxDefaultPosition, wxDefaultSize,
(isSaving ?
(wxDEFAULT_DIALOG_STYLE & ~wxCLOSE_BOX) : // no close box when saving
@ -466,7 +466,7 @@ void DependencyDialog::OnSize(wxSizeEvent &evt)
// Also subtract 8 from file path column width for borders.
mFileListCtrl->SetColumnWidth(0, fileListCtrlWidth - 120 - 8);
mFileListCtrl->SetColumnWidth(1, 120);
wxDialog::OnSize(evt);
wxDialogWrapper::OnSize(evt);
}
void DependencyDialog::OnNo(wxCommandEvent & WXUNUSED(event))

View File

@ -449,12 +449,12 @@ class FFmpegNotFoundDialog;
#define ID_FFMPEG_DLOAD 5001
/// Allows user to locate libav* libraries
class FindFFmpegDialog final : public wxDialog
class FindFFmpegDialog final : public wxDialogWrapper
{
public:
FindFFmpegDialog(wxWindow *parent, const wxString &path, const wxString &name, const wxString &type)
: wxDialog(parent, wxID_ANY, wxString(_("Locate FFmpeg")))
: wxDialogWrapper(parent, wxID_ANY, wxString(_("Locate FFmpeg")))
{
SetName(GetTitle());
ShuttleGui S(this, eIsCreating);
@ -558,7 +558,7 @@ private:
DECLARE_EVENT_TABLE()
};
BEGIN_EVENT_TABLE(FindFFmpegDialog, wxDialog)
BEGIN_EVENT_TABLE(FindFFmpegDialog, wxDialogWrapper)
EVT_BUTTON(ID_FFMPEG_BROWSE, FindFFmpegDialog::OnBrowse)
EVT_BUTTON(ID_FFMPEG_DLOAD, FindFFmpegDialog::OnDownload)
END_EVENT_TABLE()
@ -568,7 +568,7 @@ END_EVENT_TABLE()
// FFmpegNotFoundDialog
//----------------------------------------------------------------------------
BEGIN_EVENT_TABLE(FFmpegNotFoundDialog, wxDialog)
BEGIN_EVENT_TABLE(FFmpegNotFoundDialog, wxDialogWrapper)
EVT_BUTTON(wxID_OK, FFmpegNotFoundDialog::OnOk)
END_EVENT_TABLE()

View File

@ -172,12 +172,12 @@ bool LoadFFmpeg(bool showerror);
/// If Audacity failed to load libav*, this dialog
/// shows up and tells user about that. It will pop-up
/// again and again until it is disabled.
class FFmpegNotFoundDialog final : public wxDialog
class FFmpegNotFoundDialog final : public wxDialogWrapper
{
public:
FFmpegNotFoundDialog(wxWindow *parent)
: wxDialog(parent, wxID_ANY, wxString(_("FFmpeg not found")))
: wxDialogWrapper(parent, wxID_ANY, wxString(_("FFmpeg not found")))
{
SetName(GetTitle());
ShuttleGui S(this, eIsCreating);

View File

@ -157,7 +157,7 @@ static const char * ZoomOut[] = {
// FreqWindow
BEGIN_EVENT_TABLE(FreqWindow, wxDialog)
BEGIN_EVENT_TABLE(FreqWindow, wxDialogWrapper)
EVT_CLOSE(FreqWindow::OnCloseWindow)
EVT_SIZE(FreqWindow::OnSize)
EVT_SLIDER(FreqZoomSliderID, FreqWindow::OnZoomSlider)
@ -187,7 +187,7 @@ SpectrumAnalyst::~SpectrumAnalyst()
FreqWindow::FreqWindow(wxWindow * parent, wxWindowID id,
const wxString & title,
const wxPoint & pos)
: wxDialog(parent, id, title, pos, wxDefaultSize,
: wxDialogWrapper(parent, id, title, pos, wxDefaultSize,
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxMAXIMIZE_BOX),
mData(NULL),
mBitmap(NULL),
@ -544,7 +544,7 @@ bool FreqWindow::Show(bool show)
Recalc();
}
bool res = wxDialog::Show(show);
bool res = wxDialogWrapper::Show(show);
return res;
}

View File

@ -123,7 +123,7 @@ private:
DECLARE_EVENT_TABLE();
};
class FreqWindow final : public wxDialog
class FreqWindow final : public wxDialogWrapper
{
public:
FreqWindow(wxWindow *parent, wxWindowID id,

View File

@ -45,7 +45,7 @@ enum {
ID_DISCARD
};
BEGIN_EVENT_TABLE(HistoryWindow, wxDialog)
BEGIN_EVENT_TABLE(HistoryWindow, wxDialogWrapper)
EVT_SIZE(HistoryWindow::OnSize)
EVT_CLOSE(HistoryWindow::OnCloseWindow)
EVT_LIST_ITEM_SELECTED(wxID_ANY, HistoryWindow::OnItemSelected)
@ -53,7 +53,7 @@ BEGIN_EVENT_TABLE(HistoryWindow, wxDialog)
END_EVENT_TABLE()
HistoryWindow::HistoryWindow(AudacityProject *parent, UndoManager *manager):
wxDialog((wxWindow*)parent, wxID_ANY, wxString(_("Undo History")),
wxDialogWrapper((wxWindow*)parent, wxID_ANY, wxString(_("Undo History")),
wxDefaultPosition, wxDefaultSize,
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER )
{

View File

@ -12,18 +12,19 @@
#define __AUDACITY_HISTORY_WINDOW__
#include <wx/button.h>
#include <wx/dialog.h>
#include <wx/event.h>
#include <wx/frame.h>
#include <wx/listctrl.h>
#include <wx/spinctrl.h>
#include <wx/textctrl.h>
#include "widgets/wxPanelWrapper.h"
class AudacityProject;
class ShuttleGui;
class UndoManager;
class HistoryWindow final : public wxDialog {
class HistoryWindow final : public wxDialogWrapper {
public:
HistoryWindow(AudacityProject * parent, UndoManager *manager);

View File

@ -74,7 +74,7 @@ enum {
ID_EXPORT
};
BEGIN_EVENT_TABLE(LabelDialog, wxDialog)
BEGIN_EVENT_TABLE(LabelDialog, wxDialogWrapper)
EVT_GRID_SELECT_CELL(LabelDialog::OnSelectCell)
EVT_GRID_CELL_CHANGED(LabelDialog::OnCellChange)
EVT_BUTTON(ID_INSERTA, LabelDialog::OnInsert)
@ -97,7 +97,7 @@ LabelDialog::LabelDialog(wxWindow *parent,
ViewInfo &viewinfo,
double rate,
const wxString & format, const wxString &freqFormat)
: wxDialog(parent,
: wxDialogWrapper(parent,
wxID_ANY,
_("Edit Labels"),
wxDefaultPosition,
@ -313,7 +313,7 @@ bool LabelDialog::TransferDataToWindow()
bool LabelDialog::Show(bool show)
{
bool ret = wxDialog::Show(show);
bool ret = wxDialogWrapper::Show(show);
// Set initial row
// (This will not work until the grid is actually displayed)

View File

@ -13,13 +13,13 @@
#include <vector>
#include <wx/defs.h>
#include <wx/dialog.h>
#include <wx/event.h>
#include <wx/grid.h>
#include <wx/string.h>
#include "Internat.h"
#include "widgets/Grid.h"
#include "widgets/wxPanelWrapper.h"
class TrackFactory;
class TrackList;
@ -30,7 +30,7 @@ class ViewInfo;
typedef std::vector<RowData> RowDataArray;
class LabelDialog final : public wxDialog
class LabelDialog final : public wxDialogWrapper
{
public:

View File

@ -20,7 +20,6 @@ of languages for Audacity.
#include <wx/defs.h>
#include <wx/button.h>
#include <wx/choice.h>
#include <wx/dialog.h>
#include <wx/intl.h>
#include <wx/msgdlg.h>
#include <wx/sizer.h>
@ -29,8 +28,9 @@ of languages for Audacity.
#include "LangChoice.h"
#include "Languages.h"
#include "ShuttleGui.h"
#include "widgets/wxPanelWrapper.h"
class LangChoiceDialog final : public wxDialog {
class LangChoiceDialog final : public wxDialogWrapper {
public:
LangChoiceDialog(wxWindow * parent,
wxWindowID id,
@ -65,14 +65,14 @@ wxString ChooseLanguage(wxWindow *parent)
return returnVal;
}
BEGIN_EVENT_TABLE(LangChoiceDialog, wxDialog)
BEGIN_EVENT_TABLE(LangChoiceDialog, wxDialogWrapper)
EVT_BUTTON(wxID_OK, LangChoiceDialog::OnOk)
END_EVENT_TABLE()
LangChoiceDialog::LangChoiceDialog(wxWindow * parent,
wxWindowID id,
const wxString & title):
wxDialog(parent, id, title)
wxDialogWrapper(parent, id, title)
{
SetName(GetTitle());
GetLanguages(mLangCodes, mLangNames);

View File

@ -6738,7 +6738,7 @@ void AudacityProject::OnAudioDeviceInfo()
{
wxString info = gAudioIO->GetDeviceInfo();
wxDialog dlg(this, wxID_ANY, wxString(_("Audio Device Info")));
wxDialogWrapper dlg(this, wxID_ANY, wxString(_("Audio Device Info")));
dlg.SetName(dlg.GetTitle());
ShuttleGui S(&dlg, eIsCreating);
@ -6873,7 +6873,7 @@ void AudacityProject::OnResample()
while (true)
{
wxDialog dlg(this, wxID_ANY, wxString(_("Resample")));
wxDialogWrapper dlg(this, wxID_ANY, wxString(_("Resample")));
dlg.SetName(dlg.GetTitle());
ShuttleGui S(&dlg, eIsCreating);
wxString rate;

View File

@ -414,7 +414,7 @@ enum
COL_COUNT
};
class PluginRegistrationDialog final : public wxDialog
class PluginRegistrationDialog final : public wxDialogWrapper
{
public:
// constructors and destructors
@ -461,7 +461,7 @@ private:
DECLARE_EVENT_TABLE()
};
BEGIN_EVENT_TABLE(PluginRegistrationDialog, wxDialog)
BEGIN_EVENT_TABLE(PluginRegistrationDialog, wxDialogWrapper)
EVT_LIST_COL_CLICK(ID_List, PluginRegistrationDialog::OnSort)
EVT_BUTTON(wxID_OK, PluginRegistrationDialog::OnOK)
EVT_BUTTON(wxID_CANCEL, PluginRegistrationDialog::OnCancel)
@ -476,7 +476,7 @@ BEGIN_EVENT_TABLE(PluginRegistrationDialog, wxDialog)
END_EVENT_TABLE()
PluginRegistrationDialog::PluginRegistrationDialog(wxWindow *parent, EffectType type)
: wxDialog(parent,
: wxDialogWrapper(parent,
wxID_ANY,
_("Plug-in Manager: Effects, Generators and Analyzers"),
wxDefaultPosition, wxDefaultSize,

View File

@ -26,12 +26,12 @@
#include "Prefs.h"
#include "prefs/GUISettings.h"
BEGIN_EVENT_TABLE(SoundActivatedRecord, wxDialog)
BEGIN_EVENT_TABLE(SoundActivatedRecord, wxDialogWrapper)
EVT_BUTTON(wxID_OK, SoundActivatedRecord::OnOK)
END_EVENT_TABLE()
SoundActivatedRecord::SoundActivatedRecord(wxWindow* parent)
: wxDialog(parent, -1, _("Sound Activated Record"), wxDefaultPosition,
: wxDialogWrapper(parent, -1, _("Sound Activated Record"), wxDefaultPosition,
wxDefaultSize, wxCAPTION )
// wxDefaultSize, wxCAPTION | wxTHICK_FRAME)
{

View File

@ -16,11 +16,11 @@
#ifndef __AUDACITY_SOUND_ACTIVATED_RECORD__
#define __AUDACITY_SOUND_ACTIVATED_RECORD__
#include <wx/dialog.h>
#include "widgets/wxPanelWrapper.h"
class ShuttleGui;
class SoundActivatedRecord final : public wxDialog
class SoundActivatedRecord final : public wxDialogWrapper
{
public:
SoundActivatedRecord(wxWindow* parent);

View File

@ -51,15 +51,15 @@ enum
DontShowID=1000,
};
BEGIN_EVENT_TABLE(SplashDialog, wxDialog)
BEGIN_EVENT_TABLE(SplashDialog, wxDialogWrapper)
EVT_BUTTON(wxID_OK, SplashDialog::OnOK)
EVT_CHECKBOX( DontShowID, SplashDialog::OnDontShow )
END_EVENT_TABLE()
IMPLEMENT_CLASS(SplashDialog, wxDialog)
IMPLEMENT_CLASS(SplashDialog, wxDialogWrapper)
SplashDialog::SplashDialog(wxWindow * parent)
: wxDialog(parent, -1, _("Welcome to Audacity!"),
: wxDialogWrapper(parent, -1, _("Welcome to Audacity!"),
wxPoint( -1, 60 ), // default x position, y position 60 pixels from top of screen.
wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
{

View File

@ -12,6 +12,7 @@
#define __AUDACITY_SPLASH_DLG__
#include <wx/dialog.h>
#include "widgets/wxPanelWrapper.h"
class wxBoxSizer;
class wxStaticBitmap;
@ -21,7 +22,7 @@ class AudacityProject;
class wxCheckbox;
class HtmlWindow;
class SplashDialog final : public wxDialog {
class SplashDialog final : public wxDialogWrapper {
DECLARE_DYNAMIC_CLASS(SplashDialog)
public:
SplashDialog(wxWindow * parent);

View File

@ -669,7 +669,7 @@ enum {
RemoveID
};
BEGIN_EVENT_TABLE(TagsEditor, wxDialog)
BEGIN_EVENT_TABLE(TagsEditor, wxDialogWrapper)
EVT_GRID_CELL_CHANGED(TagsEditor::OnChange)
EVT_BUTTON(EditID, TagsEditor::OnEdit)
EVT_BUTTON(ResetID, TagsEditor::OnReset)
@ -689,7 +689,7 @@ TagsEditor::TagsEditor(wxWindow * parent,
Tags * tags,
bool editTitle,
bool editTrack)
: wxDialog(parent, wxID_ANY, title, wxDefaultPosition, wxDefaultSize,
: wxDialogWrapper(parent, wxID_ANY, title, wxDefaultPosition, wxDefaultSize,
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER),
mTags(tags),
mEditTitle(editTitle),
@ -1003,7 +1003,7 @@ void TagsEditor::OnEdit(wxCommandEvent & WXUNUSED(event))
mGrid->HideCellEditControl();
}
wxDialog dlg(this, wxID_ANY, _("Edit Genres"),
wxDialogWrapper dlg(this, wxID_ANY, _("Edit Genres"),
wxDefaultPosition, wxDefaultSize,
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER);
dlg.SetName(dlg.GetTitle());

View File

@ -35,11 +35,12 @@
#include "MemoryX.h"
#include <utility>
#include <wx/dialog.h>
#include <wx/hashmap.h>
#include <wx/notebook.h>
#include <wx/string.h>
#include "widgets/wxPanelWrapper.h"
class wxButton;
class wxChoice;
class wxComboBox;
@ -135,7 +136,7 @@ class AUDACITY_DLL_API Tags final : public XMLTagHandler {
inline bool operator != (const Tags &lhs, const Tags &rhs)
{ return !(lhs == rhs); }
class TagsEditor final : public wxDialog
class TagsEditor final : public wxDialogWrapper
{
public:
// constructors and destructors

View File

@ -25,7 +25,7 @@
#include "ShuttleGui.h"
#include "TimeDialog.h"
BEGIN_EVENT_TABLE(TimeDialog, wxDialog)
BEGIN_EVENT_TABLE(TimeDialog, wxDialogWrapper)
EVT_COMMAND(wxID_ANY, EVT_TIMETEXTCTRL_UPDATED, TimeDialog::OnUpdate)
END_EVENT_TABLE()
@ -35,7 +35,7 @@ TimeDialog::TimeDialog(wxWindow *parent,
double rate,
double time,
const wxString &prompt)
: wxDialog(parent, wxID_ANY, title),
: wxDialogWrapper(parent, wxID_ANY, title),
mPrompt(prompt),
mFormat(format),
mRate(rate),

View File

@ -12,14 +12,15 @@
#define __AUDACITY_TimeDialog__
#include <wx/defs.h>
#include <wx/dialog.h>
#include <wx/event.h>
#include <wx/string.h>
#include "widgets/wxPanelWrapper.h"
class NumericTextCtrl;
class ShuttleGui;
class TimeDialog final : public wxDialog
class TimeDialog final : public wxDialogWrapper
{
public:

View File

@ -116,7 +116,7 @@ wxAccStatus DatePickerCtrlAx::GetState(int WXUNUSED(childId), long *state)
#endif // wxUSE_ACCESSIBILITY
BEGIN_EVENT_TABLE(TimerRecordDialog, wxDialog)
BEGIN_EVENT_TABLE(TimerRecordDialog, wxDialogWrapper)
EVT_DATE_CHANGED(ID_DATEPICKER_START, TimerRecordDialog::OnDatePicker_Start)
EVT_TEXT(ID_TIMETEXT_START, TimerRecordDialog::OnTimeText_Start)
@ -139,7 +139,7 @@ BEGIN_EVENT_TABLE(TimerRecordDialog, wxDialog)
END_EVENT_TABLE()
TimerRecordDialog::TimerRecordDialog(wxWindow* parent, bool bAlreadySaved)
: wxDialog(parent, -1, _("Audacity Timer Record"), wxDefaultPosition,
: wxDialogWrapper(parent, -1, _("Audacity Timer Record"), wxDefaultPosition,
wxDefaultSize, wxCAPTION)
{
SetName(GetTitle());

View File

@ -54,7 +54,7 @@ public:
}
};
class TimerRecordDialog final : public wxDialog
class TimerRecordDialog final : public wxDialogWrapper
{
public:
TimerRecordDialog(wxWindow* parent, bool bAlreadySaved);

View File

@ -8277,7 +8277,7 @@ void TrackPanel::OnRateOther(wxCommandEvent &event)
/// \todo Make a real dialog box out of this!!
while (true)
{
wxDialog dlg(this, wxID_ANY, wxString(_("Set Rate")));
wxDialogWrapper dlg(this, wxID_ANY, wxString(_("Set Rate")));
dlg.SetName(dlg.GetTitle());
ShuttleGui S(&dlg, eIsCreating);
wxString rate;
@ -8574,7 +8574,7 @@ void TrackPanel::OnSetFont(wxCommandEvent & WXUNUSED(event))
LabelTrack::DefaultFontSize);
/* i18n-hint: (noun) This is the font for the label track.*/
wxDialog dlg(this, wxID_ANY, wxString(_("Label Track Font")));
wxDialogWrapper dlg(this, wxID_ANY, wxString(_("Label Track Font")));
dlg.SetName(dlg.GetTitle());
ShuttleGui S(&dlg, eIsCreating);
wxListBox *lb;

View File

@ -137,7 +137,7 @@ enum {
ID_RESULTSDB_TEXT
};
BEGIN_EVENT_TABLE(ContrastDialog,wxDialog)
BEGIN_EVENT_TABLE(ContrastDialog,wxDialogWrapper)
EVT_BUTTON(ID_BUTTON_USECURRENTF, ContrastDialog::OnGetForeground)
EVT_BUTTON(ID_BUTTON_USECURRENTB, ContrastDialog::OnGetBackground)
EVT_BUTTON(ID_BUTTON_GETURL, ContrastDialog::OnGetURL)
@ -150,7 +150,7 @@ END_EVENT_TABLE()
ContrastDialog::ContrastDialog(wxWindow * parent, wxWindowID id,
const wxString & title,
const wxPoint & pos):
wxDialog(parent, id, title, pos, wxDefaultSize,
wxDialogWrapper(parent, id, title, pos, wxDefaultSize,
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxMAXIMIZE_BOX )
{
SetName(GetTitle());

View File

@ -9,7 +9,7 @@
#ifndef __AUDACITY_CONTRAST_DIALOG__
#define __AUDACITY_CONTRAST_DIALOG__
#include <wx/dialog.h>
#include "widgets/wxPanelWrapper.h"
class wxButton;
class wxSizer;
@ -26,7 +26,7 @@ class WaveTrack;
// Declare window functions
class ContrastDialog final : public wxDialog
class ContrastDialog final : public wxDialogWrapper
{
public:
// constructors and destructors

View File

@ -2695,7 +2695,7 @@ void Effect::Preview(bool dryOnly)
}
}
BEGIN_EVENT_TABLE(EffectDialog, wxDialog)
BEGIN_EVENT_TABLE(EffectDialog, wxDialogWrapper)
EVT_BUTTON(wxID_OK, EffectDialog::OnOk)
END_EVENT_TABLE()
@ -2704,7 +2704,7 @@ EffectDialog::EffectDialog(wxWindow * parent,
int type,
int flags,
int additionalButtons)
: wxDialog(parent, wxID_ANY, title, wxDefaultPosition, wxDefaultSize, flags)
: wxDialogWrapper(parent, wxID_ANY, title, wxDefaultPosition, wxDefaultSize, flags)
{
mType = type;
mAdditionalButtons = additionalButtons;
@ -2845,7 +2845,7 @@ private:
#include "../../images/Effect.h"
BEGIN_EVENT_TABLE(EffectUIHost, wxDialog)
BEGIN_EVENT_TABLE(EffectUIHost, wxDialogWrapper)
EVT_INIT_DIALOG(EffectUIHost::OnInitDialog)
EVT_ERASE_BACKGROUND(EffectUIHost::OnErase)
EVT_PAINT(EffectUIHost::OnPaint)
@ -2871,7 +2871,7 @@ END_EVENT_TABLE()
EffectUIHost::EffectUIHost(wxWindow *parent,
Effect *effect,
EffectUIClientInterface *client)
: wxDialog(parent, wxID_ANY, effect->GetName(),
: wxDialogWrapper(parent, wxID_ANY, effect->GetName(),
wxDefaultPosition, wxDefaultSize,
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxMINIMIZE_BOX | wxMAXIMIZE_BOX)
{
@ -2952,7 +2952,7 @@ int EffectUIHost::ShowModal()
Layout();
return wxDialog::ShowModal();
return wxDialogWrapper::ShowModal();
}
// ============================================================================
@ -3159,7 +3159,7 @@ bool EffectUIHost::Initialize()
void EffectUIHost::OnInitDialog(wxInitDialogEvent & evt)
{
// Do default handling
wxDialog::OnInitDialog(evt);
wxDialogWrapper::OnInitDialog(evt);
#if wxCHECK_VERSION(3, 0, 0)
//#warning "check to see if this still needed in wx3"
@ -3575,7 +3575,7 @@ void EffectUIHost::OnSaveAs(wxCommandEvent & WXUNUSED(evt))
{
wxTextCtrl *text;
wxString name;
wxDialog dlg(this, wxID_ANY, wxString(_("Save Preset")));
wxDialogWrapper dlg(this, wxID_ANY, wxString(_("Save Preset")));
ShuttleGui S(&dlg, eIsCreating);
@ -3852,7 +3852,7 @@ enum
ID_Type = 10000
};
BEGIN_EVENT_TABLE(EffectPresetsDialog, wxDialog)
BEGIN_EVENT_TABLE(EffectPresetsDialog, wxDialogWrapper)
EVT_CHOICE(ID_Type, EffectPresetsDialog::OnType)
EVT_LISTBOX_DCLICK(wxID_ANY, EffectPresetsDialog::OnOk)
EVT_BUTTON(wxID_OK, EffectPresetsDialog::OnOk)
@ -3860,7 +3860,7 @@ BEGIN_EVENT_TABLE(EffectPresetsDialog, wxDialog)
END_EVENT_TABLE()
EffectPresetsDialog::EffectPresetsDialog(wxWindow *parent, Effect *effect)
: wxDialog(parent, wxID_ANY, wxString(_("Select Preset")))
: wxDialogWrapper(parent, wxID_ANY, wxString(_("Select Preset")))
{
ShuttleGui S(this, eIsCreating);
S.StartVerticalLay();

View File

@ -25,7 +25,6 @@
class wxCheckBox;
class wxChoice;
class wxDialog;
class wxListBox;
class wxWindow;
@ -544,7 +543,7 @@ private:
#define ID_EFFECT_PREVIEW ePreviewID
// Base dialog for regular effect
class AUDACITY_DLL_API EffectDialog /* not final */ : public wxDialog
class AUDACITY_DLL_API EffectDialog /* not final */ : public wxDialogWrapper
{
public:
// constructors and destructors
@ -573,7 +572,7 @@ private:
};
//
class EffectUIHost final : public wxDialog,
class EffectUIHost final : public wxDialogWrapper,
public EffectUIHostInterface
{
public:
@ -664,7 +663,7 @@ private:
DECLARE_EVENT_TABLE();
};
class EffectPresetsDialog final : public wxDialog
class EffectPresetsDialog final : public wxDialogWrapper
{
public:
EffectPresetsDialog(wxWindow *parent, Effect *effect);

View File

@ -3173,7 +3173,7 @@ void EqualizationPanel::OnCaptureLost(wxMouseCaptureLostEvent & WXUNUSED(event))
// Some things that deal with 'unnamed' curves still use, for example, 'mCustomBackup' as variable names.
/// Constructor
BEGIN_EVENT_TABLE(EditCurvesDialog, wxDialog)
BEGIN_EVENT_TABLE(EditCurvesDialog, wxDialogWrapper)
EVT_BUTTON(UpButtonID, EditCurvesDialog::OnUp)
EVT_BUTTON(DownButtonID, EditCurvesDialog::OnDown)
EVT_BUTTON(RenameButtonID, EditCurvesDialog::OnRename)
@ -3190,7 +3190,7 @@ BEGIN_EVENT_TABLE(EditCurvesDialog, wxDialog)
END_EVENT_TABLE()
EditCurvesDialog::EditCurvesDialog(wxWindow * parent, EffectEqualization * effect, int position):
wxDialog(parent, wxID_ANY, _("Manage Curves List"),
wxDialogWrapper(parent, wxID_ANY, _("Manage Curves List"),
wxDefaultPosition, wxDefaultSize,
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
{

View File

@ -330,7 +330,7 @@ private:
// EditCurvesDialog. Note that the 'modified' curve used to be called 'custom' but is now called 'unnamed'
// Some things that deal with 'unnamed' curves still use, for example, 'mCustomBackup' as variable names.
class EditCurvesDialog final : public wxDialog
class EditCurvesDialog final : public wxDialogWrapper
{
public:
EditCurvesDialog(wxWindow * parent, EffectEqualization * effect, int position);

View File

@ -1486,7 +1486,7 @@ return table;
} // namespace
BEGIN_EVENT_TABLE(EffectNoiseReduction::Dialog, wxDialog)
BEGIN_EVENT_TABLE(EffectNoiseReduction::Dialog, wxDialogWrapper)
EVT_BUTTON(wxID_OK, EffectNoiseReduction::Dialog::OnReduceNoise)
EVT_BUTTON(wxID_CANCEL, EffectNoiseReduction::Dialog::OnCancel)
EVT_BUTTON(ID_EFFECT_PREVIEW, EffectNoiseReduction::Dialog::OnPreview)

View File

@ -662,7 +662,7 @@ enum {
#define TIME_MAX 100 // Corresponds to 1.000 seconds
BEGIN_EVENT_TABLE(NoiseRemovalDialog,wxDialog)
BEGIN_EVENT_TABLE(NoiseRemovalDialog,wxDialogWrapper)
EVT_BUTTON(wxID_OK, NoiseRemovalDialog::OnRemoveNoise)
EVT_BUTTON(wxID_CANCEL, NoiseRemovalDialog::OnCancel)
EVT_BUTTON(ID_EFFECT_PREVIEW, NoiseRemovalDialog::OnPreview)

View File

@ -55,10 +55,10 @@ It \TODO: description
static ScoreAlignDialog *gScoreAlignDialog = NULL;
//IMPLEMENT_CLASS(ScoreAlignDialog, wxDialog)
//IMPLEMENT_CLASS(ScoreAlignDialog, wxDialogWrapper)
ScoreAlignDialog::ScoreAlignDialog(wxWindow *parent, ScoreAlignParams &params)
: wxDialog(parent, -1, _("Align MIDI to Audio"),
: wxDialogWrapper(parent, -1, _("Align MIDI to Audio"),
wxDefaultPosition, wxDefaultSize,
wxDEFAULT_DIALOG_STYLE)
{
@ -284,7 +284,7 @@ void CloseScoreAlignDialog()
}
BEGIN_EVENT_TABLE(ScoreAlignDialog, wxDialog)
BEGIN_EVENT_TABLE(ScoreAlignDialog, wxDialogWrapper)
// EVT_BUTTON(wxID_OK, ScoreAlignDialog::OnOK)
// EVT_BUTTON(wxID_CANCEL, ScoreAlignDialog::OnCancel)
EVT_BUTTON(ID_DEFAULT, ScoreAlignDialog::OnDefault)

View File

@ -26,7 +26,7 @@ void CloseScoreAlignDialog();
// Declare window functions
class ScoreAlignDialog final : public wxDialog
class ScoreAlignDialog final : public wxDialogWrapper
{
public:
ScoreAlignParams p;

View File

@ -47,7 +47,6 @@
#include <wx/button.h>
#include <wx/combobox.h>
#include <wx/dcclient.h>
#include <wx/dialog.h>
#include <wx/file.h>
#include <wx/filename.h>
#include <wx/frame.h>
@ -86,6 +85,7 @@
#include "../../ShuttleGui.h"
#include "../../effects/Effect.h"
#include "../../widgets/NumericTextCtrl.h"
#include "../../widgets/wxPanelWrapper.h"
#include "../../widgets/valnum.h"
#include "../../xml/XMLFileReader.h"
#include "../../xml/XMLWriter.h"
@ -695,7 +695,7 @@ void VSTEffectsModule::Check(const wxChar *path)
//
///////////////////////////////////////////////////////////////////////////////
class VSTEffectOptionsDialog final : public wxDialog
class VSTEffectOptionsDialog final : public wxDialogWrapper
{
public:
VSTEffectOptionsDialog(wxWindow * parent, EffectHostInterface *host);
@ -714,12 +714,12 @@ private:
DECLARE_EVENT_TABLE()
};
BEGIN_EVENT_TABLE(VSTEffectOptionsDialog, wxDialog)
BEGIN_EVENT_TABLE(VSTEffectOptionsDialog, wxDialogWrapper)
EVT_BUTTON(wxID_OK, VSTEffectOptionsDialog::OnOk)
END_EVENT_TABLE()
VSTEffectOptionsDialog::VSTEffectOptionsDialog(wxWindow * parent, EffectHostInterface *host)
: wxDialog(parent, wxID_ANY, wxString(_("VST Effect Options")))
: wxDialogWrapper(parent, wxID_ANY, wxString(_("VST Effect Options")))
{
mHost = host;
@ -1729,7 +1729,7 @@ void VSTEffect::SetHostUI(EffectUIHostInterface *host)
bool VSTEffect::PopulateUI(wxWindow *parent)
{
mDialog = (wxDialog *) wxGetTopLevelParent(parent);
mDialog = static_cast<wxDialog *>(wxGetTopLevelParent(parent));
mParent = parent;
mParent->PushEventHandler(this);

View File

@ -287,7 +287,7 @@ OSType AudioUnitEffectsModule::ToOSType(const wxString & type)
//
///////////////////////////////////////////////////////////////////////////////
class AudioUnitEffectOptionsDialog final : public wxDialog
class AudioUnitEffectOptionsDialog final : public wxDialogWrapper
{
public:
AudioUnitEffectOptionsDialog(wxWindow * parent, EffectHostInterface *host);
@ -308,12 +308,12 @@ private:
DECLARE_EVENT_TABLE()
};
BEGIN_EVENT_TABLE(AudioUnitEffectOptionsDialog, wxDialog)
BEGIN_EVENT_TABLE(AudioUnitEffectOptionsDialog, wxDialogWrapper)
EVT_BUTTON(wxID_OK, AudioUnitEffectOptionsDialog::OnOk)
END_EVENT_TABLE()
AudioUnitEffectOptionsDialog::AudioUnitEffectOptionsDialog(wxWindow * parent, EffectHostInterface *host)
: wxDialog(parent, wxID_ANY, wxString(_("Audio Unit Effect Options")))
: wxDialogWrapper(parent, wxID_ANY, wxString(_("Audio Unit Effect Options")))
{
mHost = host;
@ -427,7 +427,7 @@ void AudioUnitEffectOptionsDialog::OnOk(wxCommandEvent & WXUNUSED(evt))
#define PRESET_LOCAL_PATH wxT("/Library/Audio/Presets")
#define PRESET_USER_PATH wxT("~/Library/Audio/Presets")
class AudioUnitEffectExportDialog final : public wxDialog
class AudioUnitEffectExportDialog final : public wxDialogWrapper
{
public:
AudioUnitEffectExportDialog(wxWindow * parent, AudioUnitEffect *effect);
@ -446,12 +446,12 @@ private:
DECLARE_EVENT_TABLE()
};
BEGIN_EVENT_TABLE(AudioUnitEffectExportDialog, wxDialog)
BEGIN_EVENT_TABLE(AudioUnitEffectExportDialog, wxDialogWrapper)
EVT_BUTTON(wxID_OK, AudioUnitEffectExportDialog::OnOk)
END_EVENT_TABLE()
AudioUnitEffectExportDialog::AudioUnitEffectExportDialog(wxWindow * parent, AudioUnitEffect *effect)
: wxDialog(parent, wxID_ANY, wxString(_("Export Audio Unit Presets")))
: wxDialogWrapper(parent, wxID_ANY, wxString(_("Export Audio Unit Presets")))
{
mEffect = effect;
@ -601,7 +601,7 @@ void AudioUnitEffectExportDialog::OnOk(wxCommandEvent & WXUNUSED(evt))
//
///////////////////////////////////////////////////////////////////////////////
class AudioUnitEffectImportDialog final : public wxDialog
class AudioUnitEffectImportDialog final : public wxDialogWrapper
{
public:
AudioUnitEffectImportDialog(wxWindow * parent, AudioUnitEffect *effect);
@ -620,12 +620,12 @@ private:
DECLARE_EVENT_TABLE()
};
BEGIN_EVENT_TABLE(AudioUnitEffectImportDialog, wxDialog)
BEGIN_EVENT_TABLE(AudioUnitEffectImportDialog, wxDialogWrapper)
EVT_BUTTON(wxID_OK, AudioUnitEffectImportDialog::OnOk)
END_EVENT_TABLE()
AudioUnitEffectImportDialog::AudioUnitEffectImportDialog(wxWindow * parent, AudioUnitEffect *effect)
: wxDialog(parent, wxID_ANY, wxString(_("Import Audio Unit Presets")))
: wxDialogWrapper(parent, wxID_ANY, wxString(_("Import Audio Unit Presets")))
{
mEffect = effect;
@ -1750,7 +1750,7 @@ bool AudioUnitEffect::PopulateUI(wxWindow *parent)
{
OSStatus result;
mDialog = (wxDialog *) wxGetTopLevelParent(parent);
mDialog = static_cast<wxDialog *>(wxGetTopLevelParent(parent));
mParent = parent;
wxPanel *container;

View File

@ -52,6 +52,7 @@ effects from this one class.
#include "../../Internat.h"
#include "../../ShuttleGui.h"
#include "../../widgets/valnum.h"
#include "../../widgets/wxPanelWrapper.h"
// ============================================================================
// List of effects that ship with Audacity. These will be autoregistered.
@ -327,7 +328,7 @@ wxArrayString LadspaEffectsModule::GetSearchPaths()
//
///////////////////////////////////////////////////////////////////////////////
class LadspaEffectOptionsDialog final : public wxDialog
class LadspaEffectOptionsDialog final : public wxDialogWrapper
{
public:
LadspaEffectOptionsDialog(wxWindow * parent, EffectHostInterface *host);
@ -344,12 +345,12 @@ private:
DECLARE_EVENT_TABLE()
};
BEGIN_EVENT_TABLE(LadspaEffectOptionsDialog, wxDialog)
BEGIN_EVENT_TABLE(LadspaEffectOptionsDialog, wxDialogWrapper)
EVT_BUTTON(wxID_OK, LadspaEffectOptionsDialog::OnOk)
END_EVENT_TABLE()
LadspaEffectOptionsDialog::LadspaEffectOptionsDialog(wxWindow * parent, EffectHostInterface *host)
: wxDialog(parent, wxID_ANY, wxString(_("LADSPA Effect Options")))
: wxDialogWrapper(parent, wxID_ANY, wxString(_("LADSPA Effect Options")))
{
mHost = host;

View File

@ -163,7 +163,7 @@ void LV2EffectMeter::OnSize(wxSizeEvent & WXUNUSED(evt))
//
///////////////////////////////////////////////////////////////////////////////
class LV2EffectSettingsDialog final : public wxDialog
class LV2EffectSettingsDialog final : public wxDialogWrapper
{
public:
LV2EffectSettingsDialog(wxWindow *parent, LV2Effect *effect);
@ -181,12 +181,12 @@ private:
DECLARE_EVENT_TABLE();
};
BEGIN_EVENT_TABLE(LV2EffectSettingsDialog, wxDialog)
BEGIN_EVENT_TABLE(LV2EffectSettingsDialog, wxDialogWrapper)
EVT_BUTTON(wxID_OK, LV2EffectSettingsDialog::OnOk)
END_EVENT_TABLE()
LV2EffectSettingsDialog::LV2EffectSettingsDialog(wxWindow *parent, LV2Effect *effect)
: wxDialog(parent, wxID_ANY, wxString(_("LV2 Effect Settings")))
: wxDialogWrapper(parent, wxID_ANY, wxString(_("LV2 Effect Settings")))
{
mEffect = effect;

View File

@ -2228,7 +2228,7 @@ void NyquistEffect::OnText(wxCommandEvent & evt)
///////////////////////////////////////////////////////////////////////////////
BEGIN_EVENT_TABLE(NyquistOutputDialog, wxDialog)
BEGIN_EVENT_TABLE(NyquistOutputDialog, wxDialogWrapper)
EVT_BUTTON(wxID_OK, NyquistOutputDialog::OnOk)
END_EVENT_TABLE()
@ -2236,7 +2236,7 @@ NyquistOutputDialog::NyquistOutputDialog(wxWindow * parent, wxWindowID id,
const wxString & title,
const wxString & prompt,
const wxString &message)
: wxDialog(parent, id, title)
: wxDialogWrapper(parent, id, title)
{
SetName(GetTitle());

View File

@ -242,7 +242,7 @@ private:
friend class NyquistEffectsModule;
};
class NyquistOutputDialog final : public wxDialog
class NyquistOutputDialog final : public wxDialogWrapper
{
public:
NyquistOutputDialog(wxWindow * parent, wxWindowID id,

View File

@ -1236,7 +1236,7 @@ enum
ID_SLIDER_CHANNEL
};
BEGIN_EVENT_TABLE( ExportMixerDialog,wxDialog )
BEGIN_EVENT_TABLE( ExportMixerDialog, wxDialogWrapper )
EVT_BUTTON( wxID_OK, ExportMixerDialog::OnOk )
EVT_BUTTON( wxID_CANCEL, ExportMixerDialog::OnCancel )
EVT_SIZE( ExportMixerDialog::OnSize )
@ -1246,7 +1246,7 @@ END_EVENT_TABLE()
ExportMixerDialog::ExportMixerDialog( const TrackList *tracks, bool selectedOnly,
int maxNumChannels, wxWindow *parent, wxWindowID id, const wxString &title,
const wxPoint &position, const wxSize& size, long style ) :
wxDialog( parent, id, title, position, size, style | wxRESIZE_BORDER )
wxDialogWrapper( parent, id, title, position, size, style | wxRESIZE_BORDER )
{
SetName(GetTitle());

View File

@ -248,7 +248,7 @@ private:
//----------------------------------------------------------------------------
// ExportMixerDialog
//----------------------------------------------------------------------------
class ExportMixerDialog final : public wxDialog
class ExportMixerDialog final : public wxDialogWrapper
{
public:
// constructors and destructors

View File

@ -498,7 +498,7 @@ int ExportCL::Export(AudacityProject *project,
// Display output on error or if the user wants to see it
if (process.GetStatus() != 0 || show) {
// TODO use ShowInfoDialog() instead.
wxDialog dlg(NULL,
wxDialogWrapper dlg(nullptr,
wxID_ANY,
wxString(_("Command Output")),
wxDefaultPosition,

View File

@ -937,7 +937,7 @@ void ExportFFmpeg::SetMetadata(const Tags *tags, const char *name, const wxChar
int ExportFFmpeg::AskResample(int bitrate, int rate, int lowrate, int highrate, const int *sampRates)
{
wxDialog d(NULL, wxID_ANY, wxString(_("Invalid sample rate")));
wxDialogWrapper d(nullptr, wxID_ANY, wxString(_("Invalid sample rate")));
d.SetName(d.GetTitle());
wxChoice *choice;
ShuttleGui S(&d, eIsCreating);

View File

@ -874,7 +874,7 @@ void FFmpegPresets::WriteXML(XMLWriter &xmlFile)
// ExportFFmpegOptions Class
//----------------------------------------------------------------------------
BEGIN_EVENT_TABLE(ExportFFmpegOptions, wxDialog)
BEGIN_EVENT_TABLE(ExportFFmpegOptions, wxDialogWrapper)
EVT_BUTTON(wxID_OK,ExportFFmpegOptions::OnOK)
EVT_LISTBOX(FEFormatID,ExportFFmpegOptions::OnFormatList)
EVT_LISTBOX(FECodecID,ExportFFmpegOptions::OnCodecList)
@ -1303,7 +1303,7 @@ ExportFFmpegOptions::~ExportFFmpegOptions()
}
ExportFFmpegOptions::ExportFFmpegOptions(wxWindow *parent)
: wxDialog(parent, wxID_ANY,
: wxDialogWrapper(parent, wxID_ANY,
wxString(_("Configure custom FFmpeg options")))
{
SetName(GetTitle());

View File

@ -176,7 +176,7 @@ struct ApplicableFor
class FFmpegPresets;
/// Custom FFmpeg export dialog
class ExportFFmpegOptions final : public wxDialog
class ExportFFmpegOptions final : public wxDialogWrapper
{
public:

View File

@ -580,14 +580,14 @@ int ExportMP3Options::FindIndex(CHOICES *choices, int cnt, int needle, int def)
#define ID_BROWSE 5000
#define ID_DLOAD 5001
class FindDialog final : public wxDialog
class FindDialog final : public wxDialogWrapper
{
public:
#ifndef DISABLE_DYNAMIC_LOADING_LAME
FindDialog(wxWindow *parent, wxString path, wxString name, wxString type)
: wxDialog(parent, wxID_ANY,
: wxDialogWrapper(parent, wxID_ANY,
/* i18n-hint: LAME is the name of an MP3 converter and should not be translated*/
wxString(_("Locate Lame")))
{
@ -702,7 +702,7 @@ private:
};
#ifndef DISABLE_DYNAMIC_LOADING_LAME
BEGIN_EVENT_TABLE(FindDialog, wxDialog)
BEGIN_EVENT_TABLE(FindDialog, wxDialogWrapper)
EVT_BUTTON(ID_BROWSE, FindDialog::OnBrowse)
EVT_BUTTON(ID_DLOAD, FindDialog::OnDownload)
END_EVENT_TABLE()
@ -1928,7 +1928,7 @@ wxString ExportMP3::FindName(CHOICES *choices, int cnt, int needle)
int ExportMP3::AskResample(int bitrate, int rate, int lowrate, int highrate)
{
wxDialog d(NULL, wxID_ANY, wxString(_("Invalid sample rate")));
wxDialogWrapper d(nullptr, wxID_ANY, wxString(_("Invalid sample rate")));
d.SetName(d.GetTitle());
wxChoice *choice;
ShuttleGui S(&d, eIsCreating);

View File

@ -77,7 +77,7 @@ enum {
// ExportMultiple methods
//
BEGIN_EVENT_TABLE(ExportMultiple, wxDialog)
BEGIN_EVENT_TABLE(ExportMultiple, wxDialogWrapper)
EVT_CHOICE(FormatID, ExportMultiple::OnFormat)
// EVT_BUTTON(OptionsID, ExportMultiple::OnOptions)
EVT_BUTTON(CreateID, ExportMultiple::OnCreate)
@ -94,7 +94,7 @@ BEGIN_EVENT_TABLE(ExportMultiple, wxDialog)
EVT_TEXT(PrefixID, ExportMultiple::OnPrefix)
END_EVENT_TABLE()
BEGIN_EVENT_TABLE(SuccessDialog, wxDialog)
BEGIN_EVENT_TABLE(SuccessDialog, wxDialogWrapper)
EVT_LIST_KEY_DOWN(wxID_ANY, SuccessDialog::OnKeyDown)
EVT_LIST_ITEM_ACTIVATED(wxID_ANY, SuccessDialog::OnItemActivated) // happens when <enter> is pressed with list item having focus
END_EVENT_TABLE()
@ -104,7 +104,7 @@ BEGIN_EVENT_TABLE(MouseEvtHandler, wxEvtHandler)
END_EVENT_TABLE()
ExportMultiple::ExportMultiple(AudacityProject *project)
: wxDialog(project, wxID_ANY, wxString(_("Export Multiple")))
: wxDialogWrapper(project, wxID_ANY, wxString(_("Export Multiple")))
{
SetName(GetTitle());
@ -208,7 +208,7 @@ int ExportMultiple::ShowModal()
EnableControls();
return wxDialog::ShowModal();
return wxDialogWrapper::ShowModal();
}
void ExportMultiple::PopulateOrExchange(ShuttleGui& S)

View File

@ -30,7 +30,7 @@ class AudacityProject;
class LabelTrack;
class ShuttleGui;
class ExportMultiple final : public wxDialog
class ExportMultiple final : public wxDialogWrapper
{
public:
@ -163,11 +163,11 @@ private:
};
class SuccessDialog final : public wxDialog
class SuccessDialog final : public wxDialogWrapper
{
public:
SuccessDialog(wxWindow *parent, wxWindowID id, const wxString &title) :
wxDialog(parent, id, title, wxDefaultPosition,
wxDialogWrapper(parent, id, title, wxDefaultPosition,
wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) {};
void OnKeyDown(wxListEvent& event); // dismisses dialog when <enter> is pressed with list control having focus
void OnItemActivated(wxListEvent& event); // dismisses dialog when <enter> is pressed with list item having focus

View File

@ -736,14 +736,14 @@ bool Importer::Import(const wxString &fName,
// ImportStreamDialog
//-------------------------------------------------------------------------
BEGIN_EVENT_TABLE( ImportStreamDialog,wxDialog )
BEGIN_EVENT_TABLE( ImportStreamDialog, wxDialogWrapper )
EVT_BUTTON( wxID_OK, ImportStreamDialog::OnOk )
EVT_BUTTON( wxID_CANCEL, ImportStreamDialog::OnCancel )
END_EVENT_TABLE()
ImportStreamDialog::ImportStreamDialog( ImportFileHandle *_mFile, wxWindow *parent, wxWindowID id, const wxString &title,
const wxPoint &position, const wxSize& size, long style ):
wxDialog( parent, id, title, position, size, style | wxRESIZE_BORDER )
wxDialogWrapper( parent, id, title, position, size, style | wxRESIZE_BORDER )
{
SetName(GetTitle());

View File

@ -15,10 +15,11 @@
#include <vector>
#include <wx/arrstr.h>
#include <wx/string.h>
#include <wx/dialog.h>
#include <wx/listbox.h>
#include <wx/tokenzr.h>
#include "../widgets/wxPanelWrapper.h"
class Tags;
class TrackFactory;
class Track;
@ -157,7 +158,7 @@ private:
// ImportStreamDialog
//----------------------------------------------------------------------------
class ImportStreamDialog final : public wxDialog
class ImportStreamDialog final : public wxDialogWrapper
{
public:
// constructors and destructors

View File

@ -242,7 +242,7 @@ static wxString AskCopyOrEdit()
// check the current preferences for whether or not we should ask the user about this.
if (oldAskPref) {
wxString newCopyPref = wxT("copy");
wxDialog dialog(NULL, -1, wxString(_("Warning")));
wxDialogWrapper dialog(nullptr, -1, wxString(_("Warning")));
dialog.SetName(dialog.GetTitle());
wxBoxSizer *vbox;

View File

@ -57,7 +57,7 @@ and sample size to help you importing data of an unknown format.
#include "sndfile.h"
class ImportRawDialog final : public wxDialog {
class ImportRawDialog final : public wxDialogWrapper {
public:
ImportRawDialog(wxWindow * parent,
@ -293,7 +293,7 @@ enum {
PlayID
};
BEGIN_EVENT_TABLE(ImportRawDialog, wxDialog)
BEGIN_EVENT_TABLE(ImportRawDialog, wxDialogWrapper)
EVT_BUTTON(wxID_OK, ImportRawDialog::OnOK)
EVT_BUTTON(wxID_CANCEL, ImportRawDialog::OnCancel)
EVT_BUTTON(PlayID, ImportRawDialog::OnPlay)
@ -303,7 +303,7 @@ END_EVENT_TABLE()
ImportRawDialog::ImportRawDialog(wxWindow * parent,
int encoding, int channels,
int offset, double rate)
: wxDialog(parent, wxID_ANY, _("Import Raw Data"),
: wxDialogWrapper(parent, wxID_ANY, _("Import Raw Data"),
wxDefaultPosition, wxDefaultSize,
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER),
mEncoding(encoding),

View File

@ -68,14 +68,11 @@
#include "MidiIOPrefs.h"
#endif
BEGIN_EVENT_TABLE(PrefsDialog, wxDialog)
BEGIN_EVENT_TABLE(PrefsDialog, wxDialogWrapper)
EVT_BUTTON(wxID_OK, PrefsDialog::OnOK)
EVT_BUTTON(wxID_CANCEL, PrefsDialog::OnCancel)
EVT_BUTTON(wxID_APPLY, PrefsDialog::OnApply)
EVT_TREE_KEY_DOWN(wxID_ANY, PrefsDialog::OnTreeKeyDown) // Handles key events when tree has focus
EVT_CHAR_HOOK(PrefsDialog::OnCharHook)
END_EVENT_TABLE()
@ -97,8 +94,8 @@ public:
int wxTreebookExt::ChangeSelection(size_t n) {
int i = wxTreebook::ChangeSelection(n);
wxString Temp = GetPageText( n );
((wxDialog*)GetParent())->SetTitle( Temp );
((wxDialog*)GetParent())->SetName( Temp );
static_cast<wxDialog*>(GetParent())->SetTitle( Temp );
static_cast<wxDialog*>(GetParent())->SetName( Temp );
return i;
};
@ -106,8 +103,8 @@ int wxTreebookExt::SetSelection(size_t n)
{
int i = wxTreebook::SetSelection(n);
wxString Temp = wxString(mTitlePrefix) + GetPageText( n );
((wxDialog*)GetParent())->SetTitle( Temp );
((wxDialog*)GetParent())->SetName( Temp );
static_cast<wxDialog*>(GetParent())->SetTitle( Temp );
static_cast<wxDialog*>(GetParent())->SetName( Temp );
PrefsPanel *const panel = static_cast<PrefsPanel *>(GetPage(n));
const bool showApply = panel->ShowsApplyButton();
@ -202,7 +199,7 @@ PrefsDialog::Factories
PrefsDialog::PrefsDialog
(wxWindow * parent, const wxString &titlePrefix, Factories &factories)
: wxDialog(parent, wxID_ANY, wxString(_("Audacity Preferences")),
: wxDialogWrapper(parent, wxID_ANY, wxString(_("Audacity Preferences")),
wxDefaultPosition,
wxDefaultSize,
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
@ -342,7 +339,7 @@ int PrefsDialog::ShowModal()
SetName(Temp);
}
return wxDialog::ShowModal();
return wxDialogWrapper::ShowModal();
}
void PrefsDialog::OnCancel(wxCommandEvent & WXUNUSED(event))
@ -376,12 +373,6 @@ void PrefsDialog::OnTreeKeyDown(wxTreeEvent & event)
event.Skip(); // Ensure standard behavior when enter is not pressed
}
void PrefsDialog::OnCharHook(wxKeyEvent &event)
{
// Common behavior, let's define it in just one place
wxTabTraversalWrapperCharHook(event);
}
void PrefsDialog::OnOK(wxCommandEvent & WXUNUSED(event))
{
RecordExpansionState();

View File

@ -19,6 +19,7 @@
#include <wx/string.h>
#include <wx/treebook.h>
#include <wx/window.h>
#include "../widgets/wxPanelWrapper.h"
class PrefsPanel;
class PrefsPanelFactory;
@ -29,7 +30,7 @@ class PrefsPanelFactory;
#define CONST const
#endif
class PrefsDialog /* not final */ : public wxDialog
class PrefsDialog /* not final */ : public wxDialogWrapper
{
public:
// An array of PrefsNode specifies the tree of pages in pre-order traversal.
@ -61,8 +62,6 @@ class PrefsDialog /* not final */ : public wxDialog
void OnApply(wxCommandEvent & e);
void OnTreeKeyDown(wxTreeEvent & e); // Used to dismiss the dialog when enter is pressed with focus on tree
void OnCharHook(wxKeyEvent &e);
void SelectPageByName(const wxString &pageName);
// Accessor to help implementations of SavePreferredPage(),

View File

@ -794,7 +794,7 @@ void DeviceToolBar::ShowComboDialog(wxChoice *combo, const wxString &title)
#if USE_PORTMIXER
wxArrayString inputSources = combo->GetStrings();
wxDialog dlg(NULL, wxID_ANY, title);
wxDialogWrapper dlg(nullptr, wxID_ANY, title);
dlg.SetName(dlg.GetTitle());
ShuttleGui S(&dlg, eIsCreating);
wxChoice *c;

View File

@ -178,7 +178,7 @@ void TipPanel::OnCreate(wxWindowCreateEvent & WXUNUSED(event))
// SliderDialog
//
BEGIN_EVENT_TABLE(SliderDialog, wxDialog)
BEGIN_EVENT_TABLE(SliderDialog, wxDialogWrapper)
EVT_SLIDER(wxID_ANY,SliderDialog::OnSlider)
END_EVENT_TABLE();
@ -190,7 +190,7 @@ SliderDialog::SliderDialog(wxWindow * parent, wxWindowID id,
float value,
float line,
float page):
wxDialog(parent,id,title,position),
wxDialogWrapper(parent,id,title,position),
mStyle(style)
{
SetName(GetTitle());

View File

@ -18,9 +18,9 @@
#include "../MemoryX.h"
#include <wx/defs.h>
#include <wx/window.h>
#include <wx/dialog.h>
#include <wx/panel.h>
#include <wx/timer.h>
#include "widgets/wxPanelWrapper.h"
#if wxUSE_ACCESSIBILITY
#include <wx/access.h>
@ -330,7 +330,7 @@ public:
// This is a modal dialog that contains an ASlider
// and a text-entry box which can be used to set the
// value of a slider.
class SliderDialog final : public wxDialog
class SliderDialog final : public wxDialogWrapper
{
public:
SliderDialog(wxWindow * parent, wxWindowID id,

View File

@ -51,7 +51,7 @@ class AliasedFileMissingDialog final : public ErrorDialog
virtual ~AliasedFileMissingDialog();
};
BEGIN_EVENT_TABLE(ErrorDialog, wxDialog)
BEGIN_EVENT_TABLE(ErrorDialog, wxDialogWrapper)
EVT_BUTTON( wxID_OK, ErrorDialog::OnOk)
EVT_BUTTON( wxID_HELP, ErrorDialog::OnHelp)
END_EVENT_TABLE()
@ -78,7 +78,7 @@ ErrorDialog::ErrorDialog(
const wxString & message,
const wxString & helpURL,
const bool Close, const bool modal):
wxDialog(parent, (wxWindowID)-1, dlogTitle)
wxDialogWrapper(parent, (wxWindowID)-1, dlogTitle)
{
SetName(GetTitle());

View File

@ -15,10 +15,11 @@
#include "../Audacity.h"
#include <wx/defs.h>
#include <wx/window.h>
#include "wxPanelWrapper.h"
class AudacityProject;
class ErrorDialog /* not final */ : public wxDialog
class ErrorDialog /* not final */ : public wxDialogWrapper
{
public:
// constructors and destructors

View File

@ -731,16 +731,16 @@ void ToolBarGrabber::OnSize(wxSizeEvent & WXUNUSED(event))
// ToolBarDialog
//
BEGIN_EVENT_TABLE(ToolBarDialog, wxDialog)
BEGIN_EVENT_TABLE(ToolBarDialog, wxDialogWrapper)
END_EVENT_TABLE()
IMPLEMENT_CLASS(ToolBarDialog, wxDialog)
IMPLEMENT_CLASS(ToolBarDialog, wxDialogWrapper)
ToolBarDialog::ToolBarDialog(wxWindow* parent,
wxWindowID id,
const wxString& name,
const wxPoint& pos):
wxDialog(parent, id, name, pos, wxSize(1, 1),
wxDialogWrapper(parent, id, name, pos, wxSize(1, 1),
// Workaround for bug in __WXMSW__. No close box on a wxDialog unless wxSYSTEM_MENU is used.
#ifdef __WXMSW__
wxSYSTEM_MENU |

View File

@ -145,7 +145,7 @@ class ToolBarGrabber final : public wxPanelWrapper
DECLARE_EVENT_TABLE();
};
class ToolBarDialog final : public wxDialog
class ToolBarDialog final : public wxDialogWrapper
{
public:
DECLARE_DYNAMIC_CLASS(ToolBarDialog)

View File

@ -57,7 +57,7 @@ void HelpSystem::ShowInfoDialog( wxWindow *parent,
const wxString &message,
const int xSize, const int ySize)
{
wxDialog dlog(parent, wxID_ANY,
wxDialogWrapper dlog(parent, wxID_ANY,
dlogTitle,
wxDefaultPosition, wxDefaultSize,
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxMAXIMIZE_BOX /*| wxDEFAULT_FRAME_STYLE */);

View File

@ -28,7 +28,7 @@
#include "ErrorDialog.h"
#include "HelpSystem.h"
BEGIN_EVENT_TABLE(BrowserDialog, wxDialog)
BEGIN_EVENT_TABLE(BrowserDialog, wxDialogWrapper)
EVT_BUTTON(wxID_FORWARD, BrowserDialog::OnForward)
EVT_BUTTON(wxID_BACKWARD, BrowserDialog::OnBackward)
EVT_BUTTON(wxID_CANCEL, BrowserDialog::OnClose)
@ -37,7 +37,7 @@ END_EVENT_TABLE()
BrowserDialog::BrowserDialog(wxWindow *pParent, const wxString &title)
: wxDialog{ pParent, ID, title }
: wxDialogWrapper{ pParent, ID, title }
{
}

View File

@ -16,11 +16,11 @@
#ifndef __AUDACITY_LINKINGHTMLWINDOW__
#define __AUDACITY_LINKINGHTMLWINDOW__
#include <wx/dialog.h>
#include <wx/html/htmlwin.h>
#include <wx/frame.h>
#include "HtmlWindow.h"
#include "wxPanelWrapper.h"
void OpenInDefaultBrowser(const wxHtmlLinkInfo& link);
@ -36,7 +36,7 @@ class AUDACITY_DLL_API LinkingHtmlWindow final : public HtmlWindow
};
class BrowserDialog /* not final */ : public wxDialog
class BrowserDialog /* not final */ : public wxDialogWrapper
{
public:
enum { ID = 0 };

View File

@ -1954,7 +1954,7 @@ void Meter::OnPreferences(wxCommandEvent & WXUNUSED(event))
// Dialog is a child of the project, rather than of the toolbar.
// This determines where it pops up.
wxDialog dlg(GetActiveProject(), wxID_ANY, title);
wxDialogWrapper dlg(GetActiveProject(), wxID_ANY, title);
dlg.SetName(dlg.GetTitle());
ShuttleGui S(&dlg, eIsCreating);
S.StartVerticalLay();

View File

@ -33,7 +33,7 @@ for each problem encountered, since there can be many orphans.
#include <wx/artprov.h>
#include <wx/radiobox.h>
class MultiDialog final : public wxDialog
class MultiDialog final : public wxDialogWrapper
{
public:
MultiDialog(wxWindow * pParent,
@ -53,7 +53,7 @@ private:
#define ID_SHOW_LOG_BUTTON 3333
BEGIN_EVENT_TABLE(MultiDialog, wxDialog)
BEGIN_EVENT_TABLE(MultiDialog, wxDialogWrapper)
EVT_BUTTON( wxID_OK, MultiDialog::OnOK )
EVT_BUTTON(ID_SHOW_LOG_BUTTON, MultiDialog::OnShowLog)
END_EVENT_TABLE()
@ -62,7 +62,7 @@ MultiDialog::MultiDialog(wxWindow * pParent,
wxString message,
wxString title,
const wxChar **buttons, wxString boxMsg, bool log)
: wxDialog(pParent, wxID_ANY, title,
: wxDialogWrapper(pParent, wxID_ANY, title,
wxDefaultPosition, wxDefaultSize,
wxCAPTION) // not wxDEFAULT_DIALOG_STYLE because we don't want wxCLOSE_BOX and wxSYSTEM_MENU
{

View File

@ -980,7 +980,7 @@ static const unsigned char beep[] =
/// Methods for ProgressDialog
////////////////////////////////////////////////////////////
BEGIN_EVENT_TABLE(ProgressDialog, wxDialog)
BEGIN_EVENT_TABLE(ProgressDialog, wxDialogWrapper)
EVT_BUTTON(wxID_CANCEL, ProgressDialog::OnCancel)
EVT_BUTTON(wxID_OK, ProgressDialog::OnStop)
EVT_CLOSE(ProgressDialog::OnCloseWindow)
@ -990,7 +990,7 @@ END_EVENT_TABLE()
// Constructor
//
ProgressDialog::ProgressDialog()
: wxDialog()
: wxDialogWrapper()
{
Init();
}
@ -999,7 +999,7 @@ ProgressDialog::ProgressDialog(const wxString & title,
const wxString & message /* = wxEmptyString*/,
int flags /* = pdlgDefaultFlags */,
const wxString & sRemainingLabelText /* = wxEmptyString */)
: wxDialog()
: wxDialogWrapper()
{
Init();
@ -1082,7 +1082,7 @@ bool ProgressDialog::Create(const wxString & title,
// Set this boolean to indicate if we confirm the Cancel/Stop actions
m_bConfirmAction = (flags & pdlgConfirmStopCancel);
bool success = wxDialog::Create(parent,
bool success = wxDialogWrapper::Create(parent,
wxID_ANY,
title,
wxDefaultPosition,
@ -1247,7 +1247,7 @@ bool ProgressDialog::Create(const wxString & title,
SetTransparent(0);
mIsTransparent = true;
wxDialog::Show(true);
wxDialogWrapper::Show(true);
// Even though we won't necessarily show the dialog due to the 500ms
// delay, we MUST disable other windows/menus anyway since we run the risk
@ -1335,7 +1335,7 @@ int ProgressDialog::Update(int value, const wxString & message)
mLastUpdate = now;
}
wxDialog::Update();
wxDialogWrapper::Update();
// Copied from wx 3.0.2 generic progress dialog
//
@ -1476,7 +1476,7 @@ void ProgressDialog::SetMessage(const wxString & message)
// to the existing dimensions.
ds.x = wxMax(wxMax(ds.x, mLastW), wxMax(ds.y, mLastH));
SetClientSize(ds);
wxDialog::Update();
wxDialogWrapper::Update();
}
}
}

View File

@ -21,13 +21,14 @@
#include "../Audacity.h"
#include <wx/defs.h>
#include <wx/dialog.h>
#include <wx/evtloop.h>
#include <wx/gauge.h>
#include <wx/stattext.h>
#include <wx/utils.h>
#include <wx/msgdlg.h>
#include "wxPanelWrapper.h"
enum
{
eProgressCancelled = 0, //<! User says that whatever is happening is undesirable and shouldn't have happened at all
@ -51,7 +52,7 @@ enum ProgressDialogFlags
/// ProgressDialog Class
////////////////////////////////////////////////////////////
class AUDACITY_DLL_API ProgressDialog /* not final */ : public wxDialog
class AUDACITY_DLL_API ProgressDialog /* not final */ : public wxDialogWrapper
{
public:
ProgressDialog();

View File

@ -26,12 +26,12 @@ the ability to not see similar warnings again for this session.
#include <wx/artprov.h>
#include <wx/button.h>
#include <wx/checkbox.h>
#include <wx/dialog.h>
#include <wx/intl.h>
#include <wx/sizer.h>
#include <wx/stattext.h>
#include "wxPanelWrapper.h"
class WarningDialog final : public wxDialog
class WarningDialog final : public wxDialogWrapper
{
public:
// constructors and destructors
@ -47,12 +47,12 @@ class WarningDialog final : public wxDialog
DECLARE_EVENT_TABLE()
};
BEGIN_EVENT_TABLE(WarningDialog, wxDialog)
BEGIN_EVENT_TABLE(WarningDialog, wxDialogWrapper)
EVT_BUTTON(wxID_OK, WarningDialog::OnOK)
END_EVENT_TABLE()
WarningDialog::WarningDialog(wxWindow *parent, wxString message, bool showCancelButton)
: wxDialog(parent, wxID_ANY, (wxString)_("Warning"),
: wxDialogWrapper(parent, wxID_ANY, (wxString)_("Warning"),
wxDefaultPosition, wxDefaultSize,
(showCancelButton ? wxDEFAULT_DIALOG_STYLE : wxCAPTION | wxSYSTEM_MENU)) // Unlike wxDEFAULT_DIALOG_STYLE, no wxCLOSE_BOX.
{

View File

@ -11,6 +11,7 @@
#include <MemoryX.h>
#include <wx/panel.h>
#include <wx/dialog.h>
void wxTabTraversalWrapperCharHook(wxKeyEvent &event);
@ -34,5 +35,7 @@ public:
class wxPanel;
using wxPanelWrapper = wxTabTraversalWrapper<wxPanel>;
class wxDialog;
using wxDialogWrapper = wxTabTraversalWrapper<wxDialog>;
#endif