Permalink
Browse files

Initial commit

  • Loading branch information...
pmougin committed Jun 28, 2009
0 parents commit c808c7d56ba2dc26ce195e3df7024efbbd6b4012
Showing 439 changed files with 83,188 additions and 0 deletions.
@@ -0,0 +1 @@
+*.pbxproj -crlf -diff -merge
@@ -0,0 +1,11 @@
+# xcode noise
+build/*
+*.pbxuser
+*.mode1v3
+
+# old skool
+.svn
+
+# osx noise
+.DS_Store
+profile

Large diffs are not rendered by default.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
Binary file not shown.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
Binary file not shown.
@@ -0,0 +1,33 @@
+/* FSDemoController.h Copyright (c) 2007 Philippe Mougin. */
+/* This software is open source. See the license. */
+
+#import <Cocoa/Cocoa.h>
+#import "FSInterpreterView.h"
+
+
+@interface FSDemoAssistant : NSObject
+{
+ IBOutlet FSInterpreterView *interpreterView;
+ NSTextView *loadImage;
+ NSTextView *displayImage;
+ NSTextView *lockFocus;
+ NSTextView *perspective;
+ NSTextView *hueAdjust;
+ NSTextView *bump;
+ NSTextView *bumpAnimate;
+}
+
+@property (retain) IBOutlet NSTextView *loadImage;
+@property (retain) IBOutlet NSTextView *displayImage;
+@property (retain) IBOutlet NSTextView *lockFocus;
+@property (retain) IBOutlet NSTextView *perspective;
+@property (retain) IBOutlet NSTextView *hueAdjust;
+@property (retain) IBOutlet NSTextView *bump;
+@property (retain) IBOutlet NSTextView *bumpAnimate;
+
+- (void)activate;
+- (id)initWithInterpreterView:(FSInterpreterView *)theInterpreterView;
+- (IBAction)loadCode:sender;
+- (void)putCommand:(NSString *)command;
+
+@end
@@ -0,0 +1,65 @@
+/* FSDemoController.m Copyright (c) 2007 Philippe Mougin. */
+/* This software is open source. See the license. */
+
+#import "FSDemoAssistant.h"
+#import "FSNSString.h"
+
+
+@implementation FSDemoAssistant
+
+@synthesize loadImage;
+@synthesize displayImage;
+@synthesize lockFocus;
+@synthesize perspective;
+@synthesize hueAdjust;
+@synthesize bump;
+@synthesize bumpAnimate;
+
+- (void)activate
+{
+ if (![NSBundle loadNibNamed:@"DemoAssistant" owner:self])
+ {
+ NSLog(@"Failed to load DemoAssistant nib file");
+ NSBeep();
+ return;
+ }
+}
+
+- (void) dealloc
+{
+ [interpreterView release];
+ [super dealloc];
+}
+
+- (id)initWithInterpreterView:(FSInterpreterView *)theInterpreterView
+{
+ self = [super init];
+ if (self != nil)
+ {
+ interpreterView = [theInterpreterView retain];
+ }
+ return self;
+}
+
+
+
+- (IBAction)loadCode:sender
+{
+ [self putCommand:[[self performSelector:NSSelectorFromString([sender title])] string]];
+}
+
+- (void)putCommand:(NSString *)command
+{
+ NSArray *fragments = [command componentsSeparatedByString:@" "];
+
+ for (unsigned int i = 0, n = [fragments count]; i < n; i++)
+ {
+ [interpreterView putCommand:[fragments objectAtIndex:i]];
+ [interpreterView putCommand:@" "];
+ [interpreterView display];
+ [NSThread sleepUntilDate:[NSDate dateWithTimeIntervalSinceNow:0.05]];
+ }
+ [[interpreterView window] makeKeyWindow];
+}
+
+@end
Oops, something went wrong.

0 comments on commit c808c7d

Please sign in to comment.