MCPcopy Create free account
hub / github.com/audacity/audacity / RefreshTrack

Method RefreshTrack

src/TrackPanel.cpp:785–812  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

783}
784
785void TrackPanel::RefreshTrack(Track *trk, bool refreshbacking)
786{
787 if (!trk)
788 return;
789
790 auto height = ChannelView::GetChannelGroupHeight(trk);
791
792 // Set rectangle top according to the scrolling position, `vpos`
793 // Subtract the inset (above) and shadow (below) from the height of the
794 // rectangle, but not the border
795 // This matters because some separators do paint over the border
796 auto &view = ChannelView::Get(*trk->GetChannel(0));
797 const auto top =
798 -mViewInfo->vpos + view.GetCumulativeHeightBefore() + kTopInset;
799 height -= (kTopInset + kShadowThickness);
800
801 // Width also subtracts insets (left and right) plus shadow (right)
802 const auto left = kLeftInset;
803 const auto width = GetRect().GetWidth()
804 - (kLeftInset + kRightInset + kShadowThickness);
805
806 wxRect rect(left, top, width, height);
807
808 if( refreshbacking )
809 mRefreshBacking = true;
810
811 Refresh( false, &rect );
812}
813
814
815/// This method overrides Refresh() of wxWindow so that the

Callers 9

HandleSliderGainMethod · 0.80
HandleSliderVelocityMethod · 0.80
HandleSliderPanMethod · 0.80
OnButton_MuteMethod · 0.80
ProcessUIHandleResultMethod · 0.80
SetSemitoneShiftMethod · 0.80
OnEditClipNameFunction · 0.80
SetTrackGainFunction · 0.80
SetTrackPanFunction · 0.80

Calls 3

GetFunction · 0.85
GetChannelMethod · 0.80
GetWidthMethod · 0.45

Tested by

no test coverage detected