1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-17 08:30:06 +02:00

22 Commits

Author SHA1 Message Date
Paul Licameli
6e0b5b690a More control over HitTest behavior moved into the Track Shifter classes 2020-09-20 00:31:39 -04:00
Paul Licameli
f204ee3192 Always pass ViewInfo to TrackShiftHandle::HitTest 2020-09-20 00:30:07 -04:00
Paul Licameli
637ce894c1 Pass project to TrackShifter factory, which LabelTrackShifter will need 2020-09-20 00:30:06 -04:00
Paul Licameli
14dc5af223 Pass optional extra information into TrackShifter::HitTest ...
... Because LabelTrack, unlike the others, will also need a mouse y coordinate.

The extra information is present when using the time-shift tool but not when
using the items in ClipMenus.
2020-09-20 00:30:01 -04:00
Paul Licameli
eb22892064 TrackShifters decide what parts move or stay fixed...
... for now redundantly with the older logic.

Also shorten a function name to Init
2020-09-19 19:16:43 -04:00
Paul Licameli
c279fb6588 Choose track or clip shifting behavior without a TypeSwitch...
... Preserving existing behavior, but maybe these cases should be reconsidered
and made more uniform.  (e.g. should hit test on NoteTrack sometimes miss, as
with WaveTrack?)

Also made details of WaveTrack hit testing consistent with what ClipMenus does
2020-09-19 13:23:47 -04:00
Paul Licameli
8f8c20ac80 TrackShifters can classify track intervals as fixed or not 2020-09-19 13:23:47 -04:00
Paul Licameli
d8a894b95b Define TrackShifter, subclasses, factory method; collect them...
... in TimeShiftHandle.  They do nothing useful yet, but responsibilities
will shift into them.

TypeSwitch is avoided and the subclasses are defined in appropriate places
for dependency management, thanks to AttachedVirtualFunction.
2020-09-19 13:23:47 -04:00
Paul Licameli
3869a8f460 Remove allegro.h from other headers 2020-06-14 10:32:16 -04:00
Paul Licameli
fa4d35296e AllThemeResources.h has a .cpp & doesnt include Theme.h...
... (it used to, via MacroMagic)

This splits a cycle of 8 into 6 + 1 + 1
2020-05-28 05:50:24 -04:00
Yuri Chornoivan
d1ada5f08c Fix minor typos 2020-04-11 10:06:24 +01:00
Paul Licameli
2bec03ac08 TrackView subclasses do not depend on corresponding TrackControls...
... use an AttachedVirtualFunction to compute the default view height from
the controls.

This frees LabelTrackControls from cycles.

Also made Track::DoSetHeight non-virtual
2019-07-09 00:05:01 -04:00
Paul Licameli
b05acc32da Move drawing code for track names 2019-06-27 00:10:53 -04:00
Paul Licameli
b881a6e918 Move drawing code for tracks, free EnvelopeEditor from cycles 2019-06-26 23:39:42 -04:00
Paul Licameli
3e0d48cc14 Redefine the factories for track views and controls...
... non-intrusively in the Track suclasses, registering functions instead.

For each abstract factory function (of two), build a table of concrete factory
functions, paralleling the hierarchy of Track subclesses.  Dispatch using
runt time type information in the Track objects.
2019-06-21 09:16:49 -04:00
Paul Licameli
627213cb74 Move drawing code specific to Wave or to Note track controls...
... making cycles of some TrackControls subclasses with their handles, which
perhaps means those files should be fused, but that's for later
2019-06-19 18:34:47 -04:00
Paul Licameli
23b584b529 Move code to TrackInfo.cpp 2019-06-19 12:59:08 -04:00
Paul Licameli
66e32ca35d Move Y position, height, and minimized state into TrackView...
... and eliminate some unnecessary calls to SubstitutePendingChangedTrack,
because the track and the substitute store Y and height in their shared
TrackView object.

Also make GetMinimizedHeight() virtual to avoid inclusion of TrackPanel.h in
TrackView.cpp.
2019-06-18 16:01:06 -04:00
Paul Licameli
e581fa60d9 Move responsibilities from Track to TrackView classes...
... And Track no longer inherits TrackPanelCell, so be careful to rewrite
some dynamic_casts too to check instead for TrackView.  Those casts won't fail
to recompile if not rewritten.
2019-06-18 16:01:06 -04:00
Paul Licameli
18b4c01c51 TrackVRulerControl is directly owned by TrackView not Track...
... in anticipation of making views to tracks many-to-one, but then the rulers
should be one-to-one with the views.  So go through the view to get the ruler.
The ruler is really a left-hand extension for each view.
2019-06-18 16:01:06 -04:00
Paul Licameli
059d7eaa42 Associate View object with Track, analogous with controls 2019-06-18 16:01:06 -04:00
Paul Licameli
d7753f7acd Rename old .cpp files, add new .h files 2019-06-18 16:01:05 -04:00