mirror of
https://github.com/microtherion/VocalEasel.git
synced 2024-12-22 19:23:59 +00:00
Create temp files on demand, show progress animation
This commit is contained in:
parent
7cbbe5e050
commit
3312d2ecc0
Binary file not shown.
2
English.lproj/VLDocument.nib/classes.nib
generated
2
English.lproj/VLDocument.nib/classes.nib
generated
|
@ -55,7 +55,7 @@
|
||||||
logToolItem = id;
|
logToolItem = id;
|
||||||
outputToolItem = id;
|
outputToolItem = id;
|
||||||
playToolItem = id;
|
playToolItem = id;
|
||||||
runToolItem = id;
|
progressToolItem = id;
|
||||||
stopToolItem = id;
|
stopToolItem = id;
|
||||||
zoomInToolItem = id;
|
zoomInToolItem = id;
|
||||||
zoomOutToolItem = id;
|
zoomOutToolItem = id;
|
||||||
|
|
4
English.lproj/VLDocument.nib/info.nib
generated
4
English.lproj/VLDocument.nib/info.nib
generated
|
@ -8,10 +8,10 @@
|
||||||
<string>460.0</string>
|
<string>460.0</string>
|
||||||
<key>IBOpenObjects</key>
|
<key>IBOpenObjects</key>
|
||||||
<array>
|
<array>
|
||||||
|
<integer>216</integer>
|
||||||
|
<integer>196</integer>
|
||||||
<integer>5</integer>
|
<integer>5</integer>
|
||||||
<integer>144</integer>
|
<integer>144</integer>
|
||||||
<integer>196</integer>
|
|
||||||
<integer>216</integer>
|
|
||||||
</array>
|
</array>
|
||||||
<key>IBSystem Version</key>
|
<key>IBSystem Version</key>
|
||||||
<string>9A412</string>
|
<string>9A412</string>
|
||||||
|
|
BIN
English.lproj/VLDocument.nib/keyedobjects.nib
generated
BIN
English.lproj/VLDocument.nib/keyedobjects.nib
generated
Binary file not shown.
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
<key>CFBundleDevelopmentRegion</key>
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
@ -97,11 +97,29 @@
|
||||||
<string>Midi</string>
|
<string>Midi</string>
|
||||||
</array>
|
</array>
|
||||||
<key>CFBundleTypeRole</key>
|
<key>CFBundleTypeRole</key>
|
||||||
<string>Editor</string>
|
<string>None</string>
|
||||||
<key>LSTypeIsPackage</key>
|
<key>LSTypeIsPackage</key>
|
||||||
<false/>
|
<false/>
|
||||||
<key>NSPersistentStoreTypeKey</key>
|
<key>NSPersistentStoreTypeKey</key>
|
||||||
<string>XML</string>
|
<string>Binary</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleTypeExtensions</key>
|
||||||
|
<array>
|
||||||
|
<string>pdf</string>
|
||||||
|
</array>
|
||||||
|
<key>CFBundleTypeMIMETypes</key>
|
||||||
|
<array>
|
||||||
|
<string>application/pdf</string>
|
||||||
|
</array>
|
||||||
|
<key>CFBundleTypeName</key>
|
||||||
|
<string>VLPDFType</string>
|
||||||
|
<key>CFBundleTypeRole</key>
|
||||||
|
<string>None</string>
|
||||||
|
<key>LSTypeIsPackage</key>
|
||||||
|
<false/>
|
||||||
|
<key>NSPersistentStoreTypeKey</key>
|
||||||
|
<string>Binary</string>
|
||||||
</dict>
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
|
@ -117,7 +135,7 @@
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>VçEz</string>
|
<string>VçEz</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>1.0a1</string>
|
<string>1.0a2</string>
|
||||||
<key>NSMainNibFile</key>
|
<key>NSMainNibFile</key>
|
||||||
<string>MainMenu</string>
|
<string>MainMenu</string>
|
||||||
<key>NSPrincipalClass</key>
|
<key>NSPrincipalClass</key>
|
||||||
|
|
|
@ -16,24 +16,24 @@
|
||||||
|
|
||||||
@interface VLDocument : NSDocument
|
@interface VLDocument : NSDocument
|
||||||
{
|
{
|
||||||
VLSong * song;
|
VLSong * song;
|
||||||
NSString * lilypondTemplate;
|
NSString * lilypondTemplate;
|
||||||
NSString * songTitle;
|
NSString * songTitle;
|
||||||
NSString * songLyricist;
|
NSString * songLyricist;
|
||||||
NSString * songComposer;
|
NSString * songComposer;
|
||||||
NSString * songArranger;
|
NSString * songArranger;
|
||||||
NSString * songGroove;
|
NSString * songGroove;
|
||||||
NSNumber * songTempo;
|
NSNumber * songTempo;
|
||||||
NSString * tmpPath;
|
NSString * tmpPath;
|
||||||
NSFileWrapper * vcsWrapper;
|
NSFileWrapper * vcsWrapper;
|
||||||
NSMutableArray* observers;
|
NSMutableArray* observers;
|
||||||
int repeatVolta;
|
NSMutableDictionary*validTmpFiles;
|
||||||
bool brandNew;
|
int repeatVolta;
|
||||||
|
bool brandNew;
|
||||||
VLSheetWindow * sheetWin;
|
VLSheetWindow * sheetWin;
|
||||||
VLLogWindow * logWin;
|
VLLogWindow * logWin;
|
||||||
VLPDFWindow * pdfWin;
|
VLPDFWindow * pdfWin;
|
||||||
VLKeyValueUndo* undo;
|
VLKeyValueUndo* undo;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (VLSong *) song;
|
- (VLSong *) song;
|
||||||
|
@ -48,7 +48,6 @@
|
||||||
- (void) setDivisions:(int)divisions;
|
- (void) setDivisions:(int)divisions;
|
||||||
- (void) setRepeatVolta:(int)repeatVolta;
|
- (void) setRepeatVolta:(int)repeatVolta;
|
||||||
|
|
||||||
- (IBAction) engrave:(id)sender;
|
|
||||||
- (IBAction) showOutput:(id)sender;
|
- (IBAction) showOutput:(id)sender;
|
||||||
- (IBAction) showLog:(id)sender;
|
- (IBAction) showLog:(id)sender;
|
||||||
|
|
||||||
|
@ -56,11 +55,13 @@
|
||||||
- (NSString *) workPath;
|
- (NSString *) workPath;
|
||||||
- (NSString *) baseName;
|
- (NSString *) baseName;
|
||||||
- (NSURL *) fileURLWithExtension:(NSString*)extension;
|
- (NSURL *) fileURLWithExtension:(NSString*)extension;
|
||||||
|
- (void) createTmpFileWithExtension:(NSString*)ext ofType:(NSString*)type;
|
||||||
- (NSTask *) taskWithLaunchPath:(NSString *)path arguments:(NSArray *)args;
|
- (NSTask *) taskWithLaunchPath:(NSString *)path arguments:(NSArray *)args;
|
||||||
- (void) changedFileWrapper;
|
- (void) changedFileWrapper;
|
||||||
- (void) willChangeSong;
|
- (void) willChangeSong;
|
||||||
- (void) didChangeSong;
|
- (void) didChangeSong;
|
||||||
- (void) addObserver:(id)observer;
|
- (void) addObserver:(id)observer;
|
||||||
|
- (VLLogWindow *)logWin;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
|
@ -75,6 +75,7 @@
|
||||||
repeatVolta = 2;
|
repeatVolta = 2;
|
||||||
brandNew = true;
|
brandNew = true;
|
||||||
observers = [[NSMutableArray alloc] init];
|
observers = [[NSMutableArray alloc] init];
|
||||||
|
validTmpFiles = [[NSMutableDictionary alloc] initWithCapacity:10];
|
||||||
[self setHasUndoManager:YES];
|
[self setHasUndoManager:YES];
|
||||||
undo =
|
undo =
|
||||||
[[VLKeyValueUndo alloc] initWithOwner:self
|
[[VLKeyValueUndo alloc] initWithOwner:self
|
||||||
|
@ -90,6 +91,12 @@
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)updateChangeCount:(NSDocumentChangeType)changeType
|
||||||
|
{
|
||||||
|
[validTmpFiles removeAllObjects];
|
||||||
|
[super updateChangeCount:changeType];
|
||||||
|
}
|
||||||
|
|
||||||
- (void) addObserver:(id)observer
|
- (void) addObserver:(id)observer
|
||||||
{
|
{
|
||||||
[observers addObject:observer];
|
[observers addObject:observer];
|
||||||
|
@ -299,6 +306,8 @@
|
||||||
forSaveOperation:saveOperation error:outError];
|
forSaveOperation:saveOperation error:outError];
|
||||||
if (!vcsWrapper)
|
if (!vcsWrapper)
|
||||||
vcsWrapper = preservedVCSWrapper;
|
vcsWrapper = preservedVCSWrapper;
|
||||||
|
if ([typeName isEqual:@"VLNativeType"])
|
||||||
|
[validTmpFiles removeAllObjects];
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
@ -315,6 +324,8 @@
|
||||||
return [self mmaFileWrapperWithError:outError];
|
return [self mmaFileWrapperWithError:outError];
|
||||||
} else if ([typeName isEqual:@"VLMIDIType"]) {
|
} else if ([typeName isEqual:@"VLMIDIType"]) {
|
||||||
return [self midiFileWrapperWithError:outError];
|
return [self midiFileWrapperWithError:outError];
|
||||||
|
} else if ([typeName isEqual:@"VLPDFType"]) {
|
||||||
|
return [self pdfFileWrapperWithError:outError];
|
||||||
} else {
|
} else {
|
||||||
if (outError)
|
if (outError)
|
||||||
*outError = [NSError errorWithDomain:NSCocoaErrorDomain
|
*outError = [NSError errorWithDomain:NSCocoaErrorDomain
|
||||||
|
@ -358,6 +369,19 @@
|
||||||
[self setFileModificationDate:modDate];
|
[self setFileModificationDate:modDate];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void) createTmpFileWithExtension:(NSString*)ext ofType:(NSString*)type
|
||||||
|
{
|
||||||
|
if (![validTmpFiles objectForKey:ext]) {
|
||||||
|
NSError * err;
|
||||||
|
if ([self writeToURL:[self fileURLWithExtension:ext]
|
||||||
|
ofType:type error:&err]
|
||||||
|
) {
|
||||||
|
[validTmpFiles setObject:type forKey:ext];
|
||||||
|
[self changedFileWrapper];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
- (NSTask *) taskWithLaunchPath:(NSString *)launch arguments:(NSArray *)args;
|
- (NSTask *) taskWithLaunchPath:(NSString *)launch arguments:(NSArray *)args;
|
||||||
{
|
{
|
||||||
NSTask * task = [[NSTask alloc] init];
|
NSTask * task = [[NSTask alloc] init];
|
||||||
|
@ -377,52 +401,9 @@
|
||||||
return task;
|
return task;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (IBAction) engrave:(id)sender
|
|
||||||
{
|
|
||||||
NSString * base = [self baseName];
|
|
||||||
NSBundle * mainBundle = [NSBundle mainBundle];
|
|
||||||
|
|
||||||
//
|
|
||||||
// Convert to Lilypond format
|
|
||||||
//
|
|
||||||
NSError * err;
|
|
||||||
[self writeToURL:[self fileURLWithExtension:@"ly"]
|
|
||||||
ofType:@"VLLilypondType" error:&err];
|
|
||||||
NSString * launch =
|
|
||||||
[mainBundle pathForResource:@"lilyWrapper" ofType:@""
|
|
||||||
inDirectory:@"bin"];
|
|
||||||
NSString * tool =
|
|
||||||
[[NSUserDefaults standardUserDefaults]
|
|
||||||
stringForKey:@"VLLilypondPath"];
|
|
||||||
NSArray * args = [NSArray arrayWithObjects:tool, base, nil];
|
|
||||||
NSTask * task = [self taskWithLaunchPath:launch arguments:args];
|
|
||||||
|
|
||||||
[[NSNotificationCenter defaultCenter]
|
|
||||||
addObserver:self selector:@selector(engraveDone:)
|
|
||||||
name:NSTaskDidTerminateNotification object:task];
|
|
||||||
|
|
||||||
[task launch];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)engraveDone:(NSNotification *)notification {
|
|
||||||
[[NSNotificationCenter defaultCenter] removeObserver: self];
|
|
||||||
int status = [[notification object] terminationStatus];
|
|
||||||
if (!status) {
|
|
||||||
[[self pdfWin] showWindow: self];
|
|
||||||
[pdfWin reloadPDF];
|
|
||||||
} else {
|
|
||||||
[[self logWin] showWindow: self];
|
|
||||||
NSBeep();
|
|
||||||
}
|
|
||||||
[self changedFileWrapper];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (IBAction) play:(id)sender
|
- (IBAction) play:(id)sender
|
||||||
{
|
{
|
||||||
NSError * err;
|
[self createTmpFileWithExtension:@"mid" ofType:@"VLMIDIType"];
|
||||||
[self writeToURL:[self fileURLWithExtension:@"mid"]
|
|
||||||
ofType:@"VLMIDIType" error:&err];
|
|
||||||
[self changedFileWrapper];
|
|
||||||
VLSoundOut::Instance()->PlayFile(
|
VLSoundOut::Instance()->PlayFile(
|
||||||
CFDataRef([NSData dataWithContentsOfURL:
|
CFDataRef([NSData dataWithContentsOfURL:
|
||||||
[self fileURLWithExtension:@"mid"]]));
|
[self fileURLWithExtension:@"mid"]]));
|
||||||
|
@ -435,7 +416,9 @@
|
||||||
|
|
||||||
- (IBAction) showOutput:(id)sender
|
- (IBAction) showOutput:(id)sender
|
||||||
{
|
{
|
||||||
|
[self createTmpFileWithExtension:@"pdf" ofType:@"VLPDFType"];
|
||||||
[[self pdfWin] showWindow:sender];
|
[[self pdfWin] showWindow:sender];
|
||||||
|
[pdfWin reloadPDF];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (IBAction) showLog:(id)sender
|
- (IBAction) showLog:(id)sender
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
//
|
//
|
||||||
// VLMMADocument.h
|
// VLMIDIDocument.h
|
||||||
// Vocalese
|
// Vocalese
|
||||||
//
|
//
|
||||||
// Created by Matthias Neeracher on 10/20/06.
|
// Created by Matthias Neeracher on 10/20/06.
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
//
|
//
|
||||||
// VLLilypondDocument.mm
|
// VLMIDIDocument.mm
|
||||||
// Vocalese
|
// Vocalese
|
||||||
//
|
//
|
||||||
// Created by Matthias Neeracher on 10/20/06.
|
// Created by Matthias Neeracher on 10/20/06.
|
||||||
// Copyright 2006 __MyCompanyName__. All rights reserved.
|
// Copyright 2006 __MyCompanyName__. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
#import "VLMMADocument.h"
|
#import "VLMIDIDocument.h"
|
||||||
|
|
||||||
@implementation VLDocument (MIDI)
|
@implementation VLDocument (MIDI)
|
||||||
|
|
||||||
|
@ -14,14 +14,9 @@
|
||||||
{
|
{
|
||||||
NSBundle * mainBundle = [NSBundle mainBundle];
|
NSBundle * mainBundle = [NSBundle mainBundle];
|
||||||
|
|
||||||
//
|
[self createTmpFileWithExtension:@"mma" ofType:@"VLMMAType"];
|
||||||
// Convert to MMA format
|
|
||||||
//
|
|
||||||
NSError * err;
|
|
||||||
NSURL * mmaURL = [self fileURLWithExtension:@"mma"];
|
|
||||||
[self writeToURL: mmaURL ofType:@"VLMMAType" error:&err];
|
|
||||||
[self changedFileWrapper];
|
|
||||||
|
|
||||||
|
NSURL * mmaURL = [self fileURLWithExtension:@"mma"];
|
||||||
NSString * launch =
|
NSString * launch =
|
||||||
[mainBundle pathForResource:@"mmaWrapper" ofType:@""
|
[mainBundle pathForResource:@"mmaWrapper" ofType:@""
|
||||||
inDirectory:@"bin"];
|
inDirectory:@"bin"];
|
||||||
|
@ -32,16 +27,16 @@
|
||||||
addObserver:self selector:@selector(mmaDone:)
|
addObserver:self selector:@selector(mmaDone:)
|
||||||
name:NSTaskDidTerminateNotification object:task];
|
name:NSTaskDidTerminateNotification object:task];
|
||||||
|
|
||||||
|
[sheetWin startAnimation];
|
||||||
[task launch];
|
[task launch];
|
||||||
[task waitUntilExit];
|
[task waitUntilExit];
|
||||||
|
[sheetWin stopAnimation];
|
||||||
int status = [task terminationStatus];
|
int status = [task terminationStatus];
|
||||||
if (!status) {
|
if (!status) {
|
||||||
return [[[NSFileWrapper alloc]
|
return [[[NSFileWrapper alloc]
|
||||||
initWithPath:[[self fileURLWithExtension:@"mid"] path]]
|
initWithPath:[[self fileURLWithExtension:@"mid"] path]]
|
||||||
autorelease];
|
autorelease];
|
||||||
} else {
|
} else {
|
||||||
NSBeep();
|
|
||||||
|
|
||||||
if (outError)
|
if (outError)
|
||||||
*outError = [NSError errorWithDomain:NSCocoaErrorDomain
|
*outError = [NSError errorWithDomain:NSCocoaErrorDomain
|
||||||
code:NSPersistentStoreSaveError
|
code:NSPersistentStoreSaveError
|
||||||
|
@ -58,7 +53,7 @@
|
||||||
if (!status) {
|
if (!status) {
|
||||||
;
|
;
|
||||||
} else {
|
} else {
|
||||||
[[self logWin] showWindow: self];
|
[logWin showWindow: self];
|
||||||
NSBeep();
|
NSBeep();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
//
|
//
|
||||||
// VLLilypondDocument.mm
|
// VLMMADocument.mm
|
||||||
// Vocalese
|
// Vocalese
|
||||||
//
|
//
|
||||||
// Created by Matthias Neeracher on 10/20/06.
|
// Created by Matthias Neeracher on 10/20/06.
|
||||||
|
|
16
Sources/VLPDFDocument.h
Normal file
16
Sources/VLPDFDocument.h
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
//
|
||||||
|
// VLPDFDocument.h
|
||||||
|
// Vocalese
|
||||||
|
//
|
||||||
|
// Created by Matthias Neeracher on 10/20/06.
|
||||||
|
// Copyright 2006 __MyCompanyName__. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#import "VLDocument.h"
|
||||||
|
|
||||||
|
@interface VLDocument (PDF)
|
||||||
|
|
||||||
|
- (NSFileWrapper *)pdfFileWrapperWithError:(NSError **)outError;
|
||||||
|
|
||||||
|
@end
|
64
Sources/VLPDFDocument.mm
Normal file
64
Sources/VLPDFDocument.mm
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
//
|
||||||
|
// VLPDFDocument.mm
|
||||||
|
// Vocalese
|
||||||
|
//
|
||||||
|
// Created by Matthias Neeracher on 10/20/06.
|
||||||
|
// Copyright 2006 __MyCompanyName__. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "VLPDFDocument.h"
|
||||||
|
|
||||||
|
@implementation VLDocument (PDF)
|
||||||
|
|
||||||
|
- (NSFileWrapper *)pdfFileWrapperWithError:(NSError **)outError
|
||||||
|
{
|
||||||
|
NSString * base = [self baseName];
|
||||||
|
NSBundle * mainBundle = [NSBundle mainBundle];
|
||||||
|
|
||||||
|
[self createTmpFileWithExtension:@"ly" ofType:@"VLLilypondType"];
|
||||||
|
|
||||||
|
NSString * launch =
|
||||||
|
[mainBundle pathForResource:@"lilyWrapper" ofType:@""
|
||||||
|
inDirectory:@"bin"];
|
||||||
|
NSString * tool =
|
||||||
|
[[NSUserDefaults standardUserDefaults]
|
||||||
|
stringForKey:@"VLLilypondPath"];
|
||||||
|
NSArray * args = [NSArray arrayWithObjects:tool, base, nil];
|
||||||
|
NSTask * task = [self taskWithLaunchPath:launch arguments:args];
|
||||||
|
|
||||||
|
[[NSNotificationCenter defaultCenter]
|
||||||
|
addObserver:self selector:@selector(pdfDone:)
|
||||||
|
name:NSTaskDidTerminateNotification object:task];
|
||||||
|
|
||||||
|
[sheetWin startAnimation];
|
||||||
|
[task launch];
|
||||||
|
[task waitUntilExit];
|
||||||
|
[sheetWin stopAnimation];
|
||||||
|
int status = [task terminationStatus];
|
||||||
|
if (!status) {
|
||||||
|
return [[[NSFileWrapper alloc]
|
||||||
|
initWithPath:[[self fileURLWithExtension:@"pdf"] path]]
|
||||||
|
autorelease];
|
||||||
|
} else {
|
||||||
|
if (outError)
|
||||||
|
*outError = [NSError errorWithDomain:NSCocoaErrorDomain
|
||||||
|
code:NSPersistentStoreSaveError
|
||||||
|
userInfo:nil];
|
||||||
|
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (void)pdfDone:(NSNotification *)notification {
|
||||||
|
[[NSNotificationCenter defaultCenter] removeObserver: self];
|
||||||
|
int status = [[notification object] terminationStatus];
|
||||||
|
if (!status) {
|
||||||
|
;
|
||||||
|
} else {
|
||||||
|
[[self logWin] showWindow: self];
|
||||||
|
NSBeep();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
|
@ -24,16 +24,18 @@
|
||||||
@interface VLSheetWindow : NSWindowController {
|
@interface VLSheetWindow : NSWindowController {
|
||||||
VLEditable * editTarget;
|
VLEditable * editTarget;
|
||||||
|
|
||||||
IBOutlet id runToolItem;
|
|
||||||
IBOutlet id outputToolItem;
|
IBOutlet id outputToolItem;
|
||||||
IBOutlet id logToolItem;
|
IBOutlet id logToolItem;
|
||||||
IBOutlet id playToolItem;
|
IBOutlet id playToolItem;
|
||||||
IBOutlet id stopToolItem;
|
IBOutlet id stopToolItem;
|
||||||
IBOutlet id zoomInToolItem;
|
IBOutlet id zoomInToolItem;
|
||||||
IBOutlet id zoomOutToolItem;
|
IBOutlet id zoomOutToolItem;
|
||||||
|
IBOutlet id progressToolItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (VLEditable *) editTarget;
|
- (VLEditable *) editTarget;
|
||||||
- (void) setEditTarget:(VLEditable *)editable;
|
- (void) setEditTarget:(VLEditable *)editable;
|
||||||
|
- (void) startAnimation;
|
||||||
|
- (void) stopAnimation;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -45,11 +45,11 @@
|
||||||
static NSString* sInputToolbarIdentifier = @"Vocalese Sheet Window Toolbar Identifier";
|
static NSString* sInputToolbarIdentifier = @"Vocalese Sheet Window Toolbar Identifier";
|
||||||
static NSString* sOutputToolbarItemIdentifier = @"Output Toolbar Item Identifier";
|
static NSString* sOutputToolbarItemIdentifier = @"Output Toolbar Item Identifier";
|
||||||
static NSString* sLogToolbarItemIdentifier = @"Log Toolbar Item Identifier";
|
static NSString* sLogToolbarItemIdentifier = @"Log Toolbar Item Identifier";
|
||||||
static NSString* sRunToolbarItemIdentifier = @"Run Toolbar Item Identifier";
|
|
||||||
static NSString* sPlayToolbarItemIdentifier = @"Play Toolbar Item Identifier";
|
static NSString* sPlayToolbarItemIdentifier = @"Play Toolbar Item Identifier";
|
||||||
static NSString* sStopToolbarItemIdentifier = @"Stop Toolbar Item Identifier";
|
static NSString* sStopToolbarItemIdentifier = @"Stop Toolbar Item Identifier";
|
||||||
static NSString* sZoomInToolbarItemIdentifier = @"Zoom In Toolbar Item Identifier";
|
static NSString* sZoomInToolbarItemIdentifier = @"Zoom In Toolbar Item Identifier";
|
||||||
static NSString* sZoomOutToolbarItemIdentifier = @"Zoom Out Toolbar Item Identifier";
|
static NSString* sZoomOutToolbarItemIdentifier = @"Zoom Out Toolbar Item Identifier";
|
||||||
|
static NSString* sProgressToolbarItemIdentifier = @"Progress Toolbar Item Identifier";
|
||||||
|
|
||||||
- (id)initWithWindow:(NSWindow *)window
|
- (id)initWithWindow:(NSWindow *)window
|
||||||
{
|
{
|
||||||
|
@ -89,8 +89,6 @@ static NSString* sZoomOutToolbarItemIdentifier = @"Zoom Out Toolbar Item Identif
|
||||||
prototype = outputToolItem;
|
prototype = outputToolItem;
|
||||||
else if ([itemIdent isEqual: sLogToolbarItemIdentifier])
|
else if ([itemIdent isEqual: sLogToolbarItemIdentifier])
|
||||||
prototype = logToolItem;
|
prototype = logToolItem;
|
||||||
else if ([itemIdent isEqual: sRunToolbarItemIdentifier])
|
|
||||||
prototype = runToolItem;
|
|
||||||
else if ([itemIdent isEqual: sPlayToolbarItemIdentifier])
|
else if ([itemIdent isEqual: sPlayToolbarItemIdentifier])
|
||||||
prototype = playToolItem;
|
prototype = playToolItem;
|
||||||
else if ([itemIdent isEqual: sStopToolbarItemIdentifier])
|
else if ([itemIdent isEqual: sStopToolbarItemIdentifier])
|
||||||
|
@ -109,6 +107,10 @@ static NSString* sZoomOutToolbarItemIdentifier = @"Zoom Out Toolbar Item Identif
|
||||||
[toolbarItem setImage: [prototype image]];
|
[toolbarItem setImage: [prototype image]];
|
||||||
[toolbarItem setTarget: [prototype target]];
|
[toolbarItem setTarget: [prototype target]];
|
||||||
[toolbarItem setAction: [prototype action]];
|
[toolbarItem setAction: [prototype action]];
|
||||||
|
} else if ([itemIdent isEqual: sProgressToolbarItemIdentifier]) {
|
||||||
|
toolbarItem = [[[NSToolbarItem alloc] initWithItemIdentifier: itemIdent] autorelease];
|
||||||
|
|
||||||
|
[toolbarItem setView: progressToolItem];
|
||||||
} else {
|
} else {
|
||||||
toolbarItem = nil;
|
toolbarItem = nil;
|
||||||
}
|
}
|
||||||
|
@ -117,7 +119,7 @@ static NSString* sZoomOutToolbarItemIdentifier = @"Zoom Out Toolbar Item Identif
|
||||||
|
|
||||||
- (NSArray *) toolbarDefaultItemIdentifiers: (NSToolbar *) toolbar {
|
- (NSArray *) toolbarDefaultItemIdentifiers: (NSToolbar *) toolbar {
|
||||||
return [NSArray arrayWithObjects:
|
return [NSArray arrayWithObjects:
|
||||||
sRunToolbarItemIdentifier,
|
sOutputToolbarItemIdentifier,
|
||||||
NSToolbarSeparatorItemIdentifier,
|
NSToolbarSeparatorItemIdentifier,
|
||||||
sPlayToolbarItemIdentifier,
|
sPlayToolbarItemIdentifier,
|
||||||
sStopToolbarItemIdentifier,
|
sStopToolbarItemIdentifier,
|
||||||
|
@ -125,23 +127,34 @@ static NSString* sZoomOutToolbarItemIdentifier = @"Zoom Out Toolbar Item Identif
|
||||||
sZoomInToolbarItemIdentifier,
|
sZoomInToolbarItemIdentifier,
|
||||||
sZoomOutToolbarItemIdentifier,
|
sZoomOutToolbarItemIdentifier,
|
||||||
NSToolbarFlexibleSpaceItemIdentifier,
|
NSToolbarFlexibleSpaceItemIdentifier,
|
||||||
sOutputToolbarItemIdentifier,
|
sLogToolbarItemIdentifier,
|
||||||
sLogToolbarItemIdentifier, nil];
|
sProgressToolbarItemIdentifier,
|
||||||
|
nil];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSArray *) toolbarAllowedItemIdentifiers: (NSToolbar *) toolbar {
|
- (NSArray *) toolbarAllowedItemIdentifiers: (NSToolbar *) toolbar {
|
||||||
return [NSArray arrayWithObjects:
|
return [NSArray arrayWithObjects:
|
||||||
sRunToolbarItemIdentifier,
|
|
||||||
sPlayToolbarItemIdentifier,
|
sPlayToolbarItemIdentifier,
|
||||||
sStopToolbarItemIdentifier,
|
sStopToolbarItemIdentifier,
|
||||||
sZoomInToolbarItemIdentifier,
|
sZoomInToolbarItemIdentifier,
|
||||||
sZoomOutToolbarItemIdentifier,
|
sZoomOutToolbarItemIdentifier,
|
||||||
sOutputToolbarItemIdentifier,
|
sOutputToolbarItemIdentifier,
|
||||||
sLogToolbarItemIdentifier,
|
sLogToolbarItemIdentifier,
|
||||||
|
sProgressToolbarItemIdentifier,
|
||||||
NSToolbarCustomizeToolbarItemIdentifier,
|
NSToolbarCustomizeToolbarItemIdentifier,
|
||||||
NSToolbarFlexibleSpaceItemIdentifier,
|
NSToolbarFlexibleSpaceItemIdentifier,
|
||||||
NSToolbarSpaceItemIdentifier,
|
NSToolbarSpaceItemIdentifier,
|
||||||
NSToolbarSeparatorItemIdentifier, nil];
|
NSToolbarSeparatorItemIdentifier, nil];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void) startAnimation
|
||||||
|
{
|
||||||
|
[progressToolItem startAnimation:self];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void) stopAnimation
|
||||||
|
{
|
||||||
|
[progressToolItem stopAnimation:self];
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -51,6 +51,7 @@
|
||||||
9599ED9D0B731CC500A6A2F7 /* VLGrooveController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9599ED9B0B731CC500A6A2F7 /* VLGrooveController.mm */; };
|
9599ED9D0B731CC500A6A2F7 /* VLGrooveController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9599ED9B0B731CC500A6A2F7 /* VLGrooveController.mm */; };
|
||||||
95A1C37C0AF1D4370076597D /* Quartz.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 95A1C37B0AF1D4370076597D /* Quartz.framework */; };
|
95A1C37C0AF1D4370076597D /* Quartz.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 95A1C37B0AF1D4370076597D /* Quartz.framework */; };
|
||||||
95A1C3860AF2ACE20076597D /* VLSheetWindow.mm in Sources */ = {isa = PBXBuildFile; fileRef = 95A1C3850AF2ACE20076597D /* VLSheetWindow.mm */; };
|
95A1C3860AF2ACE20076597D /* VLSheetWindow.mm in Sources */ = {isa = PBXBuildFile; fileRef = 95A1C3850AF2ACE20076597D /* VLSheetWindow.mm */; };
|
||||||
|
95A55C540BD5E5770068A203 /* VLPDFDocument.mm in Sources */ = {isa = PBXBuildFile; fileRef = 95A55C530BD5E5770068A203 /* VLPDFDocument.mm */; };
|
||||||
95B3E1A70960E58B000E9C0D /* Music in Resources */ = {isa = PBXBuildFile; fileRef = 95B3E1980960E58B000E9C0D /* Music */; };
|
95B3E1A70960E58B000E9C0D /* Music in Resources */ = {isa = PBXBuildFile; fileRef = 95B3E1980960E58B000E9C0D /* Music */; };
|
||||||
95B66658096BCA1F00FE18C9 /* VLSheetViewNotes.mm in Sources */ = {isa = PBXBuildFile; fileRef = 95B66657096BCA1F00FE18C9 /* VLSheetViewNotes.mm */; };
|
95B66658096BCA1F00FE18C9 /* VLSheetViewNotes.mm in Sources */ = {isa = PBXBuildFile; fileRef = 95B66657096BCA1F00FE18C9 /* VLSheetViewNotes.mm */; };
|
||||||
95BDA15909540BF1009F9D65 /* VLSheetView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 95BDA15809540BF1009F9D65 /* VLSheetView.mm */; };
|
95BDA15909540BF1009F9D65 /* VLSheetView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 95BDA15809540BF1009F9D65 /* VLSheetView.mm */; };
|
||||||
|
@ -179,6 +180,8 @@
|
||||||
95A1C37B0AF1D4370076597D /* Quartz.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Quartz.framework; path = /System/Library/Frameworks/Quartz.framework; sourceTree = "<absolute>"; };
|
95A1C37B0AF1D4370076597D /* Quartz.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Quartz.framework; path = /System/Library/Frameworks/Quartz.framework; sourceTree = "<absolute>"; };
|
||||||
95A1C3840AF2ACE20076597D /* VLSheetWindow.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = VLSheetWindow.h; path = Sources/VLSheetWindow.h; sourceTree = "<group>"; };
|
95A1C3840AF2ACE20076597D /* VLSheetWindow.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = VLSheetWindow.h; path = Sources/VLSheetWindow.h; sourceTree = "<group>"; };
|
||||||
95A1C3850AF2ACE20076597D /* VLSheetWindow.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; name = VLSheetWindow.mm; path = Sources/VLSheetWindow.mm; sourceTree = "<group>"; };
|
95A1C3850AF2ACE20076597D /* VLSheetWindow.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; name = VLSheetWindow.mm; path = Sources/VLSheetWindow.mm; sourceTree = "<group>"; };
|
||||||
|
95A55C520BD5E5760068A203 /* VLPDFDocument.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = VLPDFDocument.h; path = Sources/VLPDFDocument.h; sourceTree = "<group>"; };
|
||||||
|
95A55C530BD5E5770068A203 /* VLPDFDocument.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; name = VLPDFDocument.mm; path = Sources/VLPDFDocument.mm; sourceTree = "<group>"; };
|
||||||
95B3E1980960E58B000E9C0D /* Music */ = {isa = PBXFileReference; lastKnownFileType = folder; name = Music; path = Resources/Music; sourceTree = "<group>"; };
|
95B3E1980960E58B000E9C0D /* Music */ = {isa = PBXFileReference; lastKnownFileType = folder; name = Music; path = Resources/Music; sourceTree = "<group>"; };
|
||||||
95B66653096BC6A100FE18C9 /* VLSheetViewInternal.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = VLSheetViewInternal.h; path = Sources/VLSheetViewInternal.h; sourceTree = "<group>"; };
|
95B66653096BC6A100FE18C9 /* VLSheetViewInternal.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = VLSheetViewInternal.h; path = Sources/VLSheetViewInternal.h; sourceTree = "<group>"; };
|
||||||
95B66656096BCA1F00FE18C9 /* VLSheetViewNotes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VLSheetViewNotes.h; path = Sources/VLSheetViewNotes.h; sourceTree = "<group>"; };
|
95B66656096BCA1F00FE18C9 /* VLSheetViewNotes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VLSheetViewNotes.h; path = Sources/VLSheetViewNotes.h; sourceTree = "<group>"; };
|
||||||
|
@ -321,6 +324,8 @@
|
||||||
2A37F4ABFDCFA73011CA2CEA /* Classes */ = {
|
2A37F4ABFDCFA73011CA2CEA /* Classes */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
95A55C520BD5E5760068A203 /* VLPDFDocument.h */,
|
||||||
|
95A55C530BD5E5770068A203 /* VLPDFDocument.mm */,
|
||||||
95EDA5A80B06DE46004D8D6E /* VLMIDIDocument.h */,
|
95EDA5A80B06DE46004D8D6E /* VLMIDIDocument.h */,
|
||||||
95EDA5A90B06DE46004D8D6E /* VLMIDIDocument.mm */,
|
95EDA5A90B06DE46004D8D6E /* VLMIDIDocument.mm */,
|
||||||
95F820A90AF884A30010963D /* VLMMADocument.h */,
|
95F820A90AF884A30010963D /* VLMMADocument.h */,
|
||||||
|
@ -650,6 +655,7 @@
|
||||||
955CBA4F0B2366DD001CF4A1 /* VLKeyValueUndo.mm in Sources */,
|
955CBA4F0B2366DD001CF4A1 /* VLKeyValueUndo.mm in Sources */,
|
||||||
954DD4E60B44E67F0056C504 /* VLSheetViewSelection.mm in Sources */,
|
954DD4E60B44E67F0056C504 /* VLSheetViewSelection.mm in Sources */,
|
||||||
9599ED9D0B731CC500A6A2F7 /* VLGrooveController.mm in Sources */,
|
9599ED9D0B731CC500A6A2F7 /* VLGrooveController.mm in Sources */,
|
||||||
|
95A55C540BD5E5770068A203 /* VLPDFDocument.mm in Sources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user