Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Initial commit of project

  • Loading branch information...
commit c78456ed47993b02770166235d12c2bd82f96d1a 1 parent ebe776e
Dave DeLong authored
53 BezierBuilder-Info.plist
View
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleDocumentTypes</key>
+ <array>
+ <dict>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>????</string>
+ </array>
+ <key>CFBundleTypeIconFile</key>
+ <string></string>
+ <key>CFBundleTypeName</key>
+ <string>DocumentType</string>
+ <key>CFBundleTypeOSTypes</key>
+ <array>
+ <string>????</string>
+ </array>
+ <key>CFBundleTypeRole</key>
+ <string>Editor</string>
+ <key>NSDocumentClass</key>
+ <string>MyDocument</string>
+ </dict>
+ </array>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIconFile</key>
+ <string></string>
+ <key>CFBundleIdentifier</key>
+ <string>com.yourcompany.${PRODUCT_NAME:rfc1034identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>LSMinimumSystemVersion</key>
+ <string>${MACOSX_DEPLOYMENT_TARGET}</string>
+ <key>NSMainNibFile</key>
+ <string>MainMenu</string>
+ <key>NSPrincipalClass</key>
+ <string>NSApplication</string>
+</dict>
+</plist>
351 BezierBuilder.xcodeproj/project.pbxproj
View
@@ -0,0 +1,351 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 45;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 1DDD582C0DA1D0D100B32029 /* MyDocument.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD58280DA1D0D100B32029 /* MyDocument.xib */; };
+ 1DDD582D0DA1D0D100B32029 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD582A0DA1D0D100B32029 /* MainMenu.xib */; };
+ 551E00DA12F928AA00143DD3 /* BezierPoint.m in Sources */ = {isa = PBXBuildFile; fileRef = 551E00D912F928AA00143DD3 /* BezierPoint.m */; };
+ 551E00E912F92AD000143DD3 /* CodeBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = 551E00E812F92AD000143DD3 /* CodeBuilder.m */; };
+ 551E00EC12F92B0400143DD3 /* NSBezierPathCodeBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = 551E00EB12F92B0400143DD3 /* NSBezierPathCodeBuilder.m */; };
+ 551E00FC12F92E0C00143DD3 /* CGPathRefCodeBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = 551E00FB12F92E0C00143DD3 /* CGPathRefCodeBuilder.m */; };
+ 554105501004346F0079AF28 /* BezierView.m in Sources */ = {isa = PBXBuildFile; fileRef = 5541054F1004346F0079AF28 /* BezierView.m */; };
+ 8D15AC2C0486D014006FF6A4 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 2A37F4B9FDCFA73011CA2CEA /* Credits.rtf */; };
+ 8D15AC2F0486D014006FF6A4 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165FFE840EACC02AAC07 /* InfoPlist.strings */; };
+ 8D15AC310486D014006FF6A4 /* MyDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A37F4ACFDCFA73011CA2CEA /* MyDocument.m */; settings = {ATTRIBUTES = (); }; };
+ 8D15AC320486D014006FF6A4 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A37F4B0FDCFA73011CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
+ 8D15AC340486D014006FF6A4 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A7FEA54F5311CA2CBB /* Cocoa.framework */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ 089C1660FE840EACC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 1058C7A7FEA54F5311CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
+ 13E42FBA07B3F13500E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; };
+ 1DDD58290DA1D0D100B32029 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MyDocument.xib; sourceTree = "<group>"; };
+ 1DDD582B0DA1D0D100B32029 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = "<group>"; };
+ 2564AD2C0F5327BB00F57823 /* BezierBuilder_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BezierBuilder_Prefix.pch; sourceTree = "<group>"; };
+ 2A37F4ACFDCFA73011CA2CEA /* MyDocument.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyDocument.m; sourceTree = "<group>"; };
+ 2A37F4AEFDCFA73011CA2CEA /* MyDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyDocument.h; sourceTree = "<group>"; };
+ 2A37F4B0FDCFA73011CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+ 2A37F4BAFDCFA73011CA2CEA /* English */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = English; path = English.lproj/Credits.rtf; sourceTree = "<group>"; };
+ 2A37F4C4FDCFA73011CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
+ 2A37F4C5FDCFA73011CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
+ 551E00D812F928AA00143DD3 /* BezierPoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BezierPoint.h; sourceTree = "<group>"; };
+ 551E00D912F928AA00143DD3 /* BezierPoint.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BezierPoint.m; sourceTree = "<group>"; };
+ 551E00E712F92AD000143DD3 /* CodeBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CodeBuilder.h; sourceTree = "<group>"; };
+ 551E00E812F92AD000143DD3 /* CodeBuilder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CodeBuilder.m; sourceTree = "<group>"; };
+ 551E00EA12F92B0400143DD3 /* NSBezierPathCodeBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSBezierPathCodeBuilder.h; sourceTree = "<group>"; };
+ 551E00EB12F92B0400143DD3 /* NSBezierPathCodeBuilder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSBezierPathCodeBuilder.m; sourceTree = "<group>"; };
+ 551E00FA12F92E0C00143DD3 /* CGPathRefCodeBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CGPathRefCodeBuilder.h; sourceTree = "<group>"; };
+ 551E00FB12F92E0C00143DD3 /* CGPathRefCodeBuilder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CGPathRefCodeBuilder.m; sourceTree = "<group>"; };
+ 5541054E1004346F0079AF28 /* BezierView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BezierView.h; sourceTree = "<group>"; };
+ 5541054F1004346F0079AF28 /* BezierView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BezierView.m; sourceTree = "<group>"; };
+ 8D15AC360486D014006FF6A4 /* BezierBuilder-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "BezierBuilder-Info.plist"; sourceTree = "<group>"; };
+ 8D15AC370486D014006FF6A4 /* BezierBuilder.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BezierBuilder.app; sourceTree = BUILT_PRODUCTS_DIR; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 8D15AC330486D014006FF6A4 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 8D15AC340486D014006FF6A4 /* Cocoa.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 1058C7A6FEA54F5311CA2CBB /* Linked Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 1058C7A7FEA54F5311CA2CBB /* Cocoa.framework */,
+ );
+ name = "Linked Frameworks";
+ sourceTree = "<group>";
+ };
+ 1058C7A8FEA54F5311CA2CBB /* Other Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 2A37F4C4FDCFA73011CA2CEA /* AppKit.framework */,
+ 13E42FBA07B3F13500E4EEF1 /* CoreData.framework */,
+ 2A37F4C5FDCFA73011CA2CEA /* Foundation.framework */,
+ );
+ name = "Other Frameworks";
+ sourceTree = "<group>";
+ };
+ 19C28FB0FE9D524F11CA2CBB /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 8D15AC370486D014006FF6A4 /* BezierBuilder.app */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 2A37F4AAFDCFA73011CA2CEA /* BezierBuilder */ = {
+ isa = PBXGroup;
+ children = (
+ 2A37F4ABFDCFA73011CA2CEA /* Classes */,
+ 2A37F4AFFDCFA73011CA2CEA /* Other Sources */,
+ 2A37F4B8FDCFA73011CA2CEA /* Resources */,
+ 2A37F4C3FDCFA73011CA2CEA /* Frameworks */,
+ 19C28FB0FE9D524F11CA2CBB /* Products */,
+ );
+ name = BezierBuilder;
+ sourceTree = "<group>";
+ };
+ 2A37F4ABFDCFA73011CA2CEA /* Classes */ = {
+ isa = PBXGroup;
+ children = (
+ 2A37F4AEFDCFA73011CA2CEA /* MyDocument.h */,
+ 2A37F4ACFDCFA73011CA2CEA /* MyDocument.m */,
+ 5541054E1004346F0079AF28 /* BezierView.h */,
+ 5541054F1004346F0079AF28 /* BezierView.m */,
+ 551E00D812F928AA00143DD3 /* BezierPoint.h */,
+ 551E00D912F928AA00143DD3 /* BezierPoint.m */,
+ 551E010712F9303D00143DD3 /* Builders */,
+ );
+ name = Classes;
+ sourceTree = "<group>";
+ };
+ 2A37F4AFFDCFA73011CA2CEA /* Other Sources */ = {
+ isa = PBXGroup;
+ children = (
+ 2564AD2C0F5327BB00F57823 /* BezierBuilder_Prefix.pch */,
+ 2A37F4B0FDCFA73011CA2CEA /* main.m */,
+ );
+ name = "Other Sources";
+ sourceTree = "<group>";
+ };
+ 2A37F4B8FDCFA73011CA2CEA /* Resources */ = {
+ isa = PBXGroup;
+ children = (
+ 2A37F4B9FDCFA73011CA2CEA /* Credits.rtf */,
+ 8D15AC360486D014006FF6A4 /* BezierBuilder-Info.plist */,
+ 089C165FFE840EACC02AAC07 /* InfoPlist.strings */,
+ 1DDD58280DA1D0D100B32029 /* MyDocument.xib */,
+ 1DDD582A0DA1D0D100B32029 /* MainMenu.xib */,
+ );
+ name = Resources;
+ sourceTree = "<group>";
+ };
+ 2A37F4C3FDCFA73011CA2CEA /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 1058C7A6FEA54F5311CA2CBB /* Linked Frameworks */,
+ 1058C7A8FEA54F5311CA2CBB /* Other Frameworks */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ 551E010712F9303D00143DD3 /* Builders */ = {
+ isa = PBXGroup;
+ children = (
+ 551E00E712F92AD000143DD3 /* CodeBuilder.h */,
+ 551E00E812F92AD000143DD3 /* CodeBuilder.m */,
+ 551E00EA12F92B0400143DD3 /* NSBezierPathCodeBuilder.h */,
+ 551E00EB12F92B0400143DD3 /* NSBezierPathCodeBuilder.m */,
+ 551E00FA12F92E0C00143DD3 /* CGPathRefCodeBuilder.h */,
+ 551E00FB12F92E0C00143DD3 /* CGPathRefCodeBuilder.m */,
+ );
+ name = Builders;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 8D15AC270486D014006FF6A4 /* BezierBuilder */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = C05733C708A9546B00998B17 /* Build configuration list for PBXNativeTarget "BezierBuilder" */;
+ buildPhases = (
+ 8D15AC2B0486D014006FF6A4 /* Resources */,
+ 8D15AC300486D014006FF6A4 /* Sources */,
+ 8D15AC330486D014006FF6A4 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = BezierBuilder;
+ productInstallPath = "$(HOME)/Applications";
+ productName = BezierBuilder;
+ productReference = 8D15AC370486D014006FF6A4 /* BezierBuilder.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 2A37F4A9FDCFA73011CA2CEA /* Project object */ = {
+ isa = PBXProject;
+ buildConfigurationList = C05733CB08A9546B00998B17 /* Build configuration list for PBXProject "BezierBuilder" */;
+ compatibilityVersion = "Xcode 3.1";
+ developmentRegion = English;
+ hasScannedForEncodings = 1;
+ knownRegions = (
+ English,
+ Japanese,
+ French,
+ German,
+ );
+ mainGroup = 2A37F4AAFDCFA73011CA2CEA /* BezierBuilder */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 8D15AC270486D014006FF6A4 /* BezierBuilder */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 8D15AC2B0486D014006FF6A4 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 8D15AC2C0486D014006FF6A4 /* Credits.rtf in Resources */,
+ 8D15AC2F0486D014006FF6A4 /* InfoPlist.strings in Resources */,
+ 1DDD582C0DA1D0D100B32029 /* MyDocument.xib in Resources */,
+ 1DDD582D0DA1D0D100B32029 /* MainMenu.xib in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 8D15AC300486D014006FF6A4 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 8D15AC310486D014006FF6A4 /* MyDocument.m in Sources */,
+ 8D15AC320486D014006FF6A4 /* main.m in Sources */,
+ 554105501004346F0079AF28 /* BezierView.m in Sources */,
+ 551E00DA12F928AA00143DD3 /* BezierPoint.m in Sources */,
+ 551E00E912F92AD000143DD3 /* CodeBuilder.m in Sources */,
+ 551E00EC12F92B0400143DD3 /* NSBezierPathCodeBuilder.m in Sources */,
+ 551E00FC12F92E0C00143DD3 /* CGPathRefCodeBuilder.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+ 089C165FFE840EACC02AAC07 /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 089C1660FE840EACC02AAC07 /* English */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "<group>";
+ };
+ 1DDD58280DA1D0D100B32029 /* MyDocument.xib */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 1DDD58290DA1D0D100B32029 /* English */,
+ );
+ name = MyDocument.xib;
+ sourceTree = "<group>";
+ };
+ 1DDD582A0DA1D0D100B32029 /* MainMenu.xib */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 1DDD582B0DA1D0D100B32029 /* English */,
+ );
+ name = MainMenu.xib;
+ sourceTree = "<group>";
+ };
+ 2A37F4B9FDCFA73011CA2CEA /* Credits.rtf */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 2A37F4BAFDCFA73011CA2CEA /* English */,
+ );
+ name = Credits.rtf;
+ sourceTree = "<group>";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ C05733C808A9546B00998B17 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_MODEL_TUNING = G5;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = BezierBuilder_Prefix.pch;
+ INFOPLIST_FILE = "BezierBuilder-Info.plist";
+ INSTALL_PATH = "$(HOME)/Applications";
+ PRODUCT_NAME = BezierBuilder;
+ };
+ name = Debug;
+ };
+ C05733C908A9546B00998B17 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ GCC_MODEL_TUNING = G5;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = BezierBuilder_Prefix.pch;
+ INFOPLIST_FILE = "BezierBuilder-Info.plist";
+ INSTALL_PATH = "$(HOME)/Applications";
+ PRODUCT_NAME = BezierBuilder;
+ };
+ name = Release;
+ };
+ C05733CC08A9546B00998B17 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ PREBINDING = NO;
+ SDKROOT = macosx10.6;
+ };
+ name = Debug;
+ };
+ C05733CD08A9546B00998B17 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ PREBINDING = NO;
+ SDKROOT = macosx10.6;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ C05733C708A9546B00998B17 /* Build configuration list for PBXNativeTarget "BezierBuilder" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ C05733C808A9546B00998B17 /* Debug */,
+ C05733C908A9546B00998B17 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ C05733CB08A9546B00998B17 /* Build configuration list for PBXProject "BezierBuilder" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ C05733CC08A9546B00998B17 /* Debug */,
+ C05733CD08A9546B00998B17 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 2A37F4A9FDCFA73011CA2CEA /* Project object */;
+}
15 BezierBuilder_Prefix.pch
View
@@ -0,0 +1,15 @@
+//
+// Prefix header for all source files of the 'BezierBuilder' target in the 'BezierBuilder' project
+//
+
+#ifdef __OBJC__
+ #import <Cocoa/Cocoa.h>
+
+static NSPoint NSPointAddToPoint(NSPoint p1, NSPoint p2) {
+ return NSMakePoint(p1.x+p2.x, p1.y+p2.y);
+}
+
+static NSPoint NSPointSubtractPoint(NSPoint p1, NSPoint p2) {
+ return NSMakePoint(p1.x-p2.x, p1.y-p2.y);
+}
+#endif
20 BezierPoint.h
View
@@ -0,0 +1,20 @@
+//
+// BezierPoint.h
+// BezierBuilder
+//
+// Created by Dave DeLong on 2/1/11.
+// Copyright 2011 __MyCompanyName__. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+
+@interface BezierPoint : NSObject {
+
+}
+
+@property CGPoint mainPoint;
+@property CGPoint controlPoint1;
+@property CGPoint controlPoint2;
+
+@end
16 BezierPoint.m
View
@@ -0,0 +1,16 @@
+//
+// BezierPoint.m
+// BezierBuilder
+//
+// Created by Dave DeLong on 2/1/11.
+// Copyright 2011 __MyCompanyName__. All rights reserved.
+//
+
+#import "BezierPoint.h"
+
+
+@implementation BezierPoint
+@synthesize mainPoint;
+@synthesize controlPoint1, controlPoint2;
+
+@end
32 BezierView.h
View
@@ -0,0 +1,32 @@
+//
+// BezierView.h
+// BezierBuilder
+//
+// Created by Dave DeLong on 7/7/09.
+// Copyright 2009 __MyCompanyName__. All rights reserved.
+//
+
+#import <Cocoa/Cocoa.h>
+
+@class BezierPoint;
+
+@protocol BezierViewDelegate
+
+- (void) didChangeElementAtIndex:(NSPoint)index byDelta:(NSPoint)point;
+- (void) didAddPoints:(NSPointArray)points;
+- (NSBezierPath *) path;
+
+@end
+
+
+@interface BezierView : NSView {
+ IBOutlet id<BezierViewDelegate> delegate;
+ NSPoint editingPoint;
+ NSPoint previousPoint;
+
+ BOOL isShiftDown;
+}
+
+@property (nonatomic, assign) id<BezierViewDelegate> delegate;
+
+@end
131 BezierView.m
View
@@ -0,0 +1,131 @@
+//
+// BezierView.m
+// BezierBuilder
+//
+// Created by Dave DeLong on 7/7/09.
+// Copyright 2009 __MyCompanyName__. All rights reserved.
+//
+
+#import "BezierView.h"
+
+float NSDistanceFromPointToPoint(NSPoint point1, NSPoint point2) {
+ float dx2 = (point1.x - point2.x) * (point1.x - point2.x);
+ float dy2 = (point1.y - point2.y) * (point1.y - point2.y);
+ return sqrt(dx2 + dy2);
+}
+
+@implementation BezierView
+
+@synthesize delegate;
+
+- (BOOL)acceptsFirstResponder {
+ return YES;
+}
+
+- (void) flagsChanged:(NSEvent *)event {
+ isShiftDown = (([event modifierFlags] & NSShiftKeyMask) > 0);
+}
+
+- (NSPoint) locationOfPathElementNearPoint:(NSPoint)aPoint {
+ NSBezierPath * path = [delegate path];
+ NSPoint closest = NSMakePoint(-1, -1);
+
+ int elemCount = [path elementCount];
+ float distance = FLT_MAX;
+ for (int i = 0; i < elemCount; ++i) {
+ NSPoint points[3];
+ NSBezierPathElement element = [path elementAtIndex:(elemCount - 1) associatedPoints:points];
+ float tDistance = 0;
+ switch (element) {
+ case NSCurveToBezierPathElement:
+ tDistance = NSDistanceFromPointToPoint(aPoint, points[2]);
+ NSLog(@"tDist %d,2: %f", i, tDistance);
+ if (tDistance <= distance && tDistance <= 5) {
+ distance = tDistance;
+ closest = NSMakePoint(i, 2);
+ }
+ tDistance = NSDistanceFromPointToPoint(aPoint, points[1]);
+ NSLog(@"tDist %d,1: %f", i, tDistance);
+ if (tDistance <= distance && tDistance <= 5) {
+ distance = tDistance;
+ closest = NSMakePoint(i, 1);
+ }
+ default:
+ tDistance = NSDistanceFromPointToPoint(aPoint, points[0]);
+ NSLog(@"tDist %d,0: %f", i, tDistance);
+ if (tDistance <= distance && tDistance <= 5) {
+ distance = tDistance;
+ closest = NSMakePoint(i, 0);
+ }
+ }
+ }
+ return closest;
+}
+
+- (NSPointArray) pointArrayAtPoint:(NSPoint)centerPoint {
+ NSPoint * points = malloc(3 * sizeof(NSPoint));
+ points[0] = centerPoint;
+ points[1] = NSMakePoint(MAX(centerPoint.x+20, 0), centerPoint.y);
+ points[2] = NSMakePoint(MIN(centerPoint.x-20, [self frame].size.width), centerPoint.y);
+ return points;
+}
+
+- (void)mouseDown:(NSEvent *)theEvent {
+ NSPoint event_location = [theEvent locationInWindow];
+ NSPoint local_point = [self convertPoint:event_location fromView:nil];
+ editingPoint = [self locationOfPathElementNearPoint:local_point];
+ previousPoint = local_point;
+ if (editingPoint.y <= 0 && isShiftDown) { editingPoint.y = -1; }
+ if (editingPoint.x < 0) {
+ NSPoint * points = [self pointArrayAtPoint:local_point];
+ [[self delegate] didAddPoints:points];
+ free(points);
+ //setting y to -1 means that all the control points will be dragged
+ editingPoint = NSMakePoint([[[self delegate] path] elementCount]-1, -1);
+ }
+}
+
+- (void)mouseDragged:(NSEvent *)theEvent {
+ NSPoint event_location = [theEvent locationInWindow];
+ NSPoint local_point = [self convertPoint:event_location fromView:nil];
+ [[self delegate] didChangeElementAtIndex:editingPoint byDelta:NSPointSubtractPoint(local_point, previousPoint)];
+ previousPoint = local_point;
+}
+
+- (void)mouseUp:(NSEvent *)theEvent {
+ NSPoint event_location = [theEvent locationInWindow];
+ NSPoint local_point = [self convertPoint:event_location fromView:nil];
+ [[self delegate] didChangeElementAtIndex:editingPoint byDelta:NSPointSubtractPoint(local_point, previousPoint)];
+ previousPoint = local_point;
+}
+
+- (void)drawRect:(NSRect)dirtyRect {
+ NSBezierPath * path = [delegate path];
+ [path stroke];
+
+ [[NSColor redColor] set];
+ NSBezierPath * extra = [[NSBezierPath alloc] init];
+ int elemCount = [path elementCount];
+ for (int i = 0; i < elemCount; ++i) {
+ NSPoint points[3];
+ NSBezierPathElement element = [path elementAtIndex:i associatedPoints:points];
+ NSRect rect;
+ switch (element) {
+ case NSCurveToBezierPathElement:
+ [extra moveToPoint:points[1]];
+ [extra lineToPoint:points[0]];
+ [extra lineToPoint:points[2]];
+ rect = NSMakeRect(points[1].x-2, points[1].y-2, 5, 5);
+ [extra appendBezierPathWithOvalInRect:rect];
+ rect = NSMakeRect(points[2].x-2, points[2].y-2, 5, 5);
+ [extra appendBezierPathWithOvalInRect:rect];
+ default:
+ rect = NSMakeRect(points[0].x-2, points[0].y-2, 5, 5);
+ [extra appendBezierPathWithOvalInRect:rect];
+ }
+ }
+ [extra stroke];
+ [extra release];
+}
+
+@end
16 CGPathRefCodeBuilder.h
View
@@ -0,0 +1,16 @@
+//
+// CGPathRefCodeBuilder.h
+// BezierBuilder
+//
+// Created by Dave DeLong on 2/1/11.
+// Copyright 2011 __MyCompanyName__. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import "CodeBuilder.h"
+
+@interface CGPathRefCodeBuilder : CodeBuilder {
+
+}
+
+@end
38 CGPathRefCodeBuilder.m
View
@@ -0,0 +1,38 @@
+//
+// CGPathRefCodeBuilder.m
+// BezierBuilder
+//
+// Created by Dave DeLong on 2/1/11.
+// Copyright 2011 __MyCompanyName__. All rights reserved.
+//
+
+#import "CGPathRefCodeBuilder.h"
+#import "BezierPoint.h"
+
+
+@implementation CGPathRefCodeBuilder
+
++ (NSString *) codeForBezierPoints:(NSArray *)points {
+ NSMutableArray *lines = [NSMutableArray array];
+
+ [lines addObject:@"CGMutablePathRef path = CGPathCreateMutable();"];
+ for (NSUInteger i = 0; i < [points count]; ++i) {
+ BezierPoint *point = [points objectAtIndex:i];
+ if (i == 0) {
+ [lines addObject:[NSString stringWithFormat:@"CGPathMoveToPoint(path, NULL, %f, %f);", [point mainPoint].x, [point mainPoint].y]];
+ } else {
+ [lines addObject:[NSString stringWithFormat:@"CGPathAddCurveToPoint(path, NULL, %f, %f, %f, %f, %f, %f);",
+ [point controlPoint1].x, [point controlPoint1].y,
+ [point controlPoint2].x, [point controlPoint2].y,
+ [point mainPoint].x, [point mainPoint].y]];
+ }
+ }
+
+ [lines addObject:@"CGContextAddPath(<#CGContextRef#>, path);"];
+ [lines addObject:@"CGContextStrokePath(<#CGContextRef#>);"];
+ [lines addObject:@"CFRelease(path);"];
+
+ return [lines componentsJoinedByString:@"\n"];
+}
+
+@end
19 CodeBuilder.h
View
@@ -0,0 +1,19 @@
+//
+// CodeBuilder.h
+// BezierBuilder
+//
+// Created by Dave DeLong on 2/1/11.
+// Copyright 2011 __MyCompanyName__. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+
+@interface CodeBuilder : NSObject {
+
+}
+
++ (NSString *) codeForBezierPoints:(NSArray *)points;
++ (id) objectForBezierPoints:(NSArray *)points;
+
+@end
24 CodeBuilder.m
View
@@ -0,0 +1,24 @@
+//
+// CodeBuilder.m
+// BezierBuilder
+//
+// Created by Dave DeLong on 2/1/11.
+// Copyright 2011 __MyCompanyName__. All rights reserved.
+//
+
+#import "CodeBuilder.h"
+
+
+@implementation CodeBuilder
+
++ (NSString *) codeForBezierPoints:(NSArray *)points {
+ NSLog(@"SUBCLASSES MUST OVERRIDE");
+ return nil;
+}
+
++ (id) objectForBezierPoints:(NSArray *)points {
+ NSLog(@"SUBCLASSES MUST OVERRIDE");
+ return nil;
+}
+
+@end
29 English.lproj/Credits.rtf
View
@@ -0,0 +1,29 @@
+{\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\paperw9840\paperh8400
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
+
+\f0\b\fs24 \cf0 Engineering:
+\b0 \
+ Some people\
+\
+
+\b Human Interface Design:
+\b0 \
+ Some other people\
+\
+
+\b Testing:
+\b0 \
+ Hopefully not nobody\
+\
+
+\b Documentation:
+\b0 \
+ Whoever\
+\
+
+\b With special thanks to:
+\b0 \
+ Mom\
+}
2  English.lproj/InfoPlist.strings
View
@@ -0,0 +1,2 @@
+/* Localized versions of Info.plist keys */
+
4,031 English.lproj/MainMenu.xib
View
4,031 additions, 0 deletions not shown
1,250 English.lproj/MyDocument.xib
View
@@ -0,0 +1,1250 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
+ <data>
+ <int key="IBDocument.SystemTarget">1060</int>
+ <string key="IBDocument.SystemVersion">10J567</string>
+ <string key="IBDocument.InterfaceBuilderVersion">823</string>
+ <string key="IBDocument.AppKitVersion">1038.35</string>
+ <string key="IBDocument.HIToolboxVersion">462.00</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="NS.object.0">823</string>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <integer value="100024"/>
+ </object>
+ <object class="NSArray" key="IBDocument.PluginDependencies">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ </object>
+ <object class="NSMutableDictionary" key="IBDocument.Metadata">
+ <string key="NS.key.0">PluginDependencyRecalculationVersion</string>
+ <integer value="1" key="NS.object.0"/>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.RootObjects" id="580458321">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSCustomObject" id="512844837">
+ <string key="NSClassName">MyDocument</string>
+ </object>
+ <object class="NSCustomObject" id="613418571">
+ <string key="NSClassName">FirstResponder</string>
+ </object>
+ <object class="NSWindowTemplate" id="275939982">
+ <int key="NSWindowStyleMask">15</int>
+ <int key="NSWindowBacking">2</int>
+ <string key="NSWindowRect">{{133, 130}, {828, 518}}</string>
+ <int key="NSWTFlags">1886912512</int>
+ <string key="NSWindowTitle">Window</string>
+ <string key="NSWindowClass">NSWindow</string>
+ <string key="NSViewClass">View</string>
+ <string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string>
+ <string key="NSWindowContentMinSize">{94, 86}</string>
+ <object class="NSView" key="NSWindowView" id="568628114">
+ <reference key="NSNextResponder"/>
+ <int key="NSvFlags">256</int>
+ <object class="NSMutableArray" key="NSSubviews">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSSplitView" id="781420992">
+ <reference key="NSNextResponder" ref="568628114"/>
+ <int key="NSvFlags">274</int>
+ <object class="NSMutableArray" key="NSSubviews">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSCustomView" id="286994389">
+ <reference key="NSNextResponder" ref="781420992"/>
+ <int key="NSvFlags">274</int>
+ <object class="NSMutableArray" key="NSSubviews">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSCustomView" id="1060966738">
+ <reference key="NSNextResponder" ref="286994389"/>
+ <int key="NSvFlags">274</int>
+ <string key="NSFrameSize">{566, 518}</string>
+ <reference key="NSSuperview" ref="286994389"/>
+ <string key="NSClassName">BezierView</string>
+ </object>
+ </object>
+ <string key="NSFrameSize">{566, 518}</string>
+ <reference key="NSSuperview" ref="781420992"/>
+ <string key="NSClassName">NSView</string>
+ </object>
+ <object class="NSCustomView" id="554523566">
+ <reference key="NSNextResponder" ref="781420992"/>
+ <int key="NSvFlags">274</int>
+ <object class="NSMutableArray" key="NSSubviews">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSPopUpButton" id="411251250">
+ <reference key="NSNextResponder" ref="554523566"/>
+ <int key="NSvFlags">266</int>
+ <string key="NSFrame">{{17, 474}, {218, 26}}</string>
+ <reference key="NSSuperview" ref="554523566"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSPopUpButtonCell" key="NSCell" id="928982269">
+ <int key="NSCellFlags">-2076049856</int>
+ <int key="NSCellFlags2">2048</int>
+ <object class="NSFont" key="NSSupport" id="907566353">
+ <string key="NSName">LucidaGrande</string>
+ <double key="NSSize">13</double>
+ <int key="NSfFlags">1044</int>
+ </object>
+ <reference key="NSControlView" ref="411251250"/>
+ <int key="NSButtonFlags">109199615</int>
+ <int key="NSButtonFlags2">129</int>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">400</int>
+ <int key="NSPeriodicInterval">75</int>
+ <object class="NSMenuItem" key="NSMenuItem" id="855745865">
+ <reference key="NSMenu" ref="605829154"/>
+ <string key="NSTitle">NSBezierPath</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <int key="NSState">1</int>
+ <object class="NSCustomResource" key="NSOnImage" id="36292891">
+ <string key="NSClassName">NSImage</string>
+ <string key="NSResourceName">NSMenuCheckmark</string>
+ </object>
+ <object class="NSCustomResource" key="NSMixedImage" id="915461713">
+ <string key="NSClassName">NSImage</string>
+ <string key="NSResourceName">NSMenuMixedState</string>
+ </object>
+ <string key="NSAction">_popUpItemAction:</string>
+ <reference key="NSTarget" ref="928982269"/>
+ </object>
+ <bool key="NSMenuItemRespectAlignment">YES</bool>
+ <object class="NSMenu" key="NSMenu" id="605829154">
+ <string key="NSTitle">OtherViews</string>
+ <object class="NSMutableArray" key="NSMenuItems">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="855745865"/>
+ <object class="NSMenuItem" id="1055214753">
+ <reference key="NSMenu" ref="605829154"/>
+ <string key="NSTitle">CGMutablePathRef</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="36292891"/>
+ <reference key="NSMixedImage" ref="915461713"/>
+ <string key="NSAction">_popUpItemAction:</string>
+ <reference key="NSTarget" ref="928982269"/>
+ </object>
+ </object>
+ <reference key="NSMenuFont" ref="907566353"/>
+ </object>
+ <int key="NSPreferredEdge">1</int>
+ <bool key="NSUsesItemFromMenu">YES</bool>
+ <bool key="NSAltersState">YES</bool>
+ <int key="NSArrowPosition">2</int>
+ </object>
+ </object>
+ <object class="NSScrollView" id="112933236">
+ <reference key="NSNextResponder" ref="554523566"/>
+ <int key="NSvFlags">274</int>
+ <object class="NSMutableArray" key="NSSubviews">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSClipView" id="623529941">
+ <reference key="NSNextResponder" ref="112933236"/>
+ <int key="NSvFlags">2304</int>
+ <object class="NSMutableArray" key="NSSubviews">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSTextView" id="963997078">
+ <reference key="NSNextResponder" ref="623529941"/>
+ <int key="NSvFlags">2322</int>
+ <string key="NSFrameSize">{237, 91}</string>
+ <reference key="NSSuperview" ref="623529941"/>
+ <object class="NSTextContainer" key="NSTextContainer" id="52366857">
+ <object class="NSLayoutManager" key="NSLayoutManager">
+ <object class="NSTextStorage" key="NSTextStorage">
+ <object class="NSMutableString" key="NSString">
+ <characters key="NS.bytes"/>
+ </object>
+ <nil key="NSDelegate"/>
+ </object>
+ <object class="NSMutableArray" key="NSTextContainers">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="52366857"/>
+ </object>
+ <int key="NSLMFlags">134</int>
+ <nil key="NSDelegate"/>
+ </object>
+ <reference key="NSTextView" ref="963997078"/>
+ <double key="NSWidth">237</double>
+ <int key="NSTCFlags">1</int>
+ </object>
+ <object class="NSTextViewSharedData" key="NSSharedData">
+ <int key="NSFlags">12261</int>
+ <int key="NSTextCheckingTypes">0</int>
+ <nil key="NSMarkedAttributes"/>
+ <object class="NSColor" key="NSBackgroundColor" id="464321382">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MQA</bytes>
+ </object>
+ <object class="NSDictionary" key="NSSelectedAttributes">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>NSBackgroundColor</string>
+ <string>NSColor</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSColor">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">selectedTextBackgroundColor</string>
+ <object class="NSColor" key="NSColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
+ </object>
+ </object>
+ <object class="NSColor">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">selectedTextColor</string>
+ <object class="NSColor" key="NSColor" id="41514075">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MAA</bytes>
+ </object>
+ </object>
+ </object>
+ </object>
+ <reference key="NSInsertionColor" ref="41514075"/>
+ <object class="NSDictionary" key="NSLinkAttributes">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>NSColor</string>
+ <string>NSCursor</string>
+ <string>NSUnderline</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSColor">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MCAwIDEAA</bytes>
+ </object>
+ <object class="NSCursor">
+ <string key="NSHotSpot">{8, -8}</string>
+ <int key="NSCursorType">13</int>
+ </object>
+ <integer value="1"/>
+ </object>
+ </object>
+ <nil key="NSDefaultParagraphStyle"/>
+ </object>
+ <int key="NSTVFlags">6</int>
+ <string key="NSMaxSize">{463, 1e+07}</string>
+ <string key="NSMinize">{223, 72}</string>
+ <nil key="NSDelegate"/>
+ </object>
+ </object>
+ <string key="NSFrameSize">{237, 476}</string>
+ <reference key="NSSuperview" ref="112933236"/>
+ <reference key="NSNextKeyView" ref="963997078"/>
+ <reference key="NSDocView" ref="963997078"/>
+ <reference key="NSBGColor" ref="464321382"/>
+ <object class="NSCursor" key="NSCursor">
+ <string key="NSHotSpot">{4, -5}</string>
+ <int key="NSCursorType">1</int>
+ </object>
+ <int key="NScvFlags">4</int>
+ </object>
+ <object class="NSScroller" id="431937648">
+ <reference key="NSNextResponder" ref="112933236"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{237, 0}, {15, 443}}</string>
+ <reference key="NSSuperview" ref="112933236"/>
+ <reference key="NSTarget" ref="112933236"/>
+ <string key="NSAction">_doScroller:</string>
+ <double key="NSCurValue">1</double>
+ <double key="NSPercent">0.85256409645080566</double>
+ </object>
+ <object class="NSScroller" id="970791573">
+ <reference key="NSNextResponder" ref="112933236"/>
+ <int key="NSvFlags">-2147483392</int>
+ <string key="NSFrame">{{-100, -100}, {87, 18}}</string>
+ <reference key="NSSuperview" ref="112933236"/>
+ <int key="NSsFlags">1</int>
+ <reference key="NSTarget" ref="112933236"/>
+ <string key="NSAction">_doScroller:</string>
+ <double key="NSCurValue">1</double>
+ <double key="NSPercent">0.94565218687057495</double>
+ </object>
+ </object>
+ <string key="NSFrame">{{0, -18}, {252, 476}}</string>
+ <reference key="NSSuperview" ref="554523566"/>
+ <reference key="NSNextKeyView" ref="623529941"/>
+ <int key="NSsFlags">16</int>
+ <reference key="NSVScroller" ref="431937648"/>
+ <reference key="NSHScroller" ref="970791573"/>
+ <reference key="NSContentView" ref="623529941"/>
+ </object>
+ </object>
+ <string key="NSFrame">{{576, 0}, {252, 518}}</string>
+ <reference key="NSSuperview" ref="781420992"/>
+ <string key="NSClassName">NSView</string>
+ </object>
+ </object>
+ <string key="NSFrameSize">{828, 518}</string>
+ <reference key="NSSuperview" ref="568628114"/>
+ <bool key="NSIsVertical">YES</bool>
+ <int key="NSDividerStyle">3</int>
+ </object>
+ </object>
+ <string key="NSFrameSize">{828, 518}</string>
+ <reference key="NSSuperview"/>
+ </object>
+ <string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
+ <string key="NSMinSize">{94, 108}</string>
+ <string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string>
+ </object>
+ <object class="NSCustomObject" id="796877042">
+ <string key="NSClassName">NSApplication</string>
+ </object>
+ </object>
+ <object class="IBObjectContainer" key="IBDocument.Objects">
+ <object class="NSMutableArray" key="connectionRecords">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">delegate</string>
+ <reference key="source" ref="275939982"/>
+ <reference key="destination" ref="512844837"/>
+ </object>
+ <int key="connectionID">17</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">window</string>
+ <reference key="source" ref="512844837"/>
+ <reference key="destination" ref="275939982"/>
+ </object>
+ <int key="connectionID">18</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">delegate</string>
+ <reference key="source" ref="1060966738"/>
+ <reference key="destination" ref="512844837"/>
+ </object>
+ <int key="connectionID">100030</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">bezierView</string>
+ <reference key="source" ref="512844837"/>
+ <reference key="destination" ref="1060966738"/>
+ </object>
+ <int key="connectionID">100031</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">bezierCodeView</string>
+ <reference key="source" ref="512844837"/>
+ <reference key="destination" ref="963997078"/>
+ </object>
+ <int key="connectionID">100032</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">codeOption</string>
+ <reference key="source" ref="512844837"/>
+ <reference key="destination" ref="411251250"/>
+ </object>
+ <int key="connectionID">100049</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">codeOptionChanged:</string>
+ <reference key="source" ref="512844837"/>
+ <reference key="destination" ref="411251250"/>
+ </object>
+ <int key="connectionID">100050</int>
+ </object>
+ </object>
+ <object class="IBMutableOrderedSet" key="objectRecords">
+ <object class="NSArray" key="orderedObjects">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBObjectRecord">
+ <int key="objectID">0</int>
+ <object class="NSArray" key="object" id="0">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <reference key="children" ref="580458321"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-2</int>
+ <reference key="object" ref="512844837"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">File's Owner</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-1</int>
+ <reference key="object" ref="613418571"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">First Responder</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">5</int>
+ <reference key="object" ref="275939982"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="568628114"/>
+ </object>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">Window</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">6</int>
+ <reference key="object" ref="568628114"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="781420992"/>
+ </object>
+ <reference key="parent" ref="275939982"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-3</int>
+ <reference key="object" ref="796877042"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">Application</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100022</int>
+ <reference key="object" ref="781420992"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="286994389"/>
+ <reference ref="554523566"/>
+ </object>
+ <reference key="parent" ref="568628114"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100023</int>
+ <reference key="object" ref="286994389"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="1060966738"/>
+ </object>
+ <reference key="parent" ref="781420992"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100024</int>
+ <reference key="object" ref="554523566"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="112933236"/>
+ <reference ref="411251250"/>
+ </object>
+ <reference key="parent" ref="781420992"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100029</int>
+ <reference key="object" ref="1060966738"/>
+ <reference key="parent" ref="286994389"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100025</int>
+ <reference key="object" ref="112933236"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="963997078"/>
+ <reference ref="970791573"/>
+ <reference ref="431937648"/>
+ </object>
+ <reference key="parent" ref="554523566"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100028</int>
+ <reference key="object" ref="963997078"/>
+ <reference key="parent" ref="112933236"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100027</int>
+ <reference key="object" ref="970791573"/>
+ <reference key="parent" ref="112933236"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100026</int>
+ <reference key="object" ref="431937648"/>
+ <reference key="parent" ref="112933236"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100043</int>
+ <reference key="object" ref="411251250"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="928982269"/>
+ </object>
+ <reference key="parent" ref="554523566"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100044</int>
+ <reference key="object" ref="928982269"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="605829154"/>
+ </object>
+ <reference key="parent" ref="411251250"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100045</int>
+ <reference key="object" ref="605829154"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="855745865"/>
+ <reference ref="1055214753"/>
+ </object>
+ <reference key="parent" ref="928982269"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100046</int>
+ <reference key="object" ref="855745865"/>
+ <reference key="parent" ref="605829154"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100047</int>
+ <reference key="object" ref="1055214753"/>
+ <reference key="parent" ref="605829154"/>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="flattenedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>-3.IBPluginDependency</string>
+ <string>100022.IBPluginDependency</string>
+ <string>100023.IBPluginDependency</string>
+ <string>100024.IBPluginDependency</string>
+ <string>100025.IBPluginDependency</string>
+ <string>100026.IBPluginDependency</string>
+ <string>100027.IBPluginDependency</string>
+ <string>100028.IBPluginDependency</string>
+ <string>100029.IBPluginDependency</string>
+ <string>100043.IBPluginDependency</string>
+ <string>100044.IBPluginDependency</string>
+ <string>100045.IBEditorWindowLastContentRect</string>
+ <string>100045.IBPluginDependency</string>
+ <string>100046.IBPluginDependency</string>
+ <string>100047.IBPluginDependency</string>
+ <string>5.IBEditorWindowLastContentRect</string>
+ <string>5.IBPluginDependency</string>
+ <string>5.IBWindowTemplateEditedContentRect</string>
+ <string>5.ImportedFromIB2</string>
+ <string>5.editorWindowContentRectSynchronizationRect</string>
+ <string>5.windowTemplate.hasMinSize</string>
+ <string>5.windowTemplate.minSize</string>
+ <string>6.IBPluginDependency</string>
+ <string>6.ImportedFromIB2</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>{{892, 729}, {218, 43}}</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>{{172, 168}, {828, 518}}</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>{{172, 168}, {828, 518}}</string>
+ <integer value="1"/>
+ <string>{{201, 387}, {507, 413}}</string>
+ <integer value="1"/>
+ <string>{94, 86}</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1"/>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="unlocalizedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference key="dict.sortedKeys" ref="0"/>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="activeLocalization"/>
+ <object class="NSMutableDictionary" key="localizations">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference key="dict.sortedKeys" ref="0"/>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="sourceID"/>
+ <int key="maxID">100050</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <object class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">BezierView</string>
+ <string key="superclassName">NSView</string>
+ <object class="NSMutableDictionary" key="outlets">
+ <string key="NS.key.0">delegate</string>
+ <string key="NS.object.0">id</string>
+ </object>
+ <object class="NSMutableDictionary" key="toOneOutletInfosByName">
+ <string key="NS.key.0">delegate</string>
+ <object class="IBToOneOutletInfo" key="NS.object.0">
+ <string key="name">delegate</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">BezierView.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">MyDocument</string>
+ <string key="superclassName">NSDocument</string>
+ <object class="NSMutableDictionary" key="actions">
+ <string key="NS.key.0">codeOptionChanged:</string>
+ <string key="NS.object.0">id</string>
+ </object>
+ <object class="NSMutableDictionary" key="actionInfosByName">
+ <string key="NS.key.0">codeOptionChanged:</string>
+ <object class="IBActionInfo" key="NS.object.0">
+ <string key="name">codeOptionChanged:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="outlets">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>bezierCodeView</string>
+ <string>bezierView</string>
+ <string>codeOption</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>NSTextView</string>
+ <string>BezierView</string>
+ <string>NSPopUpButton</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="toOneOutletInfosByName">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>bezierCodeView</string>
+ <string>bezierView</string>
+ <string>codeOption</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBToOneOutletInfo">
+ <string key="name">bezierCodeView</string>
+ <string key="candidateClassName">NSTextView</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">bezierView</string>
+ <string key="candidateClassName">BezierView</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">codeOption</string>
+ <string key="candidateClassName">NSPopUpButton</string>
+ </object>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">MyDocument.h</string>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSActionCell</string>
+ <string key="superclassName">NSCell</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">AppKit.framework/Headers/NSActionCell.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSApplication</string>
+ <string key="superclassName">NSResponder</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier" id="955027005">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">AppKit.framework/Headers/NSApplication.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSApplication</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier" id="379032095">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">AppKit.framework/Headers/NSApplicationScripting.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSApplication</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier" id="224483982">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">AppKit.framework/Headers/NSColorPanel.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSApplication</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">AppKit.framework/Headers/NSHelpManager.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSApplication</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">AppKit.framework/Headers/NSPageLayout.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSApplication</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">AppKit.framework/Headers/NSUserInterfaceItemSearching.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSButton</string>
+ <string key="superclassName">NSControl</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">AppKit.framework/Headers/NSButton.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSButtonCell</string>
+ <string key="superclassName">NSActionCell</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">AppKit.framework/Headers/NSButtonCell.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSCell</string>
+ <string key="superclassName">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">AppKit.framework/Headers/NSCell.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSControl</string>
+ <string key="superclassName">NSView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier" id="553328216">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">AppKit.framework/Headers/NSControl.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSDocument</string>
+ <string key="superclassName">NSObject</string>
+ <object class="NSMutableDictionary" key="actions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>printDocument:</string>
+ <string>revertDocumentToSaved:</string>
+ <string>runPageLayout:</string>
+ <string>saveDocument:</string>
+ <string>saveDocumentAs:</string>
+ <string>saveDocumentTo:</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="actionInfosByName">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>printDocument:</string>
+ <string>revertDocumentToSaved:</string>
+ <string>runPageLayout:</string>
+ <string>saveDocument:</string>
+ <string>saveDocumentAs:</string>
+ <string>saveDocumentTo:</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBActionInfo">
+ <string key="name">printDocument:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">revertDocumentToSaved:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">runPageLayout:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">saveDocument:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">saveDocumentAs:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">saveDocumentTo:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">AppKit.framework/Headers/NSDocument.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSDocument</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">AppKit.framework/Headers/NSDocumentScripting.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSFormatter</string>
+ <string key="superclassName">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSFormatter.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSMenu</string>
+ <string key="superclassName">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier" id="214861341">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">AppKit.framework/Headers/NSMenu.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSMenuItem</string>
+ <string key="superclassName">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier" id="189261149">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">AppKit.framework/Headers/NSMenuItem.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSMenuItemCell</string>
+ <string key="superclassName">NSButtonCell</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">AppKit.framework/Headers/NSMenuItemCell.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">AppKit.framework/Headers/NSAccessibility.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <reference key="sourceIdentifier" ref="955027005"/>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <reference key="sourceIdentifier" ref="379032095"/>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <reference key="sourceIdentifier" ref="224483982"/>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <reference key="sourceIdentifier" ref="553328216"/>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">AppKit.framework/Headers/NSDictionaryController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">AppKit.framework/Headers/NSDragging.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">AppKit.framework/Headers/NSFontManager.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">AppKit.framework/Headers/NSFontPanel.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">AppKit.framework/Headers/NSKeyValueBinding.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <reference key="sourceIdentifier" ref="214861341"/>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">AppKit.framework/Headers/NSNibLoading.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">AppKit.framework/Headers/NSOutlineView.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">AppKit.framework/Headers/NSPasteboard.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">AppKit.framework/Headers/NSSavePanel.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">AppKit.framework/Headers/NSTableView.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">AppKit.framework/Headers/NSToolbarItem.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier" id="16958399">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">AppKit.framework/Headers/NSView.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSArchiver.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSClassDescription.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSError.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSFileManager.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSKeyValueCoding.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSKeyValueObserving.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSKeyedArchiver.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSObject.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSObjectScripting.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSPortCoder.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSRunLoop.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSScriptClassDescription.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSScriptKeyValueCoding.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSScriptObjectSpecifiers.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSScriptWhoseTests.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSThread.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSURL.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSURLConnection.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSURLDownload.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSPopUpButton</string>
+ <string key="superclassName">NSButton</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">AppKit.framework/Headers/NSPopUpButton.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSPopUpButtonCell</string>
+ <string key="superclassName">NSMenuItemCell</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">AppKit.framework/Headers/NSPopUpButtonCell.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSResponder</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">AppKit.framework/Headers/NSInterfaceStyle.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSResponder</string>
+ <string key="superclassName">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">AppKit.framework/Headers/NSResponder.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSScrollView</string>
+ <string key="superclassName">NSView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">AppKit.framework/Headers/NSScrollView.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSScroller</string>
+ <string key="superclassName">NSControl</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">AppKit.framework/Headers/NSScroller.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSSplitView</string>
+ <string key="superclassName">NSView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">AppKit.framework/Headers/NSSplitView.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSText</string>
+ <string key="superclassName">NSView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">AppKit.framework/Headers/NSText.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSTextView</string>
+ <string key="superclassName">NSText</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">AppKit.framework/Headers/NSTextView.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">AppKit.framework/Headers/NSClipView.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSView</string>
+ <reference key="sourceIdentifier" ref="189261149"/>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">AppKit.framework/Headers/NSRulerView.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSView</string>
+ <string key="superclassName">NSResponder</string>
+ <reference key="sourceIdentifier" ref="16958399"/>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSWindow</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">AppKit.framework/Headers/NSDrawer.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSWindow</string>
+ <string key="superclassName">NSResponder</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">AppKit.framework/Headers/NSWindow.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSWindow</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">AppKit.framework/Headers/NSWindowScripting.h</string>
+ </object>
+ </object>
+ </object>
+ </object>
+ <int key="IBDocument.localizationMode">0</int>
+ <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.macosx</string>
+ <integer value="1060" key="NS.object.0"/>
+ </object>
+ <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3</string>
+ <integer value="3000" key="NS.object.0"/>
+ </object>
+ <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
+ <string key="IBDocument.LastKnownRelativeProjectPath">../BezierBuilder.xcodeproj</string>
+ <int key="IBDocument.defaultPropertyAccessControl">3</int>
+ <object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>NSMenuCheckmark</string>
+ <string>NSMenuMixedState</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>{9, 8}</string>
+ <string>{7, 2}</string>
+ </object>
+ </object>
+ </data>
+</archive>
31 MyDocument.h
View
@@ -0,0 +1,31 @@
+//
+// MyDocument.h
+// BezierBuilder
+//
+// Created by Dave DeLong on 7/7/09.
+// Copyright 2009 __MyCompanyName__. All rights reserved.
+//
+
+
+#import <Cocoa/Cocoa.h>
+
+@protocol BezierViewDelegate;
+@class BezierView;
+
+@interface MyDocument : NSDocument <BezierViewDelegate> {
+ NSMutableArray *bezierPoints;
+
+ NSBezierPath * bezierPath;
+
+ BezierView * bezierView;
+ NSTextView * bezierCodeView;
+ NSPopUpButton *codeOption;
+}
+
+@property (nonatomic, retain) IBOutlet BezierView * bezierView;
+@property (nonatomic, retain) IBOutlet NSTextView * bezierCodeView;
+@property (nonatomic, retain) IBOutlet NSPopUpButton *codeOption;
+
+- (IBAction) codeOptionChanged:(id)sender;
+
+@end
131 MyDocument.m
View
@@ -0,0 +1,131 @@
+//
+// MyDocument.m
+// BezierBuilder
+//
+// Created by Dave DeLong on 7/7/09.
+// Copyright 2009 __MyCompanyName__. All rights reserved.
+//
+
+#import "MyDocument.h"
+#import "BezierView.h"
+#import "BezierPoint.h"
+
+#import "CodeBuilder.h"
+#import "NSBezierPathCodeBuilder.h"
+#import "CGPathRefCodeBuilder.h"
+
+@implementation MyDocument
+
+@synthesize bezierView, bezierCodeView;
+@synthesize codeOption;
+
+- (void) rebuildSteps {
+
+ Class builder = [[codeOption selectedItem] representedObject];
+
+ [bezierCodeView setString:[builder codeForBezierPoints:bezierPoints]];
+}
+
+- (void) codeOptionChanged:(id)sender {
+ [self rebuildSteps];
+}
+
+- (void) didChangeElementAtIndex:(NSPoint)index byDelta:(NSPoint)point {
+ // Get the current points for the curve.
+ NSPoint points[3];
+ NSBezierPathElement element = [bezierPath elementAtIndex:index.x associatedPoints:points];
+ int elemIndex = (element == NSCurveToBezierPathElement ? (int)index.y : 0);
+ if (elemIndex >= 0) {
+ NSLog(@"%f,%f %f,%f %f,%f", points[0].x, points[0].y, points[1].x, points[1].y, points[2].x, points[2].y);
+ points[elemIndex] = NSPointAddToPoint(points[elemIndex], point);;
+ } else {
+ for (int i = 0; i < 3; ++i) {
+ points[i] = NSPointAddToPoint(points[i], point);
+ }
+ }
+
+ // Update the points.
+ [bezierPath setAssociatedPoints:points atIndex:index.x];
+ [self rebuildSteps];
+ [bezierView setNeedsDisplay:YES];
+}
+
+- (void) didAddPoints:(NSPointArray)points {
+ BezierPoint *point = [[BezierPoint alloc] init];
+ [point setMainPoint:points[0]];
+ [point setControlPoint1:points[1]];
+ [point setControlPoint2:points[2]];
+ [bezierPoints addObject:point];
+ [point release];
+
+ [self rebuildSteps];
+ [bezierView setNeedsDisplay:YES];
+}
+
+- (NSBezierPath *) path {
+ return [NSBezierPathCodeBuilder objectForBezierPoints:bezierPoints];
+}
+
+- (id)init
+{
+ self = [super init];
+ if (self) {
+ bezierPoints = [[NSMutableArray alloc] init];
+ }
+ return self;
+}
+
+- (NSString *)windowNibName
+{
+ // Override returning the nib file name of the document
+ // If you need to use a subclass of NSWindowController or if your document supports multiple NSWindowControllers, you should remove this method and override -makeWindowControllers instead.
+ return @"MyDocument";
+}
+
+- (void)windowControllerDidLoadNib:(NSWindowController *) aController
+{
+ [super windowControllerDidLoadNib:aController];
+ // Add any code here that needs to be executed once the windowController has loaded the document's window.
+
+ [codeOption removeAllItems];
+
+ [codeOption addItemWithTitle:@"NSBezierPath"];
+ NSMenuItem *item = [codeOption lastItem];
+ [item setRepresentedObject:[NSBezierPathCodeBuilder class]];
+
+ [codeOption addItemWithTitle:@"CGMutablePathRef"];
+ item = [codeOption lastItem];
+ [item setRepresentedObject:[CGPathRefCodeBuilder class]];
+
+ [codeOption selectItemAtIndex:0];
+}
+
+- (NSData *)dataOfType:(NSString *)typeName error:(NSError **)outError
+{
+ // Insert code here to write your document to data of the specified type. If the given outError != NULL, ensure that you set *outError when returning nil.
+
+ // You can also choose to override -fileWrapperOfType:error:, -writeToURL:ofType:error:, or -writeToURL:ofType:forSaveOperation:originalContentsURL:error: instead.
+
+ // For applications targeted for Panther or earlier systems, you should use the deprecated API -dataRepresentationOfType:. In this case you can also choose to override -fileWrapperRepresentationOfType: or -writeToFile:ofType: instead.
+
+ if ( outError != NULL ) {
+ *outError = [NSError errorWithDomain:NSOSStatusErrorDomain code:unimpErr userInfo:NULL];
+ }
+ return nil;
+}
+
+- (BOOL)readFromData:(NSData *)data ofType:(NSString *)typeName error:(NSError **)outError
+{
+ // Insert code here to read your document from the given data of the specified type. If the given outError != NULL, ensure that you set *outError when returning NO.
+
+ // You can also choose to override -readFromFileWrapper:ofType:error: or -readFromURL:ofType:error: instead.
+
+ // For applications targeted for Panther or earlier systems, you should use the deprecated API -loadDataRepresentation:ofType. In this case you can also choose to override -readFromFile:ofType: or -loadFileWrapperRepresentation:ofType: instead.
+
+ if ( outError != NULL ) {
+ *outError = [NSError errorWithDomain:NSOSStatusErrorDomain code:unimpErr userInfo:NULL];
+ }
+ return YES;
+}
+
+@end
16 NSBezierPathCodeBuilder.h
View
@@ -0,0 +1,16 @@
+//
+// NSBezierPathCodeBuilder.h
+// BezierBuilder
+//
+// Created by Dave DeLong on 2/1/11.
+// Copyright 2011 __MyCompanyName__. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import "CodeBuilder.h"
+
+@interface NSBezierPathCodeBuilder : CodeBuilder {
+
+}
+
+@end
52 NSBezierPathCodeBuilder.m
View
@@ -0,0 +1,52 @@
+//
+// NSBezierPathCodeBuilder.m
+// BezierBuilder
+//
+// Created by Dave DeLong on 2/1/11.
+// Copyright 2011 __MyCompanyName__. All rights reserved.
+//
+
+#import "NSBezierPathCodeBuilder.h"
+#import "BezierPoint.h"
+
+@implementation NSBezierPathCodeBuilder
+
++ (NSString *) codeForBezierPoints:(NSArray *)points {
+ NSMutableArray *lines = [NSMutableArray array];
+
+ [lines addObject:@"NSBezierPath *bp = [[NSBezierPath alloc] init];"];
+ for (NSUInteger i = 0; i < [points count]; ++i) {
+ BezierPoint *point = [points objectAtIndex:i];
+ if (i == 0) {
+ [lines addObject:[NSString stringWithFormat:@"[bp moveToPoint:NSMakePoint(%f, %f)]", [point mainPoint].x, [point mainPoint].y]];
+ } else {
+ [lines addObject:[NSString stringWithFormat:@"[bp curveToPoint:NSMakePoint(%f, %f) controlPoint1:NSMakePoint(%f, %f) controlPoint2:NSMakePoint(%f, %f)];",
+ [point mainPoint].x, [point mainPoint].y,
+ [point controlPoint1].x, [point controlPoint1].y,
+ [point controlPoint2].x, [point controlPoint2].y]];
+ }
+ }
+
+ [lines addObject:@"[bp stroke];"];
+ [lines addObject:@"[bp release];"];
+
+ return [lines componentsJoinedByString:@"\n"];
+}
+
++ (id) objectForBezierPoints:(NSArray *)points {
+ NSBezierPath *bp = [[NSBezierPath alloc] init];
+ for (NSUInteger i = 0; i < [points count]; ++i) {
+ BezierPoint *point = [points objectAtIndex:i];
+ if (i == 0) {
+ [bp moveToPoint:NSMakePoint([point mainPoint].x, [point mainPoint].y)];
+ } else {
+ [bp curveToPoint:NSMakePoint([point mainPoint].x, [point mainPoint].y)
+ controlPoint1:NSMakePoint([point controlPoint1].x, [point controlPoint1].y)
+ controlPoint2:NSMakePoint([point controlPoint2].x, [point controlPoint2].y)];
+ }
+ }
+
+ return [bp autorelease];
+}
+
+@end
14 main.m
View
@@ -0,0 +1,14 @@
+//
+// main.m
+// BezierBuilder
+//
+// Created by Dave DeLong on 7/7/09.
+// Copyright 2009 __MyCompanyName__. All rights reserved.
+//
+
+#import <Cocoa/Cocoa.h>
+
+int main(int argc, char *argv[])
+{
+ return NSApplicationMain(argc, (const char **) argv);
+}
Please sign in to comment.
Something went wrong with that request. Please try again.