Yuri Chornoivan
d1ada5f08c
Fix minor typos
2020-04-11 10:06:24 +01:00
Paul Licameli
de12b9522b
Fix Linux build
2019-07-21 22:06:19 -04:00
Paul Licameli
b585a3121f
TrackArtist needs only Track, not WaveTrack...
...
... and clean up some other things
2019-07-21 21:25:23 -04:00
Pokechu22
22ce129f8d
Misc. cleanup
2019-06-29 23:32:19 -04:00
Paul Licameli
b05acc32da
Move drawing code for track names
2019-06-27 00:10:53 -04:00
Paul Licameli
b45d1387dc
Move drawing (and updating) code for vertical rulers
2019-06-26 23:39:42 -04:00
Paul Licameli
363f6f8b7b
Move drawing code for background of vertical rulers
2019-06-26 23:39:42 -04:00
Paul Licameli
b881a6e918
Move drawing code for tracks, free EnvelopeEditor from cycles
2019-06-26 23:39:42 -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
0ce6b2b05e
Avoid naked delete
2019-06-21 14:17:15 -04:00
Paul Licameli
e3efd52026
Move many declarations into LabelTrackView & define its Copy()
2019-06-20 10:47:25 -04:00
Paul Licameli
7466556e21
Move drawing code for TimeTrack...
...
... Freeing 3 files from cycles:
EnvelopeHandle
Mix
TimeTrack
2019-06-19 11:35:48 -04:00
Paul Licameli
63350d8573
TimeTrack drawing not dependent on EnvelopeEditor...
...
... after a static function is moved from EnvelopeEditor to Envelope
2019-06-19 11:35:47 -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
4c5b65d7f6
Move some constants and GetVRulerOffset() out of TrackPanel.h
2019-06-18 11:36:50 -04:00
Paul Licameli
4cc35b145b
Comment out #includes only needed for exprimental drawing...
...
... The extra highlightings for mouseover that aren't yet used.
This lets three files escape cycles to high levels:
CutlineHandle
SampleHandle
TimeShiftHandle
But EnvelopeHandle is still in cycles.
2019-06-12 22:22:22 -04:00
Paul Licameli
7ed99c6e8f
Split EnvelopeEditor.cpp from Envelope.cpp...
...
... Envelope drops down out of the big strongly connected component, the new
piece stays behind
2019-06-10 20:48:38 -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
6c57948d8f
Remove unnecessary #include-s from .cpp files...
...
... Unnecessary because transitively included.
But each .cpp file still includes its own .h file near the top to ensure
that it compiles indenendently, even if it is reincluded transitively later.
2019-05-16 17:21:00 -04:00
Pokechu22
8e8d838a08
Refactor note track rendering/position height code into own class
...
This will make later refactoring easier, and also fixes some const-correctness issues
2019-04-15 16:52:23 +01:00
James Crook
0923a5d744
Tweaks to names on tracks
...
This makes them opaque when the track height is low.
It also improves on painting with low stereo tracks, where the name previously was clipped.
2019-04-08 18:10:53 +01:00
Paul Licameli
6e431d94a1
Fix Mac build
2019-04-07 15:38:40 -04:00
James Crook
9ba023d607
Bug 1965 - Enh: Track name overlay display for all track types
...
OK now that we have translucent name background. Includes logic to move first label down to avoid the name (if it is shown).
2019-04-06 22:26:59 +01:00
James Crook
81dd2befab
Translucent background to track name (all platforms)
...
wxDC can draw translucently, if given a bitmap. So we now create a suitable bitmap, using a wxGraphicsContext.
2019-04-06 17:16:54 +01:00
James Crook
8b9518a90a
Translucent background to track name (on Mac)
...
Mac only, as mac supports translucent brushes by default.
wxWidgets makes using a wxDC and wxGraphicContext at the same time
complex and slow. Hence just for mac.
2019-03-29 22:11:59 +00:00
Paul Licameli
9569cfddf5
More comments for including Audacity.h; fix one #ifdef in AudioIO.cpp
2019-03-23 14:09:05 -04:00
Paul Licameli
f45300f032
This is only comments, in files where USE_ macros are tested...
...
... following the comment convention used in the preceding commit.
2019-03-22 12:38:30 -04:00
Paul Licameli
b4ce681867
WaveTrack.h does not include WaveClip.h
2019-03-18 01:44:42 -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
173a300427
Include nothing before Audacity.h, as comments say we should...
...
... and remove some duplicated inclusions
2019-03-17 21:41:39 -04:00
Paul Licameli
6f89c48873
Reimplement Track::Pointer using std::enable_shared_from_this...
...
... now the Track need not be owned yet by a TrackList
2019-03-16 13:11:32 -04:00
Paul Licameli
2db49dc1f0
Use standard library style members of wxArrayString (and wxString) ...
...
... which will make it easier to change the types of those containers to
std::vectors of other string-like classes
for wxString,
IsEmpty => empty
Clear => clear
Alloc => reserve
for wxArrayString,
Count => size
GetCount => size
IsEmpty => empty
Add => push_back
Clear => clear
Empty => clear
Sort => std::sort (only with default comparator)
SetCount => resize
Last => back
Item => operator []
Alloc => reserve
2019-03-10 14:43:57 -04:00
Paul Licameli
50cf2e9a1f
Give TrackArtist a back-pointer to TrackPanel
2018-11-05 10:54:58 -05:00
Paul Licameli
4ebfbd9c50
Split class TrackArtist from namespace TrackArt...
...
... The first is just extended drawing context info, and the second has
functions that retrieve TrackArtist from TrackPanelDrawingContext as needed.
2018-11-05 09:16:50 -05:00
Paul Licameli
fe35146464
remove more TrackArtist arguments
2018-11-05 09:12:48 -05:00
Paul Licameli
99106e3ed3
Carry more information in TrackPanelDrawingContext; fewer arguments
2018-11-05 09:12:45 -05:00
Paul Licameli
c866ed4bf7
Reimplement the logic for drawing label track selection background
2018-11-05 07:48:36 -05:00
Paul Licameli
f8e0ffb31b
Make sure TrackArtist updates prefs on construction...
...
... and move one more gPrefs lookup into it.
Don't expect TrackPanel to invoke it always, because sometimes TrackArtist
is standalone, as in Printing.cpp
2018-11-05 07:44:21 -05:00
Paul Licameli
d0d88118cc
Rectangle passed VRuler draw function agrees with hit test rectangle...
...
... that is, it is one wider than before. But the drawing routine compensates
to make the picture no different.
2018-11-02 22:36:47 -04:00
Paul Licameli
e70b240338
The ruler and sash draw functions treat their own backgrounds
2018-11-02 21:10:30 -04:00
Paul Licameli
951e7d27da
The vruler and sash draw functions treat their own left boundaries
2018-11-02 21:07:48 -04:00
Paul Licameli
8d02134d6a
Simplify the track rectangle calculations in TrackArtist
2018-11-02 16:51:08 -04:00
Paul Licameli
5b01f57919
Update comments about TrackPanel and TrackArtist...
...
... Remove mention of obsolete plans for TrackPanel refactor, superseded by a
different refactor now accomplished.
Remove detailed mention of names of functions and data members that implement
drawing.
Move most of Roger's comments about drawing into Overlay.h which is now the
more relevant place.
Commented more correctly what TrackPanelListener is.
2018-10-31 08:06:18 -04:00
Paul Licameli
e9d1dfb2dd
more const arguments in TrackArtist
2018-10-30 13:42:49 -04:00
Darrell Walisser
5dfff70f5b
Fix OpenMP build
2018-10-14 11:34:37 +01:00
James Crook
657159d542
Fix C4189 and C4100 Warnings
...
C4189 is 'Local variable initialised but not used'
C4100 is 'Unreferenced parameter'
Fixed some other warnings, e.g. about empty if, too.
2018-10-10 19:46:24 +01:00
James Crook
5fd95dd131
Fix C4456 Warnings.
...
"C4456 declaration hides previous local declaration."
These arise from repeated declarations of the same name.
2018-10-10 17:28:50 +01:00
Paul Licameli
50f2b0e860
Bug1995: Fix drawing of stereo tracks, bug introduced at 0c0c2c0
2018-10-03 17:19:15 -04:00
Paul Licameli
0c0c2c0d1e
Rewrite iteration over visible tracks in TrackArtist...
...
... also eliminating AudacityProject::GetFirstVisible.
2018-10-01 13:41:51 -04:00
Paul Licameli
51842fc78b
Use TypeSwitch and track_cast
2018-10-01 10:58:47 -04:00