Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added: Demo project.

  • Loading branch information...
commit adfa226fc14a4e32c8a64df067b210a529c3d020 1 parent ea4f8bb
@shpakovski authored
View
17 .gitignore
@@ -0,0 +1,17 @@
+# Xcode
+build/*
+*.pbxuser
+!default.pbxuser
+*.mode1v3
+!default.mode1v3
+*.mode2v3
+!default.mode2v3
+*.perspectivev3
+!default.perspectivev3
+*.xcworkspace
+!default.xcworkspace
+xcuserdata
+profile
+*.moved-aside
+# Finder
+.DS_Store
View
309 Demo/Demo.xcodeproj/project.pbxproj
@@ -0,0 +1,309 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 2E8B1C511361CCEB002B7CD7 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2E8B1C501361CCEB002B7CD7 /* Cocoa.framework */; };
+ 2E8B1C5E1361CCEB002B7CD7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 2E8B1C5D1361CCEB002B7CD7 /* main.m */; };
+ 2E8B1C641361CCEB002B7CD7 /* DemoAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 2E8B1C631361CCEB002B7CD7 /* DemoAppDelegate.m */; };
+ 2E8B1C671361CCEC002B7CD7 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2E8B1C651361CCEC002B7CD7 /* MainMenu.xib */; };
+ 2E8B1C7A1361CED9002B7CD7 /* MASPreferencesWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2E8B1C791361CED9002B7CD7 /* MASPreferencesWindowController.m */; };
+ 2E8B1C7E1361D014002B7CD7 /* MASPreferencesWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2E8B1C7D1361D014002B7CD7 /* MASPreferencesWindow.xib */; };
+ 2E8B1C811361D16A002B7CD7 /* GeneralPreferencesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2E8B1C801361D16A002B7CD7 /* GeneralPreferencesViewController.m */; };
+ 2E8B1C841361D254002B7CD7 /* AdvancedPreferencesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2E8B1C831361D254002B7CD7 /* AdvancedPreferencesViewController.m */; };
+ 2E8B1C871361D2EC002B7CD7 /* AdvancedPreferencesView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2E8B1C851361D2EC002B7CD7 /* AdvancedPreferencesView.xib */; };
+ 2E8B1C881361D2EC002B7CD7 /* GeneralPreferencesView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2E8B1C861361D2EC002B7CD7 /* GeneralPreferencesView.xib */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ 2E8B1C4C1361CCEB002B7CD7 /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 2E8B1C501361CCEB002B7CD7 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
+ 2E8B1C531361CCEB002B7CD7 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
+ 2E8B1C541361CCEB002B7CD7 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
+ 2E8B1C551361CCEB002B7CD7 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ 2E8B1C581361CCEB002B7CD7 /* Demo-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Demo-Info.plist"; sourceTree = "<group>"; };
+ 2E8B1C5C1361CCEB002B7CD7 /* Demo-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Demo-Prefix.pch"; sourceTree = "<group>"; };
+ 2E8B1C5D1361CCEB002B7CD7 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+ 2E8B1C621361CCEB002B7CD7 /* DemoAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DemoAppDelegate.h; sourceTree = "<group>"; };
+ 2E8B1C631361CCEB002B7CD7 /* DemoAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DemoAppDelegate.m; sourceTree = "<group>"; };
+ 2E8B1C661361CCEC002B7CD7 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = "<group>"; };
+ 2E8B1C771361CED9002B7CD7 /* MASPreferencesViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MASPreferencesViewController.h; sourceTree = "<group>"; };
+ 2E8B1C781361CED9002B7CD7 /* MASPreferencesWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MASPreferencesWindowController.h; sourceTree = "<group>"; };
+ 2E8B1C791361CED9002B7CD7 /* MASPreferencesWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MASPreferencesWindowController.m; sourceTree = "<group>"; };
+ 2E8B1C7D1361D014002B7CD7 /* MASPreferencesWindow.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MASPreferencesWindow.xib; sourceTree = "<group>"; };
+ 2E8B1C7F1361D16A002B7CD7 /* GeneralPreferencesViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GeneralPreferencesViewController.h; sourceTree = "<group>"; };
+ 2E8B1C801361D16A002B7CD7 /* GeneralPreferencesViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneralPreferencesViewController.m; sourceTree = "<group>"; };
+ 2E8B1C821361D254002B7CD7 /* AdvancedPreferencesViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdvancedPreferencesViewController.h; sourceTree = "<group>"; };
+ 2E8B1C831361D254002B7CD7 /* AdvancedPreferencesViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdvancedPreferencesViewController.m; sourceTree = "<group>"; };
+ 2E8B1C851361D2EC002B7CD7 /* AdvancedPreferencesView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = AdvancedPreferencesView.xib; sourceTree = "<group>"; };
+ 2E8B1C861361D2EC002B7CD7 /* GeneralPreferencesView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = GeneralPreferencesView.xib; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 2E8B1C491361CCEB002B7CD7 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 2E8B1C511361CCEB002B7CD7 /* Cocoa.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 2E8B1C411361CCEB002B7CD7 = {
+ isa = PBXGroup;
+ children = (
+ 2E8B1C6D1361CCFC002B7CD7 /* Shared */,
+ 2E8B1C561361CCEB002B7CD7 /* Demo */,
+ 2E8B1C4F1361CCEB002B7CD7 /* Frameworks */,
+ 2E8B1C4D1361CCEB002B7CD7 /* Products */,
+ );
+ sourceTree = "<group>";
+ };
+ 2E8B1C4D1361CCEB002B7CD7 /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 2E8B1C4C1361CCEB002B7CD7 /* Demo.app */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 2E8B1C4F1361CCEB002B7CD7 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 2E8B1C501361CCEB002B7CD7 /* Cocoa.framework */,
+ 2E8B1C521361CCEB002B7CD7 /* Other Frameworks */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ 2E8B1C521361CCEB002B7CD7 /* Other Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 2E8B1C531361CCEB002B7CD7 /* AppKit.framework */,
+ 2E8B1C541361CCEB002B7CD7 /* CoreData.framework */,
+ 2E8B1C551361CCEB002B7CD7 /* Foundation.framework */,
+ );
+ name = "Other Frameworks";
+ sourceTree = "<group>";
+ };
+ 2E8B1C561361CCEB002B7CD7 /* Demo */ = {
+ isa = PBXGroup;
+ children = (
+ 2E8B1C891361D301002B7CD7 /* Preferences */,
+ 2E8B1C621361CCEB002B7CD7 /* DemoAppDelegate.h */,
+ 2E8B1C631361CCEB002B7CD7 /* DemoAppDelegate.m */,
+ 2E8B1C651361CCEC002B7CD7 /* MainMenu.xib */,
+ 2E8B1C571361CCEB002B7CD7 /* Supporting Files */,
+ );
+ path = Demo;
+ sourceTree = "<group>";
+ };
+ 2E8B1C571361CCEB002B7CD7 /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ 2E8B1C581361CCEB002B7CD7 /* Demo-Info.plist */,
+ 2E8B1C5C1361CCEB002B7CD7 /* Demo-Prefix.pch */,
+ 2E8B1C5D1361CCEB002B7CD7 /* main.m */,
+ );
+ name = "Supporting Files";
+ sourceTree = "<group>";
+ };
+ 2E8B1C6D1361CCFC002B7CD7 /* Shared */ = {
+ isa = PBXGroup;
+ children = (
+ 2E8B1C7D1361D014002B7CD7 /* MASPreferencesWindow.xib */,
+ 2E8B1C771361CED9002B7CD7 /* MASPreferencesViewController.h */,
+ 2E8B1C781361CED9002B7CD7 /* MASPreferencesWindowController.h */,
+ 2E8B1C791361CED9002B7CD7 /* MASPreferencesWindowController.m */,
+ );
+ path = Shared;
+ sourceTree = "<group>";
+ };
+ 2E8B1C891361D301002B7CD7 /* Preferences */ = {
+ isa = PBXGroup;
+ children = (
+ 2E8B1C7F1361D16A002B7CD7 /* GeneralPreferencesViewController.h */,
+ 2E8B1C801361D16A002B7CD7 /* GeneralPreferencesViewController.m */,
+ 2E8B1C861361D2EC002B7CD7 /* GeneralPreferencesView.xib */,
+ 2E8B1C821361D254002B7CD7 /* AdvancedPreferencesViewController.h */,
+ 2E8B1C831361D254002B7CD7 /* AdvancedPreferencesViewController.m */,
+ 2E8B1C851361D2EC002B7CD7 /* AdvancedPreferencesView.xib */,
+ );
+ name = Preferences;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 2E8B1C4B1361CCEB002B7CD7 /* Demo */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 2E8B1C6A1361CCEC002B7CD7 /* Build configuration list for PBXNativeTarget "Demo" */;
+ buildPhases = (
+ 2E8B1C481361CCEB002B7CD7 /* Sources */,
+ 2E8B1C491361CCEB002B7CD7 /* Frameworks */,
+ 2E8B1C4A1361CCEB002B7CD7 /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = Demo;
+ productName = Demo;
+ productReference = 2E8B1C4C1361CCEB002B7CD7 /* Demo.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 2E8B1C431361CCEB002B7CD7 /* Project object */ = {
+ isa = PBXProject;
+ buildConfigurationList = 2E8B1C461361CCEB002B7CD7 /* Build configuration list for PBXProject "Demo" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ );
+ mainGroup = 2E8B1C411361CCEB002B7CD7;
+ productRefGroup = 2E8B1C4D1361CCEB002B7CD7 /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 2E8B1C4B1361CCEB002B7CD7 /* Demo */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 2E8B1C4A1361CCEB002B7CD7 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 2E8B1C671361CCEC002B7CD7 /* MainMenu.xib in Resources */,
+ 2E8B1C7E1361D014002B7CD7 /* MASPreferencesWindow.xib in Resources */,
+ 2E8B1C871361D2EC002B7CD7 /* AdvancedPreferencesView.xib in Resources */,
+ 2E8B1C881361D2EC002B7CD7 /* GeneralPreferencesView.xib in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 2E8B1C481361CCEB002B7CD7 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 2E8B1C5E1361CCEB002B7CD7 /* main.m in Sources */,
+ 2E8B1C641361CCEB002B7CD7 /* DemoAppDelegate.m in Sources */,
+ 2E8B1C7A1361CED9002B7CD7 /* MASPreferencesWindowController.m in Sources */,
+ 2E8B1C811361D16A002B7CD7 /* GeneralPreferencesViewController.m in Sources */,
+ 2E8B1C841361D254002B7CD7 /* AdvancedPreferencesViewController.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+ 2E8B1C651361CCEC002B7CD7 /* MainMenu.xib */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 2E8B1C661361CCEC002B7CD7 /* en */,
+ );
+ name = MainMenu.xib;
+ sourceTree = "<group>";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ 2E8B1C681361CCEC002B7CD7 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = DEBUG;
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 10.6;
+ ONLY_ACTIVE_ARCH = YES;
+ SDKROOT = macosx;
+ };
+ name = Debug;
+ };
+ 2E8B1C691361CCEC002B7CD7 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 10.6;
+ SDKROOT = macosx;
+ };
+ name = Release;
+ };
+ 2E8B1C6B1361CCEC002B7CD7 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "Demo/Demo-Prefix.pch";
+ INFOPLIST_FILE = "Demo/Demo-Info.plist";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Debug;
+ };
+ 2E8B1C6C1361CCEC002B7CD7 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ COPY_PHASE_STRIP = YES;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "Demo/Demo-Prefix.pch";
+ INFOPLIST_FILE = "Demo/Demo-Info.plist";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 2E8B1C461361CCEB002B7CD7 /* Build configuration list for PBXProject "Demo" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 2E8B1C681361CCEC002B7CD7 /* Debug */,
+ 2E8B1C691361CCEC002B7CD7 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 2E8B1C6A1361CCEC002B7CD7 /* Build configuration list for PBXNativeTarget "Demo" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 2E8B1C6B1361CCEC002B7CD7 /* Debug */,
+ 2E8B1C6C1361CCEC002B7CD7 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 2E8B1C431361CCEB002B7CD7 /* Project object */;
+}
View
412 Demo/Demo/AdvancedPreferencesView.xib
@@ -0,0 +1,412 @@
+<?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">10J869</string>
+ <string key="IBDocument.InterfaceBuilderVersion">1306</string>
+ <string key="IBDocument.AppKitVersion">1038.35</string>
+ <string key="IBDocument.HIToolboxVersion">461.00</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="NS.object.0">1306</string>
+ </object>
+ <object class="NSArray" key="IBDocument.IntegratedClassDependencies">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>NSCustomView</string>
+ <string>NSButtonCell</string>
+ <string>NSMatrix</string>
+ <string>NSCustomObject</string>
+ </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">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys" id="0">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <reference key="dict.values" ref="0"/>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSCustomObject" id="1001">
+ <string key="NSClassName">AdvancedPreferencesViewController</string>
+ </object>
+ <object class="NSCustomObject" id="1003">
+ <string key="NSClassName">FirstResponder</string>
+ </object>
+ <object class="NSCustomObject" id="1004">
+ <string key="NSClassName">NSApplication</string>
+ </object>
+ <object class="NSCustomView" id="1005">
+ <reference key="NSNextResponder"/>
+ <int key="NSvFlags">268</int>
+ <object class="NSMutableArray" key="NSSubviews">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMatrix" id="1020484211">
+ <reference key="NSNextResponder" ref="1005"/>
+ <int key="NSvFlags">268</int>
+ <string key="NSFrame">{{141, 71}, {78, 38}}</string>
+ <reference key="NSSuperview" ref="1005"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView"/>
+ <bool key="NSEnabled">YES</bool>
+ <int key="NSNumRows">2</int>
+ <int key="NSNumCols">1</int>
+ <object class="NSMutableArray" key="NSCells">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSButtonCell" id="526323150">
+ <int key="NSCellFlags">-2080244224</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">Option 1</string>
+ <object class="NSFont" key="NSSupport" id="238513504">
+ <string key="NSName">LucidaGrande</string>
+ <double key="NSSize">13</double>
+ <int key="NSfFlags">1044</int>
+ </object>
+ <reference key="NSControlView" ref="1020484211"/>
+ <int key="NSTag">1</int>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">0</int>
+ <object class="NSButtonImageSource" key="NSAlternateImage" id="700253826">
+ <string key="NSImageName">NSRadioButton</string>
+ </object>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ <object class="NSButtonCell" id="34491905">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">Option 2</string>
+ <reference key="NSSupport" ref="238513504"/>
+ <reference key="NSControlView" ref="1020484211"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">0</int>
+ <object class="NSImage" key="NSNormalImage">
+ <int key="NSImageFlags">549453824</int>
+ <string key="NSSize">{18, 18}</string>
+ <object class="NSMutableArray" key="NSReps">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <integer value="0"/>
+ <object class="NSBitmapImageRep">
+ <object class="NSData" key="NSTIFFRepresentation">
+ <bytes key="NS.bytes">TU0AKgAABRgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAADwRERGLJycnySsrK/A1NTXw
+IyMjyRwcHIsJCQk8AAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFRUVdVBQUOCoqKj/
+29vb//n5+f/6+vr/2tra/6qqqv9UVFTgHx8fdQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUZGRl5
+dXV198PDw//8/Pz////////////////////////////U1NT/fHx89yUlJXkAAAAFAAAAAAAAAAAAAAAA
+AAAAAxEREUZqamrmtbW1/+3t7f/+/v7//v7+//7+/v/9/f3//f39//39/f/39/f/xMTE/3d3d+YZGRlG
+AAAAAwAAAAAAAAAAAAAACkJCQqGtra3/xsbG/+vr6//y8vL/9fX1//X19f/z8/P/9fX1//Ly8v/u7u7/
+0tLS/6+vr/9KSkqhAAAACgAAAAAAAAAAAAAAF3h4eN2/v7//z8/P/93d3f/q6ur/7+/v/+/v7//w8PD/
+7e3t/+3t7f/i4uL/zs7O/8XFxf98fHzdAAAAFwAAAAAAAAADAAAAJKSkpPjOzs7/2dnZ/+Dg4P/i4uL/
+5eXl/+bm5v/n5+f/5eXl/+Li4v/e3t7/2tra/9DQ0P+srKz4AAAAJAAAAAMAAAADAAAALrCwsPrW1tb/
+3t7e/+Tk5P/p6en/6+vr/+zs7P/p6en/6+vr/+fn5//k5OT/4ODg/9nZ2f+zs7P6AAAALgAAAAMAAAAD
+AAAALp2dnezg4OD/5eXl/+rq6v/u7u7/8PDw//Dw8P/x8fH/8PDw/+7u7v/q6ur/5ubm/+Hh4f+ZmZns
+AAAALgAAAAMAAAADAAAAJG5ubs/l5eX/6enp/+/v7//y8vL/9vb2//r6+v/5+fn/9/f3//b29v/x8fH/
+6+vr/+Tk5P9ra2vPAAAAJAAAAAMAAAAAAAAAFy4uLpPCwsL67Ozs//Pz8//5+fn//v7+//7+/v/+/v7/
+/v7+//v7+//19fX/8PDw/8LCwvosLCyTAAAAFwAAAAAAAAAAAAAACgAAAENfX1/S5OTk/vn5+f/+/v7/
+///////////////////////////8/Pz/5ubm/l9fX9IAAABDAAAACgAAAAAAAAAAAAAAAwAAABcAAABl
+YmJi3NLS0v3////////////////////////////////V1dX9ZGRk3AAAAGUAAAAXAAAAAwAAAAAAAAAA
+AAAAAAAAAAUAAAAfAAAAZTMzM8KAg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Jx/nfSfaqDholqj1aVRps+oTqnOq1Gs1K2Xrlqv4LFp
+svK0frYLt5m5Kbnxurq8Tb3hv3fBDsHawqfEQcUPxd3He8hKyRnKusuKzFvN/87Rz6PQdtFK0vHTxtSb
+1kXXG9fx2MjZn9tO3Cbc/93Y3rHfiuBk4hni9ePQ5KzliOZk50HoH+j86drqueuX7HbtVu427xbv9/DX
+8bnymvN89F/1QvYl9wj37PjQ+bX6mvt//GX9S/4x//8AAGRlc2MAAAAAAAAACkNvbG9yIExDRAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAABIAAAAcAEMAbwBsAG8AcgAgAEwAQwBE
+AABtbW9kAAAAAAAABhAAAJxOAAAAAL5zkQAAAAAAAAAAAAAAAAAAAAAAdGV4dAAAAABDb3B5cmlnaHQg
+QXBwbGUgQ29tcHV0ZXIsIEluYy4sIDIwMDUAAAAAA</bytes>
+ </object>
+ </object>
+ </object>
+ </object>
+ <object class="NSColor" key="NSColor" id="550723081">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MCAwAA</bytes>
+ </object>
+ </object>
+ <reference key="NSAlternateImage" ref="700253826"/>
+ <int key="NSPeriodicDelay">400</int>
+ <int key="NSPeriodicInterval">75</int>
+ </object>
+ </object>
+ <string key="NSCellSize">{78, 18}</string>
+ <string key="NSIntercellSpacing">{4, 2}</string>
+ <int key="NSMatrixFlags">1151868928</int>
+ <string key="NSCellClass">NSActionCell</string>
+ <object class="NSButtonCell" key="NSProtoCell" id="1050348696">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">Radio</string>
+ <reference key="NSSupport" ref="238513504"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">0</int>
+ <object class="NSImage" key="NSNormalImage">
+ <int key="NSImageFlags">549453824</int>
+ <string key="NSSize">{18, 18}</string>
+ <object class="NSMutableArray" key="NSReps">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <integer value="0"/>
+ <object class="NSBitmapImageRep">
+ <object class="NSData" key="NSTIFFRepresentation">
+ <bytes key="NS.bytes">TU0AKgAABRgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAADwRERGLJycnySsrK/A1NTXw
+IyMjyRwcHIsJCQk8AAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFRUVdVBQUOCoqKj/
+29vb//n5+f/6+vr/2tra/6qqqv9UVFTgHx8fdQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUZGRl5
+dXV198PDw//8/Pz////////////////////////////U1NT/fHx89yUlJXkAAAAFAAAAAAAAAAAAAAAA
+AAAAAxEREUZqamrmtbW1/+3t7f/+/v7//v7+//7+/v/9/f3//f39//39/f/39/f/xMTE/3d3d+YZGRlG
+AAAAAwAAAAAAAAAAAAAACkJCQqGtra3/xsbG/+vr6//y8vL/9fX1//X19f/z8/P/9fX1//Ly8v/u7u7/
+0tLS/6+vr/9KSkqhAAAACgAAAAAAAAAAAAAAF3h4eN2/v7//z8/P/93d3f/q6ur/7+/v/+/v7//w8PD/
+7e3t/+3t7f/i4uL/zs7O/8XFxf98fHzdAAAAFwAAAAAAAAADAAAAJKSkpPjOzs7/2dnZ/+Dg4P/i4uL/
+5eXl/+bm5v/n5+f/5eXl/+Li4v/e3t7/2tra/9DQ0P+srKz4AAAAJAAAAAMAAAADAAAALrCwsPrW1tb/
+3t7e/+Tk5P/p6en/6+vr/+zs7P/p6en/6+vr/+fn5//k5OT/4ODg/9nZ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AEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
+ </object>
+ </object>
+ </object>
+ </object>
+ <reference key="NSColor" ref="550723081"/>
+ </object>
+ <reference key="NSAlternateImage" ref="700253826"/>
+ <int key="NSPeriodicDelay">400</int>
+ <int key="NSPeriodicInterval">75</int>
+ </object>
+ <reference key="NSSelectedCell" ref="526323150"/>
+ <object class="NSColor" key="NSBackgroundColor">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">controlColor</string>
+ <object class="NSColor" key="NSColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
+ </object>
+ </object>
+ <object class="NSColor" key="NSCellBackgroundColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MQA</bytes>
+ </object>
+ <reference key="NSFont" ref="238513504"/>
+ </object>
+ </object>
+ <string key="NSFrameSize">{360, 180}</string>
+ <reference key="NSSuperview"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="1020484211"/>
+ <string key="NSClassName">NSView</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">view</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="1005"/>
+ </object>
+ <int key="connectionID">11</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>
+ <reference key="object" ref="0"/>
+ <reference key="children" ref="1000"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-2</int>
+ <reference key="object" ref="1001"/>
+ <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="1003"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">First Responder</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-3</int>
+ <reference key="object" ref="1004"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">Application</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">1</int>
+ <reference key="object" ref="1005"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="1020484211"/>
+ </object>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">63</int>
+ <reference key="object" ref="1020484211"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="1050348696"/>
+ <reference ref="526323150"/>
+ <reference ref="34491905"/>
+ </object>
+ <reference key="parent" ref="1005"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">64</int>
+ <reference key="object" ref="1050348696"/>
+ <reference key="parent" ref="1020484211"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">65</int>
+ <reference key="object" ref="526323150"/>
+ <reference key="parent" ref="1020484211"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">66</int>
+ <reference key="object" ref="34491905"/>
+ <reference key="parent" ref="1020484211"/>
+ </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>1.IBEditorWindowLastContentRect</string>
+ <string>1.IBPluginDependency</string>
+ <string>1.IBUserGuides</string>
+ <string>1.WindowOrigin</string>
+ <string>1.editorWindowContentRectSynchronizationRect</string>
+ <string>63.IBPluginDependency</string>
+ <string>64.IBPluginDependency</string>
+ <string>65.IBPluginDependency</string>
+ <string>66.IBPluginDependency</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>{{341, 676}, {360, 180}}</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="0"/>
+ <string>{628, 654}</string>
+ <string>{{217, 442}, {480, 272}}</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>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="unlocalizedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference key="dict.sortedKeys" ref="0"/>
+ <reference key="dict.values" ref="0"/>
+ </object>
+ <nil key="activeLocalization"/>
+ <object class="NSMutableDictionary" key="localizations">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference key="dict.sortedKeys" ref="0"/>
+ <reference key="dict.values" ref="0"/>
+ </object>
+ <nil key="sourceID"/>
+ <int key="maxID">66</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <object class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">AdvancedPreferencesViewController</string>
+ <string key="superclassName">NSViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">./Classes/AdvancedPreferencesViewController.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>
+ <int key="IBDocument.defaultPropertyAccessControl">3</int>
+ </data>
+</archive>
View
11 Demo/Demo/AdvancedPreferencesViewController.h
@@ -0,0 +1,11 @@
+//
+// AdvancedPreferencesViewController.h
+//
+// Created by Vadim Shpakovski on 4/22/11.
+// Copyright 2011 Shpakovski. All rights reserved.
+//
+
+#import "MASPreferencesViewController.h"
+
+@interface AdvancedPreferencesViewController : NSViewController <MASPreferencesViewController>
+@end
View
35 Demo/Demo/AdvancedPreferencesViewController.m
@@ -0,0 +1,35 @@
+//
+// AdvancedPreferencesViewController.m
+//
+// Created by Vadim Shpakovski on 4/22/11.
+// Copyright 2011 Shpakovski. All rights reserved.
+//
+
+#import "AdvancedPreferencesViewController.h"
+
+@implementation AdvancedPreferencesViewController
+
+- (id)init
+{
+ return [super initWithNibName:@"AdvancedPreferencesView" bundle:nil];
+}
+
+#pragma mark -
+#pragma mark MASPreferencesViewController
+
+- (NSString *)toolbarItemIdentifier
+{
+ return @"AdvancedPreferences";
+}
+
+- (NSImage *)toolbarItemImage
+{
+ return [NSImage imageNamed:NSImageNameAdvanced];
+}
+
+- (NSString *)toolbarItemLabel
+{
+ return NSLocalizedString(@"Advanced", @"Toolbar item name for the Advanced preference pane");
+}
+
+@end
View
44 Demo/Demo/Demo-Info.plist
@@ -0,0 +1,44 @@
+<?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>en</string>
+ <key>CFBundleDocumentTypes</key>
+ <array/>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIconFile</key>
+ <string></string>
+ <key>CFBundleIdentifier</key>
+ <string>com.shpakovski.mac.${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>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleURLTypes</key>
+ <array/>
+ <key>CFBundleVersion</key>
+ <string>1</string>
+ <key>LSMinimumSystemVersion</key>
+ <string>${MACOSX_DEPLOYMENT_TARGET}</string>
+ <key>NSHumanReadableCopyright</key>
+ <string>Copyright © 2001 Shpakovski</string>
+ <key>NSMainNibFile</key>
+ <string>MainMenu</string>
+ <key>NSPrincipalClass</key>
+ <string>NSApplication</string>
+ <key>NSServices</key>
+ <array/>
+ <key>UTExportedTypeDeclarations</key>
+ <array/>
+ <key>UTImportedTypeDeclarations</key>
+ <array/>
+</dict>
+</plist>
View
7 Demo/Demo/Demo-Prefix.pch
@@ -0,0 +1,7 @@
+//
+// Prefix header for all source files of the 'Demo' target in the 'Demo' project
+//
+
+#ifdef __OBJC__
+ #import <Cocoa/Cocoa.h>
+#endif
View
21 Demo/Demo/DemoAppDelegate.h
@@ -0,0 +1,21 @@
+//
+// DemoAppDelegate.h
+//
+// Created by Vadim Shpakovski on 4/22/11.
+// Copyright 2011 Shpakovski. All rights reserved.
+//
+
+@interface DemoAppDelegate : NSObject <NSApplicationDelegate>
+{
+@private
+
+ NSWindow *_window;
+ NSWindowController *_preferencesWindowController;
+}
+
+@property (nonatomic, assign) IBOutlet NSWindow *window;
+@property (nonatomic, readonly) NSWindowController *preferencesWindowController;
+
+- (IBAction)openPreferences:(id)sender;
+
+@end
View
58 Demo/Demo/DemoAppDelegate.m
@@ -0,0 +1,58 @@
+//
+// DemoAppDelegate.m
+//
+// Created by Vadim Shpakovski on 4/22/11.
+// Copyright 2011 Shpakovski. All rights reserved.
+//
+
+#import "DemoAppDelegate.h"
+#import "MASPreferencesWindowController.h"
+#import "GeneralPreferencesViewController.h"
+#import "AdvancedPreferencesViewController.h"
+
+@implementation DemoAppDelegate
+
+@synthesize window = _window;
+
+#pragma mark -
+
+- (void)dealloc
+{
+ [_preferencesWindowController release];
+ [super dealloc];
+}
+
+#pragma mark - NSApplicationDelegate
+
+- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender
+{
+ return YES;
+}
+
+#pragma mark - Public accessors
+
+- (NSWindowController *)preferencesWindowController
+{
+ if (_preferencesWindowController == nil)
+ {
+ NSViewController *generalViewController = [[GeneralPreferencesViewController alloc] init];
+ NSViewController *advancedViewController = [[AdvancedPreferencesViewController alloc] init];
+ NSArray *controllers = [[NSArray alloc] initWithObjects:generalViewController, advancedViewController, nil];
+ [generalViewController release];
+ [advancedViewController release];
+
+ NSString *title = NSLocalizedString(@"Preferences", @"Common title for Preferences window");
+ _preferencesWindowController = [[MASPreferencesWindowController alloc] initWithViewControllers:controllers title:title];
+ [controllers release];
+ }
+ return _preferencesWindowController;
+}
+
+#pragma mark - Actions
+
+- (IBAction)openPreferences:(id)sender
+{
+ [self.preferencesWindowController showWindow:nil];
+}
+
+@end
View
219 Demo/Demo/GeneralPreferencesView.xib
@@ -0,0 +1,219 @@
+<?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">10J869</string>
+ <string key="IBDocument.InterfaceBuilderVersion">1306</string>
+ <string key="IBDocument.AppKitVersion">1038.35</string>
+ <string key="IBDocument.HIToolboxVersion">461.00</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="NS.object.0">1306</string>
+ </object>
+ <object class="NSArray" key="IBDocument.IntegratedClassDependencies">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>NSCustomView</string>
+ <string>NSButtonCell</string>
+ <string>NSButton</string>
+ <string>NSCustomObject</string>
+ </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">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys" id="0">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <reference key="dict.values" ref="0"/>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSCustomObject" id="1001">
+ <string key="NSClassName">GeneralPreferencesViewController</string>
+ </object>
+ <object class="NSCustomObject" id="1003">
+ <string key="NSClassName">FirstResponder</string>
+ </object>
+ <object class="NSCustomObject" id="1004">
+ <string key="NSClassName">NSApplication</string>
+ </object>
+ <object class="NSCustomView" id="1005">
+ <reference key="NSNextResponder"/>
+ <int key="NSvFlags">268</int>
+ <object class="NSMutableArray" key="NSSubviews">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSButton" id="204220510">
+ <reference key="NSNextResponder" ref="1005"/>
+ <int key="NSvFlags">268</int>
+ <string key="NSFrame">{{148, 121}, {65, 18}}</string>
+ <reference key="NSSuperview" ref="1005"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="481722434">
+ <int key="NSCellFlags">-2080244224</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">Option</string>
+ <object class="NSFont" key="NSSupport">
+ <string key="NSName">LucidaGrande</string>
+ <double key="NSSize">13</double>
+ <int key="NSfFlags">1044</int>
+ </object>
+ <reference key="NSControlView" ref="204220510"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <object class="NSCustomResource" key="NSNormalImage">
+ <string key="NSClassName">NSImage</string>
+ <string key="NSResourceName">NSSwitch</string>
+ </object>
+ <object class="NSButtonImageSource" key="NSAlternateImage">
+ <string key="NSImageName">NSSwitch</string>
+ </object>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ </object>
+ <string key="NSFrameSize">{360, 260}</string>
+ <reference key="NSSuperview"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="204220510"/>
+ <string key="NSClassName">NSView</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">view</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="1005"/>
+ </object>
+ <int key="connectionID">2</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>
+ <reference key="object" ref="0"/>
+ <reference key="children" ref="1000"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-2</int>
+ <reference key="object" ref="1001"/>
+ <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="1003"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">First Responder</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-3</int>
+ <reference key="object" ref="1004"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">Application</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">1</int>
+ <reference key="object" ref="1005"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="204220510"/>
+ </object>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">161</int>
+ <reference key="object" ref="204220510"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="481722434"/>
+ </object>
+ <reference key="parent" ref="1005"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">162</int>
+ <reference key="object" ref="481722434"/>
+ <reference key="parent" ref="204220510"/>
+ </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>1.IBEditorWindowLastContentRect</string>
+ <string>1.IBPluginDependency</string>
+ <string>1.IBUserGuides</string>
+ <string>1.WindowOrigin</string>
+ <string>1.editorWindowContentRectSynchronizationRect</string>
+ <string>161.IBPluginDependency</string>
+ <string>162.IBPluginDependency</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>{{646, 500}, {360, 116}}</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="0"/>
+ <string>{628, 654}</string>
+ <string>{{217, 442}, {480, 272}}</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="unlocalizedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference key="dict.sortedKeys" ref="0"/>
+ <reference key="dict.values" ref="0"/>
+ </object>
+ <nil key="activeLocalization"/>
+ <object class="NSMutableDictionary" key="localizations">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference key="dict.sortedKeys" ref="0"/>
+ <reference key="dict.values" ref="0"/>
+ </object>
+ <nil key="sourceID"/>
+ <int key="maxID">162</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <object class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">GeneralPreferencesViewController</string>
+ <string key="superclassName">NSViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">./Classes/GeneralPreferencesViewController.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>
+ <int key="IBDocument.defaultPropertyAccessControl">3</int>
+ <object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
+ <string key="NS.key.0">NSSwitch</string>
+ <string key="NS.object.0">{15, 15}</string>
+ </object>
+ </data>
+</archive>
View
11 Demo/Demo/GeneralPreferencesViewController.h
@@ -0,0 +1,11 @@
+//
+// GeneralPreferencesViewController.h
+//
+// Created by Vadim Shpakovski on 4/22/11.
+// Copyright 2011 Shpakovski. All rights reserved.
+//
+
+#import "MASPreferencesViewController.h"
+
+@interface GeneralPreferencesViewController : NSViewController <MASPreferencesViewController>
+@end
View
35 Demo/Demo/GeneralPreferencesViewController.m
@@ -0,0 +1,35 @@
+//
+// GeneralPreferencesViewController.m
+//
+// Created by Vadim Shpakovski on 4/22/11.
+// Copyright 2011 Shpakovski. All rights reserved.
+//
+
+#import "GeneralPreferencesViewController.h"
+
+@implementation GeneralPreferencesViewController
+
+- (id)init
+{
+ return [super initWithNibName:@"GeneralPreferencesView" bundle:nil];
+}
+
+#pragma mark -
+#pragma mark MASPreferencesViewController
+
+- (NSString *)toolbarItemIdentifier
+{
+ return @"GeneralPreferences";
+}
+
+- (NSImage *)toolbarItemImage
+{
+ return [NSImage imageNamed:NSImageNamePreferencesGeneral];
+}
+
+- (NSString *)toolbarItemLabel
+{
+ return NSLocalizedString(@"General", @"Toolbar item name for the General preference pane");
+}
+
+@end
View
3,801 Demo/Demo/en.lproj/MainMenu.xib
3,801 additions, 0 deletions not shown
View
12 Demo/Demo/main.m
@@ -0,0 +1,12 @@
+//
+// main.m
+// Demo
+//
+// Created by Vadim Shpakovski on 4/22/11.
+// Copyright 2011 Shpakovski. All rights reserved.
+//
+
+int main(int argc, char *argv[])
+{
+ return NSApplicationMain(argc, (const char **)argv);
+}
View
21 Demo/Shared/MASPreferencesViewController.h
@@ -0,0 +1,21 @@
+//
+// MASPreferencesViewController.h
+//
+// Created by Vadim Shpakovski on 4/22/11.
+// Copyright 2011 Shpakovski. All rights reserved.
+//
+
+@protocol MASPreferencesViewController <NSObject>
+
+@optional
+
+- (void)viewWillAppear;
+- (void)viewDidDisappear;
+
+@required
+
+@property (nonatomic, readonly) NSString *toolbarItemIdentifier;
+@property (nonatomic, readonly) NSImage *toolbarItemImage;
+@property (nonatomic, readonly) NSString *toolbarItemLabel;
+
+@end
View
261 Demo/Shared/MASPreferencesWindow.xib
@@ -0,0 +1,261 @@
+<?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">10J869</string>
+ <string key="IBDocument.InterfaceBuilderVersion">1306</string>
+ <string key="IBDocument.AppKitVersion">1038.35</string>
+ <string key="IBDocument.HIToolboxVersion">461.00</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="NS.object.0">1306</string>
+ </object>
+ <object class="NSArray" key="IBDocument.IntegratedClassDependencies">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>NSWindowTemplate</string>
+ <string>NSView</string>
+ <string>NSToolbar</string>
+ <string>NSCustomObject</string>
+ </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">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys" id="0">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <reference key="dict.values" ref="0"/>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSCustomObject" id="1001">
+ <string key="NSClassName">MASPreferencesWindowController</string>
+ </object>
+ <object class="NSCustomObject" id="1003">
+ <string key="NSClassName">FirstResponder</string>
+ </object>
+ <object class="NSCustomObject" id="1004">
+ <string key="NSClassName">NSApplication</string>
+ </object>
+ <object class="NSWindowTemplate" id="1005">
+ <int key="NSWindowStyleMask">3</int>
+ <int key="NSWindowBacking">2</int>
+ <string key="NSWindowRect">{{540, 400}, {360, 270}}</string>
+ <int key="NSWTFlags">1618478080</int>
+ <string key="NSWindowTitle"/>
+ <string key="NSWindowClass">NSWindow</string>
+ <object class="NSToolbar" key="NSViewClass" id="693562270">
+ <object class="NSMutableString" key="NSToolbarIdentifier">
+ <characters key="NS.bytes">A3419266-C6CB-4FAA-AB63-B91B70C196EA</characters>
+ </object>
+ <nil key="NSToolbarDelegate"/>
+ <bool key="NSToolbarPrefersToBeShown">YES</bool>
+ <bool key="NSToolbarShowsBaselineSeparator">YES</bool>
+ <bool key="NSToolbarAllowsUserCustomization">NO</bool>
+ <bool key="NSToolbarAutosavesConfiguration">NO</bool>
+ <int key="NSToolbarDisplayMode">1</int>
+ <int key="NSToolbarSizeMode">1</int>
+ <object class="NSMutableDictionary" key="NSToolbarIBIdentifiedItems">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference key="dict.sortedKeys" ref="0"/>
+ <reference key="dict.values" ref="0"/>
+ </object>
+ <reference key="NSToolbarIBAllowedItems" ref="0"/>
+ <object class="NSMutableArray" key="NSToolbarIBDefaultItems">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="NSToolbarIBSelectableItems">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <object class="NSView" key="NSWindowView" id="1006">
+ <reference key="NSNextResponder"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{7, 11}, {360, 270}}</string>
+ <reference key="NSSuperview"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView"/>
+ </object>
+ <string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
+ <string key="NSMaxSize">{1e+13, 1e+13}</string>
+ <string key="NSFrameAutosaveName"/>
+ </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">window</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="1005"/>
+ </object>
+ <int key="connectionID">3</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">delegate</string>
+ <reference key="source" ref="693562270"/>
+ <reference key="destination" ref="1001"/>
+ </object>
+ <int key="connectionID">12</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>
+ <reference key="object" ref="0"/>
+ <reference key="children" ref="1000"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-2</int>
+ <reference key="object" ref="1001"/>
+ <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="1003"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">First Responder</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-3</int>
+ <reference key="object" ref="1004"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">Application</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">1</int>
+ <reference key="object" ref="1005"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="1006"/>
+ <reference ref="693562270"/>
+ </object>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">2</int>
+ <reference key="object" ref="1006"/>
+ <reference key="parent" ref="1005"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">4</int>
+ <reference key="object" ref="693562270"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <reference key="parent" ref="1005"/>
+ </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>1.IBEditorWindowLastContentRect</string>
+ <string>1.IBNSWindowAutoPositionCentersHorizontal</string>
+ <string>1.IBNSWindowAutoPositionCentersVertical</string>
+ <string>1.IBPluginDependency</string>
+ <string>1.IBWindowTemplateEditedContentRect</string>
+ <string>1.NSWindowTemplate.visibleAtLaunch</string>
+ <string>1.WindowOrigin</string>
+ <string>1.editorWindowContentRectSynchronizationRect</string>
+ <string>2.IBPluginDependency</string>
+ <string>4.IBEditorWindowLastContentRect</string>
+ <string>4.IBPluginDependency</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>{{484, 402}, {360, 270}}</string>
+ <boolean value="NO"/>
+ <boolean value="NO"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>{{484, 402}, {360, 270}}</string>
+ <boolean value="NO"/>
+ <string>{196, 240}</string>
+ <string>{{202, 428}, {480, 270}}</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>{{416, 672}, {616, 0}}</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="unlocalizedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference key="dict.sortedKeys" ref="0"/>
+ <reference key="dict.values" ref="0"/>
+ </object>
+ <nil key="activeLocalization"/>
+ <object class="NSMutableDictionary" key="localizations">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference key="dict.sortedKeys" ref="0"/>
+ <reference key="dict.values" ref="0"/>
+ </object>
+ <nil key="sourceID"/>
+ <int key="maxID">19</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <object class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">MASPreferencesWindowController</string>
+ <string key="superclassName">NSWindowController</string>
+ <object class="NSMutableDictionary" key="actions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>goNextTab:</string>
+ <string>goPreviousTab:</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <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>goNextTab:</string>
+ <string>goPreviousTab:</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBActionInfo">
+ <string key="name">goNextTab:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">goPreviousTab:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">./Classes/MASPreferencesWindowController.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>
+ <int key="IBDocument.defaultPropertyAccessControl">3</int>
+ </data>
+</archive>
View
33 Demo/Shared/MASPreferencesWindowController.h
@@ -0,0 +1,33 @@
+//
+// MASPreferencesWindowController.h
+//
+// Created by Vadim Shpakovski on 4/22/11.
+// Copyright 2011 Shpakovski. All rights reserved.
+//
+
+extern NSString *const kMASPreferencesWindowControllerDidChangeViewNotification;
+
+@interface MASPreferencesWindowController : NSWindowController <NSToolbarDelegate, NSWindowDelegate>
+{
+@private
+ NSArray *_viewControllers;
+ NSString *_title;
+ id _lastSelectedController;
+}
+
+@property (nonatomic, readonly) NSArray *viewControllers;
+@property (nonatomic, readonly) NSUInteger indexOfSelectedController;
+@property (nonatomic, readonly) NSViewController *selectedViewController;
+@property (nonatomic, readonly) NSString *title;
+
+- (id)initWithViewControllers:(NSArray *)viewControllers;
+- (id)initWithViewControllers:(NSArray *)viewControllers title:(NSString *)title;
+
+- (void)selectControllerAtIndex:(NSUInteger)controllerIndex withAnimation:(BOOL)animate;
+
+- (IBAction)goNextTab:(id)sender;
+- (IBAction)goPreviousTab:(id)sender;
+
+- (void)resetFirstResponderInView:(NSView *)view;
+
+@end
View
302 Demo/Shared/MASPreferencesWindowController.m
@@ -0,0 +1,302 @@
+//
+// MASPreferencesWindowController.m
+//
+// Created by Vadim Shpakovski on 4/22/11.
+// Copyright 2011 Shpakovski. All rights reserved.
+//
+
+#import "MASPreferencesViewController.h"
+#import "MASPreferencesWindowController.h"
+
+NSString *const kMASPreferencesWindowControllerDidChangeViewNotification = @"MASPreferencesWindowControllerDidChangeViewNotification";
+
+@interface MASPreferencesWindowController () // Private
+
+- (void)updateViewControllerWithAnimation:(BOOL)animate;
+
+@end
+
+#pragma mark -
+
+@implementation MASPreferencesWindowController
+
+@synthesize viewControllers = _viewControllers;
+@synthesize title = _title;
+
+#pragma mark -
+
+- (id)initWithViewControllers:(NSArray *)viewControllers
+{
+ return [self initWithViewControllers:viewControllers title:nil];
+}
+
+- (id)initWithViewControllers:(NSArray *)viewControllers title:(NSString *)title
+{
+ if ((self = [super initWithWindowNibName:@"MASPreferencesWindow"]))
+ {
+ _viewControllers = [viewControllers retain];
+ _title = [title copy];
+ }
+ return self;
+}
+
+- (void)dealloc
+{
+ [[self window] setDelegate:nil];
+
+ [_viewControllers release];
+ [_title release];
+
+ [super dealloc];
+}
+
+#pragma mark -
+
+- (void)awakeFromNib
+{
+ [super awakeFromNib];
+
+ // Watch for resigning and closing to commit editing
+ [[self window] setDelegate:self];
+
+ if ([self.title length] > 0)
+ [[self window] setTitle:self.title];
+ [self selectControllerAtIndex:0 withAnimation:NO];
+}
+
+#pragma mark -
+#pragma mark NSWindowDelegate
+
+- (void)commitPreferences
+{
+ [[self window] makeFirstResponder:[self window]];
+}
+
+- (void)windowWillClose:(NSNotification *)notification
+{
+ [self commitPreferences];
+}
+
+- (void)windowDidResignKey:(NSNotification *)notification
+{
+ [self commitPreferences];
+}
+
+- (void)windowDidBecomeKey:(NSNotification *)notification
+{
+ [self resetFirstResponderInView:[[self window] contentView]];
+}
+
+#pragma mark -
+#pragma mark Accessors
+
+- (NSArray *)toolbarItemIdentifiers
+{
+ NSArray *identifiers = [_viewControllers valueForKey:@"toolbarItemIdentifier"];
+ return identifiers;
+}
+
+#pragma mark -
+
+- (NSUInteger)indexOfSelectedController
+{
+ NSString *selectedIdentifier = self.window.toolbar.selectedItemIdentifier;
+ NSArray *identifiers = self.toolbarItemIdentifiers;
+ NSUInteger selectedIndex = [identifiers indexOfObject:selectedIdentifier];
+ return selectedIndex;
+}
+
+- (NSViewController *)selectedViewController
+{
+ NSString *selectedIdentifier = self.window.toolbar.selectedItemIdentifier;
+ NSArray *identifiers = self.toolbarItemIdentifiers;
+ NSUInteger selectedIndex = [identifiers indexOfObject:selectedIdentifier];
+ NSViewController *selectedController = nil;
+ if (NSLocationInRange(selectedIndex, NSMakeRange(0, self.viewControllers.count)))
+ selectedController = [self.viewControllers objectAtIndex:selectedIndex];
+ return selectedController;
+}
+
+#pragma mark -
+#pragma mark NSToolbarDelegate
+
+- (NSArray *)toolbarAllowedItemIdentifiers:(NSToolbar *)toolbar
+{
+ NSArray *identifiers = self.toolbarItemIdentifiers;
+ return identifiers;
+}
+
+- (NSArray *)toolbarDefaultItemIdentifiers:(NSToolbar *)toolbar
+{
+ NSArray *identifiers = self.toolbarItemIdentifiers;
+ return identifiers;
+}
+
+- (NSArray *)toolbarSelectableItemIdentifiers:(NSToolbar *)toolbar
+{
+ NSArray *identifiers = self.toolbarItemIdentifiers;
+ return identifiers;
+}
+
+- (NSToolbarItem *)toolbar:(NSToolbar *)toolbar itemForItemIdentifier:(NSString *)itemIdentifier willBeInsertedIntoToolbar:(BOOL)flag
+{
+ NSToolbarItem *toolbarItem = [[NSToolbarItem alloc] initWithItemIdentifier:itemIdentifier];
+ NSArray *identifiers = self.toolbarItemIdentifiers;
+ NSUInteger controllerIndex = [identifiers indexOfObject:itemIdentifier];
+ if (controllerIndex != NSNotFound)
+ {
+ id <MASPreferencesViewController> controller = [_viewControllers objectAtIndex:controllerIndex];
+ toolbarItem.image = controller.toolbarItemImage;
+ toolbarItem.label = controller.toolbarItemLabel;
+ toolbarItem.target = self;
+ toolbarItem.action = @selector(toolbarItemDidClick:);
+ }
+ return [toolbarItem autorelease];
+}
+
+#pragma mark -
+#pragma mark Private methods
+
+- (void)clearResponderChain
+{
+ // Remove view controller from the responder chain
+ NSResponder *chainedController = self.window.nextResponder;
+ if ([self.viewControllers indexOfObject:chainedController] == NSNotFound)
+ return;
+ self.window.nextResponder = chainedController.nextResponder;
+ chainedController.nextResponder = nil;
+}
+
+- (void)patchResponderChain
+{
+ [self clearResponderChain];
+
+ NSViewController *selectedController = self.selectedViewController;
+ if (!selectedController)
+ return;
+
+ // Add current controller to the responder chain
+ NSResponder *nextResponder = self.window.nextResponder;
+ self.window.nextResponder = selectedController;
+ selectedController.nextResponder = nextResponder;
+}
+
+#pragma mark -
+
+- (void)updateViewControllerWithAnimation:(BOOL)animate
+{
+ // Retrieve currently selected view controller
+ NSArray *identifiers = self.toolbarItemIdentifiers;
+ NSString *itemIdentifier = self.window.toolbar.selectedItemIdentifier;
+ NSUInteger controllerIndex = [identifiers indexOfObject:itemIdentifier];
+ if (controllerIndex == NSNotFound) return;
+ NSViewController <MASPreferencesViewController> *controller = [_viewControllers objectAtIndex:controllerIndex];
+
+ // Retrieve the new window tile from the controller view
+ if ([self.title length] == 0)
+ {
+ NSString *label = controller.toolbarItemLabel;
+ self.window.title = label;
+ }
+
+ // Retrieve the view to place into window
+ NSView *controllerView = controller.view;
+
+ // Calculate changes for window size and position
+ NSSize controllerViewSize = controllerView.bounds.size;
+ NSView *contentView = self.window.contentView;
+ NSSize contentSize = contentView.bounds.size;
+ CGFloat widthChange = contentSize.width - controllerViewSize.width;
+ CGFloat heightChange = contentSize.height - controllerViewSize.height;
+
+ // Calculate new window size and position
+ NSRect windowFrame = self.window.frame;
+ windowFrame.size.width -= widthChange;
+ windowFrame.size.height -= heightChange;
+ windowFrame.origin.y += heightChange;
+
+ // Place the view into window and perform reposition
+ NSArray *subviews = [contentView.subviews retain];
+ for (NSView *subview in contentView.subviews)
+ [subview removeFromSuperviewWithoutNeedingDisplay];
+ [subviews release];
+ [self.window setFrame:windowFrame display:YES animate:animate];
+
+ if ([_lastSelectedController respondsToSelector:@selector(viewDidDisappear)])
+ [_lastSelectedController viewDidDisappear];
+ if ([controller respondsToSelector:@selector(viewWillAppear)])
+ [controller viewWillAppear];
+ _lastSelectedController = controller;
+
+ // Add controller view only after animation is ended to avoid blinking
+ if (animate)
+ [self performSelector:@selector(setContentView:) withObject:controllerView afterDelay:0.0];
+ else
+ [self performSelector:@selector(setContentView:) withObject:controllerView];
+
+ // Insert view controller into responder chain
+ [self patchResponderChain];
+}
+
+- (void)resetFirstResponderInView:(NSView *)view
+{
+ BOOL isNotButton = ![view isKindOfClass:[NSButton class]];
+ BOOL canBecomeKey = view.canBecomeKeyView;
+ if (isNotButton && canBecomeKey)
+ {
+ [self.window makeFirstResponder:view];
+ }
+ else
+ {
+ for (NSView *subview in view.subviews)
+ [self resetFirstResponderInView:subview];
+ }
+}
+
+- (void)setContentView:(NSView *)view
+{
+ [self.window.contentView addSubview:view];
+ [self resetFirstResponderInView:self.window.contentView];
+}
+
+- (void)toolbarItemDidClick:(id)sender
+{
+ [self updateViewControllerWithAnimation:YES];
+
+ [[NSNotificationCenter defaultCenter] postNotificationName:kMASPreferencesWindowControllerDidChangeViewNotification object:self];
+}
+
+#pragma mark -
+#pragma mark Public methods
+
+- (void)selectControllerAtIndex:(NSUInteger)controllerIndex withAnimation:(BOOL)animate
+{
+ if (!NSLocationInRange(controllerIndex, NSMakeRange(0, _viewControllers.count)))
+ return;
+
+ NSViewController <MASPreferencesViewController> *controller = [_viewControllers objectAtIndex:controllerIndex];
+ NSString *newItemIdentifier = controller.toolbarItemIdentifier;
+ self.window.toolbar.selectedItemIdentifier = newItemIdentifier;
+ [self updateViewControllerWithAnimation:animate];
+}
+
+#pragma mark -
+#pragma mark Actions
+
+- (IBAction)goNextTab:(id)sender
+{
+ NSUInteger selectedIndex = self.indexOfSelectedController;
+ NSUInteger numberOfControllers = [_viewControllers count];
+ selectedIndex = (selectedIndex + 1) % numberOfControllers;
+ [self selectControllerAtIndex:selectedIndex withAnimation:YES];
+}
+
+- (IBAction)goPreviousTab:(id)sender
+{
+ NSUInteger selectedIndex = self.indexOfSelectedController;
+ NSUInteger numberOfControllers = [_viewControllers count];
+ selectedIndex = (selectedIndex + numberOfControllers - 1) % numberOfControllers;
+ [self selectControllerAtIndex:selectedIndex withAnimation:YES];
+}
+
+@end
Please sign in to comment.
Something went wrong with that request. Please try again.