mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-16 16:10:06 +02:00
More Screenshot options
This commit is contained in:
parent
79145d3e89
commit
89cd4aef88
@ -78,6 +78,8 @@ enum kCaptureTypes
|
||||
ksecondtrack,
|
||||
ktracksplus,
|
||||
kfirsttrackplus,
|
||||
kalltracks,
|
||||
kalltracksplus,
|
||||
nCaptureWhats
|
||||
};
|
||||
|
||||
@ -113,6 +115,8 @@ static const wxString kCaptureWhatStrings[nCaptureWhats] =
|
||||
XO("Second_Track"),
|
||||
XO("Tracks_Plus"),
|
||||
XO("First_Track_Plus"),
|
||||
XO("All_Tracks"),
|
||||
XO("All_Tracks_Plus"),
|
||||
};
|
||||
|
||||
|
||||
@ -815,6 +819,8 @@ bool ScreenshotCommand::Apply(const CommandContext & context)
|
||||
TrackPanel *panel = context.GetProject()->GetTrackPanel();
|
||||
AdornedRulerPanel *ruler = panel->mRuler;
|
||||
|
||||
int nTracks = context.GetProject()->GetTracks()->size();
|
||||
|
||||
int x1,y1,x2,y2;
|
||||
w->ClientToScreen(&x1, &y1);
|
||||
panel->ClientToScreen(&x2, &y2);
|
||||
@ -897,6 +903,18 @@ bool ScreenshotCommand::Apply(const CommandContext & context)
|
||||
r = r.Union( GetTrackRect( context.GetProject(), panel, 3 ));
|
||||
return Capture(context, mFileName, panel, r );
|
||||
}
|
||||
else if (mCaptureMode.IsSameAs(wxT("All_Tracks")))
|
||||
{ wxRect r = GetTrackRect( context.GetProject(), panel, 0 );
|
||||
r = r.Union( GetTrackRect( context.GetProject(), panel, nTracks-1 ));
|
||||
return Capture(context, mFileName, panel, r );
|
||||
}
|
||||
else if (mCaptureMode.IsSameAs(wxT("All_Tracks_Plus")))
|
||||
{ wxRect r = GetTrackRect( context.GetProject(), panel, 0 );
|
||||
r.SetTop( r.GetTop() - ruler->GetRulerHeight() );
|
||||
r.SetHeight( r.GetHeight() + ruler->GetRulerHeight() );
|
||||
r = r.Union( GetTrackRect( context.GetProject(), panel, nTracks-1 ));
|
||||
return Capture(context, mFileName, panel, r );
|
||||
}
|
||||
else
|
||||
return false;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user