# HG changeset patch # User mas01mj # Date 1268404098 0 # Node ID f3268055df0a29298f3da772f9fd28e71d5bd78f # Parent 015e361e5baaafc8c24e562d430e97799d0a6848 * Toolbar! * Scaling now works correctly diff -r 015e361e5baa -r f3268055df0a examples/iAudioDB/AppController.h --- a/examples/iAudioDB/AppController.h Fri Mar 12 12:17:52 2010 +0000 +++ b/examples/iAudioDB/AppController.h Fri Mar 12 14:28:18 2010 +0000 @@ -21,7 +21,7 @@ NSString* selectedFilename; IBOutlet NSTextField *statusField; - IBOutlet NSTableView *tracksView; + IBOutlet NSTableView* tracksView; IBOutlet id mainWindow; // Query Customizing @@ -35,10 +35,11 @@ // Main window buttons/fields. - IBOutlet NSButton* performQueryButton; - IBOutlet NSButton* playBothButton; - IBOutlet NSButton* playResultButton; - IBOutlet NSButton* stopButton; + IBOutlet NSToolbarItem* importAudioButton; + IBOutlet NSToolbarItem* performQueryButton; + IBOutlet NSToolbarItem* playBothButton; + IBOutlet NSToolbarItem* playResultButton; + IBOutlet NSToolbarItem* stopButton; IBOutlet NSTextField* queryKey; NSSound* queryTrack; @@ -62,8 +63,6 @@ NSDictionary* trackMap; NSDictionary* dbState; - - // Query param fields /* To Come diff -r 015e361e5baa -r f3268055df0a examples/iAudioDB/AppController.m --- a/examples/iAudioDB/AppController.m Fri Mar 12 12:17:52 2010 +0000 +++ b/examples/iAudioDB/AppController.m Fri Mar 12 14:28:18 2010 +0000 @@ -24,8 +24,10 @@ - (void)awakeFromNib { [tracksView setTarget:self]; [tracksView setDoubleAction:@selector(tableDoubleClick:)]; + [self updateStatus]; } + - (IBAction)tableDoubleClick:(id)sender { [self playResult:Nil]; @@ -229,13 +231,16 @@ [dbState objectForKey:@"windowsize"], [dbState objectForKey:@"extractor"]]]; [performQueryButton setEnabled:YES]; + [importAudioButton setEnabled:YES]; } else { NSLog(@"No db"); [performQueryButton setEnabled:NO]; + [importAudioButton setEnabled:NO]; [playBothButton setEnabled:NO]; [playResultButton setEnabled:NO]; + [stopButton setEnabled:NO]; } } @@ -341,6 +346,7 @@ id result = [results objectAtIndex:row]; id value = [result objectForKey:[tc identifier]]; + NSLog(@"Result: %s", [tc identifier]); if([[tc identifier] isEqualToString:@"meter"]) { NSLevelIndicatorCell *distance = [[NSLevelIndicatorCell alloc] initWithLevelIndicatorStyle:NSRelevancyLevelIndicatorStyle]; @@ -385,13 +391,13 @@ { if([tracksView numberOfSelectedRows] == 0) { - [playBothButton setEnabled:FALSE]; - [playResultButton setEnabled:FALSE]; + [playBothButton setEnabled:NO]; + [playResultButton setEnabled:NO]; } else { - [playBothButton setEnabled:TRUE]; - [playResultButton setEnabled:TRUE]; + [playBothButton setEnabled:YES]; + [playResultButton setEnabled:YES]; } } @@ -671,6 +677,7 @@ } else { + NSLog(@"Populate table: %d", result->nresults); float divisor = (44100/2048); for(int i=0; inresults; i++) { diff -r 015e361e5baa -r f3268055df0a examples/iAudioDB/English.lproj/MainMenu.xib --- a/examples/iAudioDB/English.lproj/MainMenu.xib Fri Mar 12 12:17:52 2010 +0000 +++ b/examples/iAudioDB/English.lproj/MainMenu.xib Fri Mar 12 14:28:18 2010 +0000 @@ -8,7 +8,7 @@ 353.00 YES - + @@ -386,13 +386,193 @@ _NSMainMenu - 7 + 4111 2 {{335, 273}, {606, 477}} 1946157056 iAudioDB NSWindow - + + + 0F013AFF-76CE-47B1-B051-A4C0663AC2E3 + + + YES + YES + NO + NO + 1 + 1 + + YES + + YES + 105D45A0-54C1-4F79-A213-7BD763B75FB9 + 8D8AC8A3-26FC-4B20-84A4-175BA2973EC2 + 9E9F684B-AC2D-4C64-BD36-9881ADEAABEC + A3831457-05C2-46D8-A720-CF818BD69A16 + DB64CA1A-034C-4947-8BD1-A909E2B69D79 + NSToolbarFlexibleSpaceItem + + + YES + + + 105D45A0-54C1-4F79-A213-7BD763B75FB9 + + Play Both + Play Both + + + + NSImage + Play + + + + {0, 0} + {0, 0} + YES + NO + -1 + YES + 3 + + + + 8D8AC8A3-26FC-4B20-84A4-175BA2973EC2 + + Play Result + Play Result + + + + + + {0, 0} + {0, 0} + YES + NO + -1 + YES + 2 + + + + 9E9F684B-AC2D-4C64-BD36-9881ADEAABEC + + Add + Add + + + + NSImage + Add + + + + {0, 0} + {0, 0} + YES + NO + -1 + YES + 0 + + + + A3831457-05C2-46D8-A720-CF818BD69A16 + + Query + Query + + + + NSImage + Spotlight + + + + {0, 0} + {0, 0} + YES + NO + -1 + YES + 1 + + + + DB64CA1A-034C-4947-8BD1-A909E2B69D79 + + Stop + Stop + + + + NSImage + Stop + + + + {0, 0} + {0, 0} + YES + NO + -1 + YES + 4 + + + NSToolbarFlexibleSpaceItem + + Flexible Space + + + + + + {1, 5} + {20000, 32} + YES + YES + -1 + YES + 0 + + YES + YES + + + 1048576 + 2147483647 + + + + + + + + YES + + + + + + + + + YES + + + + + + + + YES + + {3.40282e+38, 3.40282e+38} @@ -441,404 +621,265 @@ - + - 282 + 274 YES - - - 301 + + + 2304 YES - - + + 256 - {{5, 39}, {70, 17}} - + {586, 418} + YES - - 68288064 - 272630784 - Track Key: - - - - 6 - System - controlColor - - 3 - MC42NjY2NjY2OQA + + + 256 + {586, 17} + + + + + + 256 + {{587, 0}, {16, 17}} + + + + YES + + meter + 6.400000e+01 + 1.000000e+01 + 3.402823e+38 + + 75628032 + 0 + + + LucidaGrande + 1.100000e+01 + 3100 + + + 6 + System + headerColor + + + + 6 + System + headerTextColor + + + + + -2080244224 + 131072 + + + 3.000000e+00 + 1.000000e+01 + 3.000000e+00 + 3.000000e+00 + 5 + 1 + + 3 + YES + + + meter + NO + compare: - - 6 - System - controlTextColor - + + key + 2.080000e+02 + 1.000000e+01 + 3.402823e+38 + + 75628032 + 0 + Key + + + + + + 337772096 + 2048 + Text Cell + + + + 6 + System + controlBackgroundColor + + 3 + MC42NjY2NjY2OQA + + + + 6 + System + controlTextColor + + + + 3 + YES + + + key + YES + compare: + + + + ipos + 6.300000e+01 + 1.000000e+01 + 3.402823e+38 + + 75628032 + 0 + IPos + + + + + + 337772096 + 2048 + Text Cell + + + + + + 3 + YES + + + ipos + YES + compare: + + + + distance + 2.390000e+02 + 1.000000e+01 + 3.402823e+38 + + 75628032 + 0 + Distance + + + + + + 337772096 + 2048 + Text Cell + + + + + + 3 + YES + + + distance + YES + compare: + - - - - 256 - {{404, 3}, {98, 32}} - - YES - - 604110336 - 134217728 - Play Both - - - -2033303297 - 129 - - - 200 - 25 + 3.000000e+00 + 2.000000e+00 + + + 6 + System + gridColor + + 3 + MC41AA + - - - - 256 - {{200, 3}, {96, 32}} - - YES - - 604110336 - 134217728 - Query - - - -2038284033 - 129 - - - 200 - 25 - - - - - 256 - {{502, 3}, {96, 32}} - - YES - - 604110336 - 134217728 - Stop - - - -2033303297 - 129 - - - 200 - 25 - - - - - 268 - {{5, 13}, {212, 17}} - - YES - - 68288064 - 272630784 - None Selected - - - - 1 - MCAwIDAAA - - - - - - - 256 - {{296, 3}, {108, 32}} - - YES - - 604110336 - 134217728 - Play Result - - - -2033303297 - 129 - - - 200 - 25 - + 1.700000e+01 + -692060160 + 1 + 4 + 15 + 0 + YES - {603, 63} - - NSView + {{1, 17}, {586, 418}} + + + + + 4 - - - 274 + + + 256 + {{587, 17}, {15, 418}} + + + _doScroller: + 9.970149e-01 + + + + 256 + {{1, 435}, {586, 15}} + + 1 + + _doScroller: + 9.982964e-01 + + + + 2304 YES - - - 2304 - - YES - - - 256 - {586, 337} - - YES - - - 256 - {586, 17} - - - - - - 256 - {{587, 0}, {16, 17}} - - - - YES - - meter - 6.400000e+01 - 1.000000e+01 - 3.402823e+38 - - 75628032 - 0 - - - LucidaGrande - 1.100000e+01 - 3100 - - - 6 - System - headerColor - - - - 6 - System - headerTextColor - - - - - -2080244224 - 131072 - - - 3.000000e+00 - 1.000000e+01 - 3.000000e+00 - 3.000000e+00 - 5 - 1 - - 3 - YES - - - meter - NO - compare: - - - - key - 2.080000e+02 - 1.000000e+01 - 3.402823e+38 - - 75628032 - 0 - Key - - - - - - 337772096 - 2048 - Text Cell - - - - 6 - System - controlBackgroundColor - - - - - 3 - YES - - - key - YES - compare: - - - - ipos - 6.300000e+01 - 1.000000e+01 - 3.402823e+38 - - 75628032 - 0 - IPos - - - - - - 337772096 - 2048 - Text Cell - - - - - - 3 - YES - - - ipos - YES - compare: - - - - distance - 1.680000e+02 - 1.000000e+01 - 3.402823e+38 - - 75628032 - 0 - Distance - - - - - - 337772096 - 2048 - Text Cell - - - - - - 3 - YES - - - distance - YES - compare: - - - - 3.000000e+00 - 2.000000e+00 - - - 6 - System - gridColor - - 3 - MC41AA - - - 1.700000e+01 - -692060160 - 1 - 4 - 15 - 0 - YES - - - {{1, 17}, {586, 337}} - - - - - 4 - - - - 256 - {{587, 17}, {15, 337}} - - - _doScroller: - 9.970149e-01 - - - - 256 - {{1, 354}, {586, 15}} - - 1 - - _doScroller: - 9.982964e-01 - - - - 2304 - - YES - - - {{1, 0}, {586, 17}} - - - - - 4 - - + - {{0, 72}, {603, 370}} - - - 50 - - - - - - QSAAAEEgAABBmAAAQZgAAA + {{1, 0}, {586, 17}} + + + + + 4 + - {{3, 35}, {603, 442}} + {{0, 27}, {603, 451}} + + 50 + + + + + + QSAAAEEgAABBmAAAQZgAAA {606, 477} @@ -1146,7 +1187,12 @@ 75 - + + 6 + System + controlColor + + @@ -1787,38 +1833,6 @@ 664 - - dataSource - - - - 671 - - - - tracksView - - - - 673 - - - - delegate - - - - 675 - - - - selectedChanged: - - - - 702 - - paste: @@ -1867,70 +1881,6 @@ 737 - - chooseQuery: - - - - 740 - - - - stopPlay: - - - - 744 - - - - stopButton - - - - 745 - - - - queryKey - - - - 748 - - - - playBothButton - - - - 751 - - - - playBoth: - - - - 752 - - - - playResultButton - - - - 753 - - - - playResult: - - - - 754 - - maxTracksField @@ -2076,14 +2026,6 @@ - performQueryButton - - - - 842 - - - queryLengthVectors @@ -2114,6 +2056,110 @@ 846 + + + importAudio: + + + + 865 + + + + playResult: + + + + 866 + + + + chooseQuery: + + + + 867 + + + + stopPlay: + + + + 868 + + + + playResultButton + + + + 882 + + + + performQueryButton + + + + 883 + + + + stopButton + + + + 884 + + + + importAudioButton + + + + 885 + + + + tracksView + + + + 886 + + + + delegate + + + + 887 + + + + dataSource + + + + 888 + + + + playBoth: + + + + 890 + + + + playBothButton + + + + 891 + @@ -2355,6 +2401,7 @@ YES + @@ -2364,8 +2411,8 @@ YES - + @@ -2409,16 +2456,6 @@ - 524 - - - YES - - - - - - 564 @@ -2504,143 +2541,6 @@ - 527 - - - YES - - - - - - - - - 530 - - - - - 529 - - - - - 528 - - - YES - - - - - - - - - 552 - - - YES - - - - - - 553 - - - - - 525 - - - YES - - - - - - - - - - - 665 - - - YES - - - - - - 666 - - - - - 674 - - - - - 686 - - - YES - - - - - - 687 - - - - - 688 - - - YES - - - - - - 689 - - - - - 690 - - - YES - - - - - - 691 - - - - - 699 - - - YES - - - - - - 700 - - - - 704 @@ -2700,62 +2600,6 @@ - 738 - - - YES - - - - - - 739 - - - - - 742 - - - YES - - - - - - 743 - - - - - 746 - - - YES - - - - - - 747 - - - - - 749 - - - YES - - - - - - 750 - - - - 755 @@ -3123,6 +2967,145 @@ + + 850 + + + YES + + + + + + + + + + + 856 + + + + + 862 + + + + + 863 + + + + + 864 + + + + + 869 + + + YES + + + + + + + + + 870 + + + + + 871 + + + YES + + + + + + + + + 872 + + + + + 873 + + + + + 874 + + + YES + + + + + + 875 + + + YES + + + + + + 876 + + + YES + + + + + + 877 + + + YES + + + + + + 878 + + + + + 879 + + + + + 880 + + + + + 881 + + + + + 861 + + + + + 889 + + + @@ -3194,14 +3177,6 @@ 5.IBPluginDependency 5.ImportedFromIB2 522.IBPluginDependency - 524.IBPluginDependency - 525.IBPluginDependency - 527.IBPluginDependency - 528.IBPluginDependency - 529.IBPluginDependency - 530.IBPluginDependency - 552.IBPluginDependency - 553.IBPluginDependency 56.IBPluginDependency 56.ImportedFromIB2 564.IBEditorWindowLastContentRect @@ -3222,19 +3197,8 @@ 622.IBPluginDependency 627.IBPluginDependency 628.IBPluginDependency - 665.IBPluginDependency - 666.IBPluginDependency - 674.IBPluginDependency - 686.IBPluginDependency - 687.IBPluginDependency - 688.IBPluginDependency - 689.IBPluginDependency - 690.IBPluginDependency - 691.IBPluginDependency 693.IBPluginDependency 694.IBPluginDependency - 699.IBPluginDependency - 700.IBPluginDependency 704.IBPluginDependency 705.IBEditorWindowLastContentRect 705.IBPluginDependency @@ -3247,14 +3211,6 @@ 714.IBPluginDependency 72.IBPluginDependency 72.ImportedFromIB2 - 738.IBPluginDependency - 739.IBPluginDependency - 742.IBPluginDependency - 743.IBPluginDependency - 746.IBPluginDependency - 747.IBPluginDependency - 749.IBPluginDependency - 750.IBPluginDependency 755.IBPluginDependency 756.IBPluginDependency 757.IBPluginDependency @@ -3316,6 +3272,22 @@ 835.IBPluginDependency 836.IBPluginDependency 837.IBPluginDependency + 850.IBEditorWindowLastContentRect + 850.IBPluginDependency + 856.IBPluginDependency + 869.IBPluginDependency + 870.IBPluginDependency + 871.IBPluginDependency + 872.IBPluginDependency + 873.IBPluginDependency + 874.IBPluginDependency + 875.IBPluginDependency + 876.IBPluginDependency + 877.IBPluginDependency + 878.IBPluginDependency + 879.IBPluginDependency + 880.IBPluginDependency + 881.IBPluginDependency 92.IBPluginDependency 92.ImportedFromIB2 @@ -3371,8 +3343,8 @@ {74, 862} {{6, 978}, {478, 20}} - {{26, 79}, {606, 477}} - {{26, 79}, {606, 477}} + {{117, -39}, {606, 477}} + {{117, -39}, {606, 477}} {{33, 99}, {480, 360}} {3.40282e+38, 3.40282e+38} @@ -3387,14 +3359,6 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin {{169, 281}, {305, 281}} {{169, 281}, {305, 281}} @@ -3417,17 +3381,6 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin {{778, 152}, {154, 133}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -3453,14 +3406,6 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin {{76, 497}, {528, 56}} {{76, 497}, {528, 56}} @@ -3508,6 +3453,22 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + {{112, 438}, {616, 0}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -3532,7 +3493,7 @@ - 846 + 891 @@ -3588,6 +3549,7 @@ createSheet extractorOptions hopSizeField + importAudioButton importSheet indicator mainWindow @@ -3614,15 +3576,16 @@ id NSMatrix NSTextField + NSToolbarItem id NSProgressIndicator id NSTextField NSTextField NSButton - NSButton - NSButton - NSButton + NSToolbarItem + NSToolbarItem + NSToolbarItem NSButton NSTextField NSTextField @@ -3631,7 +3594,7 @@ id NSButton NSTextField - NSButton + NSToolbarItem NSTableView NSTextField