From 40ccec2db2584251483fe4dc0b9cc02746aebde3 Mon Sep 17 00:00:00 2001 From: Jason Zheng Date: Thu, 7 Apr 2016 11:02:30 +0800 Subject: [PATCH] Add OutlineWithController. --- .../project.pbxproj | 286 ++++++++ .../contents.xcworkspacedata | 7 + .../OutlineWithController/AppDelegate.swift | 24 + .../AppIcon.appiconset/Contents.json | 58 ++ .../Base.lproj/MainMenu.xib | 667 ++++++++++++++++++ .../OutlineWithController/Info.plist | 34 + .../MainWindowController.swift | 15 + .../MainWindowController.xib | 29 + 8 files changed, 1120 insertions(+) create mode 100644 Outline/OutlineWithController/OutlineWithController.xcodeproj/project.pbxproj create mode 100644 Outline/OutlineWithController/OutlineWithController.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 Outline/OutlineWithController/OutlineWithController/AppDelegate.swift create mode 100644 Outline/OutlineWithController/OutlineWithController/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 Outline/OutlineWithController/OutlineWithController/Base.lproj/MainMenu.xib create mode 100644 Outline/OutlineWithController/OutlineWithController/Info.plist create mode 100644 Outline/OutlineWithController/OutlineWithController/MainWindowController.swift create mode 100644 Outline/OutlineWithController/OutlineWithController/MainWindowController.xib diff --git a/Outline/OutlineWithController/OutlineWithController.xcodeproj/project.pbxproj b/Outline/OutlineWithController/OutlineWithController.xcodeproj/project.pbxproj new file mode 100644 index 0000000..3dd05f1 --- /dev/null +++ b/Outline/OutlineWithController/OutlineWithController.xcodeproj/project.pbxproj @@ -0,0 +1,286 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 963015821CB6049F003FC212 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 963015811CB6049F003FC212 /* AppDelegate.swift */; }; + 963015841CB6049F003FC212 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 963015831CB6049F003FC212 /* Assets.xcassets */; }; + 963015871CB6049F003FC212 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 963015851CB6049F003FC212 /* MainMenu.xib */; }; + 963015901CB604B1003FC212 /* MainWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9630158E1CB604B1003FC212 /* MainWindowController.swift */; }; + 963015911CB604B1003FC212 /* MainWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9630158F1CB604B1003FC212 /* MainWindowController.xib */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 9630157E1CB6049F003FC212 /* OutlineWithController.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = OutlineWithController.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 963015811CB6049F003FC212 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 963015831CB6049F003FC212 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 963015861CB6049F003FC212 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; + 963015881CB6049F003FC212 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 9630158E1CB604B1003FC212 /* MainWindowController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainWindowController.swift; sourceTree = ""; }; + 9630158F1CB604B1003FC212 /* MainWindowController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MainWindowController.xib; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 9630157B1CB6049F003FC212 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 963015751CB6049F003FC212 = { + isa = PBXGroup; + children = ( + 963015801CB6049F003FC212 /* OutlineWithController */, + 9630157F1CB6049F003FC212 /* Products */, + ); + sourceTree = ""; + }; + 9630157F1CB6049F003FC212 /* Products */ = { + isa = PBXGroup; + children = ( + 9630157E1CB6049F003FC212 /* OutlineWithController.app */, + ); + name = Products; + sourceTree = ""; + }; + 963015801CB6049F003FC212 /* OutlineWithController */ = { + isa = PBXGroup; + children = ( + 963015811CB6049F003FC212 /* AppDelegate.swift */, + 963015831CB6049F003FC212 /* Assets.xcassets */, + 963015851CB6049F003FC212 /* MainMenu.xib */, + 963015881CB6049F003FC212 /* Info.plist */, + 9630158E1CB604B1003FC212 /* MainWindowController.swift */, + 9630158F1CB604B1003FC212 /* MainWindowController.xib */, + ); + path = OutlineWithController; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 9630157D1CB6049F003FC212 /* OutlineWithController */ = { + isa = PBXNativeTarget; + buildConfigurationList = 9630158B1CB6049F003FC212 /* Build configuration list for PBXNativeTarget "OutlineWithController" */; + buildPhases = ( + 9630157A1CB6049F003FC212 /* Sources */, + 9630157B1CB6049F003FC212 /* Frameworks */, + 9630157C1CB6049F003FC212 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = OutlineWithController; + productName = OutlineWithController; + productReference = 9630157E1CB6049F003FC212 /* OutlineWithController.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 963015761CB6049F003FC212 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0730; + LastUpgradeCheck = 0730; + ORGANIZATIONNAME = "Jason Zheng"; + TargetAttributes = { + 9630157D1CB6049F003FC212 = { + CreatedOnToolsVersion = 7.3; + }; + }; + }; + buildConfigurationList = 963015791CB6049F003FC212 /* Build configuration list for PBXProject "OutlineWithController" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 963015751CB6049F003FC212; + productRefGroup = 9630157F1CB6049F003FC212 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 9630157D1CB6049F003FC212 /* OutlineWithController */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 9630157C1CB6049F003FC212 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 963015841CB6049F003FC212 /* Assets.xcassets in Resources */, + 963015911CB604B1003FC212 /* MainWindowController.xib in Resources */, + 963015871CB6049F003FC212 /* MainMenu.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 9630157A1CB6049F003FC212 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 963015901CB604B1003FC212 /* MainWindowController.swift in Sources */, + 963015821CB6049F003FC212 /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 963015851CB6049F003FC212 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 963015861CB6049F003FC212 /* Base */, + ); + name = MainMenu.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 963015891CB6049F003FC212 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.11; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 9630158A1CB6049F003FC212 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.11; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + }; + name = Release; + }; + 9630158C1CB6049F003FC212 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = OutlineWithController/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.atjason.swift.cocoa.OutlineWithController; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 9630158D1CB6049F003FC212 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = OutlineWithController/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.atjason.swift.cocoa.OutlineWithController; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 963015791CB6049F003FC212 /* Build configuration list for PBXProject "OutlineWithController" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 963015891CB6049F003FC212 /* Debug */, + 9630158A1CB6049F003FC212 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 9630158B1CB6049F003FC212 /* Build configuration list for PBXNativeTarget "OutlineWithController" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 9630158C1CB6049F003FC212 /* Debug */, + 9630158D1CB6049F003FC212 /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; +/* End XCConfigurationList section */ + }; + rootObject = 963015761CB6049F003FC212 /* Project object */; +} diff --git a/Outline/OutlineWithController/OutlineWithController.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Outline/OutlineWithController/OutlineWithController.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..0199a14 --- /dev/null +++ b/Outline/OutlineWithController/OutlineWithController.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Outline/OutlineWithController/OutlineWithController/AppDelegate.swift b/Outline/OutlineWithController/OutlineWithController/AppDelegate.swift new file mode 100644 index 0000000..52dc94c --- /dev/null +++ b/Outline/OutlineWithController/OutlineWithController/AppDelegate.swift @@ -0,0 +1,24 @@ +// +// AppDelegate.swift +// OutlineWithController +// +// Created by Jason Zheng on 4/7/16. +// Copyright © 2016 Jason Zheng. All rights reserved. +// + +import Cocoa + +@NSApplicationMain +class AppDelegate: NSObject, NSApplicationDelegate { + + var mainWindowController: MainWindowController? + + func applicationDidFinishLaunching(aNotification: NSNotification) { + + let mainWindowController = MainWindowController() + mainWindowController.showWindow(self) + + self.mainWindowController = mainWindowController + } +} + diff --git a/Outline/OutlineWithController/OutlineWithController/Assets.xcassets/AppIcon.appiconset/Contents.json b/Outline/OutlineWithController/OutlineWithController/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..2db2b1c --- /dev/null +++ b/Outline/OutlineWithController/OutlineWithController/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,58 @@ +{ + "images" : [ + { + "idiom" : "mac", + "size" : "16x16", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "16x16", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "32x32", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "32x32", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "128x128", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "128x128", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "256x256", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "256x256", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "512x512", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "512x512", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Outline/OutlineWithController/OutlineWithController/Base.lproj/MainMenu.xib b/Outline/OutlineWithController/OutlineWithController/Base.lproj/MainMenu.xib new file mode 100644 index 0000000..b0d448b --- /dev/null +++ b/Outline/OutlineWithController/OutlineWithController/Base.lproj/MainMenu.xib @@ -0,0 +1,667 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Outline/OutlineWithController/OutlineWithController/Info.plist b/Outline/OutlineWithController/OutlineWithController/Info.plist new file mode 100644 index 0000000..c8f08ce --- /dev/null +++ b/Outline/OutlineWithController/OutlineWithController/Info.plist @@ -0,0 +1,34 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSMinimumSystemVersion + $(MACOSX_DEPLOYMENT_TARGET) + NSHumanReadableCopyright + Copyright © 2016 Jason Zheng. All rights reserved. + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/Outline/OutlineWithController/OutlineWithController/MainWindowController.swift b/Outline/OutlineWithController/OutlineWithController/MainWindowController.swift new file mode 100644 index 0000000..69cd549 --- /dev/null +++ b/Outline/OutlineWithController/OutlineWithController/MainWindowController.swift @@ -0,0 +1,15 @@ +// +// MainWindowController.swift +// OutlineWithController +// +// Created by Jason Zheng on 4/7/16. +// Copyright © 2016 Jason Zheng. All rights reserved. +// + +import Cocoa + +class MainWindowController: NSWindowController { + override var windowNibName: String? { + return "MainWindowController" + } +} diff --git a/Outline/OutlineWithController/OutlineWithController/MainWindowController.xib b/Outline/OutlineWithController/OutlineWithController/MainWindowController.xib new file mode 100644 index 0000000..ba2ee66 --- /dev/null +++ b/Outline/OutlineWithController/OutlineWithController/MainWindowController.xib @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +