VocalEasel/Sources/VLSheetView.h
2006-10-02 05:29:37 +00:00

85 lines
1.7 KiB
Objective-C

//
// VLSheetView.h
// Vocalese
//
// Created by Matthias Neeracher on 12/17/05.
// Copyright 2005 __MyCompanyName__. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import "VLModel.h"
@class VLDocument;
enum VLMusicElement {
kMusicGClef,
kMusicFlat,
kMusicSharp,
kMusicNatural,
kMusicWholeNote,
kMusicHalfNote,
kMusicNote,
kMusicWholeRest,
kMusicHalfRest,
kMusicQuarterRest,
kMusicEighthRest,
kMusicSixteenthRest,
kMusicThirtysecondthRest,
kMusicEighthFlag,
kMusicSixteenthFlag,
kMusicThirtysecondthFlag,
kMusicNoteCursor,
kMusicElements
};
@interface VLSheetView : NSView {
BOOL needsRecalc;
BOOL showFieldEditor;
float clefKeyW;
float measureW;
float lineH;
int groups;
int quarterBeats;
int divPerGroup;
int firstMeasure;
int lastMeasure;
int measuresPerSystem;
int numSystems;
float displayScale;
NSImageRep * noteCursorCache;
NSPoint noteCursorLocation;
NSPoint lastNoteCenter;
NSRect noteRect;
NSTrackingRectTag noteRectTracker;
int noteCursorMeasure;
VLFract noteCursorAt;
int noteCursorPitch;
id fieldBeingEdited;
IBOutlet id chords;
IBOutlet id fieldEditor;
}
- (IBAction) setKey:(id)sender;
- (IBAction) setTime:(id)sender;
- (IBAction) setDivisions:(id)sender;
- (IBAction) showFieldEditor:(id)sender withAction:(SEL)selector;
- (IBAction) hideFieldEditor:(id)sender;
- (void) setFirstMeasure: (NSNumber *)measure;
- (VLDocument *) document;
- (VLSong *) song;
- (NSImage *) musicElement:(VLMusicElement)elt;
- (float) systemY:(int)system;
- (float) noteYWithPitch:(int)pitch;
- (float) noteXInMeasure:(int)measure at:(VLFraction)at;
@end
// Local Variables:
// mode:ObjC
// End: