Commit Graph

85 Commits

Author SHA1 Message Date
Paul Licameli d979a8959b New files for ProjectAudioManager...
... This eliminates some inclusions of ProjectManager, helping to free it from
cycles into a higher level
2019-06-09 12:10:47 -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 4f940c855d New files for ProjectWindow 2019-06-03 01:43:26 -04:00
Paul Licameli fee5582826 New files for ProjectManager 2019-06-03 01:21:12 -04:00
Paul Licameli e5cf2165d1 New files for ProjectAudioIO 2019-06-03 01:18:08 -04:00
Paul Licameli 1f4202c878 New attached structure ProjectAudioIO handles tokens and meters 2019-06-03 01:15:47 -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 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 2f0a76ed10 static Scrubber::Get()...
... not member functions of AudacityProject
2019-05-23 16:01:10 -04:00
Paul Licameli b5a57682b6 static ViewInfo::Get() and ZoomInfo::Get()...
... not member functions of AudacityProject
2019-05-23 12:58:47 -04:00
Paul Licameli 14ab93a01f static TrackList::Get()...
... not member function of AudacityProject
2019-05-23 12:58:47 -04:00
Paul Licameli 62899a32f4 All things with an UpdatePrefs() message listen for an event...
... Still to do, improve the handling of updates of only subsets of the prefs
2019-05-20 21:38:13 -04:00
Paul Licameli dccb716f39 enum PlayMode tells whether there's cut preview; out of Project.h 2019-05-20 21:38:12 -04:00
Paul Licameli 24259413be Move UpdatePrefs() later in ctor of AudacityProject...
... and assume non-null for certain sub-windows
2019-05-20 21:38:11 -04:00
Paul Licameli 227fb315ea Drawing sequence for overlays independent of insertion call sequence 2019-05-20 21:38:08 -04:00
Paul Licameli 08c16b6eb7 Remove wx/{html/htmlwin,fileconf,dragimag,debug,dcclient}.h from *.h 2019-03-30 10:53:22 -04:00
Paul Licameli 4018b191b4 Remove Get/Set functions for selection bounds from AudacityProject 2019-03-27 13:32:53 -04:00
Paul Licameli a915a510bd include <wx/setup.h> in all files where wxUSE* macros are used...
... even if it's redundant; improving on what was done at b47e2f9
2019-03-23 14:56:02 -04:00
Paul Licameli 0dd0a5cb5a Remove <wx/menu.h> from CommandManager.h, moving inline functions out 2019-03-23 10:56:43 -04:00
Paul Licameli 02db402b54 Bug2064: ESC key should abort drags in time ruler on Linux...
... Reimplement the ESC key handling in TrackPanel and time ruler on all
operating systems so that it does not rely on the focused window, but instead
uses the application-wide event filter.

This includes reversion of 9491605cfc
2019-03-18 12:43:14 -04:00
Paul Licameli 906e55f047 Experimental.h in all .h or .cpp files that directly use EXPERIMENTALs...
... except Audacity.h; and in no others.

Do so even if Experimental.h gets multiply included, as in both the .h and
.cpp files.

This makes it easier to do a text scan to be sure there are no unintended quiet
changes of meaning because of omission of Experimental.h when the flag is
an enabled one.

Also move inclusions of Experimental.h earlier.

Also don't require Experimental.h to be preceded by Audacity.h to define
EXPERIMENTAL_MIDI_OUT correctly.
2019-03-17 22:54:00 -04:00
Paul Licameli f7162d3326 OverlayPanel uses weak_ptr to Overlay, which simplifies other dtors 2019-03-16 08:21:03 -04:00
Paul Licameli e6324e86ac Fix cross-platform one-pixel differences in line drawing...
... Make all line drawing go through our AColor which wraps the wxDC
line-drawing functions.

Despite what wxWidgets documentation says, the functions still don't
consistently include the first point and omit the last point of a line.  I
observed inclusion of both on Mac, while on Windows, omission sometimes of the
first point instead of the last.

Discrepancies could be observed in 2.3.0 between Windows and Mac, using the
Window magnifier or command+alt+ +, zooming in closely on the ends of the
shadow lines below and right of tracks, or at the bottom-right corners of the
bevels drawn around vertical rulers.

So where there is an observable one-pixel difference of drawing between
platforms, there is the question, which was the intent when the drawing code
was written?  Should the coordinates be corrected by one or not?

I reviewed each case and used my judgment.

Most of the calls are in drawing rulers.  Major tick lines were drawn five
pixels long, and minor, three, on Mac.  I keep this behavior, but you might
argue for making them four and two.

On the other hand the drawing of ruler grid lines, which you can see in
the equalization and frequency analysis windows, did need a one-pixel correction
to avoid straying out of bounds.
2019-03-16 07:51:28 -04:00
Paul Licameli 5fd6965925 Use type aliases CommandID, CommandIDs...
... for identifiers of menu commands and macros, and for vectors thereof
2019-03-15 15:18:11 -04:00
Steve Daulton bc60de2ffa Disable Scrub Ruler by default 2018-11-04 21:18:29 +00:00
Paul Licameli 005abb06d6 Replace uses of TrackPanel::Cells() with CellularPanel::VisitCells() 2018-11-01 18:25:02 -04:00
Paul Licameli 01551913f0 nonvirtual reimplementation of CellularPanel::FindRect using nodes 2018-11-01 18:25:02 -04:00
Paul Licameli cfa7afcb24 nonvirtual reimplementation of CellularPanel::FindCell using nodes 2018-11-01 18:25:02 -04:00
Paul Licameli 08f88ebf2e Implement AdornedRulerPanel::Root() 2018-11-01 17:45:51 -04:00
Paul Licameli 4fe97acbc9 Define CellularPanel::Root 2018-11-01 17:37:22 -04:00
Paul Licameli 303553ae4e Take class AdornedRulerPanel out of src/widgets...
... It's not a utility widget like RulerPanel.  It has a lot of application
specific logic in it.
2018-10-24 15:04:41 -04:00