src/tracks/playabletrack/wavetrack/ui/WaveformView.cpp
// Header needed only for experimental drawing below
//#include "tracks/ui/TimeShiftHandle.h"
Header needed only for experimental drawing below
include "tracks/ui/TimeShiftHandle.h"
Header needed only for experimental drawing below include " tracks / ui / TimeShiftHandle . h "
void WaveformView::DoDraw(TrackPanelDrawingContext &context,
                               const WaveTrack *track,
                               const WaveClip* selectedClip,
                               const wxRect& rect,
                               bool muted)
{
   auto &dc = context.dc;
   const auto artist = TrackArtist::Get( context );
   bool highlight = false;
   bool gripHit = false;
#ifdef EXPERIMENTAL_TRACK_PANEL_HIGHLIGHTING
   auto target = dynamic_cast<TimeShiftHandle*>(context.target.get());
   gripHit = target && target->IsGripHit();
   highlight = target && target->GetTrack().get() == track;
#endif
   const bool dB = !track->GetWaveformSettings().isLinear();
   const auto &blankSelectedBrush = artist->blankSelectedBrush;
   const auto &blankBrush = artist->blankBrush;
   TrackArt::DrawBackgroundWithSelection(
      context, rect, track, blankSelectedBrush, blankBrush );
   for (const auto& clip : track->GetClips())
   {
      DrawClipWaveform(context, track, clip.get(), rect,
         dB, muted, clip.get() == selectedClip);
   }
   DrawBoldBoundaries( context, track, rect );
   const auto drawSliders = artist->drawSliders;
   if (drawSliders) {
      DrawTimeSlider( context, rect, true, highlight && gripHit );  
      DrawTimeSlider( context, rect, false, highlight && gripHit ); 
   }
}
void WaveformView :: DoDraw ( TrackPanelDrawingContext & context , const WaveTrack * track , const WaveClip * selectedClip , const wxRect & rect , bool muted ) { auto & dc = context . dc ; const auto artist = TrackArtist :: Get ( context ) ; bool highlight = false ; bool gripHit = false ; #ifdef EXPERIMENTAL_TRACK_PANEL_HIGHLIGHTING auto target = dynamic_cast < TimeShiftHandle * > ( context . target . get ( ) ) ; gripHit = target && target -> IsGripHit ( ) ; highlight = target && target -> GetTrack ( ) . get ( ) == track ; #endif const bool dB = ! track -> GetWaveformSettings ( ) . isLinear ( ) ; const auto & blankSelectedBrush = artist -> blankSelectedBrush ; const auto & blankBrush = artist -> blankBrush ; TrackArt :: DrawBackgroundWithSelection ( context , rect , track , blankSelectedBrush , blankBrush ) ; for ( const auto & clip : track -> GetClips ( ) ) { DrawClipWaveform ( context , track , clip . get ( ) , rect , dB , muted , clip . get ( ) == selectedClip ) ; } DrawBoldBoundaries ( context , track , rect ) ; const auto drawSliders = artist -> drawSliders ; if ( drawSliders ) { DrawTimeSlider ( context , rect , true , highlight && gripHit ) ; DrawTimeSlider ( context , rect , false , highlight && gripHit ) ; } }
Header needed only for experimental drawing below
include "tracks/ui/TimeShiftHandle.h"
Header needed only for experimental drawing below include " tracks / ui / TimeShiftHandle . h "
// directed right // directed left