1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-01 08:09:41 +02:00

10133 Commits

Author SHA1 Message Date
Paul Licameli
fee5582826 New files for ProjectManager 2019-06-03 01:21:12 -04:00
Paul Licameli
0d1d8d20c6 Move management of saved window size into ProjectManager...
... So that class AllProjects does not use ProjectWindow
2019-06-03 01:18:12 -04:00
Paul Licameli
4274d44ab7 New attached structure ProjectManager handles project lifetime...
... that is, a factory function, open, close, import, undo/redo/rollback.

Also the callbacks from AudioIO, which need to invoke undo history push when
recording stops.

It is meant as a high-level class using several of the other things attached
to the project, while AudacityProject will be a low level class acting mostly
as just the container of the attached structures.
2019-06-03 01:18:12 -04:00
Paul Licameli
c629d44c41 Split class ProjectAudioIO out of AudacityProject...
... as a low-level class to store the AudioIO token associated with the
project, and pointers to meters
2019-06-03 01:18:11 -04:00
Paul Licameli
850628275b AudioIO.cpp does not depend on ProjectAudioIO.h and GetActiveProject 2019-06-03 01:18:11 -04:00
Paul Licameli
e5cf2165d1 New files for ProjectAudioIO 2019-06-03 01:18:08 -04:00
Paul Licameli
20ed57082f Spit class ProjectSettings out of AudacityProject...
... as a low-level class, to store the rate and various other per-project
values, and send an event to the Project when certain of them change (for
now, just the sync lock setting)
2019-06-03 01:15:47 -04:00
Paul Licameli
1f4202c878 New attached structure ProjectAudioIO handles tokens and meters 2019-06-03 01:15:47 -04:00
Paul Licameli
6dc5162614 Use an event so that ProjectSettings.cpp does not need TrackPanel.h 2019-06-03 01:15:44 -04:00
Paul Licameli
05efeeb5bd New files for ProjectSettings 2019-06-03 01:13:13 -04:00
Paul Licameli
dd10e00a2d New attached structure ProjectSettings stores rate, snap-to, et al. 2019-06-02 14:42:00 -04:00
Paul Licameli
327845b0ee Remove unneeded things from Project.h 2019-06-02 14:41:47 -04:00
Paul Licameli
ac04a34d42 Move #include of Experimental.h upward in two files 2019-06-02 14:03:32 -04:00
Paul Licameli
96ad9c9b00 Remove a disabled EXPERIMENTAL and associated code...
... which referred to other functions that no longer exist
2019-06-02 13:27:56 -04:00
Paul Licameli
c6a7f7c59f OD manager events will be signalled through the Project...
... not the project window, when those are distinct objects.

This will keep the existing calls that bind the events correct.
2019-06-01 23:06:04 -04:00
Paul Licameli
18be09e277 Fix Linux assert violation in MixerBoard 2019-05-31 16:54:06 -04:00
Paul Licameli
96b749f232 Fix Linux assertion violation when closing Preferences 2019-05-30 17:37:44 -04:00
Steve Daulton
41151b0700 Mod-nyq-bench Readme updated
Mod-nyq-bench is no longer supported.
2019-05-30 14:06:57 +01:00
Paul Licameli
b25d3ad344 Limit access to global array of open projects & simplify iterations 2019-05-30 01:55:25 -04:00
Paul Licameli
0ae542cf08 Remove unused globals 2019-05-29 12:45:55 -04:00
Paul Licameli
d5314a1632 Various preliminaries before splitting class AudacityProject 2019-05-28 23:18:16 -04:00
Paul Licameli
82663892dc Accessors to get the project window...
... as a preparation for splitting up class AudacityProject.

Use ProjectWindow as an alias for AudacityProject, and fetch it from the
project with a static member function, where certain of its services are used;
pretending they are not the same class.

Use global accessor functions to get wxFrame from the project where only
wxFrame's member functions are needed, so there will be less dependency on
ProjectWindow when it becomes a distinct class.
2019-05-28 23:18:13 -04:00
Paul Licameli
02afcbca8c Redo TP_UpdateStatusMessage...
... Rename it as SetStatus; make it part of AudacityProject not
TrackPanelListener; and use a roundabout event signalling to cause the timer
restart.

Because SetStatus will be one of very few things left in AudacityProject, but
the timer handling will be part of another class decoupled from it.

And TrackPanelListener won't really be needed: TrackPanel will not need to
pretend it doesn't know what an AudacityProject is.
2019-05-28 19:36:47 -04:00
Paul Licameli
ae18f2f220 Construction of default play options moved out of AudacityProject 2019-05-28 19:33:21 -04:00
Paul Licameli
0a109d2432 Lift the propagation of format values into toolbars during file loading 2019-05-28 19:29:56 -04:00
Paul Licameli
c2d57d9e9b Rearrange the setting of project snap-to...
... Just one low-level function to simply set the variable, and one
high-level function that also pushes notifications.  The danger of infinite
recursion in the toolbar code, as in the previous commit, doesn't exist here.
2019-05-28 19:26:13 -04:00
Paul Licameli
35892fc869 Rearrange setting time & freq formats for numeric controls...
... Just one low-level function for each that simply sets; just one high-level
function for each that also pushes notifications; and to make that work,
toolbars need some rewriting to avoid recursion when the notifications they
post come back to them.
2019-05-28 19:23:42 -04:00
Paul Licameli
441763cabd Fix 9c75ebe, which caused TrackPanel not to get the message 2019-05-28 18:53:54 -04:00
Paul Licameli
ad0580c3de fix assertions on Linux because of 1ed9338 2019-05-27 19:45:57 -04:00
Paul Licameli
ea0ee7fc0b Fix inability to close the History window 2019-05-27 09:11:52 -04:00
Paul Licameli
37e176dc82 Don't set color index of temp tracks only pasted into other tracks 2019-05-26 11:29:12 -04:00
Paul Licameli
ac65d817ac Remove an #include 2019-05-25 05:59:50 -04:00
Paul Licameli
c1c24ea1dd Accessors for windows and toolbars out of class AudacityProject...
... use static Get() functions instead in the several classes.

This improves the results of scripts/graph.pl, freeing nine files from cycles
to higher levels.  However there is really still a dependency on them from
the big strongly connected component, via menu code, which the script does
not detect.
2019-05-24 16:11:07 -04:00
Paul Licameli
3416b5bad6 Toolbars accessed by static Get() functions, not through AudacityProject 2019-05-24 16:08:29 -04:00
Paul Licameli
7bb71257ed static AdornedRulerPanel::Get()...
... not member functions of AudacityProject
2019-05-24 15:48:16 -04:00
Paul Licameli
d1ad8f55e0 static TrackPanel::Get()...
... not member functions of AudacityProject
2019-05-24 15:46:30 -04:00
Paul Licameli
00117897bc Decouple class AudacityProject from some attached frames...
... use registered factories instead, so class AudacityProject needn't know
the other classes.

This frees 9 .cpp files, related to various non-modal dialogs, to higher
levels out of the big strongly connected component, as determined by
scripts/graph.pl!

But in reality there is still link dependency on them that the script does not
detect.  The remaining dependency is via the declarations of ViewMenu,
EffectMenu, etc. in Menus.cpp.

That could be broken with a registration system for menus.
2019-05-24 15:46:28 -04:00
Paul Licameli
f83a866276 Project::GetStatusBar is unnecessary (base class has it already) 2019-05-24 15:42:11 -04:00
Paul Licameli
8eb39cd606 Fix #include directives 2019-05-24 12:23:57 -04:00
Paul Licameli
2947a43181 Remove many accessor functions from AudacityProject...
... instead, each of the related objects has a static Get function taking
a reference to a project.

The attached object system introduced at commit af039f1 now manages the
objects' lifetimes.  The call to BuildAll in the constructor of
AudacityProject guarantees that all are created, without Project.cpp needing
to know the definitions of all of the classes.

This requires the implementations of those objects to include Project.h, but
makes Project.h unnecessary for client code that retrieves those objects, and
removes need for Project.cpp to include the header files for the objects.

Three files get freed from the big strongly connected component found by
scripts/graph.pl at high levels, but five low-level files are put back into it
because DirManager.cpp needs Project.h.

The intention is that AudacityProject will become little more than a container
for these objects and a source of events that other objects post on it.  That
will make Project.cpp a low-level file after everything else moves out, and
that will free DirManager.cpp and others again from cycles.
2019-05-23 16:35:06 -04:00
Paul Licameli
52abbcdc4b static ::Get functions for overlays on TrackPanel...
... not member functions of AudacityProject.

AdornedRulerPanel is not (yet) made similarly independent of its overlay
code.

Two .cpp files implementing overlays escape dependency cycles to higher levels.
2019-05-23 16:35:06 -04:00
Paul Licameli
004997cec1 static BackgroundCell::Get()...
... not member functions of AudacityProject.

This frees BackgroundCell.cpp from dependency cycles
2019-05-23 16:35:05 -04:00
Paul Licameli
0923bc19a9 static MenuManager::Get()...
... not member functions of AudacityProject
2019-05-23 16:34:47 -04:00
Paul Licameli
2f0a76ed10 static Scrubber::Get()...
... not member functions of AudacityProject
2019-05-23 16:01:10 -04:00
Paul Licameli
15dd230ee1 static ToolManager::Get()...
... not member functions of AudacityProject
2019-05-23 15:24:28 -04:00
Paul Licameli
68e25f3b7d static SelectionState::Get()...
... not member functions of AudacityProject
2019-05-23 14:11:05 -04:00
Paul Licameli
c1c0030013 static Tags::Get...
... not member functions of AudacityProject
2019-05-23 14:08:09 -04:00
Paul Licameli
116ff70756 static TrackFactory::Get()...
... not member functions of AudacityProject
2019-05-23 13:55:14 -04:00
Paul Licameli
4ba4d0978b static CommandManager::Get()...
... not member functions of AudacityProject
2019-05-23 13:17:29 -04:00
Paul Licameli
805af452a4 static DirManager::Get()...
... not member functions of AudacityProject

This puts DirManager.cpp and four others back into the big strongly connected
component of link dependencies.  They will break out again when Project.cpp
becomes a low-level file.
2019-05-23 13:10:19 -04:00