diff --git a/src/FileNames.cpp b/src/FileNames.cpp index d13588f4a..6ce13a2c3 100644 --- a/src/FileNames.cpp +++ b/src/FileNames.cpp @@ -109,7 +109,7 @@ wxString FileNames::TempDir() return FileNames::MkDir(gPrefs->Read(wxT("/Directories/TempDir"), wxT(""))); } -// originally an ExportMultiple method. Append suffix if newName appears in otherNames. +// originally an ExportMultipleDialog method. Append suffix if newName appears in otherNames. void FileNames::MakeNameUnique(FilePaths &otherNames, wxFileName &newName) { diff --git a/src/FileNames.h b/src/FileNames.h index d61efd309..0b76100d8 100644 --- a/src/FileNames.h +++ b/src/FileNames.h @@ -54,7 +54,7 @@ public: static const FilePaths &AudacityPathList(); static void SetAudacityPathList( FilePaths list ); - // originally an ExportMultiple method. Append suffix if newName appears in otherNames. + // originally an ExportMultipleDialog method. Append suffix if newName appears in otherNames. static void MakeNameUnique( FilePaths &otherNames, wxFileName &newName); diff --git a/src/FreqWindow.cpp b/src/FreqWindow.cpp index 4f5868fd1..f5d3ed798 100644 --- a/src/FreqWindow.cpp +++ b/src/FreqWindow.cpp @@ -8,7 +8,7 @@ *******************************************************************//** -\class FreqWindow +\class FrequencyPlotDialog \brief Displays a spectrum plot of the waveform. Has options for selecting parameters of the plot. @@ -18,7 +18,7 @@ the mouse around. *//****************************************************************//** \class FreqPlot -\brief Works with FreqWindow to dsplay a spectrum plot of the waveform. +\brief Works with FrequencyPlotDialog to dsplay a spectrum plot of the waveform. This class actually does the graph display. Has a feature that finds peaks and reports their value as you move @@ -166,23 +166,23 @@ static const char * ZoomOut[] = { "@+@@ ", " @@ "}; -// FreqWindow +// FrequencyPlotDialog -BEGIN_EVENT_TABLE(FreqWindow, wxDialogWrapper) - EVT_CLOSE(FreqWindow::OnCloseWindow) - EVT_SIZE(FreqWindow::OnSize) - EVT_SLIDER(FreqZoomSliderID, FreqWindow::OnZoomSlider) - EVT_COMMAND_SCROLL(FreqPanScrollerID, FreqWindow::OnPanScroller) - EVT_CHOICE(FreqAlgChoiceID, FreqWindow::OnAlgChoice) - EVT_CHOICE(FreqSizeChoiceID, FreqWindow::OnSizeChoice) - EVT_CHOICE(FreqFuncChoiceID, FreqWindow::OnFuncChoice) - EVT_CHOICE(FreqAxisChoiceID, FreqWindow::OnAxisChoice) - EVT_BUTTON(FreqExportButtonID, FreqWindow::OnExport) - EVT_BUTTON(ReplotButtonID, FreqWindow::OnReplot) - EVT_BUTTON(wxID_CANCEL, FreqWindow::OnCloseButton) - EVT_BUTTON(wxID_HELP, FreqWindow::OnGetURL) - EVT_CHECKBOX(GridOnOffID, FreqWindow::OnGridOnOff) - EVT_COMMAND(wxID_ANY, EVT_FREQWINDOW_RECALC, FreqWindow::OnRecalc) +BEGIN_EVENT_TABLE(FrequencyPlotDialog, wxDialogWrapper) + EVT_CLOSE(FrequencyPlotDialog::OnCloseWindow) + EVT_SIZE(FrequencyPlotDialog::OnSize) + EVT_SLIDER(FreqZoomSliderID, FrequencyPlotDialog::OnZoomSlider) + EVT_COMMAND_SCROLL(FreqPanScrollerID, FrequencyPlotDialog::OnPanScroller) + EVT_CHOICE(FreqAlgChoiceID, FrequencyPlotDialog::OnAlgChoice) + EVT_CHOICE(FreqSizeChoiceID, FrequencyPlotDialog::OnSizeChoice) + EVT_CHOICE(FreqFuncChoiceID, FrequencyPlotDialog::OnFuncChoice) + EVT_CHOICE(FreqAxisChoiceID, FrequencyPlotDialog::OnAxisChoice) + EVT_BUTTON(FreqExportButtonID, FrequencyPlotDialog::OnExport) + EVT_BUTTON(ReplotButtonID, FrequencyPlotDialog::OnReplot) + EVT_BUTTON(wxID_CANCEL, FrequencyPlotDialog::OnCloseButton) + EVT_BUTTON(wxID_HELP, FrequencyPlotDialog::OnGetURL) + EVT_CHECKBOX(GridOnOffID, FrequencyPlotDialog::OnGridOnOff) + EVT_COMMAND(wxID_ANY, EVT_FREQWINDOW_RECALC, FrequencyPlotDialog::OnRecalc) END_EVENT_TABLE() SpectrumAnalyst::SpectrumAnalyst() @@ -196,7 +196,7 @@ SpectrumAnalyst::~SpectrumAnalyst() { } -FreqWindow::FreqWindow(wxWindow * parent, wxWindowID id, +FrequencyPlotDialog::FrequencyPlotDialog(wxWindow * parent, wxWindowID id, const wxString & title, const wxPoint & pos) : wxDialogWrapper(parent, id, title, pos, wxDefaultSize, @@ -256,19 +256,19 @@ FreqWindow::FreqWindow(wxWindow * parent, wxWindowID id, mArrowCursor = std::make_unique(wxCURSOR_ARROW); mCrossCursor = std::make_unique(wxCURSOR_CROSS); - gPrefs->Read(wxT("/FreqWindow/DrawGrid"), &mDrawGrid, true); + gPrefs->Read(wxT("/FrequencyPlotDialog/DrawGrid"), &mDrawGrid, true); long size; - gPrefs->Read(wxT("/FreqWindow/SizeChoice"), &mSize, 3); + gPrefs->Read(wxT("/FrequencyPlotDialog/SizeChoice"), &mSize, 3); sizeChoices[mSize].ToLong(&size); mWindowSize = size; int alg; - gPrefs->Read(wxT("/FreqWindow/AlgChoice"), &alg, 0); + gPrefs->Read(wxT("/FrequencyPlotDialog/AlgChoice"), &alg, 0); mAlg = static_cast(alg); - gPrefs->Read(wxT("/FreqWindow/FuncChoice"), &mFunc, 3); - gPrefs->Read(wxT("/FreqWindow/AxisChoice"), &mAxis, 1); + gPrefs->Read(wxT("/FrequencyPlotDialog/FuncChoice"), &mFunc, 3); + gPrefs->Read(wxT("/FrequencyPlotDialog/AxisChoice"), &mAxis, 1); gPrefs->Read(ENV_DB_KEY, &dBRange, ENV_DB_RANGE); if(dBRange < 90.) dBRange = 90.; @@ -547,18 +547,18 @@ FreqWindow::FreqWindow(wxWindow * parent, wxWindowID id, #endif } -FreqWindow::~FreqWindow() +FrequencyPlotDialog::~FrequencyPlotDialog() { } -void FreqWindow::OnGetURL(wxCommandEvent & WXUNUSED(event)) +void FrequencyPlotDialog::OnGetURL(wxCommandEvent & WXUNUSED(event)) { // Original help page is back on-line (March 2016), but the manual should be more reliable. // http://www.eramp.com/WCAG_2_audio_contrast_tool_help.htm HelpSystem::ShowHelp(this, wxT("Plot Spectrum")); } -bool FreqWindow::Show(bool show) +bool FrequencyPlotDialog::Show(bool show) { if (!show) { @@ -584,7 +584,7 @@ bool FreqWindow::Show(bool show) return res; } -void FreqWindow::GetAudio() +void FrequencyPlotDialog::GetAudio() { mData.reset(); mDataLen = 0; @@ -639,7 +639,7 @@ void FreqWindow::GetAudio() } } -void FreqWindow::OnSize(wxSizeEvent & WXUNUSED(event)) +void FrequencyPlotDialog::OnSize(wxSizeEvent & WXUNUSED(event)) { Layout(); @@ -648,7 +648,7 @@ void FreqWindow::OnSize(wxSizeEvent & WXUNUSED(event)) Refresh(true); } -void FreqWindow::DrawBackground(wxMemoryDC & dc) +void FrequencyPlotDialog::DrawBackground(wxMemoryDC & dc) { Layout(); @@ -670,7 +670,7 @@ void FreqWindow::DrawBackground(wxMemoryDC & dc) dc.SetFont(mFreqFont); } -void FreqWindow::DrawPlot() +void FrequencyPlotDialog::DrawPlot() { if (!mData || mDataLen < mWindowSize || mAnalyst->GetProcessedSize() == 0) { wxMemoryDC memDC; @@ -821,7 +821,7 @@ void FreqWindow::DrawPlot() } -void FreqWindow::PlotMouseEvent(wxMouseEvent & event) +void FrequencyPlotDialog::PlotMouseEvent(wxMouseEvent & event) { if (event.Moving() && (event.m_x != mMouseX || event.m_y != mMouseY)) { mMouseX = event.m_x; @@ -836,17 +836,17 @@ void FreqWindow::PlotMouseEvent(wxMouseEvent & event) } } -void FreqWindow::OnPanScroller(wxScrollEvent & WXUNUSED(event)) +void FrequencyPlotDialog::OnPanScroller(wxScrollEvent & WXUNUSED(event)) { DrawPlot(); } -void FreqWindow::OnZoomSlider(wxCommandEvent & WXUNUSED(event)) +void FrequencyPlotDialog::OnZoomSlider(wxCommandEvent & WXUNUSED(event)) { DrawPlot(); } -void FreqWindow::OnAlgChoice(wxCommandEvent & WXUNUSED(event)) +void FrequencyPlotDialog::OnAlgChoice(wxCommandEvent & WXUNUSED(event)) { mAlg = SpectrumAnalyst::Algorithm(mAlgChoice->GetSelection()); @@ -863,7 +863,7 @@ void FreqWindow::OnAlgChoice(wxCommandEvent & WXUNUSED(event)) SendRecalcEvent(); } -void FreqWindow::OnSizeChoice(wxCommandEvent & WXUNUSED(event)) +void FrequencyPlotDialog::OnSizeChoice(wxCommandEvent & WXUNUSED(event)) { long windowSize = 0; mSizeChoice->GetStringSelection().ToLong(&windowSize); @@ -872,18 +872,18 @@ void FreqWindow::OnSizeChoice(wxCommandEvent & WXUNUSED(event)) SendRecalcEvent(); } -void FreqWindow::OnFuncChoice(wxCommandEvent & WXUNUSED(event)) +void FrequencyPlotDialog::OnFuncChoice(wxCommandEvent & WXUNUSED(event)) { SendRecalcEvent(); } -void FreqWindow::OnAxisChoice(wxCommandEvent & WXUNUSED(event)) +void FrequencyPlotDialog::OnAxisChoice(wxCommandEvent & WXUNUSED(event)) { mLogAxis = mAxisChoice->GetSelection() ? true : false; DrawPlot(); } -void FreqWindow::PlotPaint(wxPaintEvent & event) +void FrequencyPlotDialog::PlotPaint(wxPaintEvent & event) { wxPaintDC dc( (wxWindow *) event.GetEventObject() ); @@ -989,29 +989,29 @@ void FreqWindow::PlotPaint(wxPaintEvent & event) dc.DrawRectangle(r); } -void FreqWindow::OnCloseWindow(wxCloseEvent & WXUNUSED(event)) +void FrequencyPlotDialog::OnCloseWindow(wxCloseEvent & WXUNUSED(event)) { Show(false); } -void FreqWindow::OnCloseButton(wxCommandEvent & WXUNUSED(event)) +void FrequencyPlotDialog::OnCloseButton(wxCommandEvent & WXUNUSED(event)) { - gPrefs->Write(wxT("/FreqWindow/DrawGrid"), mDrawGrid); - gPrefs->Write(wxT("/FreqWindow/SizeChoice"), mSizeChoice->GetSelection()); - gPrefs->Write(wxT("/FreqWindow/AlgChoice"), mAlgChoice->GetSelection()); - gPrefs->Write(wxT("/FreqWindow/FuncChoice"), mFuncChoice->GetSelection()); - gPrefs->Write(wxT("/FreqWindow/AxisChoice"), mAxisChoice->GetSelection()); + gPrefs->Write(wxT("/FrequencyPlotDialog/DrawGrid"), mDrawGrid); + gPrefs->Write(wxT("/FrequencyPlotDialog/SizeChoice"), mSizeChoice->GetSelection()); + gPrefs->Write(wxT("/FrequencyPlotDialog/AlgChoice"), mAlgChoice->GetSelection()); + gPrefs->Write(wxT("/FrequencyPlotDialog/FuncChoice"), mFuncChoice->GetSelection()); + gPrefs->Write(wxT("/FrequencyPlotDialog/AxisChoice"), mAxisChoice->GetSelection()); gPrefs->Flush(); Show(false); } -void FreqWindow::SendRecalcEvent() +void FrequencyPlotDialog::SendRecalcEvent() { wxCommandEvent e(EVT_FREQWINDOW_RECALC, wxID_ANY); GetEventHandler()->AddPendingEvent(e); } -void FreqWindow::Recalc() +void FrequencyPlotDialog::Recalc() { if (!mData || mDataLen < mWindowSize) { DrawPlot(); @@ -1056,7 +1056,7 @@ void FreqWindow::Recalc() DrawPlot(); } -void FreqWindow::OnExport(wxCommandEvent & WXUNUSED(event)) +void FrequencyPlotDialog::OnExport(wxCommandEvent & WXUNUSED(event)) { wxString fName = _("spectrum.txt"); @@ -1108,7 +1108,7 @@ void FreqWindow::OnExport(wxCommandEvent & WXUNUSED(event)) f.Close(); } -void FreqWindow::OnReplot(wxCommandEvent & WXUNUSED(event)) +void FrequencyPlotDialog::OnReplot(wxCommandEvent & WXUNUSED(event)) { gPrefs->Read(ENV_DB_KEY, &dBRange, ENV_DB_RANGE); if(dBRange < 90.) @@ -1117,14 +1117,14 @@ void FreqWindow::OnReplot(wxCommandEvent & WXUNUSED(event)) SendRecalcEvent(); } -void FreqWindow::OnGridOnOff(wxCommandEvent & WXUNUSED(event)) +void FrequencyPlotDialog::OnGridOnOff(wxCommandEvent & WXUNUSED(event)) { mDrawGrid = mGridOnOff->IsChecked(); DrawPlot(); } -void FreqWindow::OnRecalc(wxCommandEvent & WXUNUSED(event)) +void FrequencyPlotDialog::OnRecalc(wxCommandEvent & WXUNUSED(event)) { Recalc(); } @@ -1138,7 +1138,7 @@ END_EVENT_TABLE() FreqPlot::FreqPlot(wxWindow *parent, wxWindowID winid) : wxWindow(parent, winid) { - freqWindow = (FreqWindow *) parent; + freqWindow = (FrequencyPlotDialog *) parent; } bool FreqPlot::AcceptsFocus() const diff --git a/src/FreqWindow.h b/src/FreqWindow.h index 218cb5fed..55ce75049 100644 --- a/src/FreqWindow.h +++ b/src/FreqWindow.h @@ -26,7 +26,7 @@ class wxCheckBox; class wxChoice; class AudacityProject; -class FreqWindow; +class FrequencyPlotDialog; class FreqGauge; class RulerPanel; @@ -108,17 +108,17 @@ private: void OnMouseEvent(wxMouseEvent & event); private: - FreqWindow *freqWindow; + FrequencyPlotDialog *freqWindow; DECLARE_EVENT_TABLE() }; -class FreqWindow final : public wxDialogWrapper +class FrequencyPlotDialog final : public wxDialogWrapper { public: - FreqWindow(wxWindow *parent, wxWindowID id, + FrequencyPlotDialog(wxWindow *parent, wxWindowID id, const wxString & title, const wxPoint & pos); - virtual ~ FreqWindow(); + virtual ~ FrequencyPlotDialog(); bool Show( bool show = true ) override; diff --git a/src/HistoryWindow.cpp b/src/HistoryWindow.cpp index c314ec4f4..0427c00af 100644 --- a/src/HistoryWindow.cpp +++ b/src/HistoryWindow.cpp @@ -9,7 +9,7 @@ *******************************************************************//*! -\class HistoryWindow +\class HistoryDialog \brief Works with UndoManager to allow user to see descriptions of and undo previous commands. Also allows you to selectively clear the undo memory so as to free up space. @@ -50,15 +50,15 @@ enum { ID_DISCARD_CLIPBOARD }; -BEGIN_EVENT_TABLE(HistoryWindow, wxDialogWrapper) - EVT_SIZE(HistoryWindow::OnSize) - EVT_CLOSE(HistoryWindow::OnCloseWindow) - EVT_LIST_ITEM_SELECTED(wxID_ANY, HistoryWindow::OnItemSelected) - EVT_BUTTON(ID_DISCARD, HistoryWindow::OnDiscard) - EVT_BUTTON(ID_DISCARD_CLIPBOARD, HistoryWindow::OnDiscardClipboard) +BEGIN_EVENT_TABLE(HistoryDialog, wxDialogWrapper) + EVT_SIZE(HistoryDialog::OnSize) + EVT_CLOSE(HistoryDialog::OnCloseWindow) + EVT_LIST_ITEM_SELECTED(wxID_ANY, HistoryDialog::OnItemSelected) + EVT_BUTTON(ID_DISCARD, HistoryDialog::OnDiscard) + EVT_BUTTON(ID_DISCARD_CLIPBOARD, HistoryDialog::OnDiscardClipboard) END_EVENT_TABLE() -HistoryWindow::HistoryWindow(AudacityProject *parent, UndoManager *manager): +HistoryDialog::HistoryDialog(AudacityProject *parent, UndoManager *manager): wxDialogWrapper(FindProjectFrame( parent ), wxID_ANY, wxString(_("History")), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER ) @@ -98,12 +98,12 @@ HistoryWindow::HistoryWindow(AudacityProject *parent, UndoManager *manager): S.StartMultiColumn(3, wxCENTRE); { mTotal = S.Id(ID_TOTAL) - .ConnectRoot(wxEVT_KEY_DOWN, &HistoryWindow::OnChar) + .ConnectRoot(wxEVT_KEY_DOWN, &HistoryDialog::OnChar) .AddTextBox(_("&Total space used"), wxT("0"), 10); S.AddVariableText( {} )->Hide(); mAvail = S.Id(ID_AVAIL) - .ConnectRoot(wxEVT_KEY_DOWN, &HistoryWindow::OnChar) + .ConnectRoot(wxEVT_KEY_DOWN, &HistoryDialog::OnChar) .AddTextBox(_("&Undo levels available"), wxT("0"), 10); S.AddVariableText( {} )->Hide(); @@ -122,7 +122,7 @@ HistoryWindow::HistoryWindow(AudacityProject *parent, UndoManager *manager): mDiscard = S.Id(ID_DISCARD).AddButton(_("&Discard")); mClipboard = S - .ConnectRoot(wxEVT_KEY_DOWN, &HistoryWindow::OnChar) + .ConnectRoot(wxEVT_KEY_DOWN, &HistoryDialog::OnChar) .AddTextBox(_("Clipboard space used"), wxT("0"), 10); S.Id(ID_DISCARD_CLIPBOARD).AddButton(_("Discard")); } @@ -146,27 +146,27 @@ HistoryWindow::HistoryWindow(AudacityProject *parent, UndoManager *manager): mList->SetTextColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT)); wxTheApp->Bind(EVT_AUDIOIO_PLAYBACK, - &HistoryWindow::OnAudioIO, + &HistoryDialog::OnAudioIO, this); wxTheApp->Bind(EVT_AUDIOIO_CAPTURE, - &HistoryWindow::OnAudioIO, + &HistoryDialog::OnAudioIO, this); Clipboard::Get().Bind( - EVT_CLIPBOARD_CHANGE, &HistoryWindow::UpdateDisplay, this); - parent->Bind(EVT_UNDO_PUSHED, &HistoryWindow::UpdateDisplay, this); - parent->Bind(EVT_UNDO_MODIFIED, &HistoryWindow::UpdateDisplay, this); - parent->Bind(EVT_UNDO_OR_REDO, &HistoryWindow::UpdateDisplay, this); - parent->Bind(EVT_UNDO_RESET, &HistoryWindow::UpdateDisplay, this); + EVT_CLIPBOARD_CHANGE, &HistoryDialog::UpdateDisplay, this); + parent->Bind(EVT_UNDO_PUSHED, &HistoryDialog::UpdateDisplay, this); + parent->Bind(EVT_UNDO_MODIFIED, &HistoryDialog::UpdateDisplay, this); + parent->Bind(EVT_UNDO_OR_REDO, &HistoryDialog::UpdateDisplay, this); + parent->Bind(EVT_UNDO_RESET, &HistoryDialog::UpdateDisplay, this); } -void HistoryWindow::OnChar( wxEvent& ) +void HistoryDialog::OnChar( wxEvent& ) { // ignore it } -void HistoryWindow::OnAudioIO(wxCommandEvent& evt) +void HistoryDialog::OnAudioIO(wxCommandEvent& evt) { evt.Skip(); @@ -178,21 +178,21 @@ void HistoryWindow::OnAudioIO(wxCommandEvent& evt) mDiscard->Enable(!mAudioIOBusy); } -void HistoryWindow::UpdateDisplay(wxEvent& e) +void HistoryDialog::UpdateDisplay(wxEvent& e) { e.Skip(); if(IsShown()) DoUpdate(); } -bool HistoryWindow::Show( bool show ) +bool HistoryDialog::Show( bool show ) { if ( show && !IsShown()) DoUpdate(); return wxDialogWrapper::Show( show ); } -void HistoryWindow::DoUpdate() +void HistoryDialog::DoUpdate() { int i; @@ -225,7 +225,7 @@ void HistoryWindow::DoUpdate() UpdateLevels(); } -void HistoryWindow::UpdateLevels() +void HistoryDialog::UpdateLevels() { wxWindow *focus; int value = mLevels->GetValue(); @@ -252,7 +252,7 @@ void HistoryWindow::UpdateLevels() mDiscard->Enable(!mAudioIOBusy && mSelected > 0); } -void HistoryWindow::OnDiscard(wxCommandEvent & WXUNUSED(event)) +void HistoryDialog::OnDiscard(wxCommandEvent & WXUNUSED(event)) { int i = mLevels->GetValue(); @@ -266,12 +266,12 @@ void HistoryWindow::OnDiscard(wxCommandEvent & WXUNUSED(event)) DoUpdate(); } -void HistoryWindow::OnDiscardClipboard(wxCommandEvent & WXUNUSED(event)) +void HistoryDialog::OnDiscardClipboard(wxCommandEvent & WXUNUSED(event)) { Clipboard::Get().Clear(); } -void HistoryWindow::OnItemSelected(wxListEvent &event) +void HistoryDialog::OnItemSelected(wxListEvent &event) { if (mAudioIOBusy) { mList->SetItemState(mSelected, @@ -303,12 +303,12 @@ void HistoryWindow::OnItemSelected(wxListEvent &event) UpdateLevels(); } -void HistoryWindow::OnCloseWindow(wxCloseEvent & WXUNUSED(event)) +void HistoryDialog::OnCloseWindow(wxCloseEvent & WXUNUSED(event)) { this->Show(false); } -void HistoryWindow::OnSize(wxSizeEvent & WXUNUSED(event)) +void HistoryDialog::OnSize(wxSizeEvent & WXUNUSED(event)) { Layout(); mList->SetColumnWidth(0, mList->GetClientSize().x - mList->GetColumnWidth(1)); diff --git a/src/HistoryWindow.h b/src/HistoryWindow.h index f49a06ad2..e86eb3fc6 100644 --- a/src/HistoryWindow.h +++ b/src/HistoryWindow.h @@ -22,10 +22,10 @@ class AudacityProject; class ShuttleGui; class UndoManager; -class HistoryWindow final : public wxDialogWrapper { +class HistoryDialog final : public wxDialogWrapper { public: - HistoryWindow(AudacityProject * parent, UndoManager *manager); + HistoryDialog(AudacityProject * parent, UndoManager *manager); void UpdateDisplay(wxEvent &e); diff --git a/src/ProjectFileManager.cpp b/src/ProjectFileManager.cpp index 7c0754420..43b863753 100644 --- a/src/ProjectFileManager.cpp +++ b/src/ProjectFileManager.cpp @@ -574,7 +574,7 @@ bool ProjectFileManager::SaveCopyWaveTracks(const FilePath & strProjectPathName, extension = wxT("wav"); fileFormat = wxT("WAVFLT"); #endif - // Some of this is similar to code in ExportMultiple::ExportMultipleByTrack + // Some of this is similar to code in ExportMultipleDialog::ExportMultipleByTrack // but that code is really tied into the dialogs. // Copy the tracks because we're going to do some state changes before exporting. diff --git a/src/Screenshot.cpp b/src/Screenshot.cpp index b3aaac77e..dbc5152d6 100644 --- a/src/Screenshot.cpp +++ b/src/Screenshot.cpp @@ -8,8 +8,8 @@ *******************************************************************//** -\class ScreenFrame -\brief ScreenFrame provides an alternative Gui for ScreenshotCommand. +\class ScreenshotBigDialog +\brief ScreenshotBigDialog provides an alternative Gui for ScreenshotCommand. It adds a timer that allows a delay before taking a screenshot, provides lots of one-click buttons, options to resize the screen. It forwards the actual work of doing the commands to the ScreenshotCommand. @@ -53,12 +53,13 @@ class OldStyleCommandType; //////////////////////////////////////////////////////////////////////////////// -class ScreenFrame final : public wxFrame +// ANSWER-ME: Should this derive from wxDialogWrapper instead? +class ScreenshotBigDialog final : public wxFrame { public: // constructors and destructors - ScreenFrame(wxWindow *parent, wxWindowID id); - virtual ~ScreenFrame(); + ScreenshotBigDialog(wxWindow *parent, wxWindowID id); + virtual ~ScreenshotBigDialog(); bool ProcessEvent(wxEvent & event) override; @@ -108,12 +109,12 @@ class ScreenFrame final : public wxFrame DECLARE_EVENT_TABLE() }; -// Static pointer to the unique ScreenFrame window. -// Formerly it was parentless, therefore this was a Destroy_ptr +// Static pointer to the unique ScreenshotBigDialog window. +// Formerly it was parentless, therefore this was a Destroy_ptr // But now the window is owned, so just use a bare pointer, and null it when // the unique window is destroyed. -using ScreenFramePtr = ScreenFrame*; -ScreenFramePtr mFrame; +using ScreenshotBigDialogPtr = ScreenshotBigDialog*; +ScreenshotBigDialogPtr mFrame; //////////////////////////////////////////////////////////////////////////////// @@ -125,7 +126,7 @@ void OpenScreenshotTools() wxASSERT(false); return; } - mFrame = ScreenFramePtr{ safenew ScreenFrame(parent, -1) }; + mFrame = ScreenshotBigDialogPtr{ safenew ScreenshotBigDialog(parent, -1) }; } mFrame->Show(); mFrame->Raise(); @@ -141,7 +142,7 @@ void CloseScreenshotTools() class ScreenFrameTimer final : public wxTimer { public: - ScreenFrameTimer(ScreenFrame *frame, + ScreenFrameTimer(ScreenshotBigDialog *frame, wxEvent & event) { screenFrame = frame; @@ -157,7 +158,7 @@ class ScreenFrameTimer final : public wxTimer } private: - ScreenFrame *screenFrame; + ScreenshotBigDialog *screenFrame; std::unique_ptr evt; }; @@ -224,34 +225,34 @@ enum }; -BEGIN_EVENT_TABLE(ScreenFrame, wxFrame) - EVT_CLOSE(ScreenFrame::OnCloseWindow) - EVT_BUTTON(wxID_HELP, ScreenFrame::OnGetURL) - EVT_BUTTON(wxID_CANCEL, ScreenFrame::OnClose) +BEGIN_EVENT_TABLE(ScreenshotBigDialog, wxFrame) + EVT_CLOSE(ScreenshotBigDialog::OnCloseWindow) + EVT_BUTTON(wxID_HELP, ScreenshotBigDialog::OnGetURL) + EVT_BUTTON(wxID_CANCEL, ScreenshotBigDialog::OnClose) - EVT_UPDATE_UI(IdCaptureFullScreen, ScreenFrame::OnUIUpdate) + EVT_UPDATE_UI(IdCaptureFullScreen, ScreenshotBigDialog::OnUIUpdate) - EVT_BUTTON(IdMainWindowSmall, ScreenFrame::OnMainWindowSmall) - EVT_BUTTON(IdMainWindowLarge, ScreenFrame::OnMainWindowLarge) - EVT_TOGGLEBUTTON(IdToggleBackgroundBlue, ScreenFrame::OnToggleBackgroundBlue) - EVT_TOGGLEBUTTON(IdToggleBackgroundWhite, ScreenFrame::OnToggleBackgroundWhite) - EVT_COMMAND_RANGE(IdCaptureFirst, IdCaptureLast, wxEVT_COMMAND_BUTTON_CLICKED, ScreenFrame::OnCaptureSomething) + EVT_BUTTON(IdMainWindowSmall, ScreenshotBigDialog::OnMainWindowSmall) + EVT_BUTTON(IdMainWindowLarge, ScreenshotBigDialog::OnMainWindowLarge) + EVT_TOGGLEBUTTON(IdToggleBackgroundBlue, ScreenshotBigDialog::OnToggleBackgroundBlue) + EVT_TOGGLEBUTTON(IdToggleBackgroundWhite, ScreenshotBigDialog::OnToggleBackgroundWhite) + EVT_COMMAND_RANGE(IdCaptureFirst, IdCaptureLast, wxEVT_COMMAND_BUTTON_CLICKED, ScreenshotBigDialog::OnCaptureSomething) - EVT_BUTTON(IdOneSec, ScreenFrame::OnOneSec) - EVT_BUTTON(IdTenSec, ScreenFrame::OnTenSec) - EVT_BUTTON(IdOneMin, ScreenFrame::OnOneMin) - EVT_BUTTON(IdFiveMin, ScreenFrame::OnFiveMin) - EVT_BUTTON(IdOneHour, ScreenFrame::OnOneHour) + EVT_BUTTON(IdOneSec, ScreenshotBigDialog::OnOneSec) + EVT_BUTTON(IdTenSec, ScreenshotBigDialog::OnTenSec) + EVT_BUTTON(IdOneMin, ScreenshotBigDialog::OnOneMin) + EVT_BUTTON(IdFiveMin, ScreenshotBigDialog::OnFiveMin) + EVT_BUTTON(IdOneHour, ScreenshotBigDialog::OnOneHour) - EVT_BUTTON(IdShortTracks, ScreenFrame::OnShortTracks) - EVT_BUTTON(IdMedTracks, ScreenFrame::OnMedTracks) - EVT_BUTTON(IdTallTracks, ScreenFrame::OnTallTracks) + EVT_BUTTON(IdShortTracks, ScreenshotBigDialog::OnShortTracks) + EVT_BUTTON(IdMedTracks, ScreenshotBigDialog::OnMedTracks) + EVT_BUTTON(IdTallTracks, ScreenshotBigDialog::OnTallTracks) - EVT_BUTTON(IdDirChoose, ScreenFrame::OnDirChoose) + EVT_BUTTON(IdDirChoose, ScreenshotBigDialog::OnDirChoose) END_EVENT_TABLE(); // Must not be called before CreateStatusBar! -std::unique_ptr ScreenFrame::CreateCommand() +std::unique_ptr ScreenshotBigDialog::CreateCommand() { wxASSERT(mStatus != NULL); auto output = @@ -261,7 +262,7 @@ std::unique_ptr ScreenFrame::CreateCommand() return std::make_unique();//*type, std::move(output), this); } -ScreenFrame::ScreenFrame(wxWindow * parent, wxWindowID id) +ScreenshotBigDialog::ScreenshotBigDialog(wxWindow * parent, wxWindowID id) : wxFrame(parent, id, _("Screen Capture Frame"), wxDefaultPosition, wxDefaultSize, @@ -298,7 +299,7 @@ ScreenFrame::ScreenFrame(wxWindow * parent, wxWindowID id) Center(); } -ScreenFrame::~ScreenFrame() +ScreenshotBigDialog::~ScreenshotBigDialog() { if (this == mFrame) mFrame = nullptr; @@ -307,13 +308,13 @@ ScreenFrame::~ScreenFrame() wxASSERT(false); } -void ScreenFrame::Populate() +void ScreenshotBigDialog::Populate() { ShuttleGui S(this, eIsCreating); PopulateOrExchange(S); } -void ScreenFrame::PopulateOrExchange(ShuttleGui & S) +void ScreenshotBigDialog::PopulateOrExchange(ShuttleGui & S) { wxPanel *p = S.StartPanel(); RTL_WORKAROUND(p); @@ -483,7 +484,7 @@ void ScreenFrame::PopulateOrExchange(ShuttleGui & S) SetIcon( GetProjectFrame( mContext.project ).GetIcon() ); } -bool ScreenFrame::ProcessEvent(wxEvent & e) +bool ScreenshotBigDialog::ProcessEvent(wxEvent & e) { int id = e.GetId(); @@ -509,22 +510,22 @@ bool ScreenFrame::ProcessEvent(wxEvent & e) return wxFrame::ProcessEvent(e); } -void ScreenFrame::OnCloseWindow(wxCloseEvent & WXUNUSED(event)) +void ScreenshotBigDialog::OnCloseWindow(wxCloseEvent & WXUNUSED(event)) { Destroy(); } -void ScreenFrame::OnClose(wxCommandEvent & WXUNUSED(event)) +void ScreenshotBigDialog::OnClose(wxCommandEvent & WXUNUSED(event)) { Destroy(); } -void ScreenFrame::OnGetURL(wxCommandEvent & WXUNUSED(event)) +void ScreenshotBigDialog::OnGetURL(wxCommandEvent & WXUNUSED(event)) { HelpSystem::ShowHelp(this, wxT("Screenshot")); } -void ScreenFrame::OnUIUpdate(wxUpdateUIEvent & WXUNUSED(event)) +void ScreenshotBigDialog::OnUIUpdate(wxUpdateUIEvent & WXUNUSED(event)) { #ifdef __WXMAC__ wxTopLevelWindow *top = mCommand->GetFrontWindow(GetActiveProject()); @@ -551,7 +552,7 @@ void ScreenFrame::OnUIUpdate(wxUpdateUIEvent & WXUNUSED(event)) #endif } -void ScreenFrame::OnDirChoose(wxCommandEvent & WXUNUSED(event)) +void ScreenshotBigDialog::OnDirChoose(wxCommandEvent & WXUNUSED(event)) { wxString current = mDirectoryTextBox->GetValue(); @@ -571,17 +572,17 @@ void ScreenFrame::OnDirChoose(wxCommandEvent & WXUNUSED(event)) } } -void ScreenFrame::OnToggleBackgroundBlue(wxCommandEvent & WXUNUSED(event)) +void ScreenshotBigDialog::OnToggleBackgroundBlue(wxCommandEvent & WXUNUSED(event)) { mWhite->SetValue(false); } -void ScreenFrame::OnToggleBackgroundWhite(wxCommandEvent & WXUNUSED(event)) +void ScreenshotBigDialog::OnToggleBackgroundWhite(wxCommandEvent & WXUNUSED(event)) { mBlue->SetValue(false); } -void ScreenFrame::SizeMainWindow(int w, int h) +void ScreenshotBigDialog::SizeMainWindow(int w, int h) { int top = 20; @@ -592,17 +593,17 @@ void ScreenFrame::SizeMainWindow(int w, int h) //ToolManager::Get( mContext.project ).Reset(); } -void ScreenFrame::OnMainWindowSmall(wxCommandEvent & WXUNUSED(event)) +void ScreenshotBigDialog::OnMainWindowSmall(wxCommandEvent & WXUNUSED(event)) { SizeMainWindow(680, 450); } -void ScreenFrame::OnMainWindowLarge(wxCommandEvent & WXUNUSED(event)) +void ScreenshotBigDialog::OnMainWindowLarge(wxCommandEvent & WXUNUSED(event)) { SizeMainWindow(900, 600); } -void ScreenFrame::DoCapture(int captureMode) +void ScreenshotBigDialog::DoCapture(int captureMode) { Hide(); //mCommand->SetParameter(wxT("FilePath"), mDirectoryTextBox->GetValue()); @@ -618,7 +619,7 @@ void ScreenFrame::DoCapture(int captureMode) Show(); } -void ScreenFrame::OnCaptureSomething(wxCommandEvent & event) +void ScreenshotBigDialog::OnCaptureSomething(wxCommandEvent & event) { int i = event.GetId() - IdCaptureFirst; @@ -688,7 +689,7 @@ void ScreenFrame::OnCaptureSomething(wxCommandEvent & event) DoCapture(codes[i]); } -void ScreenFrame::TimeZoom(double seconds) +void ScreenshotBigDialog::TimeZoom(double seconds) { auto &viewInfo = ViewInfo::Get( mContext.project ); auto &window = ProjectWindow::Get( mContext.project ); @@ -698,32 +699,32 @@ void ScreenFrame::TimeZoom(double seconds) window.RedrawProject(); } -void ScreenFrame::OnOneSec(wxCommandEvent & WXUNUSED(event)) +void ScreenshotBigDialog::OnOneSec(wxCommandEvent & WXUNUSED(event)) { TimeZoom(1.0); } -void ScreenFrame::OnTenSec(wxCommandEvent & WXUNUSED(event)) +void ScreenshotBigDialog::OnTenSec(wxCommandEvent & WXUNUSED(event)) { TimeZoom(10.0); } -void ScreenFrame::OnOneMin(wxCommandEvent & WXUNUSED(event)) +void ScreenshotBigDialog::OnOneMin(wxCommandEvent & WXUNUSED(event)) { TimeZoom(60.0); } -void ScreenFrame::OnFiveMin(wxCommandEvent & WXUNUSED(event)) +void ScreenshotBigDialog::OnFiveMin(wxCommandEvent & WXUNUSED(event)) { TimeZoom(300.0); } -void ScreenFrame::OnOneHour(wxCommandEvent & WXUNUSED(event)) +void ScreenshotBigDialog::OnOneHour(wxCommandEvent & WXUNUSED(event)) { TimeZoom(3600.0); } -void ScreenFrame::SizeTracks(int h) +void ScreenshotBigDialog::SizeTracks(int h) { // h is the height for a channel // Set the height of a mono track twice as high @@ -743,7 +744,7 @@ void ScreenFrame::SizeTracks(int h) ProjectWindow::Get( mContext.project ).RedrawProject(); } -void ScreenFrame::OnShortTracks(wxCommandEvent & WXUNUSED(event)) +void ScreenshotBigDialog::OnShortTracks(wxCommandEvent & WXUNUSED(event)) { for (auto t : TrackList::Get( mContext.project ).Any()) { auto &view = TrackView::Get( *t ); @@ -753,12 +754,12 @@ void ScreenFrame::OnShortTracks(wxCommandEvent & WXUNUSED(event)) ProjectWindow::Get( mContext.project ).RedrawProject(); } -void ScreenFrame::OnMedTracks(wxCommandEvent & WXUNUSED(event)) +void ScreenshotBigDialog::OnMedTracks(wxCommandEvent & WXUNUSED(event)) { SizeTracks(60); } -void ScreenFrame::OnTallTracks(wxCommandEvent & WXUNUSED(event)) +void ScreenshotBigDialog::OnTallTracks(wxCommandEvent & WXUNUSED(event)) { SizeTracks(85); } diff --git a/src/SoundActivatedRecord.cpp b/src/SoundActivatedRecord.cpp index 6e4276e8d..4436a0b1c 100644 --- a/src/SoundActivatedRecord.cpp +++ b/src/SoundActivatedRecord.cpp @@ -13,7 +13,7 @@ ********************************************************************//** -\class SoundActivatedRecord +\class SoundActivatedRecordDialog \brief Configures sound activated recording. *//********************************************************************/ @@ -25,11 +25,11 @@ #include "Prefs.h" #include "prefs/GUISettings.h" -BEGIN_EVENT_TABLE(SoundActivatedRecord, wxDialogWrapper) - EVT_BUTTON(wxID_OK, SoundActivatedRecord::OnOK) +BEGIN_EVENT_TABLE(SoundActivatedRecordDialog, wxDialogWrapper) + EVT_BUTTON(wxID_OK, SoundActivatedRecordDialog::OnOK) END_EVENT_TABLE() -SoundActivatedRecord::SoundActivatedRecord(wxWindow* parent) +SoundActivatedRecordDialog::SoundActivatedRecordDialog(wxWindow* parent) : wxDialogWrapper(parent, -1, _("Sound Activated Record"), wxDefaultPosition, wxDefaultSize, wxCAPTION ) // wxDefaultSize, wxCAPTION | wxTHICK_FRAME) @@ -41,11 +41,11 @@ SoundActivatedRecord::SoundActivatedRecord(wxWindow* parent) Center(); } -SoundActivatedRecord::~SoundActivatedRecord() +SoundActivatedRecordDialog::~SoundActivatedRecordDialog() { } -void SoundActivatedRecord::PopulateOrExchange(ShuttleGui & S) +void SoundActivatedRecordDialog::PopulateOrExchange(ShuttleGui & S) { S.SetBorder(5); int dBRange; @@ -65,7 +65,7 @@ void SoundActivatedRecord::PopulateOrExchange(ShuttleGui & S) S.AddStandardButtons(); } -void SoundActivatedRecord::OnOK(wxCommandEvent & WXUNUSED(event)) +void SoundActivatedRecordDialog::OnOK(wxCommandEvent & WXUNUSED(event)) { ShuttleGui S( this, eIsSavingToPrefs ); PopulateOrExchange( S ); diff --git a/src/SoundActivatedRecord.h b/src/SoundActivatedRecord.h index 164fb9e4e..8ea022d82 100644 --- a/src/SoundActivatedRecord.h +++ b/src/SoundActivatedRecord.h @@ -20,11 +20,11 @@ class ShuttleGui; -class SoundActivatedRecord final : public wxDialogWrapper +class SoundActivatedRecordDialog final : public wxDialogWrapper { public: - SoundActivatedRecord(wxWindow* parent); - ~SoundActivatedRecord(); + SoundActivatedRecordDialog(wxWindow* parent); + ~SoundActivatedRecordDialog(); private: void OnOK(wxCommandEvent& event); diff --git a/src/Tags.cpp b/src/Tags.cpp index b923a1f8e..f6109abf2 100644 --- a/src/Tags.cpp +++ b/src/Tags.cpp @@ -25,7 +25,7 @@ *//****************************************************************//** -\class TagsEditor +\class TagsEditorDialog \brief Derived from ExpandingToolBar, this dialog allows editing of Tags. *//*******************************************************************/ @@ -611,7 +611,7 @@ void Tags::WriteXML(XMLWriter &xmlFile) const bool Tags::ShowEditDialog(wxWindow *parent, const wxString &title, bool force) { if (force) { - TagsEditor dlg(parent, title, this, mEditTitle, mEditTrackNumber); + TagsEditorDialog dlg(parent, title, this, mEditTitle, mEditTrackNumber); return dlg.ShowModal() == wxID_OK; } @@ -793,24 +793,24 @@ enum { DontShowID }; -BEGIN_EVENT_TABLE(TagsEditor, wxDialogWrapper) - EVT_GRID_CELL_CHANGED(TagsEditor::OnChange) - EVT_BUTTON(EditID, TagsEditor::OnEdit) - EVT_BUTTON(ResetID, TagsEditor::OnReset) - EVT_BUTTON(ClearID, TagsEditor::OnClear) - EVT_BUTTON(LoadID, TagsEditor::OnLoad) - EVT_BUTTON(SaveID, TagsEditor::OnSave) - EVT_BUTTON(SaveDefaultsID, TagsEditor::OnSaveDefaults) - EVT_BUTTON(AddID, TagsEditor::OnAdd) - EVT_BUTTON(RemoveID, TagsEditor::OnRemove) - EVT_BUTTON(wxID_HELP, TagsEditor::OnHelp) - EVT_BUTTON(wxID_CANCEL, TagsEditor::OnCancel) - EVT_BUTTON(wxID_OK, TagsEditor::OnOk) - EVT_CHECKBOX( DontShowID, TagsEditor::OnDontShow ) - EVT_KEY_DOWN(TagsEditor::OnKeyDown) +BEGIN_EVENT_TABLE(TagsEditorDialog, wxDialogWrapper) + EVT_GRID_CELL_CHANGED(TagsEditorDialog::OnChange) + EVT_BUTTON(EditID, TagsEditorDialog::OnEdit) + EVT_BUTTON(ResetID, TagsEditorDialog::OnReset) + EVT_BUTTON(ClearID, TagsEditorDialog::OnClear) + EVT_BUTTON(LoadID, TagsEditorDialog::OnLoad) + EVT_BUTTON(SaveID, TagsEditorDialog::OnSave) + EVT_BUTTON(SaveDefaultsID, TagsEditorDialog::OnSaveDefaults) + EVT_BUTTON(AddID, TagsEditorDialog::OnAdd) + EVT_BUTTON(RemoveID, TagsEditorDialog::OnRemove) + EVT_BUTTON(wxID_HELP, TagsEditorDialog::OnHelp) + EVT_BUTTON(wxID_CANCEL, TagsEditorDialog::OnCancel) + EVT_BUTTON(wxID_OK, TagsEditorDialog::OnOk) + EVT_CHECKBOX( DontShowID, TagsEditorDialog::OnDontShow ) + EVT_KEY_DOWN(TagsEditorDialog::OnKeyDown) END_EVENT_TABLE() -TagsEditor::TagsEditor(wxWindow * parent, +TagsEditorDialog::TagsEditorDialog(wxWindow * parent, const wxString &title, Tags * tags, bool editTitle, @@ -845,10 +845,10 @@ TagsEditor::TagsEditor(wxWindow * parent, // Override size and position with last saved wxRect r = GetRect(); - gPrefs->Read(wxT("/TagsEditor/x"), &r.x, r.x); - gPrefs->Read(wxT("/TagsEditor/y"), &r.y, r.y); - gPrefs->Read(wxT("/TagsEditor/width"), &r.width, r.width); - gPrefs->Read(wxT("/TagsEditor/height"), &r.height, r.height); + gPrefs->Read(wxT("/TagsEditorDialog/x"), &r.x, r.x); + gPrefs->Read(wxT("/TagsEditorDialog/y"), &r.y, r.y); + gPrefs->Read(wxT("/TagsEditorDialog/width"), &r.width, r.width); + gPrefs->Read(wxT("/TagsEditorDialog/height"), &r.height, r.height); //On multi-monitor systems, there's a chance the last saved window position is //on a monitor that has been removed or is unavailable. if (IsWindowRectValid(&r)) @@ -872,7 +872,7 @@ TagsEditor::TagsEditor(wxWindow * parent, PopulateGenres(); } -TagsEditor::~TagsEditor() +TagsEditorDialog::~TagsEditorDialog() { // This DELETE is not needed because wxWidgets owns the grid. // DELETE mGrid; @@ -885,7 +885,7 @@ TagsEditor::~TagsEditor() // DELETE mComboEditor; } -void TagsEditor::PopulateOrExchange(ShuttleGui & S) +void TagsEditorDialog::PopulateOrExchange(ShuttleGui & S) { bool bShow; gPrefs->Read(wxT("/AudioFiles/ShowId3Dialog"), &bShow, true ); @@ -975,19 +975,19 @@ void TagsEditor::PopulateOrExchange(ShuttleGui & S) S.AddStandardButtons(eOkButton | eCancelButton | eHelpButton); } -void TagsEditor::OnDontShow( wxCommandEvent & Evt ) +void TagsEditorDialog::OnDontShow( wxCommandEvent & Evt ) { bool bShow = !Evt.IsChecked(); gPrefs->Write(wxT("/AudioFiles/ShowId3Dialog"), bShow ); gPrefs->Flush(); } -void TagsEditor::OnHelp(wxCommandEvent& WXUNUSED(event)) +void TagsEditorDialog::OnHelp(wxCommandEvent& WXUNUSED(event)) { HelpSystem::ShowHelp(this, wxT("Metadata_Editor"), true); } -bool TagsEditor::TransferDataFromWindow() +bool TagsEditorDialog::TransferDataFromWindow() { int i, cnt = mGrid->GetNumberRows(); @@ -1041,7 +1041,7 @@ bool TagsEditor::TransferDataFromWindow() return true; } -bool TagsEditor::TransferDataToWindow() +bool TagsEditorDialog::TransferDataToWindow() { size_t i; TagMap popTagMap; @@ -1103,7 +1103,7 @@ bool TagsEditor::TransferDataToWindow() return true; } -void TagsEditor::OnChange(wxGridEvent & event) +void TagsEditorDialog::OnChange(wxGridEvent & event) { static bool ischanging = false; @@ -1140,7 +1140,7 @@ void TagsEditor::OnChange(wxGridEvent & event) return; } -void TagsEditor::OnEdit(wxCommandEvent & WXUNUSED(event)) +void TagsEditorDialog::OnEdit(wxCommandEvent & WXUNUSED(event)) { if (mGrid->IsCellEditControlShown()) { mGrid->SaveEditControlValue(); @@ -1191,7 +1191,7 @@ void TagsEditor::OnEdit(wxCommandEvent & WXUNUSED(event)) PopulateGenres(); } -void TagsEditor::OnReset(wxCommandEvent & WXUNUSED(event)) +void TagsEditorDialog::OnReset(wxCommandEvent & WXUNUSED(event)) { int id = AudacityMessageBox(_("Are you sure you want to reset the genre list to defaults?"), _("Reset Genres"), @@ -1231,14 +1231,14 @@ void TagsEditor::OnReset(wxCommandEvent & WXUNUSED(event)) PopulateGenres(); } -void TagsEditor::OnClear(wxCommandEvent & WXUNUSED(event)) +void TagsEditorDialog::OnClear(wxCommandEvent & WXUNUSED(event)) { mLocal.Clear(); TransferDataToWindow(); } -void TagsEditor::OnLoad(wxCommandEvent & WXUNUSED(event)) +void TagsEditorDialog::OnLoad(wxCommandEvent & WXUNUSED(event)) { wxString fn; @@ -1290,7 +1290,7 @@ void TagsEditor::OnLoad(wxCommandEvent & WXUNUSED(event)) return; } -void TagsEditor::OnSave(wxCommandEvent & WXUNUSED(event)) +void TagsEditorDialog::OnSave(wxCommandEvent & WXUNUSED(event)) { wxString fn; @@ -1349,7 +1349,7 @@ void TagsEditor::OnSave(wxCommandEvent & WXUNUSED(event)) } ); } -void TagsEditor::OnSaveDefaults(wxCommandEvent & WXUNUSED(event)) +void TagsEditorDialog::OnSaveDefaults(wxCommandEvent & WXUNUSED(event)) { // Refresh tags TransferDataFromWindow(); @@ -1390,12 +1390,12 @@ void TagsEditor::OnSaveDefaults(wxCommandEvent & WXUNUSED(event)) } } -void TagsEditor::OnAdd(wxCommandEvent & WXUNUSED(event)) +void TagsEditorDialog::OnAdd(wxCommandEvent & WXUNUSED(event)) { mGrid->AppendRows(); } -void TagsEditor::OnRemove(wxCommandEvent & WXUNUSED(event)) +void TagsEditorDialog::OnRemove(wxCommandEvent & WXUNUSED(event)) { size_t row = mGrid->GetGridCursorRow(); @@ -1416,7 +1416,7 @@ void TagsEditor::OnRemove(wxCommandEvent & WXUNUSED(event)) } } -void TagsEditor::OnOk(wxCommandEvent & WXUNUSED(event)) +void TagsEditorDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { if (mGrid->IsCellEditControlShown()) { mGrid->SaveEditControlValue(); @@ -1430,21 +1430,21 @@ void TagsEditor::OnOk(wxCommandEvent & WXUNUSED(event)) *mTags = mLocal; wxRect r = GetRect(); - gPrefs->Write(wxT("/TagsEditor/x"), r.x); - gPrefs->Write(wxT("/TagsEditor/y"), r.y); - gPrefs->Write(wxT("/TagsEditor/width"), r.width); - gPrefs->Write(wxT("/TagsEditor/height"), r.height); + gPrefs->Write(wxT("/TagsEditorDialog/x"), r.x); + gPrefs->Write(wxT("/TagsEditorDialog/y"), r.y); + gPrefs->Write(wxT("/TagsEditorDialog/width"), r.width); + gPrefs->Write(wxT("/TagsEditorDialog/height"), r.height); gPrefs->Flush(); EndModal(wxID_OK); } -void TagsEditor::OnCancel(wxCommandEvent & WXUNUSED(event)) +void TagsEditorDialog::OnCancel(wxCommandEvent & WXUNUSED(event)) { DoCancel(false); } -void TagsEditor::DoCancel(bool escKey) +void TagsEditorDialog::DoCancel(bool escKey) { if (mGrid->IsCellEditControlShown()) { auto editor = mGrid->GetCellEditor(mGrid->GetGridCursorRow(), @@ -1465,7 +1465,7 @@ void TagsEditor::DoCancel(bool escKey) EndModal(wxID_CANCEL); } -void TagsEditor::OnKeyDown(wxKeyEvent &event) +void TagsEditorDialog::OnKeyDown(wxKeyEvent &event) { if (event.GetKeyCode() == WXK_ESCAPE) DoCancel(true); @@ -1473,7 +1473,7 @@ void TagsEditor::OnKeyDown(wxKeyEvent &event) event.Skip(); } -void TagsEditor::SetEditors() +void TagsEditorDialog::SetEditors() { int cnt = mGrid->GetNumberRows(); @@ -1489,7 +1489,7 @@ void TagsEditor::SetEditors() } } -void TagsEditor::PopulateGenres() +void TagsEditorDialog::PopulateGenres() { int cnt = mLocal.GetNumUserGenres(); int i; @@ -1512,7 +1512,7 @@ void TagsEditor::PopulateGenres() editor->DecRef(); } -bool TagsEditor::IsWindowRectValid(const wxRect *windowRect) const +bool TagsEditorDialog::IsWindowRectValid(const wxRect *windowRect) const { wxDisplay display; wxPoint topLeft(windowRect->GetTopLeft().x, windowRect->GetTopLeft().y); diff --git a/src/Tags.h b/src/Tags.h index 2d2a4b479..f077912dd 100644 --- a/src/Tags.h +++ b/src/Tags.h @@ -52,7 +52,7 @@ class wxTextCtrl; class AudacityProject; class Grid; class ShuttleGui; -class TagsEditor; +class TagsEditorDialog; class ComboEditor; using TagMap = std::unordered_map< wxString, wxString >; @@ -137,17 +137,17 @@ class AUDACITY_DLL_API Tags final inline bool operator != (const Tags &lhs, const Tags &rhs) { return !(lhs == rhs); } -class TagsEditor final : public wxDialogWrapper +class TagsEditorDialog final : public wxDialogWrapper { public: // constructors and destructors - TagsEditor(wxWindow * parent, + TagsEditorDialog(wxWindow * parent, const wxString &title, Tags * tags, bool editTitle, bool editTrackNumber); - virtual ~TagsEditor(); + virtual ~TagsEditorDialog(); #if !defined(__WXMSW__) bool IsEscapeKey(const wxKeyEvent& /*event*/) override { return false; } diff --git a/src/UndoManager.cpp b/src/UndoManager.cpp index c552581a3..c18b378f5 100644 --- a/src/UndoManager.cpp +++ b/src/UndoManager.cpp @@ -9,7 +9,7 @@ *******************************************************************//** \class UndoManager -\brief Works with HistoryWindow to provide the Undo functionality. +\brief Works with HistoryDialog to provide the Undo functionality. *//****************************************************************//** diff --git a/src/commands/ScreenshotCommand.h b/src/commands/ScreenshotCommand.h index f2ff701d9..ce7e818c4 100644 --- a/src/commands/ScreenshotCommand.h +++ b/src/commands/ScreenshotCommand.h @@ -95,7 +95,7 @@ private: bool mbBringToTop; bool bHasBackground; bool bHasBringToTop; - friend class ScreenFrame; + friend class ScreenshotBigDialog; public: bool Apply(const CommandContext & context) override; diff --git a/src/effects/Equalization.cpp b/src/effects/Equalization.cpp index f84ebb693..7b26b5e47 100644 --- a/src/effects/Equalization.cpp +++ b/src/effects/Equalization.cpp @@ -37,7 +37,7 @@ \class EqualizationPanel \brief EqualizationPanel is used with EqualizationDialog and controls a graph for EffectEqualization. We should look at amalgamating the - various graphing code, such as provided by FreqWindow and FilterPanel. + various graphing code, such as provided by FrequencyPlotDialog and FilterPanel. *//****************************************************************//** diff --git a/src/export/ExportMultiple.cpp b/src/export/ExportMultiple.cpp index cce4c943c..1290e42b6 100644 --- a/src/export/ExportMultiple.cpp +++ b/src/export/ExportMultiple.cpp @@ -8,7 +8,7 @@ *******************************************************************//** -\class ExportMultiple +\class ExportMultipleDialog \brief Presents a dialog box allowing the user to export multiple files either by exporting each track as a separate file, or by exporting each label as a separate file. @@ -98,25 +98,25 @@ enum { }; // -// ExportMultiple methods +// ExportMultipleDialog methods // -BEGIN_EVENT_TABLE(ExportMultiple, wxDialogWrapper) - EVT_CHOICE(FormatID, ExportMultiple::OnFormat) -// EVT_BUTTON(OptionsID, ExportMultiple::OnOptions) - EVT_BUTTON(CreateID, ExportMultiple::OnCreate) - EVT_BUTTON(ChooseID, ExportMultiple::OnChoose) - EVT_BUTTON(wxID_OK, ExportMultiple::OnExport) - EVT_BUTTON(wxID_CANCEL, ExportMultiple::OnCancel) - EVT_BUTTON(wxID_HELP, ExportMultiple::OnHelp) - EVT_RADIOBUTTON(LabelID, ExportMultiple::OnLabel) - EVT_RADIOBUTTON(TrackID, ExportMultiple::OnTrack) - EVT_RADIOBUTTON(ByNameAndNumberID, ExportMultiple::OnByName) - EVT_RADIOBUTTON(ByNameID, ExportMultiple::OnByName) - EVT_RADIOBUTTON(ByNumberID, ExportMultiple::OnByNumber) - EVT_CHECKBOX(FirstID, ExportMultiple::OnFirst) - EVT_TEXT(FirstFileNameID, ExportMultiple::OnFirstFileName) - EVT_TEXT(PrefixID, ExportMultiple::OnPrefix) +BEGIN_EVENT_TABLE(ExportMultipleDialog, wxDialogWrapper) + EVT_CHOICE(FormatID, ExportMultipleDialog::OnFormat) +// EVT_BUTTON(OptionsID, ExportMultipleDialog::OnOptions) + EVT_BUTTON(CreateID, ExportMultipleDialog::OnCreate) + EVT_BUTTON(ChooseID, ExportMultipleDialog::OnChoose) + EVT_BUTTON(wxID_OK, ExportMultipleDialog::OnExport) + EVT_BUTTON(wxID_CANCEL, ExportMultipleDialog::OnCancel) + EVT_BUTTON(wxID_HELP, ExportMultipleDialog::OnHelp) + EVT_RADIOBUTTON(LabelID, ExportMultipleDialog::OnLabel) + EVT_RADIOBUTTON(TrackID, ExportMultipleDialog::OnTrack) + EVT_RADIOBUTTON(ByNameAndNumberID, ExportMultipleDialog::OnByName) + EVT_RADIOBUTTON(ByNameID, ExportMultipleDialog::OnByName) + EVT_RADIOBUTTON(ByNumberID, ExportMultipleDialog::OnByNumber) + EVT_CHECKBOX(FirstID, ExportMultipleDialog::OnFirst) + EVT_TEXT(FirstFileNameID, ExportMultipleDialog::OnFirstFileName) + EVT_TEXT(PrefixID, ExportMultipleDialog::OnPrefix) END_EVENT_TABLE() BEGIN_EVENT_TABLE(SuccessDialog, wxDialogWrapper) @@ -128,7 +128,7 @@ BEGIN_EVENT_TABLE(MouseEvtHandler, wxEvtHandler) EVT_LEFT_DCLICK(MouseEvtHandler::OnMouse) END_EVENT_TABLE() -ExportMultiple::ExportMultiple(AudacityProject *project) +ExportMultipleDialog::ExportMultipleDialog(AudacityProject *project) : wxDialogWrapper( &GetProjectFrame( *project ), wxID_ANY, wxString(_("Export Multiple")) ) , mSelectionState{ SelectionState::Get( *project ) } @@ -162,11 +162,11 @@ ExportMultiple::ExportMultiple(AudacityProject *project) EnableControls(); } -ExportMultiple::~ExportMultiple() +ExportMultipleDialog::~ExportMultipleDialog() { } -void ExportMultiple::CountTracksAndLabels() +void ExportMultipleDialog::CountTracksAndLabels() { bool anySolo = !(( mTracks->Any() + &WaveTrack::GetSolo ).empty()); @@ -179,7 +179,7 @@ void ExportMultiple::CountTracksAndLabels() mNumLabels = mLabels ? mLabels->GetNumLabels() : 0; } -int ExportMultiple::ShowModal() +int ExportMultipleDialog::ShowModal() { // Cannot export if all audio tracks are muted. if (mNumWaveTracks == 0) @@ -218,7 +218,7 @@ int ExportMultiple::ShowModal() return wxDialogWrapper::ShowModal(); } -void ExportMultiple::PopulateOrExchange(ShuttleGui& S) +void ExportMultipleDialog::PopulateOrExchange(ShuttleGui& S) { wxString name = mProject->GetProjectName(); wxString defaultFormat = gPrefs->Read(wxT("/Export/Format"), wxT("WAV")); @@ -416,7 +416,7 @@ void ExportMultiple::PopulateOrExchange(ShuttleGui& S) } -void ExportMultiple::EnableControls() +void ExportMultipleDialog::EnableControls() { bool enable; @@ -450,14 +450,14 @@ void ExportMultiple::EnableControls() mExport->Enable(ok); } -void ExportMultiple::OnFormat(wxCommandEvent& WXUNUSED(event)) +void ExportMultipleDialog::OnFormat(wxCommandEvent& WXUNUSED(event)) { mBook->ChangeSelection(mFormat->GetSelection()); EnableControls(); } -void ExportMultiple::OnOptions(wxCommandEvent& WXUNUSED(event)) +void ExportMultipleDialog::OnOptions(wxCommandEvent& WXUNUSED(event)) { const int sel = mFormat->GetSelection(); if (sel != wxNOT_FOUND) @@ -481,7 +481,7 @@ void ExportMultiple::OnOptions(wxCommandEvent& WXUNUSED(event)) mPlugins[mPluginIndex]->DisplayOptions(this,mSubFormatIndex); } -void ExportMultiple::OnCreate(wxCommandEvent& WXUNUSED(event)) +void ExportMultipleDialog::OnCreate(wxCommandEvent& WXUNUSED(event)) { wxFileName fn; @@ -500,7 +500,7 @@ void ExportMultiple::OnCreate(wxCommandEvent& WXUNUSED(event)) wxOK | wxCENTRE, this); } -void ExportMultiple::OnChoose(wxCommandEvent& WXUNUSED(event)) +void ExportMultipleDialog::OnChoose(wxCommandEvent& WXUNUSED(event)) { wxDirDialogWrapper dlog(this, _("Choose a location to save the exported files"), @@ -510,52 +510,52 @@ void ExportMultiple::OnChoose(wxCommandEvent& WXUNUSED(event)) mDir->SetValue(dlog.GetPath()); } -void ExportMultiple::OnLabel(wxCommandEvent& WXUNUSED(event)) +void ExportMultipleDialog::OnLabel(wxCommandEvent& WXUNUSED(event)) { EnableControls(); } -void ExportMultiple::OnFirst(wxCommandEvent& WXUNUSED(event)) +void ExportMultipleDialog::OnFirst(wxCommandEvent& WXUNUSED(event)) { EnableControls(); } -void ExportMultiple::OnFirstFileName(wxCommandEvent& WXUNUSED(event)) +void ExportMultipleDialog::OnFirstFileName(wxCommandEvent& WXUNUSED(event)) { EnableControls(); } -void ExportMultiple::OnTrack(wxCommandEvent& WXUNUSED(event)) +void ExportMultipleDialog::OnTrack(wxCommandEvent& WXUNUSED(event)) { EnableControls(); } -void ExportMultiple::OnByName(wxCommandEvent& WXUNUSED(event)) +void ExportMultipleDialog::OnByName(wxCommandEvent& WXUNUSED(event)) { EnableControls(); } -void ExportMultiple::OnByNumber(wxCommandEvent& WXUNUSED(event)) +void ExportMultipleDialog::OnByNumber(wxCommandEvent& WXUNUSED(event)) { EnableControls(); } -void ExportMultiple::OnPrefix(wxCommandEvent& WXUNUSED(event)) +void ExportMultipleDialog::OnPrefix(wxCommandEvent& WXUNUSED(event)) { EnableControls(); } -void ExportMultiple::OnCancel(wxCommandEvent& WXUNUSED(event)) +void ExportMultipleDialog::OnCancel(wxCommandEvent& WXUNUSED(event)) { EndModal(0); } -void ExportMultiple::OnHelp(wxCommandEvent& WXUNUSED(event)) +void ExportMultipleDialog::OnHelp(wxCommandEvent& WXUNUSED(event)) { HelpSystem::ShowHelp(this, wxT("Export_Multiple"), true); } -void ExportMultiple::OnExport(wxCommandEvent& WXUNUSED(event)) +void ExportMultipleDialog::OnExport(wxCommandEvent& WXUNUSED(event)) { ShuttleGui S(this, eIsSavingToPrefs); PopulateOrExchange(S); @@ -641,7 +641,7 @@ void ExportMultiple::OnExport(wxCommandEvent& WXUNUSED(event)) } } -bool ExportMultiple::DirOk() +bool ExportMultipleDialog::DirOk() { wxFileName fn; @@ -722,7 +722,7 @@ static unsigned GetNumExportChannels( const TrackList &tracks ) // TODO: JKC July2016: Merge labels/tracks duplicated export code. // TODO: JKC Apr2019: Doubly so merge these! Too much duplication. -ProgressResult ExportMultiple::ExportMultipleByLabel(bool byName, +ProgressResult ExportMultipleDialog::ExportMultipleByLabel(bool byName, const wxString &prefix, bool addNumber) { wxASSERT(mProject); @@ -861,7 +861,7 @@ ProgressResult ExportMultiple::ExportMultipleByLabel(bool byName, return ok; } -ProgressResult ExportMultiple::ExportMultipleByTrack(bool byName, +ProgressResult ExportMultipleDialog::ExportMultipleByTrack(bool byName, const wxString &prefix, bool addNumber) { wxASSERT(mProject); @@ -1001,7 +1001,7 @@ ProgressResult ExportMultiple::ExportMultipleByTrack(bool byName, return ok ; } -ProgressResult ExportMultiple::DoExport(std::unique_ptr &pDialog, +ProgressResult ExportMultipleDialog::DoExport(std::unique_ptr &pDialog, unsigned channels, const wxFileName &inName, bool selectedOnly, @@ -1091,7 +1091,7 @@ ProgressResult ExportMultiple::DoExport(std::unique_ptr &pDialog return success; } -wxString ExportMultiple::MakeFileName(const wxString &input) +wxString ExportMultipleDialog::MakeFileName(const wxString &input) { wxString newname = input; // name we are generating diff --git a/src/export/ExportMultiple.h b/src/export/ExportMultiple.h index ddfb0744f..8b3febad2 100644 --- a/src/export/ExportMultiple.h +++ b/src/export/ExportMultiple.h @@ -29,12 +29,12 @@ class SelectionState; class ShuttleGui; class Track; -class ExportMultiple final : public wxDialogWrapper +class ExportMultipleDialog final : public wxDialogWrapper { public: - ExportMultiple(AudacityProject *parent); - virtual ~ExportMultiple(); + ExportMultipleDialog(AudacityProject *parent); + virtual ~ExportMultipleDialog(); int ShowModal(); diff --git a/src/menus/FileMenus.cpp b/src/menus/FileMenus.cpp index e37cecd6e..91e3d51c8 100644 --- a/src/menus/FileMenus.cpp +++ b/src/menus/FileMenus.cpp @@ -275,7 +275,7 @@ void OnExportLabels(const CommandContext &context) void OnExportMultiple(const CommandContext &context) { auto &project = context.project; - ExportMultiple em(&project); + ExportMultipleDialog em(&project); MissingAliasFilesDialog::SetShouldShow(true); em.ShowModal(); diff --git a/src/menus/PluginMenus.cpp b/src/menus/PluginMenus.cpp index 6c99b4ecc..5a1109fd2 100644 --- a/src/menus/PluginMenus.cpp +++ b/src/menus/PluginMenus.cpp @@ -36,7 +36,7 @@ AudacityProject::AttachedWindows::RegisteredFactory sContrastDialogKey{ AudacityProject::AttachedWindows::RegisteredFactory sFrequencyWindowKey{ []( AudacityProject &parent ) -> wxWeakRef< wxWindow > { auto &window = ProjectWindow::Get( parent ); - return safenew FreqWindow( + return safenew FrequencyPlotDialog( &window, -1, _("Frequency Analysis"), wxPoint{ 150, 150 } ); @@ -486,7 +486,7 @@ void OnPlotSpectrum(const CommandContext &context) { auto &project = context.project; auto freqWindow = - &project.AttachedWindows::Get< FreqWindow >( sFrequencyWindowKey ); + &project.AttachedWindows::Get< FrequencyPlotDialog >( sFrequencyWindowKey ); if( ScreenshotCommand::MayCapture( freqWindow ) ) return; diff --git a/src/menus/TransportMenus.cpp b/src/menus/TransportMenus.cpp index 35b3e983b..cf409ddb2 100644 --- a/src/menus/TransportMenus.cpp +++ b/src/menus/TransportMenus.cpp @@ -487,7 +487,7 @@ void OnSoundActivated(const CommandContext &context) { AudacityProject &project = context.project; - SoundActivatedRecord dialog( &GetProjectFrame( project ) /* parent */ ); + SoundActivatedRecordDialog dialog( &GetProjectFrame( project ) /* parent */ ); dialog.ShowModal(); } diff --git a/src/menus/ViewMenus.cpp b/src/menus/ViewMenus.cpp index 74f4bb731..e1b9a0ef7 100644 --- a/src/menus/ViewMenus.cpp +++ b/src/menus/ViewMenus.cpp @@ -40,7 +40,7 @@ AudacityProject::AttachedWindows::RegisteredFactory sMixerBoardKey{ AudacityProject::AttachedWindows::RegisteredFactory sHistoryWindowKey{ []( AudacityProject &parent ) -> wxWeakRef< wxWindow > { auto &undoManager = UndoManager::Get( parent ); - return safenew HistoryWindow( &parent, &undoManager ); + return safenew HistoryDialog( &parent, &undoManager ); } }; diff --git a/src/widgets/ASlider.cpp b/src/widgets/ASlider.cpp index 37573b85c..f424225bc 100644 --- a/src/widgets/ASlider.cpp +++ b/src/widgets/ASlider.cpp @@ -22,7 +22,7 @@ have a window permanently associated with it. \class SliderDialog \brief Pop up dialog used with an LWSlider. -\class TipPanel +\class TipWindow \brief A wxPopupWindow used to give the numerical value of an LWSlider or ASlider. @@ -150,14 +150,14 @@ const int sliderFontSize = 12; class wxArrayString; // -// TipPanel +// TipWindow // -class TipPanel final : public wxFrame +class TipWindow final : public wxFrame { public: - TipPanel(wxWindow *parent, const wxArrayString & labels); - virtual ~TipPanel() {} + TipWindow(wxWindow *parent, const wxArrayString & labels); + virtual ~TipWindow() {} wxSize GetSize() const; void SetPos(const wxPoint & pos); @@ -177,14 +177,14 @@ private: DECLARE_EVENT_TABLE() }; -BEGIN_EVENT_TABLE(TipPanel, wxFrame) - EVT_PAINT(TipPanel::OnPaint) +BEGIN_EVENT_TABLE(TipWindow, wxFrame) + EVT_PAINT(TipWindow::OnPaint) #if defined(__WXGTK__) - EVT_WINDOW_CREATE(TipPanel::OnCreate) + EVT_WINDOW_CREATE(TipWindow::OnCreate) #endif END_EVENT_TABLE() -TipPanel::TipPanel(wxWindow *parent, const wxArrayString & labels) +TipWindow::TipWindow(wxWindow *parent, const wxArrayString & labels) : wxFrame(parent, wxID_ANY, wxString{}, wxDefaultPosition, wxDefaultSize, wxFRAME_SHAPED | wxFRAME_FLOAT_ON_PARENT) { @@ -209,12 +209,12 @@ TipPanel::TipPanel(wxWindow *parent, const wxArrayString & labels) #endif } -wxSize TipPanel::GetSize() const +wxSize TipWindow::GetSize() const { return wxSize(mWidth, mHeight); } -void TipPanel::SetPos(const wxPoint & pos) +void TipWindow::SetPos(const wxPoint & pos) { #if defined(__WXGTK__) SetSize(pos.x, pos.y, wxDefaultCoord, wxDefaultCoord); @@ -223,12 +223,12 @@ void TipPanel::SetPos(const wxPoint & pos) #endif } -void TipPanel::SetLabel(const wxString & label) +void TipWindow::SetLabel(const wxString & label) { mLabel = label; } -void TipPanel::OnPaint(wxPaintEvent & WXUNUSED(event)) +void TipWindow::OnPaint(wxPaintEvent & WXUNUSED(event)) { wxAutoBufferedPaintDC dc(this); @@ -245,7 +245,7 @@ void TipPanel::OnPaint(wxPaintEvent & WXUNUSED(event)) } #if defined(__WXGTK__) -void TipPanel::OnCreate(wxWindowCreateEvent & WXUNUSED(event)) +void TipWindow::OnCreate(wxWindowCreateEvent & WXUNUSED(event)) { wxGraphicsPath path = wxGraphicsRenderer::GetDefaultRenderer()->CreatePath(); path.AddRoundedRectangle(0, 0, mWidth, mHeight, 5); @@ -894,7 +894,7 @@ void LWSlider::ShowTip(bool show) void LWSlider::CreatePopWin() { - mTipPanel = std::make_unique(mParent, GetWidestTips()); + mTipPanel = std::make_unique(mParent, GetWidestTips()); } void LWSlider::SetPopWinPosition() diff --git a/src/widgets/ASlider.h b/src/widgets/ASlider.h index 45a08c5f0..883879993 100644 --- a/src/widgets/ASlider.h +++ b/src/widgets/ASlider.h @@ -25,7 +25,7 @@ class wxPoint; class wxTextCtrl; class Ruler; -class TipPanel; +class TipWindow; // // Predefined slider types (mStyle) @@ -217,7 +217,7 @@ class LWSlider wxWindowID mID; - std::unique_ptr mTipPanel; + std::unique_ptr mTipPanel; wxString mTipTemplate; bool mIsDragging; diff --git a/src/widgets/HtmlWindow.cpp b/src/widgets/HtmlWindow.cpp index 3fd82af46..193dcc6db 100644 --- a/src/widgets/HtmlWindow.cpp +++ b/src/widgets/HtmlWindow.cpp @@ -15,8 +15,7 @@ *//*******************************************************************//** \class HtmlWindow -\brief The widget to the left of a ToolBar that allows it to be dragged -around to NEW positions. +\brief An accessible wxHtmlWindow. *//**********************************************************************/ diff --git a/src/widgets/Ruler.cpp b/src/widgets/Ruler.cpp index f8847e0d2..ec5545768 100644 --- a/src/widgets/Ruler.cpp +++ b/src/widgets/Ruler.cpp @@ -1659,7 +1659,7 @@ void RulerPanel::OnSize(wxSizeEvent & WXUNUSED(evt)) // LL: We're overloading DoSetSize so that we can update the ruler bounds immediately // instead of waiting for a wxEVT_SIZE to come through. This is needed by (at least) -// FreqWindow since it needs to have an updated ruler before RulerPanel gets the +// FrequencyPlotDialog since it needs to have an updated ruler before RulerPanel gets the // size event. void RulerPanel::DoSetSize(int x, int y, int width, int height,