1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-12-19 15:11:23 +01:00

Frequency Selection toolbar from Paul Licameli.

Linux/Mac will need new files adding to project, SpectralSelectionBar.cpp, NumericTextCtrl.cpp.
This commit is contained in:
james.k.crook@gmail.com
2014-11-08 15:18:43 +00:00
parent 327bd905de
commit 67d2b274e2
36 changed files with 3050 additions and 2192 deletions

View File

@@ -67,7 +67,6 @@ simplifies construction of menu items.
#include "export/Export.h"
#include "export/ExportMultiple.h"
#include "prefs/PrefsDialog.h"
#include "widgets/TimeTextCtrl.h"
#include "ShuttleGui.h"
#include "HistoryWindow.h"
#include "LyricsWindow.h"
@@ -714,8 +713,12 @@ void AudacityProject::CreateMenusAndCommands()
c->AddCheck(wxT("ShowPlayMeterTB"), _("&Playback Meter Toolbar"), FN(OnShowPlayMeterToolBar), 0, AlwaysEnabledFlag, AlwaysEnabledFlag);
/* i18n-hint: Clicking this menu item shows the toolbar with the mixer*/
c->AddCheck(wxT("ShowMixerTB"), _("Mi&xer Toolbar"), FN(OnShowMixerToolBar), 0, AlwaysEnabledFlag, AlwaysEnabledFlag);
/* i18n-hint: Clicking this menu item shows the toolbar for selecting audio*/
/* i18n-hint: Clicking this menu item shows the toolbar for selecting a time range of audio*/
c->AddCheck(wxT("ShowSelectionTB"), _("&Selection Toolbar"), FN(OnShowSelectionToolBar), 0, AlwaysEnabledFlag, AlwaysEnabledFlag);
#ifdef EXPERIMENTAL_SPECTRAL_EDITING
/* i18n-hint: Clicking this menu item shows the toolbar for selecting a frequency range of audio*/
c->AddCheck(wxT("ShowSpectralSelectionTB"), _("&Spectral Selection Toolbar"), FN(OnShowSpectralSelectionToolBar), 0, AlwaysEnabledFlag, AlwaysEnabledFlag);
#endif
/* i18n-hint: Clicking this menu item shows a toolbar that has some tools in it*/
c->AddCheck(wxT("ShowToolsTB"), _("T&ools Toolbar"), FN(OnShowToolsToolBar), 0, AlwaysEnabledFlag, AlwaysEnabledFlag);
/* i18n-hint: Clicking this menu item shows the toolbar for transcription (currently just vary play speed)*/
@@ -1824,8 +1827,6 @@ void AudacityProject::ModifyToolbarMenus()
return;
}
mCommandManager.Check(wxT("ShowTransportTB"),
mToolManager->IsVisible(TransportBarID));
mCommandManager.Check(wxT("ShowDeviceTB"),
mToolManager->IsVisible(DeviceBarID));
mCommandManager.Check(wxT("ShowEditTB"),
@@ -1840,10 +1841,16 @@ void AudacityProject::ModifyToolbarMenus()
mToolManager->IsVisible(MixerBarID));
mCommandManager.Check(wxT("ShowSelectionTB"),
mToolManager->IsVisible(SelectionBarID));
#ifdef EXPERIMENTAL_SPECTRAL_EDITING
mCommandManager.Check(wxT("ShowSpectralSelectionTB"),
mToolManager->IsVisible(SpectralSelectionBarID));
#endif
mCommandManager.Check(wxT("ShowToolsTB"),
mToolManager->IsVisible(ToolsBarID));
mCommandManager.Check(wxT("ShowTranscriptionTB"),
mToolManager->IsVisible(TranscriptionBarID));
mCommandManager.Check(wxT("ShowTransportTB"),
mToolManager->IsVisible(TransportBarID));
// Now, go through each toolbar, and call EnableDisableButtons()
for (int i = 0; i < ToolBarCount; i++) {
@@ -4909,6 +4916,14 @@ void AudacityProject::OnShowSelectionToolBar()
ModifyToolbarMenus();
}
#ifdef EXPERIMENTAL_SPECTRAL_EDITING
void AudacityProject::OnShowSpectralSelectionToolBar()
{
mToolManager->ShowHide( SpectralSelectionBarID );
ModifyToolbarMenus();
}
#endif
void AudacityProject::OnShowToolsToolBar()
{
mToolManager->ShowHide( ToolsBarID );