1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-07 15:22:34 +02:00

10394 Commits

Author SHA1 Message Date
Paul Licameli
2f9322e7f7 Fixes for Windows build and run-time problems suggested by Pokechu22 2019-06-05 07:24:01 -04:00
Paul Licameli
f951fe0522 CommandManager.cpp compilable without AudacityHeaders.h 2019-06-03 09:54:58 -04:00
Paul Licameli
ba6db6e438 class AudacityProject is gutted and becomes a low-level class! ...
... Five new classes are split out for various special purposes, one odd thing
(the play region) is moved into ViewInfo, and very little remains in
Project.cpp and Project.h.

The five new things are intended to rank thus in the compilation dependency
hierarchy:

ProjectManager
ProjectFileIO
ProjectWindow
ProjectSettings ProjectAudioIO

And AudacityProject is lower than all.

The project class now holds the file name, status message, and a pointer
to its window, and a few other things that should perhaps go to
ProjectSettings instead.

It is also a container of other attached extension objects and window pointers,
which it treats opaquely.  The several attached classes define their static
Get() functions, non-intrusively in AudacityProject.

It is also an event handler where other objects can post events or bind to
them, defining their own added event protocols non-instrusively.

The files for the new classes are still stuck in the big strongly connected
component, but Project is freed from it, with eight others -- notably
DirManager is again free (see comments at 2947a43).

The nine are:
AButton
DirManager
MissingAliasFileDialog
PCMAliasBlockFile
Project
Sequence
SilentBlockFile
SimpleBlockFile
Tags
2019-06-03 01:43:27 -04:00
Paul Licameli
63b93fd2d1 Play region and its lock are stored together in ViewInfo 2019-06-03 01:43:27 -04:00
Paul Licameli
0a843806f8 Split class ProjectWindow out of AudacityProject...
... as a middle-level class that handles scrolling and zooming
2019-06-03 01:43:26 -04:00
Paul Licameli
4f940c855d New files for ProjectWindow 2019-06-03 01:43:26 -04:00
Paul Licameli
4abc71c6b4 Do the separation of classes ProjectWindow and AudacityProject 2019-06-03 01:43:23 -04:00
Paul Licameli
135af0480e Split class ProjectFileIO out of AudacityProject...
... as a middle-level class that handles reading and writing of the .aup file
format.

There is only one small dependency on ProjectWindow for
mbInitializingScrollbar. Can that be removed, so we can just use
GetProjectFrame instead?
2019-06-03 01:24:03 -04:00
Paul Licameli
3fc961f74a New files for ProjectFileIO 2019-06-03 01:24:01 -04:00
Paul Licameli
f7e79406ee Split class ProjectManager out of AudacityProject...
... as a high-level class allowed access to all of the sub-structures,
handling major events in project lifetime (creation, destruction, pushing
and resetting undo states), and also file opening and import
2019-06-03 01:21:15 -04:00
Paul Licameli
7b8bfd1d02 New attached structure ProjectFileIO handles load and save 2019-06-03 01:21:15 -04:00
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