2016-05-25 02:00:22 +00:00
|
|
|
#import <AppKit/AppKit.h>
|
|
|
|
#import <AudioUnit/AudioUnit.h>
|
|
|
|
#import <CoreAudioKit/AUViewController.h>
|
|
|
|
#import "AudioUnitViewController.hpp"
|
|
|
|
|
2016-05-26 01:28:50 +00:00
|
|
|
@interface MainView : NSView
|
|
|
|
{
|
|
|
|
AudioUnitViewController* amuseVC;
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation MainView
|
|
|
|
|
|
|
|
- (id)initWithFrame:(NSRect)frameRect
|
|
|
|
{
|
|
|
|
self = [super initWithFrame:frameRect];
|
|
|
|
if (!self)
|
|
|
|
return nil;
|
|
|
|
amuseVC = [[AudioUnitViewController alloc] initWithNibName:nil bundle:nil];
|
|
|
|
[self addSubview:amuseVC.view];
|
|
|
|
return self;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (BOOL)translatesAutoresizingMaskIntoConstraints
|
|
|
|
{
|
|
|
|
return NO;
|
|
|
|
}
|
|
|
|
|
2016-05-25 02:00:22 +00:00
|
|
|
@end
|
|
|
|
|
2016-05-27 00:56:18 +00:00
|
|
|
@interface MainTabView : NSTabView
|
|
|
|
{}
|
|
|
|
- (IBAction)selectDataTab:(id)sender;
|
|
|
|
- (IBAction)selectSFXTab:(id)sender;
|
|
|
|
- (IBAction)selectSamplesTab:(id)sender;
|
|
|
|
- (IBAction)selectCreditsTab:(id)sender;
|
2016-05-26 01:28:50 +00:00
|
|
|
@end
|
2016-05-25 02:00:22 +00:00
|
|
|
|
2016-05-27 00:56:18 +00:00
|
|
|
@implementation MainTabView
|
|
|
|
- (IBAction)selectDataTab:(id)sender
|
2016-05-26 01:28:50 +00:00
|
|
|
{
|
2016-05-27 00:56:18 +00:00
|
|
|
[self selectTabViewItemAtIndex:0];
|
2016-05-26 01:28:50 +00:00
|
|
|
}
|
2016-05-27 00:56:18 +00:00
|
|
|
- (IBAction)selectSFXTab:(id)sender
|
|
|
|
{
|
|
|
|
[self selectTabViewItemAtIndex:1];
|
2016-05-25 02:00:22 +00:00
|
|
|
}
|
2016-05-27 00:56:18 +00:00
|
|
|
- (IBAction)selectSamplesTab:(id)sender
|
|
|
|
{
|
|
|
|
[self selectTabViewItemAtIndex:2];
|
2016-05-26 01:28:50 +00:00
|
|
|
}
|
2016-05-27 00:56:18 +00:00
|
|
|
- (IBAction)selectCreditsTab:(id)sender
|
2016-05-26 01:28:50 +00:00
|
|
|
{
|
2016-05-27 00:56:18 +00:00
|
|
|
[self selectTabViewItemAtIndex:3];
|
2016-05-25 02:00:22 +00:00
|
|
|
}
|
2016-05-27 00:56:18 +00:00
|
|
|
@end
|
2016-05-25 02:00:22 +00:00
|
|
|
|
2016-05-27 00:56:18 +00:00
|
|
|
@interface AppDelegate : NSObject <NSApplicationDelegate>
|
|
|
|
{
|
|
|
|
IBOutlet NSWindow* mainWindow;
|
|
|
|
IBOutlet NSOutlineView* dataOutline;
|
|
|
|
IBOutlet NSTableView* sfxTable;
|
|
|
|
IBOutlet NSTableView* samplesTable;
|
|
|
|
IBOutlet NSTextView* creditsView;
|
|
|
|
}
|
2016-05-25 02:00:22 +00:00
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation AppDelegate
|
|
|
|
|
2016-05-26 01:28:50 +00:00
|
|
|
- (void)applicationDidFinishLaunching:(NSNotification*)notification
|
|
|
|
{
|
|
|
|
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"NSConstraintBasedLayoutVisualizeMutuallyExclusiveConstraints"];
|
2016-05-27 00:56:18 +00:00
|
|
|
[mainWindow.toolbar setSelectedItemIdentifier:@"DataTab"];
|
2016-05-26 01:28:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender
|
|
|
|
{
|
|
|
|
return YES;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (IBAction)quitApp:(id)sender
|
|
|
|
{
|
|
|
|
[NSApp terminate:sender];
|
|
|
|
}
|
2016-05-25 02:00:22 +00:00
|
|
|
|
2016-05-26 01:28:50 +00:00
|
|
|
@end
|
2016-05-25 02:00:22 +00:00
|
|
|
|
2016-05-26 01:28:50 +00:00
|
|
|
int main(int argc, const char * argv[])
|
|
|
|
{
|
2016-05-27 00:56:18 +00:00
|
|
|
return NSApplicationMain(argc, argv);
|
2016-05-25 02:00:22 +00:00
|
|
|
}
|