1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-23 17:30:17 +01:00

Carry more information in TrackPanelDrawingContext; fewer arguments

This commit is contained in:
Paul Licameli
2018-11-03 13:34:48 -04:00
parent c866ed4bf7
commit 99106e3ed3
12 changed files with 227 additions and 176 deletions

View File

@@ -24,6 +24,7 @@
#include "Envelope.h"
#include "Prefs.h"
#include "Project.h"
#include "TrackArtist.h"
#include "Internat.h"
#include "ViewInfo.h"
#include "AllThemeResources.h"
@@ -265,9 +266,12 @@ void TimeTrack::WriteXML(XMLWriter &xmlFile) const
#include "tracks/ui/EnvelopeHandle.h"
void TimeTrack::Draw
(TrackPanelDrawingContext &context, const wxRect & r, const ZoomInfo &zoomInfo) const
( TrackPanelDrawingContext &context, const wxRect & r ) const
{
auto &dc = context.dc;
const auto artist = TrackArtist::Get( context );
const auto &zoomInfo = *artist->pZoomInfo;
bool highlight = false;
#ifdef EXPERIMENTAL_TRACK_PANEL_HIGHLIGHTING
auto target = dynamic_cast<EnvelopeHandle*>(context.target.get());