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

10685 Commits

Author SHA1 Message Date
Paul Licameli
b888dfec5a Sever dependencies of ProjectWindow & Scrubbing on AdornedRulerPanel 2019-07-04 09:57:59 -04:00
Paul Licameli
a3b434be1c Move the scrub mouse event handler into ScrubUI...
... Making Scrubbing independent of AdornedRulerPanel.cpp
2019-07-04 09:52:34 -04:00
Paul Licameli
8414ebffa5 ScrubbingOverlay declared and defined entirely within ScrubUI.cpp 2019-07-04 09:22:20 -04:00
Paul Licameli
24bd7cf571 New files for ScrubUI 2019-07-04 09:13:59 -04:00
Paul Licameli
8c59b6f1cf This call isn't needed to hide the quick play line at end of scrub...
see also commit e815949535d73e46d048c79f706024ee6669df11
2019-07-04 09:00:09 -04:00
Paul Licameli
9faa746d4d Scrubber holds preference, AdornedRulerPanel updates in idle time...
... removing two uses of AdornedRulerPanel in Scrubbing
2019-07-04 08:59:57 -04:00
Paul Licameli
3c858dd343 Remove unnecessary button update of ruler from Scrubbing...
... this is a remnant of the abandoned experiment that put other buttons in
the ruler besides the pinned play head

See commit 6a3613e8e97da5164da881a179f1b64ac098d472
2019-07-04 08:58:36 -04:00
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
c742199d47 AdornedRulerPanel does not depend on TrackPanel...
... but it does assume that GetProjectPanel returns a CellularPanel
2019-07-03 23:08:49 -04:00
Paul Licameli
500ccb60b3 Free ControlToolBar from cycles. That's all the toolbars now! 2019-07-03 21:38:06 -04:00
Paul Licameli
acfd2b7010 TrackFocus is a new attached object...
... removing the need to use TrackPanel to get and set the focused track

ProjectAudioManager loses its direct dependency on TrackPanel
2019-07-03 19:10:21 -04:00
Paul Licameli
02075d5b43 Remove some fetches of TrackPanel 2019-07-03 18:42:33 -04:00
Paul Licameli
53c96cced6 Refactor ControlToolBar and ProjectAudioManager...
... The first, being only a user interface for the second, which has no
direct dependency back on it.

Several other places now use ProjectAudioManager directly, not using
ControlToolBar.

Also eliminate the namespace TransportActions from ProjectAudioManager. Either
make new member functions, or inline them because they are short, or move them
to more appropriate files.
2019-07-03 17:22:04 -04:00
Paul Licameli
b6cd9a2b36 DoPlayStopSelect into ProjectAudioManager; remove button push-down...
... which was redundant with what happens in the yield to idle events in
ProjectAudioManager::Stop.

This removes direct dependency of ProjectAudioManager on ControlToolBar.

And remove another #include we don't need
2019-07-03 17:21:55 -04:00
Paul Licameli
ca8740b510 StopIfPaused is now a member function of ProjectAudioManager 2019-07-03 17:00:08 -04:00
Paul Licameli
2c840a75c5 Remove short functions from namespace TransportActions 2019-07-03 16:52:19 -04:00
Paul Licameli
c8c76cf294 Cut and paste functions into ProjectAudioManager.cpp 2019-07-03 16:52:19 -04:00
Paul Licameli
13c2e4de0f Move members from ControlToolBar into class ProjectAudioManager...
... and ControlToolBar is included in fewer places
2019-07-03 16:52:16 -04:00
Paul Licameli
977b46cda2 Move CanStopAudioStream into ProjectAudioManager 2019-07-03 16:34:47 -04:00
Paul Licameli
a470ba00b0 ProjectAudioManager does not depend directly on AdornedRulerPanel 2019-07-03 16:34:46 -04:00
Paul Licameli
3af2063fa3 Remove some direct dependencies on TrackPanel 2019-07-03 14:55: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
b0d03d09a2 Redo management of widths of fields in project status bar...
... new attached object, demoted to low levels of the dependency graph, to
loosen some remaining difficult dependencies;

also update it for "Playing at speed" and for changes of language
2019-07-02 21:03:10 -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
9f61b67965 Manage some more status bar changes with ProjectStatus 2019-07-02 21:01:34 -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
efa66f5350 New files for ProjectStatus 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
2a06b10884 Make objects attached to AudacityProject non-copyable...
... except for Tags; also some uses of final and explicit

This caught a mistake in Scrubbing.cpp
2019-07-02 19:51:24 -04:00
Paul Licameli
6adb2abc98 Keep EXPERIMENTAL_AUTOMATED_INPUT_LEVEL_ADJUSTMENT compilable...
... while not reintroducing bad dependencies, which explains the movement
of the definition of some constants
2019-07-02 12:35:40 -04:00
Paul Licameli
a046d9906c One less use of ProjectWindow::Get() where only a wxWindow is needed 2019-07-02 10:26:42 -04:00
Steve Daulton
f99d564fd6 Fix bug 2148
Ensure that backslashes in GetInfo data are escaped.
2019-07-02 15:05:10 +01:00
Paul Licameli
5741589758 More updating of ProjectWindow and TrackPanel into event handlers...
... reducing intrusions in much other code
2019-07-02 08:51:36 -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
abe69ddd35 Remove some unnecessary calls to FixScrollbars...
... because RedrawProject or HandleResize invokes it
2019-07-02 08:06:24 -04:00
Paul Licameli
73fb2a2a82 Transport status message, buttons, scrolling update in idle time...
... so the functions that start and stop streams don't really need the
ControlToolBar object.

This also makes the intended momentary push-down of the Stop button visible,
as was apparently intended, when playback stops for other reasons than a
click on that button.
2019-07-01 22:51:20 -04:00
Paul Licameli
34e9cb6171 Start and stop record or playback scrolling in idle time 2019-07-01 22:51:20 -04:00
Paul Licameli
2a87ea77cf Momentary Stop push-down happens in yield to the idle time handler...
... So that ControlToolBar::StopPlaying now does nothing directly to the
buttons, and can be moved to another place with no dependency on ControlToolBar
2019-07-01 22:51:15 -04:00
Paul Licameli
5ab3986261 Pop up the Stop button in idle time...
... This also causes a momentary push-down of the stop button, which happens
in ControlToolBar::StopPlaying, really to be visible, as was apparently the
intent.

For instance, when playing, then clicking in the quick-play ruler to restart
the play elsewhere.
2019-07-01 22:51:13 -04:00
Paul Licameli
830f772625 Update Play button appearance in idle time...
... so most calls to ControlToolBar::SetPlay are removed.  One remains in
TransportMenus, which will not be problematic for untangling dependencies,
and one remains where the toolbar remakes its own buttons.

But the routines that start and stop the streams, importantly, don't use it.
2019-07-01 21:25:50 -04:00
Paul Licameli
cac04e9fb8 Do not use ControlToolBar's Record button as a state variable 2019-07-01 19:48:52 -04:00
Paul Licameli
923128731d Do not store pause state in ControlToolBar...
... Move that into ProjectAudioManager instead, and update the button, only to
reflect it, in idle time.

However, AudioIO also has its mPaused member variable, and it is not obvious
that it was always kept the same as the button state.  No attempt was made
here to identify and fix any bugs, but only to preserve behavior.
2019-07-01 19:48:52 -04:00
Paul Licameli
8b549ea07f Another overload of ControlToolBar::OnRecord taking bool...
... so that it's called directly where needed without the roundabout of
SetInt in an event, and there is no checking of the state of a button first
2019-07-01 19:48:52 -04:00
Paul Licameli
7d504ba015 ControlToolBar uses idle events to update status message for itself 2019-07-01 19:48:51 -04:00