Remove some unneeded #includes and forward declarations

This commit is contained in:
Paul Licameli 2020-11-20 13:15:20 -05:00
parent a46118dc2a
commit caa312ab7b
31 changed files with 16 additions and 51 deletions

View File

@ -25,7 +25,6 @@
#include "AudioIOBase.h"
#include "CommonCommandFlags.h"
#include "LabelTrack.h"
#include "ModuleManager.h"
#include "Prefs.h"
#include "Project.h"

View File

@ -94,7 +94,7 @@ It handles initialization and termination by subclassing wxApp.
#include "ProjectWindow.h"
#include "Screenshot.h"
#include "Sequence.h"
#include "WaveTrack.h"
#include "Track.h"
#include "prefs/PrefsDialog.h"
#include "Theme.h"
#include "PlatformCompatibility.h"

View File

@ -15,6 +15,10 @@
#include "Audacity.h"
class WaveTrack;
using WaveTrackArray =
std::vector < std::shared_ptr < WaveTrack > >;
class AUDACITY_DLL_API AudioIOListener /* not final */ {
public:
AudioIOListener() {}

View File

@ -74,7 +74,6 @@ the mouse around.
#include "Project.h"
#include "ProjectWindow.h"
#include "Theme.h"
#include "WaveClip.h"
#include "ViewInfo.h"
#include "AllThemeResources.h"

View File

@ -22,13 +22,10 @@ class wxCommandEvent;
class AudacityProject;
class CommandContext;
class CommandManager;
class LabelTrack;
class PluginDescriptor;
class Track;
class TrackList;
class ViewInfo;
class WaveClip;
class WaveTrack;
enum EffectType : int;

View File

@ -26,7 +26,7 @@
#include "AColor.h"
#include "TrackArtist.h"
#include "ViewInfo.h"
#include "WaveTrack.h"
#include "Track.h"
#include "widgets/Ruler.h"
#include "widgets/AudacityMessageBox.h"

View File

@ -14,7 +14,6 @@ Paul Licameli split from ProjectManager.h
#include <memory>
#include <vector>
#include "AudioIO.h"
#include "AudioIOListener.h" // to inherit
#include "ClientData.h" // to inherit

View File

@ -26,11 +26,9 @@ Paul Licameli split from AudacityProject.cpp
#include "ProjectSerializer.h"
#include "ProjectSettings.h"
#include "SampleBlock.h"
#include "Sequence.h"
#include "Tags.h"
#include "TimeTrack.h"
#include "ViewInfo.h"
#include "WaveClip.h"
#include "WaveTrack.h"
#include "widgets/AudacityMessageBox.h"
#include "widgets/NumericTextCtrl.h"

View File

@ -19,8 +19,6 @@ Paul Licameli split from AudacityProject.cpp
#endif
#include <wx/frame.h>
#include "Dependencies.h"
#include "FileFormats.h"
#include "FileNames.h"
#include "Legacy.h"
#include "PlatformCompatibility.h"
@ -35,18 +33,15 @@ Paul Licameli split from AudacityProject.cpp
#include "ProjectWindow.h"
#include "SelectUtilities.h"
#include "SelectionState.h"
#include "Sequence.h"
#include "Tags.h"
#include "TrackPanelAx.h"
#include "TrackPanel.h"
#include "UndoManager.h"
#include "WaveClip.h"
#include "WaveTrack.h"
#include "wxFileNameWrapper.h"
#include "export/Export.h"
#include "import/Import.h"
#include "import/ImportMIDI.h"
#include "commands/CommandContext.h"
#include "toolbars/SelectionBar.h"
#include "widgets/AudacityMessageBox.h"
#include "widgets/ErrorDialog.h"

View File

@ -16,7 +16,6 @@ Paul Licameli split from ProjectManager.cpp
#include "Track.h"
#include "UndoManager.h"
#include "ViewInfo.h"
#include "WaveTrack.h"
static AudacityProject::AttachedObjects::RegisteredFactory sProjectHistoryKey {
[]( AudacityProject &project ) {

View File

@ -23,10 +23,8 @@ class wxWindow;
class ButtonHandle;
class LWSlider;
class NoteTrack;
class Track;
struct TrackPanelDrawingContext;
class WaveTrack;
static const int TitleSoloBorderOverlap = 1;

View File

@ -31,7 +31,6 @@
class wxRect;
class LabelTrack;
class SpectrumAnalyst;
class Track;
class TrackList;
@ -45,10 +44,6 @@ class LWSlider;
class TrackPanelAx;
class NoteTrack;
class WaveTrack;
class WaveClip;
// Declared elsewhere, to reduce compilation dependencies
class TrackPanelListener;

View File

@ -21,8 +21,6 @@ Paul Licameli split from TrackPanel.cpp
#include "ViewInfo.h"
#include "widgets/OverlayPanel.h"
#include "tracks/ui/TrackView.h"
#include <wx/dc.h>
#include <wx/mousestate.h>

View File

@ -31,9 +31,8 @@ UndoManager
#include "Project.h"
#include "SampleBlock.h"
#include "Sequence.h"
#include "WaveClip.h"
#include "WaveTrack.h" // temp
#include "NoteTrack.h" // for Sonify* function declarations
//#include "NoteTrack.h" // for Sonify* function declarations
#include "Diags.h"
#include "Tags.h"
#include "widgets/ProgressDialog.h"
@ -272,7 +271,7 @@ void UndoManager::ModifyState(const TrackList * l,
return;
}
SonifyBeginModifyState();
// SonifyBeginModifyState();
// Delete current -- not necessary, but let's reclaim space early
stack[current]->state.tracks.reset();
@ -290,7 +289,7 @@ void UndoManager::ModifyState(const TrackList * l,
stack[current]->state.tags = tags;
stack[current]->state.selectedRegion = selectedRegion;
SonifyEndModifyState();
// SonifyEndModifyState();
// wxWidgets will own the event object
mProject.QueueEvent( safenew wxCommandEvent{ EVT_UNDO_MODIFIED } );

View File

@ -9,10 +9,9 @@
#ifndef __AUDACITY_COMMAND_FUNCTORS__
#define __AUDACITY_COMMAND_FUNCTORS__
#include "Command.h"
class AudacityProject;
class AudacityApp;
class CommandContext;
class wxEvtHandler;
// Base class for objects, to whose member functions, the CommandManager will

View File

@ -20,8 +20,6 @@
#include "GetTrackInfoCommand.h"
#include "LoadCommands.h"
#include "../NoteTrack.h"
#include "../WaveTrack.h"
#include "../Shuttle.h"
#include "../ShuttleGui.h"
#include "CommandContext.h"

View File

@ -30,7 +30,7 @@ effects.
#include "../ShuttleGetDefinition.h"
#include "../commands/CommandContext.h"
#include "../commands/Command.h"
#include "../commands/AudacityCommand.h"
#include "../PluginManager.h"

View File

@ -71,7 +71,6 @@ effects from this one class.
#include "../../Prefs.h"
#include "../../wxFileNameWrapper.h"
#include "../../prefs/GUIPrefs.h"
#include "../../prefs/WaveformSettings.h"
#include "../../tracks/playabletrack/wavetrack/ui/WaveTrackView.h"
#include "../../tracks/playabletrack/wavetrack/ui/WaveTrackViewConstants.h"
#include "../../widgets/NumericTextCtrl.h"

View File

@ -50,7 +50,6 @@
#include "../widgets/FileDialog/FileDialog.h"
#include "../FileFormats.h"
#include "../Mix.h"
#include "../Prefs.h"
#include "../prefs/ImportExportPrefs.h"
@ -66,11 +65,11 @@
#include "../widgets/Warning.h"
#include "../widgets/HelpSystem.h"
#include "../AColor.h"
#include "../Dependencies.h"
#include "../FileNames.h"
#include "../widgets/HelpSystem.h"
#include "../widgets/ProgressDialog.h"
#include "../widgets/ErrorDialog.h"
#include "../wxFileNameWrapper.h"
//----------------------------------------------------------------------------
// ExportPlugin

View File

@ -33,7 +33,6 @@ function.
#include <wx/spinctrl.h>
#include <wx/combobox.h>
#include "../FileFormats.h"
#include "../Mix.h"
#include "../ProjectSettings.h"
#include "../Tags.h"

View File

@ -60,7 +60,6 @@
#include "../widgets/FileDialog/FileDialog.h"
#include "../FileFormats.h"
#include "../Mix.h"
#include "../Tags.h"
#include "../widgets/AudacityMessageBox.h"

View File

@ -37,7 +37,6 @@
#include <wx/textctrl.h>
#include <wx/textdlg.h>
#include "../FileFormats.h"
#include "../FileNames.h"
#include "../LabelTrack.h"
#include "../Project.h"

View File

@ -28,7 +28,6 @@ Licensed under the GNU General Public License v2 or later
#include <wx/wxprec.h>
#include "../FFmpeg.h" // which brings in avcodec.h, avformat.h
#include "../WaveClip.h"
#ifndef WX_PRECOMP
// Include your minimal set of headers here, or wx.h
#include <wx/window.h>

View File

@ -42,7 +42,6 @@
#include "ImportPlugin.h"
#include "../Tags.h"
#include "../WaveClip.h"
#include "../prefs/QualityPrefs.h"
#include "../widgets/ProgressDialog.h"

View File

@ -84,12 +84,10 @@
#include "../WaveTrack.h"
#include "ImportPlugin.h"
#include "Import.h"
#include "../NoteTrack.h"
#include "../Project.h"
#include "../ProjectHistory.h"
#include "../ProjectManager.h"
#include "../ProjectWindow.h"
#include "../FileFormats.h"
#include "../Prefs.h"
#include "../widgets/AudacityMessageBox.h"
#include "../widgets/ProgressDialog.h"

View File

@ -36,7 +36,6 @@
#include "sndfile.h"
#include "../WaveClip.h"
#include "../ShuttleGui.h"
#include "../prefs/QualityPrefs.h"

View File

@ -11,7 +11,6 @@
#include "../AudioIOBase.h"
#include "../CommonCommandFlags.h"
#include "../CrashReport.h"
#include "../Dependencies.h"
#include "../FileNames.h"
#include "../HelpText.h"
#include "../Menus.h"

View File

@ -20,7 +20,6 @@
#include <wx/defs.h>
#include "../FileFormats.h"
#include "../Prefs.h"
#include "../ShuttleGui.h"

View File

@ -13,13 +13,13 @@ Paul Licameli split from TrackPanel.cpp
#ifdef USE_MIDI
#include "NoteTrackButtonHandle.h"
#include "../../../../HitTestResult.h"
#include "NoteTrackControls.h"
#include "../../../../TrackPanelMouseEvent.h"
#include "../../../../NoteTrack.h"
#include "../../../../ProjectHistory.h"
#include "../../../../RefreshCode.h"
#include "../../../../TrackInfo.h"
#include "../../../../TrackPanel.h"
NoteTrackButtonHandle::NoteTrackButtonHandle
( const std::shared_ptr<NoteTrack> &pTrack,

View File

@ -22,7 +22,7 @@ Paul Licameli split from TrackControls.cpp
#include "../../TrackPanelMouseEvent.h"
#include "../../TrackUtilities.h"
#include <wx/textdlg.h>
#include "../../commands/CommandType.h"
#include "../../commands/AudacityCommand.h"
#include "../../commands/CommandManager.h"
#include "../../ShuttleGui.h"
#include "../../Track.h"

View File

@ -12,14 +12,14 @@ Paul Licameli split from TrackPanel.cpp
#include "TrackSelectHandle.h"
#include "TrackView.h"
#include "../../HitTestResult.h"
#include "../../Project.h"
#include "../../ProjectAudioIO.h"
#include "../../ProjectHistory.h"
#include "../../RefreshCode.h"
#include "../../SelectUtilities.h"
#include "../../TrackPanel.h"
#include "../../TrackPanelMouseEvent.h"
#include "../../WaveTrack.h"
#include "../../Track.h"
#include <wx/cursor.h>
#include <wx/translation.h>