1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-15 15:49:36 +02:00

40 Commits

Author SHA1 Message Date
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
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
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
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
dccb716f39 enum PlayMode tells whether there's cut preview; out of Project.h 2019-05-20 21:38:12 -04:00
Paul Licameli
227fb315ea Drawing sequence for overlays independent of insertion call sequence 2019-05-20 21:38:08 -04:00
Paul Licameli
69962f62d3 Remove AudacityProject::GetScreenEndTime 2019-03-27 13:32:54 -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
ac2fecf151 Don't rely on order of Bind to EVT_TRACK_PANEL_TIMER from project...
... instead, re-process the event, and let each handler bind to the one it
depends on.

This still leaves a critical ordering of construction of playback scroller and
play indicator overlay in AudacityProject::AudacityProject (reverse of the
previous), but that will be removed by other means.
2019-03-16 08:20:44 -04:00
Paul Licameli
005abb06d6 Replace uses of TrackPanel::Cells() with CellularPanel::VisitCells() 2018-11-01 18:25:02 -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
Paul Licameli
fd10ed26cd Use TypeSwitch and track_cast in TrackPanel 2018-10-01 10:58:33 -04:00
Paul Licameli
b881b06b53 When scrubbing backwards unpinned, scroll tracks by whole panel width 2018-09-09 13:53:51 -04:00
Paul Licameli
52ad43daac Scrubbing at high mag, play head won't stray left of track edge 2018-09-09 13:10:01 -04:00
Paul Licameli
3f1d9ab8c1 P & R recording: change color of pin button, as for play indicator 2018-08-11 00:26:34 -04:00
Paul Licameli
3f0b3bf1b8 Try to flash the pin even less at extreme positions 2018-08-07 10:27:37 -04:00
Paul Licameli
54807caa1a Correct flashing of the pin when dragged to extreme left or right 2018-08-06 21:58:42 -04:00
Paul Licameli
1c5e523a1e A preference governs where the pinned head goes, not always exact center 2018-08-06 21:58:42 -04:00
Paul Licameli
5f27ae905c Changed misleading terminology in scrubber...
... It was confusing that HasStartedScrubbing() could be true
while also not IsScrubbing()
2018-07-29 14:20:11 -04:00
Paul Licameli
2c7ca97095 Reimplement change of color of playhead after pre-roll, more simply 2018-06-11 18:27:18 -04:00
Paul Licameli
77779395c7 Revert "Play head is green during pre-roll, then turns red for real recording"
This reverts commit 8e51391b98ad7a98f49c98929a10322dd551391f.
2018-06-11 18:23:56 -04:00
Paul Licameli
8e51391b98 Play head is green during pre-roll, then turns red for real recording 2018-06-09 14:40:09 -04:00
Paul Licameli
2fbe04eda0 Replace more Connect with Bind; needed redeclaration of custom events 2018-02-21 19:30:40 -05:00
Paul Licameli
bf5228267a Calls to Disconnect or Unbind in destructors are not needed, if...
... it's either the source of the connection that is being destroyed, or other
object (such as an ancestor window) transitively owning it and so causing it to
be destroyed too;

or, the sink is being destroyed, and that sink is a wxEvtHandler (which is
always so for Disconnect, though not for Unbind in case Bind was passed a
member function of a non-wxEvtHandler).

wxWidgets takes care of erasing the connection in such cases.

This removes most calls to Disconnect and Unbind.  Many destructors shrank to
nothing.

Notably, in case of popup menu handling, the call to Disconnect is not removable
because the object being destroyed is neither the source nor the sink.
2018-02-21 19:28:06 -05:00
Paul Licameli
f8b74db76e Iterators over TrackPanelCell give shared_ptr 2017-06-26 17:14:33 -04:00
Paul Licameli
ffbc4d5f90 Simplify iterations over TrackPanelCells with range-for 2017-06-17 03:01:40 -04:00
Paul Licameli
14d45eda33 Define and use the UIHandle and TrackPanelCell protocols, but...
...no actions reimplemented to them yet.

Later commits will move special cases one at a time from TrackPanel, preserving
all click and drag capabilities at each step.  With a few exceptions, but those
lost abilities are restored in yet later commits.  (Ctrl+Click on the Label
track being one.)
2017-06-15 08:20:56 -04:00
Paul Licameli
364794fd68 Scrub handle changes appearance for seeking 2016-06-02 16:05:56 -04:00
Paul Licameli
b0919ba44f Bug 1392: don't draw indicator over track control during quick play 2016-05-18 09:27:03 -04:00
Paul Licameli
c66262d790 Double click on Record button pins record head right, not center 2016-05-17 12:25:39 -04:00
Paul Licameli
f9dd6b4066 Reimplement the play/record indicator in the ruler as an overlay...
... fixing the lag between the green line and the triangle for scrolling play
2016-05-09 15:58:51 -04:00
Paul Licameli
7c2a531486 New base classes of TrackPanel just for the bitmap backing and overlay system...
... to make it reusable by other classes.

Also, don't create a second DC when repainting TrackPanel.
2016-05-09 11:37:32 -04:00
Paul Licameli
b8e3d7bb5e Fix build 2016-05-03 10:30:48 -04:00
Paul Licameli
0514ed432a Bug1052: Appearance should change immediately after ctrl-(double-)click...
... for scrubbing.

Now the green play indicator appears, though the play button on the control
toolbar does not go down until the mouse moves.
2016-04-18 20:28:33 -04:00
Paul Licameli
d5915491b3 Bug1342: Loop-play (and other things) before scrub (and other things)...
... should not disable auto-scrolling of the window during playback.
2016-04-18 17:50:17 -04:00
Paul Licameli
1722ee9e32 Define TrackPanelOverlay, use it to reimplement play indicator and cursor...
... but scrub speed display is disabled
2016-04-18 14:31:36 -04:00