1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-25 16:48:44 +02:00

37 Commits

Author SHA1 Message Date
Paul Licameli
eb4eba6325 AdornedRulerPanel updates its play region in idle time...
... Eliminating TP_DisplaySelection and making ProjectWindow independent of
AdornedRulerPanel
2019-07-03 23:38:33 -04:00
Paul Licameli
1c1aca521d AdornedRulerPanel updates itself in response to theme change event 2019-07-03 23:11:10 -04:00
Paul Licameli
1e4812f470 GetProjectPanel analogous to GetProjectFrame breaks dependencies...
... in places that need the TrackPanel but only to invoke common wxWindow
methods on it.

This eliminates direct use of TrackPanel by Scrubbing and ProjectWindow
2019-07-03 13:53:07 -04:00
Paul Licameli
7597080418 Move the project window initialization into ProjectManager 2019-07-03 13:50:57 -04:00
Paul Licameli
d0c4677ab1 Move most of ProjectWindow initialization into nonmember function 2019-07-03 13:34:44 -04:00
Paul Licameli
52ff705b0d ScrollIntoView out of TrackPanel, into ProjectWindow 2019-07-03 13:32:32 -04:00
Paul Licameli
312911645e Update status bar field widths in case of language change 2019-07-02 21:02:13 -04:00
Paul Licameli
68999934e0 ProjectAudioManager doesn't use ProjectWindow, which doesn't use...
ControlToolBar, after we make a system to register functions that calculate
necessary minimum widths for status bar fields.

Also let Scrubbing.cpp register its own strings.

Also be sure to size the status field sufficiently for "Playing at Speed".
2019-07-02 21:01:54 -04:00
Paul Licameli
e2362bc25a Move project status string management to new attached object class 2019-07-02 21:01:34 -04:00
Paul Licameli
1ce9d59590 Fix another possible case of crashing on exit 2019-07-02 21:01:33 -04:00
Paul Licameli
a5364119eb Eliminate many calls to RedrawProject & TrackPanel::Refresh()...
... Let the window respond to an undo manager event instead, whenever there
is a push or modify

Maybe this makes a few unnecessary redraws that did not happen before.  If
that is important, then we should figure out how to put the logic for eliding
the redraw into ProjectWindow, and the extra information needed for the
decision into the events, but not make intrusions in other code all over the
place.
2019-07-02 08:17:01 -04:00
Paul Licameli
63c7b3740e RedrawProject has a CallAfter delay now, so remove other delays...
... and rewrite that CallAfter more safely with a weak pointer
2019-07-02 08:14:30 -04:00
Paul Licameli
7d504ba015 ControlToolBar uses idle events to update status message for itself 2019-07-01 19:48:51 -04:00
Paul Licameli
868481b686 GetSceenEndTime out of TrackPanel 2019-06-26 21:25:15 -04:00
Paul Licameli
d29d10d712 GetTracksUsableArea() out of TrackPanel 2019-06-26 21:25:15 -04:00
Paul Licameli
f87dfd43c1 GetVRulerWidth, GetLabelWidth, GetLeftOffset out of TrackPanel.h...
... And some things demoted from ViewInfo to ZoomInfo, related to x coordinates
only
2019-06-26 21:25:15 -04:00
Paul Licameli
ef7068f46a Fix some failures to update the vertical scrollbar...
... Problem involves sequence in which event handlers are done, and started at
commit 278509a which updated track Y coordinates in a handler.

Solution is to delay the updating of scrollbars further, using CallAfter.

Also remove one unnecessary call to ProjectWindow::FixScrollbars() because
ProjectWindow::HandleResize follows it and includes scrollbar update already.
2019-06-25 17:41:29 -04:00
Paul Licameli
2257fa642a Remove TrackPanel::EnsureVisible; TrackList sends an event instead 2019-06-25 10:54:55 -04:00
Paul Licameli
c6478f43af Lower ViewActions as member functions of ProjectWindow 2019-06-25 00:14:53 -04:00
Paul Licameli
4339c0df68 Move height calculation utilities to class TrackView 2019-06-22 21:46:32 -04:00
Paul Licameli
a6e2ca0aa8 Move some enums into new files WaveTrackViewConstants.* ...
... freeing TracksPrefs from the second largest s.c.c. which is now only 20
2019-06-22 21:46:32 -04:00
Paul Licameli
6a03e7c84a Global slider instances for control panels out of TrackPanel.cpp...
... and updating of them is accomplished privately in implementation files,
reducing intrusions into TrackPanel and ProjectWindow

This removes #include-s from TrackInfo.cpp, leaving dependency cycles better
than previously
2019-06-19 18:34:47 -04:00
Paul Licameli
e1908ab8e2 ToolManager does not depend on ProjectWindow 2019-06-16 01:24:29 -04:00
Paul Licameli
ca5259712c HandleCommandEntry's 3rd parameter was two-valued, make it bool...
... false when it was NoFlagsSpecified, true when it was AlwaysEnabledFlag
2019-06-14 10:12:45 -04:00
Paul Licameli
f0ae4c3858 ProjectWindow does not depend on selection toolbars...
... Freeing SelectionBar and SpectralSelectionBar from cycles.

Also fixing a minor problem:  if two projects are open, and one is playing or
recording, and you switch windows -- then the audio time in the selection bar
of the other project could be updated.
2019-06-12 21:02:11 -04:00
Paul Licameli
0a29afb933 Remove some unnecessary #include directives 2019-06-12 15:13:58 -04:00
Paul Licameli
5eaf0a649b ProjectWindow listens for undo events, intrudes less in other code 2019-06-12 11:08:50 -04:00
Paul Licameli
ef8c100cee MenuManager holds a back-reference to project; simplifies calls 2019-06-12 11:08:50 -04:00
Paul Licameli
b7386c2db1 Use idle events to update TrackPanel cursor...
... As when recording starts or stops, or the Tools button has changed, or
scrolling has changed the results of hit-test.

This reduces TrackPanel's intrusions into other code, including ProjectHistory.

Also for AdornedRulerPanel, which shares the base class CellularPanel
2019-06-12 11:05:55 -04:00
Paul Licameli
d4b44d16f1 Move details of mouse wheel handling into ProjectWindow.cpp ...
... to break some dependency cycles.  Install a callback at initialization time.

This frees CommonTrackPanelCell from cycles, which is important because it is
a base class of Track
2019-06-10 21:56:46 -04:00
Paul Licameli
42a4f55ffe Prepare to split AudioIOBase from AudioIO...
... New files, but (almost) empty; don't use the global variable gAudioIO,
but use one of two accessor function names (which are the same function for
now).

AudioIOBase will have fewer dependencies than AudioIO -- in particular, no
dependency on tracks.

It won't include StartStream.  It will contain functions to query the
present state of streams, and device capabilities.
2019-06-10 20:48:38 -04:00
Paul Licameli
090374381c Supply #include "Experimental.h" in recent new files 2019-06-09 08:56:38 -04:00
Paul Licameli
577fdb200f Fix error in playing from cursor, introduced at 4abc71c 2019-06-08 13:59:20 -04:00
David Bailes
a55cba3241 Fix tab order of top panel
Problem:
When the keyboard first moves to the top panel using ctrl+f6, the click to pin button in the ruler is the focus. It should be the first control in the top tooldock.
This problem was introduced by commit: 4abc71c. Prior to this commit the top tooldock was created before the ruler, and afterwards the order was reversed. The default tab order is the order of creation.

Fix:
Explicitly set the tab order of the top tooldock and the ruler, so that the creation order doesn't matter.
2019-06-08 12:42:56 +01:00
Paul Licameli
236b188d6b ProjectWindow does not depend on ProjectFileIO 2019-06-05 07:24:01 -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