comparison examples/iAudioDB/AppController.h @ 669:780ebab29268

Added initial increment of OSX audioDB interface
author mas01mj
date Wed, 03 Mar 2010 17:17:08 +0000
parents
children df9639a5cad2
comparison
equal deleted inserted replaced
668:ce5ff00168e1 669:780ebab29268
1 //
2 // AppController.h
3 // iAudioDB
4 //
5 // Created by Mike Jewell on 27/01/2010.
6 // Copyright 2010 __MyCompanyName__. All rights reserved.
7 //
8
9 #import <Cocoa/Cocoa.h>
10 #include <audioDB_API.h>
11
12 @interface AppController : NSObject {
13 adb_ptr db;
14 NSModalSession session;
15
16 NSString* dbName;
17 NSString* dbFilename;
18 NSString* plistFilename;
19 NSString* selectedKey;
20 NSString* selectedFilename;
21
22 IBOutlet NSTextField *statusField;
23 IBOutlet NSTableView *tracksView;
24 IBOutlet id mainWindow;
25
26 // Querying
27 IBOutlet NSTextField* queryKey;
28 IBOutlet NSButton* playBothButton;
29 IBOutlet NSButton* playResultButton;
30 IBOutlet NSButton* stopButton;
31 IBOutlet NSButton* chooseButton;
32
33 NSMutableArray* results;
34 NSDictionary* trackMap;
35
36 // Extracting
37 IBOutlet id importSheet;
38 IBOutlet NSBox* extractingBox;
39 IBOutlet NSMatrix* extractorOptions;
40 IBOutlet NSProgressIndicator* indicator;
41
42 // Playback
43 NSSound* queryTrack;
44 NSSound* resultTrack;
45
46 // Query param fields
47
48 /* To Come
49 IBOutlet id queryType;
50 IBOutlet NSTextField* queryStartField;
51 IBOutlet id queryTypeOptions;
52 IBOutlet NSTextField* queryLengthField;
53 IBOutlet NSTextField* queryRadiusField;
54 IBOutlet NSButtonCell* exhaustiveField;*/
55
56 }
57
58 // Menus
59 -(IBAction)newDatabase:(id)sender;
60 -(IBAction)openDatabase:(id)sender;
61 -(IBAction)selectFiles:(id)sender;
62
63 // Import
64 -(IBAction)importAudio:(id)sender;
65 -(IBAction)cancelImport:(id)sender;
66
67 // Buttons
68 -(IBAction)playBoth:(id)sender;
69 -(IBAction)playResult:(id)sender;
70 -(IBAction)stopPlay:(id)sender;
71 -(IBAction)chooseQuery:(id)sender;
72 -(IBAction)selectedChanged:(id)sender;
73
74
75 -(void)performQuery;
76 -(void)updateStatus;
77 - (BOOL)validateUserInterfaceItem:(id <NSValidatedUserInterfaceItem>)anItem;
78 - (void)sound:(NSSound *)sound didFinishPlaying:(BOOL)playbackSuccessful;
79
80 @end