mirror of
https://github.com/microtherion/VocalEasel.git
synced 2025-01-08 19:24:00 +00:00
Insert line and page breaks
This commit is contained in:
parent
d78ceb8258
commit
25d151d5af
2218
English.lproj/MainMenu.nib/designable.nib
generated
2218
English.lproj/MainMenu.nib/designable.nib
generated
File diff suppressed because it is too large
Load Diff
BIN
English.lproj/MainMenu.nib/keyedobjects.nib
generated
BIN
English.lproj/MainMenu.nib/keyedobjects.nib
generated
Binary file not shown.
|
@ -58,6 +58,10 @@ void VLLilypondWriter::VisitMeasure(size_t m, VLProperties & p, VLMeasure & meas
|
||||||
bool repeat;
|
bool repeat;
|
||||||
|
|
||||||
fAccum.clear();
|
fAccum.clear();
|
||||||
|
if (meas.fBreak == VLMeasure::kNewPage)
|
||||||
|
fAccum += fIndent+"\\pageBreak\n";
|
||||||
|
else if (meas.fBreak == VLMeasure::kNewSystem)
|
||||||
|
fAccum += fIndent+"\\break\n";
|
||||||
if (fSong->DoesEndRepeat(m)) {
|
if (fSong->DoesEndRepeat(m)) {
|
||||||
fAccum += "}\n";
|
fAccum += "}\n";
|
||||||
fIndent = "";
|
fIndent = "";
|
||||||
|
|
|
@ -21,6 +21,9 @@
|
||||||
|
|
||||||
- (IBAction)editRepeat:(id)sender;
|
- (IBAction)editRepeat:(id)sender;
|
||||||
- (IBAction)editRepeatEnding:(id)sender;
|
- (IBAction)editRepeatEnding:(id)sender;
|
||||||
|
- (IBAction)insertStartCoda:(id)sender;
|
||||||
|
- (IBAction)insertJumpToCoda:(id)sender;
|
||||||
|
- (IBAction)insertBreak:(id)sender;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
|
@ -75,6 +75,15 @@ static VLSong sPasteboard;
|
||||||
if (fSelStart == fSelEnd) {
|
if (fSelStart == fSelEnd) {
|
||||||
[item setState:[self song]->fCoda==fSelStart];
|
[item setState:[self song]->fCoda==fSelStart];
|
||||||
|
|
||||||
|
return YES;
|
||||||
|
} else
|
||||||
|
return NO;
|
||||||
|
else if (action == @selector(insertBreak:))
|
||||||
|
if (fSelStart == fSelEnd && fSelStart > 0) {
|
||||||
|
VLSong * song = [self song];
|
||||||
|
[item setState:fSelStart < song->fMeasures.size()
|
||||||
|
&& song->fMeasures[fSelStart].fBreak == [item tag]];
|
||||||
|
|
||||||
return YES;
|
return YES;
|
||||||
} else
|
} else
|
||||||
return NO;
|
return NO;
|
||||||
|
@ -262,4 +271,18 @@ static VLSong sPasteboard;
|
||||||
[[self document] didChangeSong];
|
[[self document] didChangeSong];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (IBAction)insertBreak:(id)sender
|
||||||
|
{
|
||||||
|
[[self document] willChangeSong];
|
||||||
|
VLSong * song = [self song];
|
||||||
|
VLMeasure & meas = song->fMeasures[fSelStart];
|
||||||
|
if (meas.fBreak == [sender tag])
|
||||||
|
meas.fBreak = 0;
|
||||||
|
else
|
||||||
|
meas.fBreak = [sender tag];
|
||||||
|
fNeedsRecalc = kRecalc;
|
||||||
|
[self setNeedsDisplay:YES];
|
||||||
|
[[self document] didChangeSong];
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user