| 1 |
// |
| 2 |
// MDObjects.h |
| 3 |
// |
| 4 |
// Created by Toshi Nagata on Mon Mar 04 2002. |
| 5 |
// |
| 6 |
/* |
| 7 |
Copyright (c) 2000-2016 Toshi Nagata. All rights reserved. |
| 8 |
|
| 9 |
This program is free software; you can redistribute it and/or modify |
| 10 |
it under the terms of the GNU General Public License as published by |
| 11 |
the Free Software Foundation version 2 of the License. |
| 12 |
|
| 13 |
This program is distributed in the hope that it will be useful, |
| 14 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 |
GNU General Public License for more details. |
| 17 |
*/ |
| 18 |
|
| 19 |
#import <Cocoa/Cocoa.h> |
| 20 |
#import "MDHeaders.h" |
| 21 |
|
| 22 |
@interface MDEventObject : NSObject { |
| 23 |
@public |
| 24 |
int32_t position; |
| 25 |
MDEvent event; |
| 26 |
} |
| 27 |
- (id)initWithMDEvent: (const MDEvent *)ep; |
| 28 |
- (MDEvent *)eventPtr; |
| 29 |
@end |
| 30 |
|
| 31 |
@interface MDTrackObject : NSObject { |
| 32 |
@public |
| 33 |
MDTrack *track; |
| 34 |
} |
| 35 |
- (id)initWithMDTrack: (MDTrack *)inTrack; |
| 36 |
- (MDTrack *)track; |
| 37 |
@end |
| 38 |
|
| 39 |
@interface IntGroupObject : NSObject { |
| 40 |
@public |
| 41 |
IntGroup *pointSet; |
| 42 |
} |
| 43 |
- (id)initWithMDPointSet: (IntGroup *)inPointSet; |
| 44 |
- (IntGroup *)pointSet; |
| 45 |
@end |
| 46 |
|
| 47 |
@interface MDSelectionObject : IntGroupObject { |
| 48 |
@public |
| 49 |
MDTickType startTick, endTick; |
| 50 |
MDTrack *track; /* For caching only */ |
| 51 |
BOOL isEndOfTrackSelected; |
| 52 |
} |
| 53 |
- (BOOL)getStartTick: (MDTickType *)startTickPtr andEndTick: (MDTickType *)endTickPtr withMDTrack: (MDTrack *)inTrack; |
| 54 |
@end |
| 55 |
|
| 56 |
@interface MDTickRangeObject: NSObject { |
| 57 |
@public |
| 58 |
MDTickType startTick, endTick; |
| 59 |
} |
| 60 |
- (id)initWithStartTick: (MDTickType)tick1 endTick: (MDTickType)tick2; |
| 61 |
@end |
| 62 |
|
| 63 |
/* Create an NSMenu with CC names. Each menu item will have the target and action, |
| 64 |
and the control change number can be accessed by [sender tag] - tagOffset. */ |
| 65 |
NSMenu *MDMenuWithControlNames(id target, SEL action, int tagOffset); |
| 66 |
|
| 67 |
/* Create an NSMenu with meta-event names. Each menu item will have the target and action, |
| 68 |
and the SMF meta number can be accessed by [sender tag] - tagOffset. */ |
| 69 |
NSMenu *MDMenuWithMetaNames(id target, SEL action, int tagOffset); |