2006-09-11 02:49:56 +00:00
|
|
|
//
|
|
|
|
// 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 {
|
2006-10-21 09:23:37 +00:00
|
|
|
kMusicNothing = 0,
|
|
|
|
kMusicGClef = 0,
|
2006-09-11 02:49:56 +00:00
|
|
|
kMusicFlat,
|
|
|
|
kMusicSharp,
|
|
|
|
kMusicNatural,
|
|
|
|
kMusicWholeNote,
|
|
|
|
kMusicHalfNote,
|
|
|
|
kMusicNote,
|
|
|
|
kMusicWholeRest,
|
|
|
|
kMusicHalfRest,
|
|
|
|
kMusicQuarterRest,
|
|
|
|
kMusicEighthRest,
|
|
|
|
kMusicSixteenthRest,
|
|
|
|
kMusicThirtysecondthRest,
|
|
|
|
kMusicEighthFlag,
|
|
|
|
kMusicSixteenthFlag,
|
|
|
|
kMusicThirtysecondthFlag,
|
|
|
|
kMusicNoteCursor,
|
2006-10-21 09:23:37 +00:00
|
|
|
kMusicFlatCursor,
|
|
|
|
kMusicSharpCursor,
|
|
|
|
kMusicNaturalCursor,
|
2006-10-16 09:01:25 +00:00
|
|
|
kMusicRestCursor,
|
2006-10-21 09:23:37 +00:00
|
|
|
kMusicKillCursor,
|
2007-01-21 11:34:56 +00:00
|
|
|
kMusicCoda,
|
2006-09-11 02:49:56 +00:00
|
|
|
kMusicElements
|
|
|
|
};
|
|
|
|
|
2006-10-02 08:32:25 +00:00
|
|
|
enum VLRegion {
|
|
|
|
kRegionNowhere,
|
|
|
|
kRegionNote,
|
|
|
|
kRegionChord,
|
2006-12-28 05:03:28 +00:00
|
|
|
kRegionLyrics,
|
|
|
|
kRegionMeasure
|
2006-10-02 08:32:25 +00:00
|
|
|
};
|
|
|
|
|
2006-10-08 05:56:25 +00:00
|
|
|
enum VLRecalc {
|
|
|
|
kNoRecalc,
|
|
|
|
kRecalc,
|
|
|
|
kFirstRecalc
|
|
|
|
};
|
|
|
|
|
2006-10-28 09:18:55 +00:00
|
|
|
@class VLEditable;
|
|
|
|
|
2006-09-11 02:49:56 +00:00
|
|
|
@interface VLSheetView : NSView {
|
2006-12-02 23:05:12 +00:00
|
|
|
NSImage ** fMusic;
|
2006-10-08 05:56:25 +00:00
|
|
|
VLRecalc fNeedsRecalc;
|
2006-10-16 09:01:25 +00:00
|
|
|
char fClickMode;
|
2006-10-02 06:07:44 +00:00
|
|
|
float fClefKeyW;
|
|
|
|
float fMeasureW;
|
|
|
|
int fGroups;
|
|
|
|
int fQuarterBeats;
|
|
|
|
int fDivPerGroup;
|
|
|
|
int fMeasPerSystem;
|
|
|
|
int fNumSystems;
|
|
|
|
float fDisplayScale;
|
|
|
|
NSPoint fLastNoteCenter;
|
2006-10-02 08:32:25 +00:00
|
|
|
NSTrackingRectTag fCursorTracking;
|
2006-10-03 17:52:54 +00:00
|
|
|
VLRegion fCursorRegion;
|
2006-10-02 08:32:25 +00:00
|
|
|
int fCursorMeasure;
|
|
|
|
VLFract fCursorAt;
|
|
|
|
int fCursorPitch;
|
2006-10-21 09:23:37 +00:00
|
|
|
int fCursorActualPitch;
|
|
|
|
VLMusicElement fCursorAccidental;
|
2006-12-02 09:02:44 +00:00
|
|
|
size_t fCursorStanza;
|
2006-12-28 05:03:28 +00:00
|
|
|
int fSelStart;
|
|
|
|
int fSelEnd;
|
2006-12-30 09:57:40 +00:00
|
|
|
size_t fVolta;
|
|
|
|
size_t fVoltaOK;
|
2006-09-11 02:49:56 +00:00
|
|
|
|
2006-10-02 06:07:44 +00:00
|
|
|
IBOutlet id fFieldEditor;
|
2006-12-30 09:57:40 +00:00
|
|
|
IBOutlet id fRepeatSheet;
|
|
|
|
IBOutlet id fEndingSheet;
|
|
|
|
IBOutlet id fRepeatMsg;
|
|
|
|
IBOutlet id fEndingMsg;
|
2007-04-15 05:22:30 +00:00
|
|
|
IBOutlet id fGrooveMenu;
|
2006-09-11 02:49:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
- (IBAction) setKey:(id)sender;
|
|
|
|
- (IBAction) setTime:(id)sender;
|
|
|
|
- (IBAction) setDivisions:(id)sender;
|
2006-09-12 07:55:28 +00:00
|
|
|
- (IBAction) hideFieldEditor:(id)sender;
|
2006-12-30 09:57:40 +00:00
|
|
|
- (IBAction) endRepeatSheet:(id)sender;
|
2007-04-15 05:22:30 +00:00
|
|
|
- (IBAction) selectGroove:(id)sender;
|
2006-09-11 02:49:56 +00:00
|
|
|
|
|
|
|
- (VLDocument *) document;
|
|
|
|
- (VLSong *) song;
|
|
|
|
- (NSImage *) musicElement:(VLMusicElement)elt;
|
|
|
|
|
2006-10-21 09:23:37 +00:00
|
|
|
- (int) stepWithPitch:(int)pitch;
|
2006-10-02 05:29:37 +00:00
|
|
|
- (float) systemY:(int)system;
|
2006-10-21 09:23:37 +00:00
|
|
|
- (float) noteYWithPitch:(int)pitch accidental:(VLMusicElement*)accidental;
|
|
|
|
- (float) noteYInMeasure:(int)measure withPitch:(int)pitch accidental:(VLMusicElement*)accidental;
|
2006-09-11 02:49:56 +00:00
|
|
|
- (float) noteXInMeasure:(int)measure at:(VLFraction)at;
|
|
|
|
|
2006-10-09 07:28:49 +00:00
|
|
|
- (void) scrollMeasureToVisible:(int)measure;
|
|
|
|
|
2006-10-02 08:32:25 +00:00
|
|
|
- (void) mouseMoved:(NSEvent *)event;
|
|
|
|
- (void) mouseDown:(NSEvent *)event;
|
|
|
|
- (void) mouseEntered:(NSEvent *)event;
|
|
|
|
- (void) mouseExited:(NSEvent *)event;
|
|
|
|
|
2006-10-03 17:52:54 +00:00
|
|
|
- (BOOL)control:(NSControl *)control textShouldEndEditing:(NSText *)fieldEditor;
|
|
|
|
|
2006-10-28 09:18:55 +00:00
|
|
|
- (VLEditable *) editTarget;
|
|
|
|
- (void) setEditTarget:(VLEditable *)editable;
|
2006-12-30 09:57:40 +00:00
|
|
|
- (VLRegion) findRegionForEvent:(NSEvent *) event;
|
2006-10-28 09:18:55 +00:00
|
|
|
|
2007-04-15 05:22:30 +00:00
|
|
|
- (void) setGroove:(NSString *)groove;
|
2007-04-16 04:54:02 +00:00
|
|
|
- (void) setGrooveMenu:(NSString *)groove;
|
2007-04-15 05:22:30 +00:00
|
|
|
|
2006-09-11 02:49:56 +00:00
|
|
|
@end
|
|
|
|
|
|
|
|
// Local Variables:
|
|
|
|
// mode:ObjC
|
|
|
|
// End:
|