diff --git a/.gitignore b/.gitignore index 7cdf713..ec90ec0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,13 +1,26 @@ +# OS X .DS_Store -*.swp -*~.nib +# Xcode build/ - *.pbxuser -*.perspective -*.perspectivev3 +!default.pbxuser *.mode1v3 +!default.mode1v3 *.mode2v3 -*.xcworkspace -*xcuserdata/ +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata +*.xccheckout +profile +*.moved-aside +DerivedData +*.hmap +*.ipa + +# CocoaPods +Pods + +# AppCode +.idea/ \ No newline at end of file diff --git a/INPopoverController.podspec b/INPopoverController.podspec new file mode 100644 index 0000000..7e6de82 --- /dev/null +++ b/INPopoverController.podspec @@ -0,0 +1,14 @@ +Pod::Spec.new do |s| + s.name = 'INPopoverController' + s.version = '0.0.1' + s.summary = 'A customizable popover controller for Mac OS X' + s.homepage = 'https://github.com/indragiek/INPopoverController' + s.author = { 'Indragie Karunaratne' => 'indragiek@gmail.com' } + s.source = { :git => 'https://github.com/indragiek/INPopoverController.git' } + s.source_files = 'INPopoverController/*.{h,m}' + s.public_header_files = 'INPopoverController/*.h' + s.platform = :osx + s.requires_arc = true + s.license = 'BSD' + s.frameworks = 'QuartzCore' +end diff --git a/INPopoverController.xcodeproj/project.pbxproj b/INPopoverController.xcodeproj/project.pbxproj old mode 100644 new mode 100755 index 6441e3c..47d28d3 --- a/INPopoverController.xcodeproj/project.pbxproj +++ b/INPopoverController.xcodeproj/project.pbxproj @@ -7,36 +7,36 @@ objects = { /* Begin PBXBuildFile section */ + 7619A0908F1873F212A86D92 /* INPopoverController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7619A090EED3A0874FFB0542 /* INPopoverController.m */; }; + 7619A507692D41F9A4EA0EB1 /* INPopoverController.h in Headers */ = {isa = PBXBuildFile; fileRef = 7619AF3F1F908EC06616FBBA /* INPopoverController.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7619A5078560AD04EB09398F /* INPopoverWindowFrame.m in Sources */ = {isa = PBXBuildFile; fileRef = 7619AFDD9CA28B629C79B9B7 /* INPopoverWindowFrame.m */; }; + 7619A72138650AA792042726 /* INPopoverParentWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = 7619A3274F11C96F76F9A2AA /* INPopoverParentWindow.h */; }; + 7619A73868BE7D04215703FA /* INPopoverControllerDefines.h in Headers */ = {isa = PBXBuildFile; fileRef = 7619A49B8AE793DFA2663E95 /* INPopoverControllerDefines.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7619A73A585AD478336FBD44 /* INPopoverParentWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 7619A840E914A3391A33BCB2 /* INPopoverParentWindow.m */; }; + 7619A7C39101BC5170F2CF23 /* INPopoverWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = 7619AEB4110920D49EB68147 /* INPopoverWindow.h */; }; + 7619AFCF3AC75534C6582B37 /* INPopoverWindowFrame.h in Headers */ = {isa = PBXBuildFile; fileRef = 7619ABC89C19022487731625 /* INPopoverWindowFrame.h */; }; + 7619AFCFD4611DEE23332859 /* INPopoverWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 7619A46EB85527945376718B /* INPopoverWindow.m */; }; 98BA893B143EA04A006F744E /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 98BA893A143EA04A006F744E /* Cocoa.framework */; }; - 98BA8973143EA10E006F744E /* INPopoverController.h in Headers */ = {isa = PBXBuildFile; fileRef = 98BA896C143EA10E006F744E /* INPopoverController.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 98BA8974143EA10E006F744E /* INPopoverController.m in Sources */ = {isa = PBXBuildFile; fileRef = 98BA896D143EA10E006F744E /* INPopoverController.m */; }; - 98BA8975143EA10E006F744E /* INPopoverControllerDefines.h in Headers */ = {isa = PBXBuildFile; fileRef = 98BA896E143EA10E006F744E /* INPopoverControllerDefines.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 98BA8976143EA10E006F744E /* INPopoverWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = 98BA896F143EA10E006F744E /* INPopoverWindow.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 98BA8977143EA10E006F744E /* INPopoverWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 98BA8970143EA10E006F744E /* INPopoverWindow.m */; }; - 98BA8978143EA10E006F744E /* INPopoverWindowFrame.h in Headers */ = {isa = PBXBuildFile; fileRef = 98BA8971143EA10E006F744E /* INPopoverWindowFrame.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 98BA8979143EA10E006F744E /* INPopoverWindowFrame.m in Sources */ = {isa = PBXBuildFile; fileRef = 98BA8972143EA10E006F744E /* INPopoverWindowFrame.m */; }; - 98BA897C143EA1B7006F744E /* INPopoverParentWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = 98BA897A143EA1B7006F744E /* INPopoverParentWindow.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 98BA897D143EA1B7006F744E /* INPopoverParentWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 98BA897B143EA1B7006F744E /* INPopoverParentWindow.m */; }; 98BA8983143EA1E9006F744E /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 98BA8982143EA1E9006F744E /* QuartzCore.framework */; }; 98BA8985143EA28E006F744E /* INPopoverPrefixHeader.pch in Headers */ = {isa = PBXBuildFile; fileRef = 98BA8984143EA28E006F744E /* INPopoverPrefixHeader.pch */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 7619A090EED3A0874FFB0542 /* INPopoverController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = INPopoverController.m; sourceTree = ""; }; + 7619A3274F11C96F76F9A2AA /* INPopoverParentWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = INPopoverParentWindow.h; sourceTree = ""; }; + 7619A46EB85527945376718B /* INPopoverWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = INPopoverWindow.m; sourceTree = ""; }; + 7619A49B8AE793DFA2663E95 /* INPopoverControllerDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = INPopoverControllerDefines.h; sourceTree = ""; }; + 7619A840E914A3391A33BCB2 /* INPopoverParentWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = INPopoverParentWindow.m; sourceTree = ""; }; + 7619ABC89C19022487731625 /* INPopoverWindowFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = INPopoverWindowFrame.h; sourceTree = ""; }; + 7619AEB4110920D49EB68147 /* INPopoverWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = INPopoverWindow.h; sourceTree = ""; }; + 7619AF3F1F908EC06616FBBA /* INPopoverController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = INPopoverController.h; sourceTree = ""; }; + 7619AFDD9CA28B629C79B9B7 /* INPopoverWindowFrame.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = INPopoverWindowFrame.m; sourceTree = ""; }; 98BA8937143EA04A006F744E /* INPopoverController.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = INPopoverController.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 98BA893A143EA04A006F744E /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; 98BA893D143EA04A006F744E /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; 98BA893E143EA04A006F744E /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; 98BA893F143EA04A006F744E /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 98BA8942143EA04A006F744E /* INPopoverController-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "INPopoverController-Info.plist"; sourceTree = ""; }; - 98BA896C143EA10E006F744E /* INPopoverController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = INPopoverController.h; sourceTree = SOURCE_ROOT; }; - 98BA896D143EA10E006F744E /* INPopoverController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = INPopoverController.m; sourceTree = SOURCE_ROOT; }; - 98BA896E143EA10E006F744E /* INPopoverControllerDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = INPopoverControllerDefines.h; sourceTree = SOURCE_ROOT; }; - 98BA896F143EA10E006F744E /* INPopoverWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = INPopoverWindow.h; sourceTree = SOURCE_ROOT; }; - 98BA8970143EA10E006F744E /* INPopoverWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = INPopoverWindow.m; sourceTree = SOURCE_ROOT; }; - 98BA8971143EA10E006F744E /* INPopoverWindowFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = INPopoverWindowFrame.h; sourceTree = SOURCE_ROOT; }; - 98BA8972143EA10E006F744E /* INPopoverWindowFrame.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = INPopoverWindowFrame.m; sourceTree = SOURCE_ROOT; }; - 98BA897A143EA1B7006F744E /* INPopoverParentWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = INPopoverParentWindow.h; sourceTree = SOURCE_ROOT; }; - 98BA897B143EA1B7006F744E /* INPopoverParentWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = INPopoverParentWindow.m; sourceTree = SOURCE_ROOT; }; 98BA8982143EA1E9006F744E /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = SDKs/MacOSX10.6.sdk/System/Library/Frameworks/QuartzCore.framework; sourceTree = DEVELOPER_DIR; }; 98BA8984143EA28E006F744E /* INPopoverPrefixHeader.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = INPopoverPrefixHeader.pch; sourceTree = ""; }; /* End PBXFileReference section */ @@ -94,16 +94,16 @@ 98BA8940143EA04A006F744E /* INPopoverController */ = { isa = PBXGroup; children = ( - 98BA896C143EA10E006F744E /* INPopoverController.h */, - 98BA896D143EA10E006F744E /* INPopoverController.m */, - 98BA896E143EA10E006F744E /* INPopoverControllerDefines.h */, - 98BA897A143EA1B7006F744E /* INPopoverParentWindow.h */, - 98BA897B143EA1B7006F744E /* INPopoverParentWindow.m */, - 98BA896F143EA10E006F744E /* INPopoverWindow.h */, - 98BA8970143EA10E006F744E /* INPopoverWindow.m */, - 98BA8971143EA10E006F744E /* INPopoverWindowFrame.h */, - 98BA8972143EA10E006F744E /* INPopoverWindowFrame.m */, 98BA8941143EA04A006F744E /* Supporting Files */, + 7619A49B8AE793DFA2663E95 /* INPopoverControllerDefines.h */, + 7619AF3F1F908EC06616FBBA /* INPopoverController.h */, + 7619A090EED3A0874FFB0542 /* INPopoverController.m */, + 7619ABC89C19022487731625 /* INPopoverWindowFrame.h */, + 7619AFDD9CA28B629C79B9B7 /* INPopoverWindowFrame.m */, + 7619AEB4110920D49EB68147 /* INPopoverWindow.h */, + 7619A46EB85527945376718B /* INPopoverWindow.m */, + 7619A3274F11C96F76F9A2AA /* INPopoverParentWindow.h */, + 7619A840E914A3391A33BCB2 /* INPopoverParentWindow.m */, ); path = INPopoverController; sourceTree = ""; @@ -124,12 +124,12 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 98BA8973143EA10E006F744E /* INPopoverController.h in Headers */, - 98BA8975143EA10E006F744E /* INPopoverControllerDefines.h in Headers */, - 98BA8976143EA10E006F744E /* INPopoverWindow.h in Headers */, - 98BA8978143EA10E006F744E /* INPopoverWindowFrame.h in Headers */, - 98BA897C143EA1B7006F744E /* INPopoverParentWindow.h in Headers */, 98BA8985143EA28E006F744E /* INPopoverPrefixHeader.pch in Headers */, + 7619A507692D41F9A4EA0EB1 /* INPopoverController.h in Headers */, + 7619A72138650AA792042726 /* INPopoverParentWindow.h in Headers */, + 7619A73868BE7D04215703FA /* INPopoverControllerDefines.h in Headers */, + 7619A7C39101BC5170F2CF23 /* INPopoverWindow.h in Headers */, + 7619AFCF3AC75534C6582B37 /* INPopoverWindowFrame.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -159,6 +159,14 @@ /* Begin PBXProject section */ 98BA892D143EA049006F744E /* Project object */ = { isa = PBXProject; + attributes = { + LastUpgradeCheck = 0700; + TargetAttributes = { + 98BA8936143EA04A006F744E = { + DevelopmentTeam = GNHH4Q9D6U; + }; + }; + }; buildConfigurationList = 98BA8930143EA049006F744E /* Build configuration list for PBXProject "INPopoverController" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; @@ -191,10 +199,10 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 98BA8974143EA10E006F744E /* INPopoverController.m in Sources */, - 98BA8977143EA10E006F744E /* INPopoverWindow.m in Sources */, - 98BA8979143EA10E006F744E /* INPopoverWindowFrame.m in Sources */, - 98BA897D143EA1B7006F744E /* INPopoverParentWindow.m in Sources */, + 7619A0908F1873F212A86D92 /* INPopoverController.m in Sources */, + 7619A5078560AD04EB09398F /* INPopoverWindowFrame.m in Sources */, + 7619AFCFD4611DEE23332859 /* INPopoverWindow.m in Sources */, + 7619A73A585AD478336FBD44 /* INPopoverParentWindow.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -205,11 +213,21 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", @@ -220,8 +238,11 @@ GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.6; + MACOSX_DEPLOYMENT_TARGET = 10.9; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; }; @@ -231,17 +252,29 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_NO_COMMON_BLOCKS = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.6; + MACOSX_DEPLOYMENT_TARGET = 10.9; SDKROOT = macosx; }; name = Release; @@ -249,20 +282,20 @@ 98BA8963143EA04B006F744E /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + CLANG_ENABLE_OBJC_ARC = YES; + COMBINE_HIDPI_IMAGES = YES; + DEAD_CODE_STRIPPING = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "\"$(DEVELOPER_DIR)/SDKs/MacOSX10.6.sdk/System/Library/Frameworks\"", - ); FRAMEWORK_VERSION = A; GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = INPopoverPrefixHeader.pch; + GCC_PREFIX_HEADER = INPopoverController/INPopoverPrefixHeader.pch; GCC_VERSION = ""; GCC_WARN_64_TO_32_BIT_CONVERSION = NO; - INFOPLIST_FILE = "INPopoverController-Info.plist"; - INSTALL_PATH = "@loader_path/../Frameworks"; + INFOPLIST_FILE = "INPopoverController/INPopoverController-Info.plist"; + INSTALL_PATH = "@rpath"; + MACOSX_DEPLOYMENT_TARGET = 10.9; + PRODUCT_BUNDLE_IDENTIFIER = "com.indragie.INPopoverController.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; WRAPPER_EXTENSION = framework; @@ -272,22 +305,26 @@ 98BA8964143EA04B006F744E /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + CLANG_ENABLE_OBJC_ARC = YES; + COMBINE_HIDPI_IMAGES = YES; + DEAD_CODE_STRIPPING = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "\"$(DEVELOPER_DIR)/SDKs/MacOSX10.6.sdk/System/Library/Frameworks\"", - ); FRAMEWORK_VERSION = A; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_OPTIMIZATION_LEVEL = fast; GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = INPopoverPrefixHeader.pch; + GCC_PREFIX_HEADER = INPopoverController/INPopoverPrefixHeader.pch; GCC_VERSION = ""; GCC_WARN_64_TO_32_BIT_CONVERSION = NO; - INFOPLIST_FILE = "INPopoverController-Info.plist"; - INSTALL_PATH = "@loader_path/../Frameworks"; + INFOPLIST_FILE = "INPopoverController/INPopoverController-Info.plist"; + INSTALL_PATH = "@rpath"; + MACOSX_DEPLOYMENT_TARGET = 10.9; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_BUNDLE_IDENTIFIER = "com.indragie.INPopoverController.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; + STRIP_STYLE = all; WRAPPER_EXTENSION = framework; }; name = Release; diff --git a/INPopoverController.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/INPopoverController.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100755 index 0000000..88334f9 --- /dev/null +++ b/INPopoverController.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/INPopoverController-Info.plist b/INPopoverController/INPopoverController-Info.plist old mode 100644 new mode 100755 similarity index 91% rename from INPopoverController-Info.plist rename to INPopoverController/INPopoverController-Info.plist index e023d8c..682e15f --- a/INPopoverController-Info.plist +++ b/INPopoverController/INPopoverController-Info.plist @@ -9,7 +9,7 @@ CFBundleIconFile CFBundleIdentifier - com.indragie.INPopoverController.${PRODUCT_NAME:rfc1034identifier} + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/INPopoverController.h b/INPopoverController/INPopoverController.h old mode 100644 new mode 100755 similarity index 59% rename from INPopoverController.h rename to INPopoverController/INPopoverController.h index 7e55133..05c9bb6 --- a/INPopoverController.h +++ b/INPopoverController/INPopoverController.h @@ -1,81 +1,78 @@ // // INPopoverController.h -// Copyright 2011 Indragie Karunaratne. All rights reserved. +// Copyright 2011-2014 Indragie Karunaratne. All rights reserved. // -// Licensed under the BSD License -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #import #import "INPopoverControllerDefines.h" -@class INPopoverWindow; @protocol INPopoverControllerDelegate; -@interface INPopoverController : NSObject { -#if __has_feature(objc_arc) - __unsafe_unretained id _delegate; -#else - id _delegate; -#endif - NSSize _contentSize; - BOOL _closesWhenPopoverResignsKey; - BOOL _closesWhenApplicationBecomesInactive; - BOOL _animates; - NSViewController *_contentViewController; - - INPopoverWindow *_popoverWindow; - NSView *_positionView; - NSRect _screenRect; - NSRect _viewRect; -} + +@interface INPopoverController : NSObject #pragma mark - #pragma mark Properties /** The delegate of the INPopoverController object (should conform to the INPopoverControllerDelegate protocol) **/ -#if __has_feature(objc_arc) -@property (nonatomic, unsafe_unretained) id delegate; -#else -@property (nonatomic, assign) id delegate; -#endif +@property (nonatomic, assign) id delegate; /** The background color of the popover. Default value is [NSColor blackColor] with an alpha value of 0.8. Changes to this value are not animated. **/ -@property (nonatomic, retain) NSColor *color; +@property (nonatomic, strong) NSColor *color; /** Border color to use when drawing a border. Default value: [NSColor blackColor]. Changes to this value are not animated. **/ -@property (nonatomic, retain) NSColor *borderColor; +@property (nonatomic, strong) NSColor *borderColor; /** Color to use for drawing a 1px highlight just below the top. Can be nil. Changes to this value are not animated. **/ -@property (nonatomic, retain) NSColor *topHighlightColor; +@property (nonatomic, strong) NSColor *topHighlightColor; /** The width of the popover border, drawn using borderColor. Default value: 0.0 (no border). Changes to this value are not animated. **/ -@property (nonatomic) CGFloat borderWidth; +@property (nonatomic, assign) CGFloat borderWidth; + +/** Corner radius of the popover window. Default value: 4. Changes to this value are not animated. **/ +@property (nonatomic, assign) CGFloat cornerRadius; + +/** The size of the popover arrow. Default value: {23, 12}. Changes to this value are not animated. **/ +@property (nonatomic, assign) NSSize arrowSize; /** The current arrow direction of the popover. If the popover has never been displayed, then this will return INPopoverArrowDirectionUndefined */ -@property (readonly) INPopoverArrowDirection arrowDirection; +@property (nonatomic, assign, readonly) INPopoverArrowDirection arrowDirection; /** The size of the content of the popover. This is automatically set to contentViewController's size when the view controller is set, but can be modified. Changes to this value are animated when animates is set to YES **/ @property (nonatomic, assign) NSSize contentSize; +/** Whether the popover closes when user presses escape key. Default value: YES */ +@property (nonatomic, assign) BOOL closesWhenEscapeKeyPressed; + /** Whether the popover closes when the popover window resigns its key status. Default value: YES **/ @property (nonatomic, assign) BOOL closesWhenPopoverResignsKey; /** Whether the popover closes when the application becomes inactive. Default value: NO **/ @property (nonatomic, assign) BOOL closesWhenApplicationBecomesInactive; +/** Whether the popover closes when the view to which the popover is anchored to move off window. Default value: YES **/ +@property (nonatomic, assign) BOOL closeWhenAnchorMoveOffScreen; + +/** Whether the popover's anchor resize, should we update our frame ourselves. Default value: NO **/ +@property (nonatomic, assign) BOOL overrideAnchorFrameUpdate; + /** Enable or disable animation when showing/closing the popover and changing the content size. Default value: YES */ @property (nonatomic, assign) BOOL animates; +/* If `animates` is `YES`, this is the animation type to use when showing/closing the popover. + Default value: `INPopoverAnimationTypePop` **/ +@property (nonatomic, assign) INPopoverAnimationType animationType; + /** The content view controller from which content is displayed in the popover **/ -@property (nonatomic, retain) NSViewController *contentViewController; +@property (nonatomic, strong) NSViewController *contentViewController; /** The view that the currently displayed popover is positioned relative to. If there is no popover being displayed, this returns nil. **/ -@property (readonly) NSView *positionView; +@property (nonatomic, strong, readonly) NSView *positionView; /** The window of the popover **/ -@property (readonly) NSWindow *popoverWindow; +@property (nonatomic, strong, readonly) NSWindow *popoverWindow; /** Whether the popover is currently visible or not **/ -@property (readonly) BOOL popoverIsVisible; +@property (nonatomic, assign, readonly) BOOL popoverIsVisible; #pragma mark - #pragma mark Methods @@ -85,7 +82,7 @@ @param viewController the content view controller @returns a new instance of INPopoverController */ -- (id)initWithContentViewController:(NSViewController*)viewController; +- (id)initWithContentViewController:(NSViewController *)viewController; /** Displays the popover. @@ -94,7 +91,7 @@ @param direction the prefered direction at which the arrow will point. There is no guarantee that this will be the actual arrow direction, depending on whether the screen is able to accomodate the popover in that position. @param anchors Whether the popover binds to the frame of the positionView. This means that if the positionView is resized or moved, the popover will be repositioned according to the point at which it was originally placed. This also means that if the positionView goes off screen, the popover will be automatically closed. **/ -- (void)presentPopoverFromRect:(NSRect)rect inView:(NSView*)positionView preferredArrowDirection:(INPopoverArrowDirection)direction anchorsToPositionView:(BOOL)anchors; +- (void)presentPopoverFromRect:(NSRect)rect inView:(NSView *)positionView preferredArrowDirection:(INPopoverArrowDirection)direction anchorsToPositionView:(BOOL)anchors; /** Recalculates the best arrow direction for the current window position and resets the arrow direction. The change will not be animated. **/ @@ -125,32 +122,32 @@ @optional /** When the -closePopover: method is invoked, this method is called to give a change for the delegate to prevent it from closing. Returning NO for this delegate method will prevent the popover being closed. This delegate method does not apply to the -forceClosePopover: method, which will close the popover regardless of what the delegate returns. - @param popover the @class INPopoverController object that is controlling the popover + @param popover the class INPopoverController object that is controlling the popover @returns whether the popover should close or not */ -- (BOOL)popoverShouldClose:(INPopoverController*)popover; +- (BOOL)popoverShouldClose:(INPopoverController *)popover; /** Invoked right before the popover shows on screen - @param popover the @class INPopoverController object that is controlling the popover + @param popover the class INPopoverController object that is controlling the popover */ -- (void)popoverWillShow:(INPopoverController*)popover; +- (void)popoverWillShow:(INPopoverController *)popover; /** Invoked right after the popover shows on screen - @param popover the @class INPopoverController object that is controlling the popover + @param popover the class INPopoverController object that is controlling the popover */ -- (void)popoverDidShow:(INPopoverController*)popover; +- (void)popoverDidShow:(INPopoverController *)popover; /** Invoked right before the popover closes - @param popover the @class INPopoverController object that is controlling the popover + @param popover the class INPopoverController object that is controlling the popover */ -- (void)popoverWillClose:(INPopoverController*)popover; +- (void)popoverWillClose:(INPopoverController *)popover; /** - Invoked right before the popover closes - @param popover the @class INPopoverController object that is controlling the popover + Invoked right after the popover closes + @param popover the class INPopoverController object that is controlling the popover */ -- (void)popoverDidClose:(INPopoverController*)popover; +- (void)popoverDidClose:(INPopoverController *)popover; @end diff --git a/INPopoverController.m b/INPopoverController/INPopoverController.m similarity index 60% rename from INPopoverController.m rename to INPopoverController/INPopoverController.m index d879768..4dd87e2 100644 --- a/INPopoverController.m +++ b/INPopoverController/INPopoverController.m @@ -1,33 +1,19 @@ // // INPopoverController.m -// Copyright 2011 Indragie Karunaratne. All rights reserved. +// Copyright 2011-2014 Indragie Karunaratne. All rights reserved. // -// Licensed under the BSD License -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #import "INPopoverController.h" #import "INPopoverWindow.h" #import "INPopoverWindowFrame.h" #import "INPopoverParentWindow.h" - #include -@interface INPopoverController () -- (void)_setInitialPropertyValues; -- (void)_closePopoverAndResetVariables; -- (void)_callDelegateMethod:(SEL)selector; -- (void)_positionViewFrameChanged:(NSNotification*)notification; -- (void)_setPositionView:(NSView*)newPositionView; -- (void)_setArrowDirection:(INPopoverArrowDirection)direction; -- (INPopoverArrowDirection)_arrowDirectionWithPreferredArrowDirection:(INPopoverArrowDirection)direction; -@property (readonly) NSView *contentView; -@end - -@implementation INPopoverController -@synthesize delegate = _delegate; -@synthesize closesWhenPopoverResignsKey = _closesWhenPopoverResignsKey; -@synthesize closesWhenApplicationBecomesInactive = _closesWhenApplicationBecomesInactive; -@synthesize animates = _animates; +@implementation INPopoverController { + INPopoverWindow *_popoverWindow; + NSRect _screenRect; + NSRect _viewRect; +} #pragma mark - #pragma mark Initialization @@ -46,10 +32,18 @@ - (void)awakeFromNib [self _setInitialPropertyValues]; } +#pragma mark - +#pragma mark - Memory Management + +- (void)dealloc +{ + _popoverWindow.popoverController = nil; +} + #pragma mark - #pragma mark Public Methods -- (id)initWithContentViewController:(NSViewController*)viewController +- (id)initWithContentViewController:(NSViewController *)viewController { if ((self = [super init])) { [self _setInitialPropertyValues]; @@ -58,35 +52,35 @@ - (id)initWithContentViewController:(NSViewController*)viewController return self; } -- (void)presentPopoverFromRect:(NSRect)rect inView:(NSView*)positionView preferredArrowDirection:(INPopoverArrowDirection)direction anchorsToPositionView:(BOOL)anchors +- (void)presentPopoverFromRect:(NSRect)rect inView:(NSView *)positionView preferredArrowDirection:(INPopoverArrowDirection)direction anchorsToPositionView:(BOOL)anchors { - if (self.popoverIsVisible) { return; } // If it's already visible, do nothing + if (self.popoverIsVisible) {return;} // If it's already visible, do nothing NSWindow *mainWindow = [positionView window]; - [self _setPositionView:positionView]; + _positionView = positionView; _viewRect = rect; - _screenRect = [positionView convertRect:rect toView:nil]; // Convert the rect to window coordinates - _screenRect.origin = [mainWindow convertBaseToScreen:_screenRect.origin]; // Convert window coordinates to screen coordinates + + // Convert the rect to window coordinates, then convert window coordinates to screen coordinates + _screenRect = [mainWindow convertRectToScreen:[positionView convertRect:rect toView:nil]]; + INPopoverArrowDirection calculatedDirection = [self _arrowDirectionWithPreferredArrowDirection:direction]; // Calculate the best arrow direction [self _setArrowDirection:calculatedDirection]; // Change the arrow direction of the popover + NSRect windowFrame = [self popoverFrameWithSize:self.contentSize andArrowDirection:calculatedDirection]; // Calculate the window frame based on the arrow direction [_popoverWindow setFrame:windowFrame display:YES]; // Se the frame of the window - [[_popoverWindow animationForKey:@"alphaValue"] setDelegate:self]; - + [(CAAnimation *) [_popoverWindow animationForKey:@"alphaValue"] setDelegate:self]; + // Show the popover [self _callDelegateMethod:@selector(popoverWillShow:)]; // Call the delegate - if (self.animates) - { + if (self.animates && self.animationType != INPopoverAnimationTypeFadeOut) { // Animate the popover in + [_popoverWindow presentAnimated]; + } else { [_popoverWindow setAlphaValue:1.0]; - [_popoverWindow presentWithPopoverController:self]; - } - else - { [mainWindow addChildWindow:_popoverWindow ordered:NSWindowAbove]; // Add the popover as a child window of the main window [_popoverWindow makeKeyAndOrderFront:nil]; // Show the popover [self _callDelegateMethod:@selector(popoverDidShow:)]; // Call the delegate } - + NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; if (anchors) { // If the anchors option is enabled, register for frame change notifications [nc addObserver:self selector:@selector(_positionViewFrameChanged:) name:NSViewFrameDidChangeNotification object:self.positionView]; @@ -94,8 +88,9 @@ - (void)presentPopoverFromRect:(NSRect)rect inView:(NSView*)positionView preferr // When -closesWhenPopoverResignsKey is set to YES, the popover will automatically close when the popover loses its key status if (self.closesWhenPopoverResignsKey) { [nc addObserver:self selector:@selector(closePopover:) name:NSWindowDidResignKeyNotification object:_popoverWindow]; - if (!self.closesWhenApplicationBecomesInactive) + if (!self.closesWhenApplicationBecomesInactive) { [nc addObserver:self selector:@selector(applicationDidBecomeActive:) name:NSApplicationDidBecomeActiveNotification object:nil]; + } } else if (self.closesWhenApplicationBecomesInactive) { // this is only needed if closesWhenPopoverResignsKey is NO, otherwise we already get a "resign key" notification when resigning active [nc addObserver:self selector:@selector(closePopover:) name:NSApplicationDidResignActiveNotification object:nil]; @@ -110,8 +105,8 @@ - (void)recalculateAndResetArrowDirection - (IBAction)closePopover:(id)sender { - if (![_popoverWindow isVisible]) { return; } - if ([sender isKindOfClass:[NSNotification class]] && [[sender name] isEqualToString:NSWindowDidResignKeyNotification]) { + if (![_popoverWindow isVisible]) {return;} + if ([sender isKindOfClass:[NSNotification class]] && [[(NSNotification *) sender name] isEqualToString:NSWindowDidResignKeyNotification]) { // ignore "resign key" notification sent when app becomes inactive unless closesWhenApplicationBecomesInactive is enabled if (!self.closesWhenApplicationBecomesInactive && ![NSApp isActive]) return; @@ -119,69 +114,134 @@ - (IBAction)closePopover:(id)sender BOOL close = YES; // Check to see if the delegate has implemented the -popoverShouldClose: method if ([self.delegate respondsToSelector:@selector(popoverShouldClose:)]) { - close = [self.delegate popoverShouldClose:self]; + close = [self.delegate popoverShouldClose:self]; } - if (close) { [self forceClosePopover:nil]; } + if (close) {[self forceClosePopover:nil];} } - (IBAction)forceClosePopover:(id)sender { - if (![_popoverWindow isVisible]) { return; } + if (![_popoverWindow isVisible]) {return;} [self _callDelegateMethod:@selector(popoverWillClose:)]; // Call delegate - if (self.animates) { + if (self.animates && self.animationType != INPopoverAnimationTypeFadeIn) { [_popoverWindow dismissAnimated]; } else { [self _closePopoverAndResetVariables]; } } +- (CGFloat)fittingXOffsetForViewFrame:(CGRect)windowFrame inScreenFrame:(CGRect)screenFrame +{ + CGFloat xOrigin = windowFrame.origin.x; + + CGFloat offset = 0; + if (xOrigin < 0) { + offset = xOrigin * -1; + } + else if (xOrigin + windowFrame.size.width > screenFrame.size.width) + { + offset = ((xOrigin + windowFrame.size.width) - screenFrame.size.width) * -1; + } + + if (ABS(offset) >= (windowFrame.size.width * 0.5 - self.arrowSize.height - self.arrowSize.width)) + { + offset = 0; + } + + return offset; +} + +- (CGFloat)fittingYOffsetForViewFrame:(CGRect)windowFrame inScreenFrame:(CGRect)screenFrame +{ + CGFloat yOrigin = windowFrame.origin.y; + + CGFloat offset = 0; + if (yOrigin < 0) { + offset = yOrigin * -1; + } + else if (yOrigin + windowFrame.size.height > screenFrame.size.height) + { + offset = ((yOrigin + windowFrame.size.height) - screenFrame.size.height) * -1; + } + + if (ABS(offset) >= (windowFrame.size.height * 0.5 - self.arrowSize.height * 2)) + { + offset = 0; + } + + return offset; +} + // Calculate the frame of the window depending on the arrow direction - (NSRect)popoverFrameWithSize:(NSSize)contentSize andArrowDirection:(INPopoverArrowDirection)direction { + [self _setArrowOffset:0]; + + NSRect screenFrame = [[[_positionView window] screen] frame]; NSRect contentRect = NSZeroRect; contentRect.size = contentSize; + NSRect windowFrame = [_popoverWindow frameRectForContentRect:contentRect]; - if (direction == INPopoverArrowDirectionUp) { + + if (direction == INPopoverArrowDirectionUp) + { CGFloat xOrigin = NSMidX(_screenRect) - floor(windowFrame.size.width / 2.0); CGFloat yOrigin = NSMinY(_screenRect) - windowFrame.size.height; + + CGFloat offset = [self fittingXOffsetForViewFrame:CGRectMake(xOrigin, yOrigin, windowFrame.size.width, windowFrame.size.height) inScreenFrame:screenFrame]; + xOrigin += offset; + [self _setArrowOffset:-offset]; + windowFrame.origin = NSMakePoint(xOrigin, yOrigin); - } else if (direction == INPopoverArrowDirectionDown) { + } + else if (direction == INPopoverArrowDirectionDown) + { CGFloat xOrigin = NSMidX(_screenRect) - floor(windowFrame.size.width / 2.0); + + CGFloat offset = [self fittingXOffsetForViewFrame:CGRectMake(xOrigin, windowFrame.origin.y, windowFrame.size.width, windowFrame.size.height) inScreenFrame:screenFrame]; + xOrigin += offset; + [self _setArrowOffset:-offset]; + windowFrame.origin = NSMakePoint(xOrigin, NSMaxY(_screenRect)); - } else if (direction == INPopoverArrowDirectionLeft) { + } + else if (direction == INPopoverArrowDirectionLeft) + { CGFloat yOrigin = NSMidY(_screenRect) - floor(windowFrame.size.height / 2.0); + + CGFloat offset = [self fittingYOffsetForViewFrame:CGRectMake(windowFrame.origin.x, yOrigin, windowFrame.size.width, windowFrame.size.height) inScreenFrame:screenFrame]; + yOrigin += offset; + [self _setArrowOffset:-offset]; + windowFrame.origin = NSMakePoint(NSMaxX(_screenRect), yOrigin); - } else if (direction == INPopoverArrowDirectionRight) { + } + else if (direction == INPopoverArrowDirectionRight) + { CGFloat xOrigin = NSMinX(_screenRect) - windowFrame.size.width; CGFloat yOrigin = NSMidY(_screenRect) - floor(windowFrame.size.height / 2.0); + + CGFloat offset = [self fittingYOffsetForViewFrame:CGRectMake(xOrigin, yOrigin, windowFrame.size.width, windowFrame.size.height) inScreenFrame:screenFrame]; + yOrigin += offset; + [self _setArrowOffset:-offset]; + windowFrame.origin = NSMakePoint(xOrigin, yOrigin); - } else { + } + else + { // If no arrow direction is specified, just return an empty rect windowFrame = NSZeroRect; } + return windowFrame; } -#pragma mark - -#pragma mark Memory Management - -#if !__has_feature(objc_arc) -- (void)dealloc -{ - [_contentViewController release]; - [_popoverWindow release]; - [super dealloc]; -} -#endif - -- (void) animationDidStop:(CAAnimation *)animation finished:(BOOL)flag +- (void)animationDidStop:(CAAnimation *)animation finished:(BOOL)flag { #pragma unused(animation) #pragma unused(flag) // Detect the end of fade out and close the window - if(0.0 == [_popoverWindow alphaValue]) + if (0.0 == [_popoverWindow alphaValue]) [self _closePopoverAndResetVariables]; - else if(1.0 == [_popoverWindow alphaValue]) { + else if (1.0 == [_popoverWindow alphaValue]) { [[_positionView window] addChildWindow:_popoverWindow ordered:NSWindowAbove]; [self _callDelegateMethod:@selector(popoverDidShow:)]; } @@ -204,43 +264,92 @@ - (void)checkPopoverKeyWindowStatus #pragma mark - #pragma mark Getters -@synthesize positionView=_positionView, contentSize=_contentSize, popoverWindow=_popoverWindow, contentViewController=_contentViewController; -- (NSColor*)color { return _popoverWindow.frameView.color; } +- (NSColor *)color +{ + return _popoverWindow.frameView.color; +} + +- (CGFloat)borderWidth +{ + return _popoverWindow.frameView.borderWidth; +} + +- (NSColor *)borderColor +{ + return _popoverWindow.frameView.borderColor; +} -- (CGFloat)borderWidth { return _popoverWindow.frameView.borderWidth; } +- (NSColor *)topHighlightColor +{ + return _popoverWindow.frameView.topHighlightColor; +} -- (NSColor*)borderColor { return _popoverWindow.frameView.borderColor; } +- (CGFloat)cornerRadius +{ + return _popoverWindow.frameView.cornerRadius; +} -- (NSColor*)topHighlightColor { return _popoverWindow.frameView.topHighlightColor; } +- (NSSize)arrowSize +{ + return _popoverWindow.frameView.arrowSize; +} -- (INPopoverArrowDirection)arrowDirection { return _popoverWindow.frameView.arrowDirection; } +- (INPopoverArrowDirection)arrowDirection +{ + return _popoverWindow.frameView.arrowDirection; +} -- (NSView*)contentView { return [_popoverWindow popoverContentView]; } +- (NSView *)contentView +{ + return [_popoverWindow popoverContentView]; +} -- (BOOL)popoverIsVisible { return [_popoverWindow isVisible]; } +- (BOOL)popoverIsVisible +{ + return [_popoverWindow isVisible]; +} #pragma mark - #pragma mark Setters -- (void)setColor:(NSColor *)newColor { _popoverWindow.frameView.color = newColor; } +- (void)setColor:(NSColor *)newColor +{ + _popoverWindow.frameView.color = newColor; +} + +- (void)setBorderWidth:(CGFloat)newBorderWidth +{ + _popoverWindow.frameView.borderWidth = newBorderWidth; + [_popoverWindow updateWindowSize]; + [_popoverWindow updateContentViewOrigin]; +} + +- (void)setBorderColor:(NSColor *)newBorderColor +{ + _popoverWindow.frameView.borderColor = newBorderColor; +} -- (void)setBorderWidth:(CGFloat)newBorderWidth { _popoverWindow.frameView.borderWidth = newBorderWidth; } +- (void)setTopHighlightColor:(NSColor *)newTopHighlightColor +{ + _popoverWindow.frameView.topHighlightColor = newTopHighlightColor; +} -- (void)setBorderColor:(NSColor *)newBorderColor { _popoverWindow.frameView.borderColor = newBorderColor; } +- (void)setCornerRadius:(CGFloat)cornerRadius +{ + _popoverWindow.frameView.cornerRadius = cornerRadius; +} -- (void)setTopHighlightColor:(NSColor *)newTopHighlightColor { _popoverWindow.frameView.topHighlightColor = newTopHighlightColor; } +- (void)setArrowSize:(NSSize)arrowSize +{ + _popoverWindow.frameView.arrowSize = arrowSize; +} - (void)setContentViewController:(NSViewController *)newContentViewController { if (_contentViewController != newContentViewController) { [_popoverWindow setPopoverContentView:nil]; // Clear the content view -#if __has_feature(objc_arc) - _contentViewController = newContentViewController; -#else - [_contentViewController release]; - _contentViewController = [newContentViewController retain]; -#endif + _contentViewController = newContentViewController; NSView *contentView = [_contentViewController view]; self.contentSize = [contentView frame].size; [_popoverWindow setPopoverContentView:contentView]; @@ -254,23 +363,16 @@ - (void)setContentSize:(NSSize)newContentSize NSRect adjustedRect = [self popoverFrameWithSize:newContentSize andArrowDirection:self.arrowDirection]; [_popoverWindow setFrame:adjustedRect display:YES animate:self.animates]; } - -#pragma mark - -- (void)_setPositionView:(NSView*)newPositionView +- (void)_setArrowDirection:(INPopoverArrowDirection)direction { -#if __has_feature(objc_arc) - _positionView = newPositionView; -#else - if (_positionView != newPositionView) { - [_positionView release]; - _positionView = [newPositionView retain]; - } -#endif + _popoverWindow.frameView.arrowDirection = direction; + [_popoverWindow updateContentViewOrigin]; } -- (void)_setArrowDirection:(INPopoverArrowDirection)direction { - _popoverWindow.frameView.arrowDirection = direction; +- (void)_setArrowOffset:(CGFloat)offset +{ + _popoverWindow.frameView.arrowOffset = offset; } #pragma mark - @@ -281,15 +383,20 @@ - (void)_setInitialPropertyValues { // Create an empty popover window _popoverWindow = [[INPopoverWindow alloc] initWithContentRect:NSZeroRect styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO]; - + _popoverWindow.popoverController = self; + // set defaults like iCal popover self.color = [NSColor colorWithCalibratedWhite:0.94 alpha:0.92]; self.borderColor = [NSColor colorWithCalibratedWhite:1.0 alpha:0.92]; self.borderWidth = 1.0; + self.closesWhenEscapeKeyPressed = YES; self.closesWhenPopoverResignsKey = YES; self.closesWhenApplicationBecomesInactive = NO; + self.closeWhenAnchorMoveOffScreen = YES; + self.overrideAnchorFrameUpdate = NO; self.animates = YES; - + self.animationType = INPopoverAnimationTypePop; + // create animation to get callback - delegate is set when opening popover to avoid memory cycles CAAnimation *animation = [CABasicAnimation animation]; [_popoverWindow setAnimations:[NSDictionary dictionaryWithObject:animation forKey:@"alphaValue"]]; @@ -335,14 +442,20 @@ - (INPopoverArrowDirection)_arrowDirectionWithPreferredArrowDirection:(INPopover BOOL arrowLeft = (right > left); BOOL arrowUp = (down > up); // Now the next thing to try is the direction with the most space - switch (direction) { + switch (direction) + { case INPopoverArrowDirectionUp: case INPopoverArrowDirectionDown: + { newDirection = arrowLeft ? INPopoverArrowDirectionLeft : INPopoverArrowDirectionRight; + break; + } case INPopoverArrowDirectionLeft: case INPopoverArrowDirectionRight: + { newDirection = arrowUp ? INPopoverArrowDirectionUp : INPopoverArrowDirectionDown; break; + } default: break; } @@ -355,49 +468,55 @@ - (INPopoverArrowDirection)_arrowDirectionWithPreferredArrowDirection:(INPopover return direction; } -- (void)_positionViewFrameChanged:(NSNotification*)notification +- (void)_positionViewFrameChanged:(NSNotification *)notification { - NSRect superviewBounds = [[self.positionView superview] bounds]; - if (!(NSContainsRect(superviewBounds, [self.positionView frame]))) { - [self forceClosePopover:nil]; // If the position view goes off screen then close the popover - return; + if(self.closeWhenAnchorMoveOffScreen) + { + NSRect superviewBounds = [[self.positionView superview] bounds]; + if (!(NSContainsRect(superviewBounds, [self.positionView frame]))) { + [self forceClosePopover:nil]; // If the position view goes off screen then close the popover + return; + } + } + + if(!self.overrideAnchorFrameUpdate) + { + NSRect newFrame = [_popoverWindow frame]; + + // Convert the rect to window coordinates, then convert window coordinates to screen coordinates + _screenRect = [[self.positionView window] convertRectToScreen:[self.positionView convertRect:_viewRect toView:nil]]; + NSRect calculatedFrame = [self popoverFrameWithSize:self.contentSize andArrowDirection:self.arrowDirection]; // Calculate the window frame based on the arrow direction + newFrame.origin = calculatedFrame.origin; + [_popoverWindow setFrame:newFrame display:YES animate:NO]; // Set the frame of the window } - NSRect newFrame = [_popoverWindow frame]; - _screenRect = [self.positionView convertRect:_viewRect toView:nil]; // Convert the rect to window coordinates - _screenRect.origin = [[self.positionView window] convertBaseToScreen:_screenRect.origin]; // Convert window coordinates to screen coordinates - NSRect calculatedFrame = [self popoverFrameWithSize:self.contentSize andArrowDirection:self.arrowDirection]; // Calculate the window frame based on the arrow direction - newFrame.origin = calculatedFrame.origin; - [_popoverWindow setFrame:newFrame display:YES animate:NO]; // Set the frame of the window } - (void)_closePopoverAndResetVariables { NSWindow *positionWindow = [self.positionView window]; - [_popoverWindow orderOut:nil]; // Close the window + [_popoverWindow orderOut:nil]; // Close the window [self _callDelegateMethod:@selector(popoverDidClose:)]; // Call the delegate to inform that the popover has closed [positionWindow removeChildWindow:_popoverWindow]; // Remove it as a child window [positionWindow makeKeyAndOrderFront:nil]; // Clear all the ivars [self _setArrowDirection:INPopoverArrowDirectionUndefined]; - [self _setPositionView:nil]; [[NSNotificationCenter defaultCenter] removeObserver:self]; - [[_popoverWindow animationForKey:@"alphaValue"] setDelegate:nil]; // reset delegate so it doesn't retain us + _positionView = nil; _screenRect = NSZeroRect; _viewRect = NSZeroRect; + + // When using ARC and no animation, there is a "message sent to deallocated instance" crash if setDelegate: is not performed at the end of the event. + [[_popoverWindow animationForKey:@"alphaValue"] performSelector:@selector(setDelegate:) withObject:nil afterDelay:0]; } - (void)_callDelegateMethod:(SEL)selector { - if ([self.delegate respondsToSelector:selector]) { - -#if __has_feature(objc_arc) + if ([self.delegate respondsToSelector:selector]) + { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Warc-performSelector-leaks" [self.delegate performSelector:selector withObject:self]; #pragma clang diagnostic pop -#else - [self.delegate performSelector:selector withObject:self]; -#endif } } diff --git a/INPopoverController/INPopoverControllerDefines.h b/INPopoverController/INPopoverControllerDefines.h new file mode 100755 index 0000000..a238de4 --- /dev/null +++ b/INPopoverController/INPopoverControllerDefines.h @@ -0,0 +1,19 @@ +// +// INPopoverControllerDefines.h +// Copyright 2011-2014 Indragie Karunaratne. All rights reserved. +// + +typedef NS_ENUM(NSUInteger, INPopoverArrowDirection) { + INPopoverArrowDirectionUndefined = 0, + INPopoverArrowDirectionLeft = NSMaxXEdge, + INPopoverArrowDirectionRight = NSMinXEdge, + INPopoverArrowDirectionUp = NSMaxYEdge, + INPopoverArrowDirectionDown = NSMinYEdge +}; + +typedef NS_ENUM(NSInteger, INPopoverAnimationType) { + INPopoverAnimationTypePop = 0, // Pop animation similar to NSPopover + INPopoverAnimationTypeFadeIn, // Fade in only, no fade out + INPopoverAnimationTypeFadeOut, // Fade out only, no fade in + INPopoverAnimationTypeFadeInOut // Fade in and out +}; \ No newline at end of file diff --git a/INPopoverController/INPopoverParentWindow.h b/INPopoverController/INPopoverParentWindow.h new file mode 100755 index 0000000..483e278 --- /dev/null +++ b/INPopoverController/INPopoverParentWindow.h @@ -0,0 +1,12 @@ +// +// INPopoverParentWindow.h +// Copyright 2011-2014 Indragie Karunaratne. All rights reserved. +// + +#import + +@interface INPopoverParentWindow : NSWindow + +- (BOOL)isReallyKeyWindow; + +@end diff --git a/INPopoverController/INPopoverParentWindow.m b/INPopoverController/INPopoverParentWindow.m new file mode 100755 index 0000000..9f4b629 --- /dev/null +++ b/INPopoverController/INPopoverParentWindow.m @@ -0,0 +1,31 @@ +// +// INAlwaysKeyWindow.m +// Copyright 2011-2014 Indragie Karunaratne. All rights reserved. +// + +#import "INPopoverParentWindow.h" +#import "INPopoverWindow.h" + +@implementation INPopoverParentWindow + +- (BOOL)isKeyWindow +{ + BOOL isKey = [super isKeyWindow]; + if (!isKey) { + for (NSWindow *childWindow in [self childWindows]) { + if ([childWindow isKindOfClass:[INPopoverWindow class]]) { + // if we have popover attached, window is key if app is active + isKey = [NSApp isActive]; + break; + } + } + } + return isKey; +} + +- (BOOL)isReallyKeyWindow +{ + return [super isKeyWindow]; +} + +@end diff --git a/INPopoverController/INPopoverPrefixHeader.pch b/INPopoverController/INPopoverPrefixHeader.pch new file mode 100755 index 0000000..68b7426 --- /dev/null +++ b/INPopoverController/INPopoverPrefixHeader.pch @@ -0,0 +1,5 @@ +#ifdef __OBJC__ + +#import + +#endif diff --git a/INPopoverController/INPopoverWindow.h b/INPopoverController/INPopoverWindow.h new file mode 100755 index 0000000..a3ae6f0 --- /dev/null +++ b/INPopoverController/INPopoverWindow.h @@ -0,0 +1,27 @@ +// +// INPopoverWindow.h +// Copyright 2011-2014 Indragie Karunaratne. All rights reserved. +// + +#import +#import "INPopoverControllerDefines.h" + +/** + @class INPopoverWindow + An NSWindow subclass used to draw a custom window frame (@class INPopoverWindowFrame) + **/ +@class INPopoverWindowFrame; +@class INPopoverController; + +@interface INPopoverWindow : NSPanel +@property (nonatomic, readonly) INPopoverWindowFrame *frameView; // Equivalent to contentView +@property (nonatomic, assign) INPopoverController *popoverController; +@property (nonatomic, strong) NSView *popoverContentView; + +- (void) updateWindowSize; +- (void) updateContentViewOrigin; + +- (void)presentAnimated; +- (void)dismissAnimated; + +@end diff --git a/INPopoverWindow.m b/INPopoverController/INPopoverWindow.m similarity index 53% rename from INPopoverWindow.m rename to INPopoverController/INPopoverWindow.m index df7e919..86b35e6 100644 --- a/INPopoverWindow.m +++ b/INPopoverController/INPopoverWindow.m @@ -1,9 +1,7 @@ // // INPopoverWindow.m -// Copyright 2011 Indragie Karunaratne. All rights reserved. +// Copyright 2011-2014 Indragie Karunaratne. All rights reserved. // -// Licensed under the BSD License -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #import "INPopoverWindow.h" #import "INPopoverControllerDefines.h" @@ -11,22 +9,21 @@ #import "INPopoverController.h" #import -#define START_SIZE NSMakeSize(20, 20) -#define OVERSHOOT_FACTOR 1.2 +#define START_SIZE NSMakeSize(20, 20) +#define OVERSHOOT_FACTOR 1.2 // A lot of this code was adapted from the following article: // -@interface INPopoverWindow () -- (NSWindow *)_zoomWindowWithRect:(NSRect)rect; -@end - -@implementation INPopoverWindow +@implementation INPopoverWindow { + NSView *_popoverContentView; + NSWindow *_zoomWindow; +} // Borderless, transparent window - (id)initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)windowStyle backing:(NSBackingStoreType)bufferingType defer:(BOOL)deferCreation { - if ((self = [super initWithContentRect:contentRect styleMask:NSBorderlessWindowMask backing:bufferingType defer:deferCreation])) { + if ((self = [super initWithContentRect:contentRect styleMask:NSNonactivatingPanelMask backing:bufferingType defer:deferCreation])) { [self setOpaque:NO]; [self setBackgroundColor:[NSColor clearColor]]; [self setHasShadow:YES]; @@ -38,12 +35,14 @@ - (id)initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)windowStyle - (NSRect)contentRectForFrameRect:(NSRect)windowFrame { windowFrame.origin = NSZeroPoint; - return NSInsetRect(windowFrame, INPOPOVER_ARROW_HEIGHT, INPOPOVER_ARROW_HEIGHT); + const CGFloat arrowHeight = self.frameView.arrowSize.height + self.frameView.cornerRadius; + return NSInsetRect(windowFrame, arrowHeight, arrowHeight); } - (NSRect)frameRectForContentRect:(NSRect)contentRect { - return NSInsetRect(contentRect, -INPOPOVER_ARROW_HEIGHT, -INPOPOVER_ARROW_HEIGHT); + const CGFloat arrowHeight = self.frameView.arrowSize.height + self.frameView.borderWidth; + return NSInsetRect(contentRect, -arrowHeight, -arrowHeight); } // Allow the popover to become the key window @@ -62,54 +61,101 @@ - (BOOL)isVisible return [super isVisible] || [_zoomWindow isVisible]; } -- (INPopoverWindowFrame*)frameView +- (INPopoverWindowFrame *)frameView { - return (INPopoverWindowFrame*)[self contentView]; + return (INPopoverWindowFrame *) [self contentView]; } - (void)setContentView:(NSView *)aView { - [self setPopoverContentView:aView]; + [self setPopoverContentView:aView]; } - (void)setPopoverContentView:(NSView *)aView { - if ([_popoverContentView isEqualTo:aView]) { return; } + if ([_popoverContentView isEqualTo:aView]) {return;} NSRect bounds = [self frame]; bounds.origin = NSZeroPoint; + INPopoverWindowFrame *frameView = [self frameView]; if (!frameView) { -#if __has_feature(objc_arc) - frameView = [[INPopoverWindowFrame alloc] initWithFrame:bounds]; -#else - frameView = [[[INPopoverWindowFrame alloc] initWithFrame:bounds] autorelease]; -#endif + frameView = [[INPopoverWindowFrame alloc] initWithFrame:bounds]; [super setContentView:frameView]; // Call on super or there will be infinite loop } if (_popoverContentView) { [_popoverContentView removeFromSuperview]; } _popoverContentView = aView; + [_popoverContentView setFrame:[self contentRectForFrameRect:bounds]]; [_popoverContentView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable]; + [self updateContentViewOrigin]; [frameView addSubview:_popoverContentView]; } -- (void)presentWithPopoverController:(INPopoverController *)popoverController +- (void) updateWindowSize +{ + const CGFloat inset = self.frameView.cornerRadius + self.frameView.arrowSize.height + 2 * self.frameView.borderWidth; + const NSRect frame = NSInsetRect(_popoverContentView.frame, inset, inset); + + [self setFrame:frame display:NO]; + [self.contentView setFrameSize:frame.size]; +} + +- (void) updateContentViewOrigin +{ + if(_popoverContentView == nil || self.popoverController == nil || !self.popoverController.borderWidth) return; + + NSPoint point = [self contentRectForFrameRect:self.frame].origin; + const CGFloat width = ceil(self.popoverController.borderWidth / 2.0f); + + switch (self.popoverController.arrowDirection) + { + case INPopoverArrowDirectionLeft: + point.y -= width; + break; + + case INPopoverArrowDirectionRight: + point.y -= width; + break; + + case INPopoverArrowDirectionDown: + point.x -= width; + break; + + case INPopoverArrowDirectionUp: + point.x -= width; + break; + } + + [_popoverContentView setFrameOrigin:point]; +} + +- (void)presentAnimated { if ([self isVisible]) return; + switch (self.popoverController.animationType) { + case INPopoverAnimationTypePop: + [self presentWithPopAnimation]; + break; + case INPopoverAnimationTypeFadeIn: + case INPopoverAnimationTypeFadeInOut: + [self presentWithFadeAnimation]; + break; + default: + break; + } +} + +- (void)presentWithPopAnimation +{ NSRect endFrame = [self frame]; - NSRect startFrame = [popoverController popoverFrameWithSize:START_SIZE andArrowDirection:self.frameView.arrowDirection]; - NSRect overshootFrame = [popoverController popoverFrameWithSize:NSMakeSize(endFrame.size.width*OVERSHOOT_FACTOR, endFrame.size.height*OVERSHOOT_FACTOR) andArrowDirection:self.frameView.arrowDirection]; - -#if __has_feature(objc_arc) - _zoomWindow = [self _zoomWindowWithRect:startFrame]; -#else - _zoomWindow = [[self _zoomWindowWithRect:startFrame] retain]; -#endif + NSRect startFrame = [self.popoverController popoverFrameWithSize:START_SIZE andArrowDirection:self.frameView.arrowDirection]; + NSRect overshootFrame = [self.popoverController popoverFrameWithSize:NSMakeSize(endFrame.size.width * OVERSHOOT_FACTOR, endFrame.size.height * OVERSHOOT_FACTOR) andArrowDirection:self.frameView.arrowDirection]; + _zoomWindow = [self _zoomWindowWithRect:startFrame]; [_zoomWindow setAlphaValue:0.0]; [_zoomWindow orderFront:self]; @@ -119,8 +165,17 @@ - (void)presentWithPopoverController:(INPopoverController *)popoverController [anim setValues:[NSArray arrayWithObjects:[NSValue valueWithRect:startFrame], [NSValue valueWithRect:overshootFrame], [NSValue valueWithRect:endFrame], nil]]; [_zoomWindow setAnimations:[NSDictionary dictionaryWithObjectsAndKeys:anim, @"frame", nil]]; + [NSAnimationContext beginGrouping]; [[_zoomWindow animator] setAlphaValue:1.0]; [[_zoomWindow animator] setFrame:endFrame display:YES]; + [NSAnimationContext endGrouping]; +} + +- (void)presentWithFadeAnimation +{ + [self setAlphaValue:0.0]; + [self makeKeyAndOrderFront:nil]; + [[self animator] setAlphaValue:1.0]; } - (void)dismissAnimated @@ -131,19 +186,21 @@ - (void)dismissAnimated - (void)animationDidStop:(CAAnimation *)anim finished:(BOOL)flag { - [self makeKeyAndOrderFront:self]; + [self setAlphaValue:1.0]; + [self makeKeyAndOrderFront:self]; [_zoomWindow close]; - -#if !__has_feature(objc_arc) - [_zoomWindow release]; -#endif _zoomWindow = nil; - + // call the animation delegate of the "real" window CAAnimation *windowAnimation = [self animationForKey:@"alphaValue"]; [[windowAnimation delegate] animationDidStop:anim finished:flag]; } +- (void)cancelOperation:(id)sender +{ + if (self.popoverController.closesWhenEscapeKeyPressed) [self.popoverController closePopover:nil]; +} + #pragma mark - #pragma mark Private @@ -155,53 +212,44 @@ - (NSWindow *)_zoomWindowWithRect:(NSRect)rect BOOL isOneShot = [self isOneShot]; if (isOneShot) [self setOneShot:NO]; - - if ([self windowNumber] <= 0) - { - // force creation of window device by putting it on-screen. We make it transparent to minimize the chance of visible flicker + + if ([self windowNumber] <= 0) { + // force creation of window device by putting it on-screen. We make it transparent to minimize the chance of visible flicker CGFloat alpha = [self alphaValue]; [self setAlphaValue:0.0]; [self orderBack:self]; [self orderOut:self]; [self setAlphaValue:alpha]; } - + // get window content as image NSRect frame = [self frame]; -#if __has_feature(objc_arc) NSImage *image = [[NSImage alloc] initWithSize:frame.size]; -#else - NSImage *image = [[[NSImage alloc] initWithSize:frame.size] autorelease]; -#endif - [self displayIfNeeded]; // refresh view - [image lockFocus]; - NSCopyBits([self gState], NSMakeRect(0.0, 0.0, frame.size.width, frame.size.height), NSZeroPoint); - [image unlockFocus]; - + [self displayIfNeeded]; // refresh view + NSView *view = self.contentView; + NSBitmapImageRep *imageRep = [view bitmapImageRepForCachingDisplayInRect:view.bounds]; + [view cacheDisplayInRect:view.bounds toBitmapImageRep:imageRep]; + [image addRepresentation:imageRep]; + // create zoom window NSWindow *zoomWindow = [[NSWindow alloc] initWithContentRect:rect styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO]; [zoomWindow setBackgroundColor:[NSColor clearColor]]; [zoomWindow setHasShadow:[self hasShadow]]; [zoomWindow setLevel:[self level]]; [zoomWindow setOpaque:NO]; - [zoomWindow setReleasedWhenClosed:YES]; - [zoomWindow useOptimizedDrawing:YES]; + [zoomWindow setReleasedWhenClosed:NO]; -#if __has_feature(objc_arc) NSImageView *imageView = [[NSImageView alloc] initWithFrame:[zoomWindow contentRectForFrameRect:frame]]; -#else - NSImageView *imageView = [[[NSImageView alloc] initWithFrame:[zoomWindow contentRectForFrameRect:frame]] autorelease]; -#endif [imageView setImage:image]; [imageView setImageFrameStyle:NSImageFrameNone]; - [imageView setImageScaling:NSScaleToFit]; - [imageView setAutoresizingMask:NSViewWidthSizable|NSViewHeightSizable]; - + [imageView setImageScaling:NSImageScaleAxesIndependently]; + [imageView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable]; + [zoomWindow setContentView:imageView]; - + // reset one shot flag [self setOneShot:isOneShot]; - + return zoomWindow; } diff --git a/INPopoverController/INPopoverWindowFrame.h b/INPopoverController/INPopoverWindowFrame.h new file mode 100644 index 0000000..9d9fa37 --- /dev/null +++ b/INPopoverController/INPopoverWindowFrame.h @@ -0,0 +1,22 @@ +// +// INPopoverWindowFrame.h +// Copyright 2011-2014 Indragie Karunaratne. All rights reserved. +// + +#import +#import "INPopoverControllerDefines.h" + +/** + @class INPopoverWindowFrame + The NSView subclass responsible for drawing the frame of the popover + */ +@interface INPopoverWindowFrame : NSView +@property (nonatomic, strong) NSColor *color; +@property (nonatomic, strong) NSColor *borderColor; +@property (nonatomic, strong) NSColor *topHighlightColor; +@property (nonatomic, assign) CGFloat borderWidth; +@property (nonatomic, assign) CGFloat cornerRadius; +@property (nonatomic, assign) NSSize arrowSize; +@property (nonatomic, assign) INPopoverArrowDirection arrowDirection; +@property (nonatomic, assign) CGFloat arrowOffset; +@end diff --git a/INPopoverController/INPopoverWindowFrame.m b/INPopoverController/INPopoverWindowFrame.m new file mode 100644 index 0000000..32b4243 --- /dev/null +++ b/INPopoverController/INPopoverWindowFrame.m @@ -0,0 +1,195 @@ +// +// INPopoverWindowFrame.m +// Copyright 2011-2014 Indragie Karunaratne. All rights reserved. +// + +#import "INPopoverWindowFrame.h" + +@implementation INPopoverWindowFrame + +- (id)initWithFrame:(NSRect)frame +{ + if ((self = [super initWithFrame:frame])) { + _color = [NSColor colorWithCalibratedWhite:0.0 alpha:0.8]; + _cornerRadius = 4.0; + _arrowSize = NSMakeSize(23.0, 12.0); + _arrowDirection = INPopoverArrowDirectionLeft; + } + return self; +} + +- (void)drawRect:(NSRect)dirtyRect +{ + NSRect bounds = [self bounds]; + if (((NSUInteger) self.borderWidth % 2) == 1) { // Remove draw glitch on odd border width + bounds = NSInsetRect(bounds, 0.5, 0.5); + } + + NSBezierPath *path = [self _popoverBezierPathWithRect:bounds], *inside; + + if([self.color isEqualTo:self.borderColor]) //prevent to redraw over the previous colored area, important if alpha channel used! + { + NSUInteger offset = ceil(self.borderWidth / 2.0f); + inside = [self _popoverBezierPathWithRect: NSMakeRect(offset, offset, bounds.size.width - 2 * offset, bounds.size.height - 2 * offset)]; + } + else + inside = path; + + if (self.color) + { + [self.color set]; + [inside fill]; + } + + if (self.borderWidth > 0) + { + [path setLineWidth:self.borderWidth]; + + [self.borderColor set]; + [path stroke]; + } + + const CGFloat arrowWidth = self.arrowSize.width; + const CGFloat arrowHeight = self.arrowSize.height; + const CGFloat radius = self.cornerRadius; + + if (self.topHighlightColor) { + [self.topHighlightColor set]; + NSRect bounds = NSInsetRect([self bounds], arrowHeight, arrowHeight); + NSRect lineRect = NSMakeRect(floor(NSMinX(bounds) + (radius / 2.0)), NSMaxY(bounds) - self.borderWidth - 1, NSWidth(bounds) - radius, 1.0); + + if (self.arrowDirection == INPopoverArrowDirectionUp) { + CGFloat width = floor((lineRect.size.width / 2.0) - (arrowWidth / 2.0)); + NSRectFill(NSMakeRect(lineRect.origin.x, lineRect.origin.y, width, lineRect.size.height)); + NSRectFill(NSMakeRect(floor(lineRect.origin.x + (lineRect.size.width / 2.0) + (arrowWidth / 2.0)), lineRect.origin.y, width, lineRect.size.height)); + } else { + NSRectFill(lineRect); + } + } +} + +#pragma mark - +#pragma mark Private + +- (NSBezierPath *)_popoverBezierPathWithRect:(NSRect)aRect +{ + const CGFloat radius = self.cornerRadius, border = floor(self.borderWidth / 2.0f); + const CGFloat arrowWidth = self.arrowSize.width; + const CGFloat arrowHeight = self.arrowSize.height; + const CGFloat inset = radius + arrowHeight + ceil(self.borderWidth / 2.0f); + const NSRect drawingRect = NSInsetRect(aRect, inset, inset); + + const CGFloat minX = NSMinX(drawingRect) - ((self.arrowDirection == INPopoverArrowDirectionUp || self.arrowDirection == INPopoverArrowDirectionDown) ? border : 0); + const CGFloat maxX = NSMaxX(drawingRect) - ((self.arrowDirection == INPopoverArrowDirectionUp || self.arrowDirection == INPopoverArrowDirectionDown) ? border : 0); + const CGFloat minY = NSMinY(drawingRect) - ((self.arrowDirection == INPopoverArrowDirectionRight || self.arrowDirection == INPopoverArrowDirectionLeft) ? border : 0); + const CGFloat maxY = NSMaxY(drawingRect) - ((self.arrowDirection == INPopoverArrowDirectionRight || self.arrowDirection == INPopoverArrowDirectionLeft) ? border : 0); + + NSBezierPath *path = [NSBezierPath bezierPath]; + [path setLineJoinStyle:NSRoundLineJoinStyle]; + + // Bottom left corner + [path appendBezierPathWithArcWithCenter:NSMakePoint(minX, minY) radius:radius startAngle:180.0 endAngle:270.0]; + if (self.arrowDirection == INPopoverArrowDirectionDown) { + CGFloat midX = NSMidX(drawingRect); + NSPoint points[3]; + points[0] = NSMakePoint(floor(midX + self.arrowOffset - (arrowWidth / 2.0)), minY - radius); // Starting point + points[1] = NSMakePoint(floor(midX + self.arrowOffset), points[0].y - arrowHeight); // Arrow tip + points[2] = NSMakePoint(floor(midX + self.arrowOffset + (arrowWidth / 2.0)), points[0].y); // Ending point + [path appendBezierPathWithPoints:points count:3]; + } + // Bottom right corner + [path appendBezierPathWithArcWithCenter:NSMakePoint(maxX, minY) radius:radius startAngle:270.0 endAngle:360.0]; + if (self.arrowDirection == INPopoverArrowDirectionRight) { + CGFloat midY = NSMidY(drawingRect); + NSPoint points[3]; + points[0] = NSMakePoint(maxX + radius, floor(midY + self.arrowOffset - (arrowWidth / 2.0))); + points[1] = NSMakePoint(points[0].x + arrowHeight, floor(midY + self.arrowOffset)); + points[2] = NSMakePoint(points[0].x, floor(midY + self.arrowOffset + (arrowWidth / 2.0))); + [path appendBezierPathWithPoints:points count:3]; + } + // Top right corner + [path appendBezierPathWithArcWithCenter:NSMakePoint(maxX, maxY) radius:radius startAngle:0.0 endAngle:90.0]; + if (self.arrowDirection == INPopoverArrowDirectionUp) { + CGFloat midX = NSMidX(drawingRect); + NSPoint points[3]; + points[0] = NSMakePoint(floor(midX + self.arrowOffset + (arrowWidth / 2.0)), maxY + radius); + points[1] = NSMakePoint(floor(midX + self.arrowOffset), points[0].y + arrowHeight); + points[2] = NSMakePoint(floor(midX + self.arrowOffset - (arrowWidth / 2.0)), points[0].y); + [path appendBezierPathWithPoints:points count:3]; + } + // Top left corner + [path appendBezierPathWithArcWithCenter:NSMakePoint(minX, maxY) radius:radius startAngle:90.0 endAngle:180.0]; + if (self.arrowDirection == INPopoverArrowDirectionLeft) { + CGFloat midY = NSMidY(drawingRect); + NSPoint points[3]; + points[0] = NSMakePoint(minX - radius, floor(midY + self.arrowOffset + (arrowWidth / 2.0))); + points[1] = NSMakePoint(points[0].x - arrowHeight, floor(midY + self.arrowOffset)); + points[2] = NSMakePoint(points[0].x, floor(midY + self.arrowOffset - (arrowWidth / 2.0))); + [path appendBezierPathWithPoints:points count:3]; + } + [path closePath]; + + return path; +} + +#pragma mark - +#pragma mark Accessors + +// Redraw the frame every time a property is changed +- (void)setColor:(NSColor *)newColor +{ + if (_color != newColor) { + _color = newColor; + [self setNeedsDisplay:YES]; + } +} + +- (void)setBorderColor:(NSColor *)newBorderColor +{ + if (_borderColor != newBorderColor) { + _borderColor = newBorderColor; + [self setNeedsDisplay:YES]; + } +} + + +- (void)setBorderWidth:(CGFloat)newBorderWidth +{ + if (_borderWidth != newBorderWidth) { + _borderWidth = newBorderWidth; + [self setNeedsDisplay:YES]; + } +} + +- (void)setCornerRadius:(CGFloat)cornerRadius +{ + if (_cornerRadius != cornerRadius) { + _cornerRadius = cornerRadius; + [self setNeedsDisplay:YES]; + } +} + +- (void)setArrowSize:(NSSize)arrowSize +{ + if (!NSEqualSizes(_arrowSize, arrowSize)) { + _arrowSize = arrowSize; + [self setNeedsDisplay:YES]; + } +} + +- (void)setArrowDirection:(INPopoverArrowDirection)newArrowDirection +{ + if (_arrowDirection != newArrowDirection) { + _arrowDirection = newArrowDirection; + [self setNeedsDisplay:YES]; + } +} + +- (void)setArrowOffset:(CGFloat)arrowOffset { + if (_arrowOffset != arrowOffset) { + _arrowOffset = arrowOffset; + [self setNeedsDisplay:YES]; + } +} + +@end diff --git a/INPopoverControllerDefines.h b/INPopoverControllerDefines.h deleted file mode 100644 index b72afe4..0000000 --- a/INPopoverControllerDefines.h +++ /dev/null @@ -1,23 +0,0 @@ -// -// INPopoverControllerDefines.h -// Copyright 2011 Indragie Karunaratne. All rights reserved. -// -// Licensed under the BSD License -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -enum { - INPopoverArrowDirectionUndefined = 0, - INPopoverArrowDirectionLeft = NSMaxXEdge, - INPopoverArrowDirectionRight = NSMinXEdge, - INPopoverArrowDirectionUp = NSMaxYEdge, - INPopoverArrowDirectionDown = NSMinYEdge -}; - -typedef NSRectEdge INPopoverArrowDirection; - -/** The arrow height **/ -#define INPOPOVER_ARROW_HEIGHT 12.0 -/** The arrow width **/ -#define INPOPOVER_ARROW_WIDTH 23.0 -/** Corner radius to use when drawing popover corners **/ -#define INPOPOVER_CORNER_RADIUS 4.0 \ No newline at end of file diff --git a/INPopoverParentWindow.h b/INPopoverParentWindow.h deleted file mode 100644 index 53f48e6..0000000 --- a/INPopoverParentWindow.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// INPopoverParentWindow.h -// Copyright 2011 Indragie Karunaratne. All rights reserved. -// -// Licensed under the BSD License -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -#import - -@interface INPopoverParentWindow : NSWindow - -- (BOOL)isReallyKeyWindow; - -@end diff --git a/INPopoverParentWindow.m b/INPopoverParentWindow.m deleted file mode 100644 index 10ad715..0000000 --- a/INPopoverParentWindow.m +++ /dev/null @@ -1,34 +0,0 @@ -// -// INAlwaysKeyWindow.m -// Copyright 2011 Indragie Karunaratne. All rights reserved. -// -// Licensed under the BSD License -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import "INPopoverParentWindow.h" -#import "INPopoverWindow.h" - - -@implementation INPopoverParentWindow - -- (BOOL)isKeyWindow -{ - BOOL isKey = [super isKeyWindow]; - if (!isKey) { - for (NSWindow *childWindow in [self childWindows]) { - if ([childWindow isKindOfClass:[INPopoverWindow class]]) { - // if we have popover attached, window is key if app is active - isKey = [NSApp isActive]; - break; - } - } - } - return isKey; -} - -- (BOOL)isReallyKeyWindow -{ - return [super isKeyWindow]; -} - -@end diff --git a/INPopoverPrefixHeader.pch b/INPopoverPrefixHeader.pch deleted file mode 100644 index c14011e..0000000 --- a/INPopoverPrefixHeader.pch +++ /dev/null @@ -1,4 +0,0 @@ - -#ifdef __OBJC__ - #import -#endif diff --git a/INPopoverWindow.h b/INPopoverWindow.h deleted file mode 100644 index fe3f63a..0000000 --- a/INPopoverWindow.h +++ /dev/null @@ -1,28 +0,0 @@ -// -// INPopoverWindow.h -// Copyright 2011 Indragie Karunaratne. All rights reserved. -// -// Licensed under the BSD License -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import -#import "INPopoverControllerDefines.h" - -/** - @class INPopoverWindow - An NSWindow subclass used to draw a custom window frame (@class INPopoverWindowFrame) - **/ -@class INPopoverWindowFrame; -@class INPopoverController; -@interface INPopoverWindow : NSWindow { - NSView *_popoverContentView; - NSWindow *_zoomWindow; -} - -@property (nonatomic, readonly) INPopoverWindowFrame *frameView; // Equivalent to contentView -@property (nonatomic, retain) NSView *popoverContentView; - -- (void)presentWithPopoverController:(INPopoverController *)popoverController; -- (void)dismissAnimated; - -@end diff --git a/INPopoverWindowFrame.h b/INPopoverWindowFrame.h deleted file mode 100644 index bfd32a9..0000000 --- a/INPopoverWindowFrame.h +++ /dev/null @@ -1,25 +0,0 @@ -// -// INPopoverWindowFrame.h -// Copyright 2011 Indragie Karunaratne. All rights reserved. -// -// Licensed under the BSD License -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import -#import "INPopoverControllerDefines.h" - -/** - @class INPopoverWindowFrame - The NSView subclass responsible for drawing the frame of the popover - */ -@interface INPopoverWindowFrame : NSView { - NSColor *_color; - NSColor *_borderColor; - NSColor *_topHighlightColor; - CGFloat _borderWidth; - INPopoverArrowDirection _arrowDirection; -} -@property (nonatomic, retain) NSColor *color, *borderColor, *topHighlightColor; -@property (nonatomic, assign) CGFloat borderWidth; -@property (nonatomic, assign) INPopoverArrowDirection arrowDirection; -@end diff --git a/INPopoverWindowFrame.m b/INPopoverWindowFrame.m deleted file mode 100644 index 06348df..0000000 --- a/INPopoverWindowFrame.m +++ /dev/null @@ -1,168 +0,0 @@ -// -// INPopoverWindowFrame.m -// Copyright 2011 Indragie Karunaratne. All rights reserved. -// -// Licensed under the BSD License -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import "INPopoverWindowFrame.h" - -@interface INPopoverWindowFrame () -- (NSBezierPath*)_popoverBezierPathWithRect:(NSRect)aRect; -@end - -@implementation INPopoverWindowFrame -@synthesize color = _color, borderColor = _borderColor, topHighlightColor=_topHighlightColor; -@synthesize borderWidth = _borderWidth; -@synthesize arrowDirection = _arrowDirection; - -- (id)initWithFrame:(NSRect)frame -{ - self = [super initWithFrame:frame]; - if (self) { - // Set some default values - self.arrowDirection = INPopoverArrowDirectionLeft; - self.color = [NSColor colorWithCalibratedWhite:0.0 alpha:0.8]; - } - return self; -} - -#if !__has_feature(objc_arc) -- (void)dealloc -{ - [_color release]; - [_borderColor release]; - [_topHighlightColor release]; - [super dealloc]; -} -#endif - -- (void)drawRect:(NSRect)dirtyRect -{ - NSBezierPath *path = [self _popoverBezierPathWithRect:[self bounds]]; - [self.color set]; - [path fill]; - - [path setLineWidth:self.borderWidth]; - [self.borderColor set]; - [path stroke]; - - if (self.topHighlightColor) { - [self.topHighlightColor set]; - NSRect bounds = NSInsetRect([self bounds], INPOPOVER_ARROW_HEIGHT, INPOPOVER_ARROW_HEIGHT); - NSRect lineRect = NSMakeRect(floor(NSMinX(bounds) + (INPOPOVER_CORNER_RADIUS / 2.0)), NSMaxY(bounds) - self.borderWidth - 1, NSWidth(bounds) - INPOPOVER_CORNER_RADIUS, 1.0); - - if (self.arrowDirection == INPopoverArrowDirectionUp) { - CGFloat width = floor((lineRect.size.width / 2.0) - (INPOPOVER_ARROW_WIDTH / 2.0)); - NSRectFill(NSMakeRect(lineRect.origin.x, lineRect.origin.y, width, lineRect.size.height)); - NSRectFill(NSMakeRect(floor(lineRect.origin.x + (lineRect.size.width / 2.0) + (INPOPOVER_ARROW_WIDTH / 2.0)), lineRect.origin.y, width, lineRect.size.height)); - } else { - NSRectFill(lineRect); - } - } -} - -#pragma mark - -#pragma mark Private - -- (NSBezierPath*)_popoverBezierPathWithRect:(NSRect)aRect -{ - CGFloat radius = INPOPOVER_CORNER_RADIUS; - CGFloat inset = radius + INPOPOVER_ARROW_HEIGHT; - NSRect drawingRect = NSInsetRect(aRect, inset, inset); - CGFloat minX = NSMinX(drawingRect); - CGFloat maxX = NSMaxX(drawingRect); - CGFloat minY = NSMinY(drawingRect); - CGFloat maxY = NSMaxY(drawingRect); - - NSBezierPath *path = [NSBezierPath bezierPath]; - [path setLineJoinStyle:NSRoundLineJoinStyle]; - - // Bottom left corner - [path appendBezierPathWithArcWithCenter:NSMakePoint(minX, minY) radius:radius startAngle:180.0 endAngle:270.0]; - if (self.arrowDirection == INPopoverArrowDirectionDown) { - CGFloat midX = NSMidX(drawingRect); - NSPoint points[3]; - points[0] = NSMakePoint(floor(midX - (INPOPOVER_ARROW_WIDTH / 2.0)), minY - radius); // Starting point - points[1] = NSMakePoint(floor(midX), points[0].y - INPOPOVER_ARROW_HEIGHT); // Arrow tip - points[2] = NSMakePoint(floor(midX + (INPOPOVER_ARROW_WIDTH / 2.0)), points[0].y); // Ending point - [path appendBezierPathWithPoints:points count:3]; - } - // Bottom right corner - [path appendBezierPathWithArcWithCenter:NSMakePoint(maxX, minY) radius:radius startAngle:270.0 endAngle:360.0]; - if (self.arrowDirection == INPopoverArrowDirectionRight) { - CGFloat midY = NSMidY(drawingRect); - NSPoint points[3]; - points[0] = NSMakePoint(maxX + radius, floor(midY - (INPOPOVER_ARROW_WIDTH / 2.0))); - points[1] = NSMakePoint(points[0].x + INPOPOVER_ARROW_HEIGHT, floor(midY)); - points[2] = NSMakePoint(points[0].x, floor(midY + (INPOPOVER_ARROW_WIDTH / 2.0))); - [path appendBezierPathWithPoints:points count:3]; - } - // Top right corner - [path appendBezierPathWithArcWithCenter:NSMakePoint(maxX, maxY) radius:radius startAngle:0.0 endAngle:90.0]; - if (self.arrowDirection == INPopoverArrowDirectionUp) { - CGFloat midX = NSMidX(drawingRect); - NSPoint points[3]; - points[0] = NSMakePoint(floor(midX + (INPOPOVER_ARROW_WIDTH / 2.0)), maxY + radius); - points[1] = NSMakePoint(floor(midX), points[0].y + INPOPOVER_ARROW_HEIGHT); - points[2] = NSMakePoint(floor(midX - (INPOPOVER_ARROW_WIDTH / 2.0)), points[0].y); - [path appendBezierPathWithPoints:points count:3]; - } - // Top left corner - [path appendBezierPathWithArcWithCenter:NSMakePoint(minX, maxY) radius:radius startAngle:90.0 endAngle:180.0]; - if (self.arrowDirection == INPopoverArrowDirectionLeft) { - CGFloat midY = NSMidY(drawingRect); - NSPoint points[3]; - points[0] = NSMakePoint(minX - radius, floor(midY + (INPOPOVER_ARROW_WIDTH / 2.0))); - points[1] = NSMakePoint(points[0].x - INPOPOVER_ARROW_HEIGHT, floor(midY)); - points[2] = NSMakePoint(points[0].x, floor(midY - (INPOPOVER_ARROW_WIDTH / 2.0))); - [path appendBezierPathWithPoints:points count:3]; - } - [path closePath]; - - return path; -} - -#pragma mark - -#pragma mark Accessors - -// Redraw the frame every time a property is changed -- (void)setColor:(NSColor *)newColor -{ - if (_color != newColor) { -#if __has_feature(objc_arc) - _color = newColor; -#else - [_color release]; - _color = [newColor retain]; -#endif - [self setNeedsDisplay:YES]; - } -} - -- (void)setBorderColor:(NSColor *)newBorderColor -{ - if (_borderColor != newBorderColor) { -#if __has_feature(objc_arc) - _borderColor = newBorderColor; -#else - [_borderColor release]; - _borderColor = [newBorderColor retain]; -#endif - [self setNeedsDisplay:YES]; - } -} - -- (void)setArrowDirection:(INPopoverArrowDirection)newArrowDirection -{ - _arrowDirection = newArrowDirection; - [self setNeedsDisplay:YES]; -} - -- (void)setBorderWidth:(CGFloat)newBorderWidth -{ - _borderWidth = newBorderWidth; - [self setNeedsDisplay:YES]; -} - -@end diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..a925142 --- /dev/null +++ b/LICENSE @@ -0,0 +1,10 @@ +Copyright (c) 2011-2014, Indragie Karunaratne +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/PopoverSampleApp/PopoverSampleApp.xcodeproj/project.pbxproj b/PopoverSampleApp/PopoverSampleApp.xcodeproj/project.pbxproj old mode 100644 new mode 100755 index 957752c..45c86f3 --- a/PopoverSampleApp/PopoverSampleApp.xcodeproj/project.pbxproj +++ b/PopoverSampleApp/PopoverSampleApp.xcodeproj/project.pbxproj @@ -7,6 +7,9 @@ objects = { /* Begin PBXBuildFile section */ + 03657F2B187A09BE00C969BA /* INPopoverController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 03657F28187A09A000C969BA /* INPopoverController.framework */; }; + 03657F2D187A09C900C969BA /* INPopoverController.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 03657F28187A09A000C969BA /* INPopoverController.framework */; }; + 0391A4FF18822FAA007D32D5 /* AlphaColorWell.m in Sources */ = {isa = PBXBuildFile; fileRef = 0391A4FE18822FAA007D32D5 /* AlphaColorWell.m */; }; 0393272D131F613D0007496E /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0393272C131F613D0007496E /* Cocoa.framework */; }; 03932737131F613D0007496E /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 03932735131F613D0007496E /* InfoPlist.strings */; }; 0393273A131F613D0007496E /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 03932739131F613D0007496E /* main.m */; }; @@ -15,14 +18,43 @@ 03932743131F613D0007496E /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 03932741131F613D0007496E /* MainMenu.xib */; }; 0393274C131F61590007496E /* ContentViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0393274A131F61590007496E /* ContentViewController.m */; }; 0393274D131F61590007496E /* ContentViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 0393274B131F61590007496E /* ContentViewController.xib */; }; - 03932756131F62420007496E /* INPopoverController.m in Sources */ = {isa = PBXBuildFile; fileRef = 03932750131F62420007496E /* INPopoverController.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 03932757131F62420007496E /* INPopoverWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 03932753131F62420007496E /* INPopoverWindow.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 03932758131F62420007496E /* INPopoverWindowFrame.m in Sources */ = {isa = PBXBuildFile; fileRef = 03932755131F62420007496E /* INPopoverWindowFrame.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 0393275B131F62780007496E /* INPopoverParentWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 0393275A131F62780007496E /* INPopoverParentWindow.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; BFF06C9116CAAEC100C3D751 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BFF06C9016CAAEC100C3D751 /* QuartzCore.framework */; }; /* End PBXBuildFile section */ +/* Begin PBXContainerItemProxy section */ + 03657F27187A09A000C969BA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 03657F23187A09A000C969BA /* INPopoverController.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 98BA8937143EA04A006F744E; + remoteInfo = INPopoverController; + }; + 03657F29187A09BA00C969BA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 03657F23187A09A000C969BA /* INPopoverController.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 98BA8936143EA04A006F744E; + remoteInfo = INPopoverController; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 03657F2C187A09C300C969BA /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 03657F2D187A09C900C969BA /* INPopoverController.framework in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + /* Begin PBXFileReference section */ + 03657F23187A09A000C969BA /* INPopoverController.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = INPopoverController.xcodeproj; path = ../../INPopoverController.xcodeproj; sourceTree = ""; }; + 0391A4FD18822FAA007D32D5 /* AlphaColorWell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AlphaColorWell.h; sourceTree = ""; }; + 0391A4FE18822FAA007D32D5 /* AlphaColorWell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AlphaColorWell.m; sourceTree = ""; }; 03932728131F613D0007496E /* PopoverSampleApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PopoverSampleApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; 0393272C131F613D0007496E /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; 0393272F131F613D0007496E /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; @@ -39,15 +71,6 @@ 03932749131F61590007496E /* ContentViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContentViewController.h; sourceTree = ""; }; 0393274A131F61590007496E /* ContentViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ContentViewController.m; sourceTree = ""; }; 0393274B131F61590007496E /* ContentViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ContentViewController.xib; sourceTree = ""; }; - 0393274F131F62420007496E /* INPopoverController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = INPopoverController.h; sourceTree = ""; }; - 03932750131F62420007496E /* INPopoverController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = INPopoverController.m; sourceTree = ""; }; - 03932751131F62420007496E /* INPopoverControllerDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = INPopoverControllerDefines.h; sourceTree = ""; }; - 03932752131F62420007496E /* INPopoverWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = INPopoverWindow.h; sourceTree = ""; }; - 03932753131F62420007496E /* INPopoverWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = INPopoverWindow.m; sourceTree = ""; }; - 03932754131F62420007496E /* INPopoverWindowFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = INPopoverWindowFrame.h; sourceTree = ""; }; - 03932755131F62420007496E /* INPopoverWindowFrame.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = INPopoverWindowFrame.m; sourceTree = ""; }; - 03932759131F62780007496E /* INPopoverParentWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = INPopoverParentWindow.h; sourceTree = ""; }; - 0393275A131F62780007496E /* INPopoverParentWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = INPopoverParentWindow.m; sourceTree = ""; }; BFF06C9016CAAEC100C3D751 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; /* End PBXFileReference section */ @@ -56,6 +79,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 03657F2B187A09BE00C969BA /* INPopoverController.framework in Frameworks */, BFF06C9116CAAEC100C3D751 /* QuartzCore.framework in Frameworks */, 0393272D131F613D0007496E /* Cocoa.framework in Frameworks */, ); @@ -64,6 +88,14 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 03657F24187A09A000C969BA /* Products */ = { + isa = PBXGroup; + children = ( + 03657F28187A09A000C969BA /* INPopoverController.framework */, + ); + name = Products; + sourceTree = ""; + }; 0393271D131F613D0007496E = { isa = PBXGroup; children = ( @@ -104,11 +136,13 @@ 03932732131F613D0007496E /* PopoverSampleApp */ = { isa = PBXGroup; children = ( - 0393274E131F62170007496E /* INPopoverController */, + 03657F23187A09A000C969BA /* INPopoverController.xcodeproj */, 0393273E131F613D0007496E /* PopoverSampleAppAppDelegate.h */, 0393273F131F613D0007496E /* PopoverSampleAppAppDelegate.m */, 03932749131F61590007496E /* ContentViewController.h */, 0393274A131F61590007496E /* ContentViewController.m */, + 0391A4FD18822FAA007D32D5 /* AlphaColorWell.h */, + 0391A4FE18822FAA007D32D5 /* AlphaColorWell.m */, 03932741131F613D0007496E /* MainMenu.xib */, 0393274B131F61590007496E /* ContentViewController.xib */, 03932733131F613D0007496E /* Supporting Files */, @@ -128,23 +162,6 @@ name = "Supporting Files"; sourceTree = ""; }; - 0393274E131F62170007496E /* INPopoverController */ = { - isa = PBXGroup; - children = ( - 0393274F131F62420007496E /* INPopoverController.h */, - 03932750131F62420007496E /* INPopoverController.m */, - 03932751131F62420007496E /* INPopoverControllerDefines.h */, - 03932752131F62420007496E /* INPopoverWindow.h */, - 03932753131F62420007496E /* INPopoverWindow.m */, - 03932754131F62420007496E /* INPopoverWindowFrame.h */, - 03932755131F62420007496E /* INPopoverWindowFrame.m */, - 03932759131F62780007496E /* INPopoverParentWindow.h */, - 0393275A131F62780007496E /* INPopoverParentWindow.m */, - ); - name = INPopoverController; - path = ../..; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -155,10 +172,12 @@ 03932724131F613D0007496E /* Sources */, 03932725131F613D0007496E /* Frameworks */, 03932726131F613D0007496E /* Resources */, + 03657F2C187A09C300C969BA /* CopyFiles */, ); buildRules = ( ); dependencies = ( + 03657F2A187A09BA00C969BA /* PBXTargetDependency */, ); name = PopoverSampleApp; productName = PopoverSampleApp; @@ -171,7 +190,7 @@ 0393271F131F613D0007496E /* Project object */ = { isa = PBXProject; attributes = { - ORGANIZATIONNAME = "PCWiz Computer"; + ORGANIZATIONNAME = "Indragie Karunaratne"; }; buildConfigurationList = 03932722131F613D0007496E /* Build configuration list for PBXProject "PopoverSampleApp" */; compatibilityVersion = "Xcode 3.2"; @@ -183,6 +202,12 @@ mainGroup = 0393271D131F613D0007496E; productRefGroup = 03932729131F613D0007496E /* Products */; projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 03657F24187A09A000C969BA /* Products */; + ProjectRef = 03657F23187A09A000C969BA /* INPopoverController.xcodeproj */; + }, + ); projectRoot = ""; targets = ( 03932727131F613D0007496E /* PopoverSampleApp */, @@ -190,6 +215,16 @@ }; /* End PBXProject section */ +/* Begin PBXReferenceProxy section */ + 03657F28187A09A000C969BA /* INPopoverController.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = INPopoverController.framework; + remoteRef = 03657F27187A09A000C969BA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + /* Begin PBXResourcesBuildPhase section */ 03932726131F613D0007496E /* Resources */ = { isa = PBXResourcesBuildPhase; @@ -209,18 +244,23 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 0391A4FF18822FAA007D32D5 /* AlphaColorWell.m in Sources */, 0393273A131F613D0007496E /* main.m in Sources */, 03932740131F613D0007496E /* PopoverSampleAppAppDelegate.m in Sources */, 0393274C131F61590007496E /* ContentViewController.m in Sources */, - 03932756131F62420007496E /* INPopoverController.m in Sources */, - 03932757131F62420007496E /* INPopoverWindow.m in Sources */, - 03932758131F62420007496E /* INPopoverWindowFrame.m in Sources */, - 0393275B131F62780007496E /* INPopoverParentWindow.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ +/* Begin PBXTargetDependency section */ + 03657F2A187A09BA00C969BA /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = INPopoverController; + targetProxy = 03657F29187A09BA00C969BA /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + /* Begin PBXVariantGroup section */ 03932735131F613D0007496E /* InfoPlist.strings */ = { isa = PBXVariantGroup; @@ -252,6 +292,7 @@ 03932744131F613D0007496E /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ENABLE_OBJC_ARC = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = DEBUG; @@ -269,6 +310,7 @@ 03932745131F613D0007496E /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ENABLE_OBJC_ARC = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -291,6 +333,7 @@ GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "PopoverSampleApp/PopoverSampleApp-Prefix.pch"; INFOPLIST_FILE = "PopoverSampleApp/PopoverSampleApp-Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks"; PRODUCT_NAME = "$(TARGET_NAME)"; WRAPPER_EXTENSION = app; }; @@ -308,6 +351,7 @@ GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "PopoverSampleApp/PopoverSampleApp-Prefix.pch"; INFOPLIST_FILE = "PopoverSampleApp/PopoverSampleApp-Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks"; PRODUCT_NAME = "$(TARGET_NAME)"; WRAPPER_EXTENSION = app; }; diff --git a/PopoverSampleApp/PopoverSampleApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/PopoverSampleApp/PopoverSampleApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata old mode 100644 new mode 100755 diff --git a/PopoverSampleApp/PopoverSampleApp.xcodeproj/project.xcworkspace/xcuserdata/Indragie.xcuserdatad/UserInterfaceState.xcuserstate b/PopoverSampleApp/PopoverSampleApp.xcodeproj/project.xcworkspace/xcuserdata/Indragie.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100644 index 5495f7e..0000000 --- a/PopoverSampleApp/PopoverSampleApp.xcodeproj/project.xcworkspace/xcuserdata/Indragie.xcuserdatad/UserInterfaceState.xcuserstate +++ /dev/null @@ -1,6887 +0,0 @@ - - - - - $archiver - NSKeyedArchiver - $objects - - $null - - $class - - CF$UID - 55 - - NS.keys - - - CF$UID - 2 - - - CF$UID - 3 - - - NS.objects - - - CF$UID - 4 - - - CF$UID - 198 - - - - 78C3C1DA-4305-4E7A-81A7-FA725F0CC462 - IDEWorkspaceDocument - - $class - - CF$UID - 46 - - NS.keys - - - CF$UID - 5 - - - CF$UID - 6 - - - CF$UID - 7 - - - CF$UID - 8 - - - CF$UID - 9 - - - CF$UID - 10 - - - NS.objects - - - CF$UID - 11 - - - CF$UID - 12 - - - CF$UID - 14 - - - CF$UID - 15 - - - CF$UID - 2 - - - CF$UID - 8 - - - - IDEWindowFrame - IDEOrderedWorkspaceTabControllers - IDEWindowToolbarIsVisible - IDEWorkspaceTabController_A18A77FC-8A5B-4569-99A4-B0299BB0316B - IDEWorkspaceWindowControllerUniqueIdentifier - IDEActiveWorkspaceTabController - {{-24, 77}, {1452, 801}} - - $class - - CF$UID - 13 - - NS.objects - - - CF$UID - 8 - - - - - $classes - - NSArray - NSObject - - $classname - NSArray - - - - $class - - CF$UID - 46 - - NS.keys - - - CF$UID - 16 - - - CF$UID - 17 - - - CF$UID - 18 - - - CF$UID - 19 - - - CF$UID - 20 - - - CF$UID - 21 - - - CF$UID - 22 - - - CF$UID - 23 - - - NS.objects - - - CF$UID - 24 - - - CF$UID - 14 - - - CF$UID - 25 - - - CF$UID - 141 - - - CF$UID - 148 - - - CF$UID - 189 - - - CF$UID - 14 - - - CF$UID - 45 - - - - IDETabLabel - IDEShowNavigator - IDEEditorArea - IDEWorkspaceTabControllerUtilityAreaSplitView - IDENavigatorArea - IDEWorkspaceTabControllerDesignAreaSplitView - IDEShowUtilities - AssistantEditorsLayout - Untitled 11 - - $class - - CF$UID - 46 - - NS.keys - - - CF$UID - 26 - - - CF$UID - 27 - - - CF$UID - 28 - - - CF$UID - 29 - - - CF$UID - 30 - - - CF$UID - 31 - - - CF$UID - 32 - - - CF$UID - 33 - - - NS.objects - - - CF$UID - 34 - - - CF$UID - 35 - - - CF$UID - 69 - - - CF$UID - 14 - - - CF$UID - 45 - - - CF$UID - 119 - - - CF$UID - 127 - - - CF$UID - 128 - - - - ShowDebuggerArea - IDEEDitorArea_DebugArea - IDEEditorMode_Standard - IDEShowEditor - EditorMode - DebuggerSplitView - DefaultPersistentRepresentations - layoutTree - - - $class - - CF$UID - 46 - - NS.keys - - - CF$UID - 36 - - - CF$UID - 37 - - - CF$UID - 38 - - - CF$UID - 39 - - - CF$UID - 40 - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 42 - - - CF$UID - 43 - - - CF$UID - 47 - - - CF$UID - 42 - - - CF$UID - 60 - - - CF$UID - 66 - - - - LayoutFocusMode - console - IDEDebuggerAreaSplitView - LayoutMode - IDEDebugArea_SplitView - variables - 1 - - $class - - CF$UID - 46 - - NS.keys - - - CF$UID - 44 - - - NS.objects - - - CF$UID - 45 - - - - ConsoleFilterMode - 0 - - $classes - - NSMutableDictionary - NSDictionary - NSObject - - $classname - NSMutableDictionary - - - $class - - CF$UID - 46 - - NS.keys - - - CF$UID - 48 - - - NS.objects - - - CF$UID - 49 - - - - DVTSplitViewItems - - $class - - CF$UID - 59 - - NS.objects - - - CF$UID - 50 - - - CF$UID - 56 - - - - - $class - - CF$UID - 55 - - NS.keys - - - CF$UID - 51 - - - CF$UID - 52 - - - NS.objects - - - CF$UID - 53 - - - CF$UID - 54 - - - - DVTIdentifier - DVTViewMagnitude - VariablesView - 316 - - $classes - - NSDictionary - NSObject - - $classname - NSDictionary - - - $class - - CF$UID - 55 - - NS.keys - - - CF$UID - 51 - - - CF$UID - 52 - - - NS.objects - - - CF$UID - 57 - - - CF$UID - 58 - - - - ConsoleArea - 615 - - $classes - - NSMutableArray - NSArray - NSObject - - $classname - NSMutableArray - - - $class - - CF$UID - 46 - - NS.keys - - - CF$UID - 48 - - - NS.objects - - - CF$UID - 61 - - - - - $class - - CF$UID - 59 - - NS.objects - - - CF$UID - 62 - - - CF$UID - 64 - - - - - $class - - CF$UID - 55 - - NS.keys - - - CF$UID - 51 - - - CF$UID - 52 - - - NS.objects - - - CF$UID - 53 - - - CF$UID - 63 - - - - 316 - - $class - - CF$UID - 55 - - NS.keys - - - CF$UID - 51 - - - CF$UID - 52 - - - NS.objects - - - CF$UID - 57 - - - CF$UID - 65 - - - - 615 - - $class - - CF$UID - 46 - - NS.keys - - - CF$UID - 67 - - - NS.objects - - - CF$UID - 68 - - - - DBGVariablesViewFilterMode - 2 - - $class - - CF$UID - 46 - - NS.keys - - - CF$UID - 70 - - - NS.objects - - - CF$UID - 71 - - - - EditorLayout_PersistentRepresentation - - $class - - CF$UID - 46 - - NS.keys - - - CF$UID - 72 - - - NS.objects - - - CF$UID - 73 - - - - Main - - $class - - CF$UID - 55 - - NS.keys - - - CF$UID - 74 - - - CF$UID - 75 - - - CF$UID - 76 - - - NS.objects - - - CF$UID - 77 - - - CF$UID - 45 - - - CF$UID - 117 - - - - EditorLayout_StateSavingStateDictionaries - EditorLayout_Selected - EditorLayout_Geometry - - $class - - CF$UID - 13 - - NS.objects - - - CF$UID - 78 - - - - - $class - - CF$UID - 46 - - NS.keys - - - CF$UID - 79 - - - CF$UID - 80 - - - CF$UID - 81 - - - CF$UID - 82 - - - CF$UID - 83 - - - CF$UID - 84 - - - CF$UID - 85 - - - NS.objects - - - CF$UID - 86 - - - CF$UID - 87 - - - CF$UID - 104 - - - CF$UID - 112 - - - CF$UID - 91 - - - CF$UID - 113 - - - CF$UID - 114 - - - - FileDataType - ArchivableRepresentation - EditorState - NavigableItemName - DocumentNavigableItemName - DocumentExtensionIdentifier - DocumentURL - public.c-header - - $class - - CF$UID - 103 - - DocumentLocation - - CF$UID - 99 - - DomainIdentifier - - CF$UID - 88 - - IdentifierPath - - CF$UID - 89 - - IndexOfDocumentIdentifier - - CF$UID - 45 - - - Xcode.IDENavigableItemDomain.WorkspaceStructure - - $class - - CF$UID - 13 - - NS.objects - - - CF$UID - 90 - - - CF$UID - 93 - - - CF$UID - 95 - - - CF$UID - 97 - - - - - $class - - CF$UID - 92 - - Identifier - - CF$UID - 91 - - - INPopoverController.h - - $classes - - IDEArchivableStringIndexPair - NSObject - - $classname - IDEArchivableStringIndexPair - - - $class - - CF$UID - 92 - - Identifier - - CF$UID - 94 - - - INPopoverController - - $class - - CF$UID - 92 - - Identifier - - CF$UID - 96 - - - PopoverSampleApp - - $class - - CF$UID - 92 - - Identifier - - CF$UID - 98 - - - PopoverSampleApp - - $class - - CF$UID - 102 - - documentURL - - CF$UID - 100 - - timestamp - - CF$UID - 0 - - - - $class - - CF$UID - 101 - - NS.string - file://localhost/Users/Indragie/Desktop/INPopoverController/INPopoverController.h - - - $classes - - NSMutableString - NSString - NSObject - - $classname - NSMutableString - - - $classes - - DVTDocumentLocation - NSObject - - $classname - DVTDocumentLocation - - - $classes - - IDENavigableItemArchivableRepresentation - NSObject - - $classname - IDENavigableItemArchivableRepresentation - - - $class - - CF$UID - 55 - - NS.keys - - - CF$UID - 105 - - - CF$UID - 106 - - - CF$UID - 107 - - - CF$UID - 108 - - - NS.objects - - - CF$UID - 109 - - - CF$UID - 110 - - - CF$UID - 34 - - - CF$UID - 111 - - - - PrimaryDocumentTimestamp - PrimaryDocumentVisibleCharacterRange - HideAllIssues - PrimaryDocumentSelectedCharacterRange - 320869095.56154901 - {4929, 1925} - {3751, 0} - @interface INPopoverController - Xcode.IDEKit.EditorDocument.SourceCode - - $class - - CF$UID - 116 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 115 - - - file://localhost/Users/Indragie/Desktop/INPopoverController/INPopoverController.h - - $classes - - NSURL - NSObject - - $classname - NSURL - - - $class - - CF$UID - 13 - - NS.objects - - - CF$UID - 118 - - - - {{0, 0}, {932, 703}} - - $class - - CF$UID - 46 - - NS.keys - - - CF$UID - 48 - - - NS.objects - - - CF$UID - 120 - - - - - $class - - CF$UID - 59 - - NS.objects - - - CF$UID - 121 - - - CF$UID - 124 - - - - - $class - - CF$UID - 55 - - NS.keys - - - CF$UID - 51 - - - CF$UID - 52 - - - NS.objects - - - CF$UID - 122 - - - CF$UID - 123 - - - - IDEEditor - 566 - - $class - - CF$UID - 55 - - NS.keys - - - CF$UID - 51 - - - CF$UID - 52 - - - NS.objects - - - CF$UID - 125 - - - CF$UID - 126 - - - - IDEDebuggerArea - 115 - - $class - - CF$UID - 46 - - NS.keys - - NS.objects - - - - $class - - CF$UID - 140 - - geniusEditorContextNode - - CF$UID - 0 - - primaryEditorContextNode - - CF$UID - 129 - - rootLayoutTreeNode - - CF$UID - 137 - - - - $class - - CF$UID - 139 - - children - - CF$UID - 0 - - contentType - 1 - documentArchivableRepresentation - - CF$UID - 130 - - orientation - 0 - parent - - CF$UID - 137 - - - - $class - - CF$UID - 103 - - DocumentLocation - - CF$UID - 99 - - DomainIdentifier - - CF$UID - 88 - - IdentifierPath - - CF$UID - 131 - - IndexOfDocumentIdentifier - - CF$UID - 45 - - - - $class - - CF$UID - 13 - - NS.objects - - - CF$UID - 132 - - - CF$UID - 133 - - - CF$UID - 134 - - - CF$UID - 135 - - - - - $class - - CF$UID - 92 - - Identifier - - CF$UID - 91 - - - - $class - - CF$UID - 92 - - Identifier - - CF$UID - 94 - - - - $class - - CF$UID - 92 - - Identifier - - CF$UID - 96 - - - - $class - - CF$UID - 92 - - Identifier - - CF$UID - 136 - - - PopoverSampleApp - - $class - - CF$UID - 139 - - children - - CF$UID - 138 - - contentType - 0 - documentArchivableRepresentation - - CF$UID - 0 - - orientation - 0 - parent - - CF$UID - 0 - - - - $class - - CF$UID - 13 - - NS.objects - - - CF$UID - 129 - - - - - $classes - - IDEWorkspaceTabControllerLayoutTreeNode - NSObject - - $classname - IDEWorkspaceTabControllerLayoutTreeNode - - - $classes - - IDEWorkspaceTabControllerLayoutTree - NSObject - - $classname - IDEWorkspaceTabControllerLayoutTree - - - $class - - CF$UID - 46 - - NS.keys - - - CF$UID - 48 - - - NS.objects - - - CF$UID - 142 - - - - - $class - - CF$UID - 59 - - NS.objects - - - CF$UID - 143 - - - CF$UID - 146 - - - - - $class - - CF$UID - 55 - - NS.keys - - - CF$UID - 51 - - - CF$UID - 52 - - - NS.objects - - - CF$UID - 144 - - - CF$UID - 145 - - - - - 479 - - $class - - CF$UID - 55 - - NS.keys - - - CF$UID - 51 - - - CF$UID - 52 - - - NS.objects - - - CF$UID - 144 - - - CF$UID - 147 - - - - 224 - - $class - - CF$UID - 46 - - NS.keys - - - CF$UID - 149 - - - CF$UID - 150 - - - CF$UID - 151 - - - NS.objects - - - CF$UID - 152 - - - CF$UID - 151 - - - CF$UID - 170 - - - - Xcode.IDEKit.Navigator.Issues - SelectedNavigator - Xcode.IDEKit.Navigator.Structure - - $class - - CF$UID - 46 - - NS.keys - - - CF$UID - 153 - - - CF$UID - 154 - - - CF$UID - 155 - - - CF$UID - 156 - - - CF$UID - 157 - - - CF$UID - 158 - - - CF$UID - 159 - - - CF$UID - 160 - - - CF$UID - 161 - - - CF$UID - 162 - - - NS.objects - - - CF$UID - 34 - - - CF$UID - 163 - - - CF$UID - 164 - - - CF$UID - 166 - - - CF$UID - 167 - - - CF$UID - 34 - - - CF$UID - 34 - - - CF$UID - 168 - - - CF$UID - 34 - - - CF$UID - 169 - - - - IDEErrorFilteringEnabled - IDEVisibleRect - IDECollapsedFiles - IDEExpandedIssues - IDESelectedNavigables - IDEShowsByType - IDESchemeFilteringEnabled - IDECollapsedTypes - IDERecentFilteringEnabled - IDECollapsedGroups - {{0, 0}, {259, 615}} - - $class - - CF$UID - 165 - - NS.objects - - - - $classes - - NSMutableSet - NSSet - NSObject - - $classname - NSMutableSet - - - $class - - CF$UID - 165 - - NS.objects - - - - $class - - CF$UID - 59 - - NS.objects - - - - $class - - CF$UID - 165 - - NS.objects - - - - $class - - CF$UID - 165 - - NS.objects - - - - $class - - CF$UID - 46 - - NS.keys - - - CF$UID - 171 - - - CF$UID - 172 - - - CF$UID - 173 - - - CF$UID - 174 - - - CF$UID - 175 - - - CF$UID - 176 - - - CF$UID - 177 - - - NS.objects - - - CF$UID - 178 - - - CF$UID - 34 - - - CF$UID - 179 - - - CF$UID - 34 - - - CF$UID - 34 - - - CF$UID - 181 - - - CF$UID - 184 - - - - IDEVisibleRect - IDEUnsavedDocumentFilteringEnabled - IDENavigatorExpandedItemsBeforeFilteringSet - IDERecentDocumentFilteringEnabled - IDESCMStatusFilteringEnabled - IDESelectedObjects - IDEExpandedItemsSet - {{0, 0}, {259, 659}} - - $class - - CF$UID - 180 - - NS.objects - - - - $classes - - NSSet - NSObject - - $classname - NSSet - - - $class - - CF$UID - 13 - - NS.objects - - - CF$UID - 182 - - - - - $class - - CF$UID - 59 - - NS.objects - - - CF$UID - 183 - - - CF$UID - 96 - - - CF$UID - 94 - - - CF$UID - 91 - - - - PopoverSampleApp - - $class - - CF$UID - 180 - - NS.objects - - - CF$UID - 185 - - - CF$UID - 186 - - - CF$UID - 188 - - - - - $class - - CF$UID - 59 - - NS.objects - - - CF$UID - 183 - - - CF$UID - 96 - - - CF$UID - 94 - - - - - $class - - CF$UID - 59 - - NS.objects - - - CF$UID - 183 - - - CF$UID - 96 - - - CF$UID - 187 - - - - Supporting Files - - $class - - CF$UID - 59 - - NS.objects - - - CF$UID - 183 - - - - - $class - - CF$UID - 46 - - NS.keys - - - CF$UID - 48 - - - NS.objects - - - CF$UID - 190 - - - - - $class - - CF$UID - 59 - - NS.objects - - - CF$UID - 191 - - - CF$UID - 193 - - - CF$UID - 195 - - - - - $class - - CF$UID - 55 - - NS.keys - - - CF$UID - 51 - - - CF$UID - 52 - - - NS.objects - - - CF$UID - 20 - - - CF$UID - 192 - - - - 260 - - $class - - CF$UID - 55 - - NS.keys - - - CF$UID - 51 - - - CF$UID - 52 - - - NS.objects - - - CF$UID - 18 - - - CF$UID - 194 - - - - 932 - - $class - - CF$UID - 55 - - NS.keys - - - CF$UID - 51 - - - CF$UID - 52 - - - NS.objects - - - CF$UID - 196 - - - CF$UID - 197 - - - - IDEUtilitiesArea - 260 - - $class - - CF$UID - 46 - - NS.keys - - - CF$UID - 199 - - - CF$UID - 200 - - - CF$UID - 201 - - - CF$UID - 202 - - - CF$UID - 203 - - - CF$UID - 204 - - - CF$UID - 205 - - - CF$UID - 206 - - - CF$UID - 207 - - - CF$UID - 208 - - - NS.objects - - - CF$UID - 14 - - - CF$UID - 209 - - - CF$UID - 45 - - - CF$UID - 534 - - - CF$UID - 539 - - - CF$UID - 542 - - - CF$UID - 573 - - - CF$UID - 574 - - - CF$UID - 34 - - - CF$UID - 34 - - - - BreakpointsActivated - DefaultEditorStatesForURLs - DebuggingWindowBehavior - ActiveRunDestination - ActiveScheme - LastCompletedPersistentSchemeBasedActivityReport - DocumentWindows - RecentEditorDocumentURLs - AppFocusInMiniDebugging - MiniDebuggingConsole - - $class - - CF$UID - 46 - - NS.keys - - - CF$UID - 210 - - - CF$UID - 211 - - - CF$UID - 212 - - - CF$UID - 213 - - - NS.objects - - - CF$UID - 214 - - - CF$UID - 245 - - - CF$UID - 255 - - - CF$UID - 480 - - - - Xcode.IDEKit.CocoaIntegration.EditorDocument.Cocoa - Xcode.IDEKit.EditorDocument.PlistEditor - Xcode.Xcode3ProjectSupport.EditorDocument.Xcode3Project - Xcode.IDEKit.EditorDocument.SourceCode - - $class - - CF$UID - 46 - - NS.keys - - - CF$UID - 215 - - - CF$UID - 217 - - - NS.objects - - - CF$UID - 219 - - - CF$UID - 237 - - - - - $class - - CF$UID - 116 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 216 - - - - $class - - CF$UID - 101 - - NS.string - file://localhost/Users/Indragie/Desktop/INPopoverController/PopoverSampleApp/PopoverSampleApp/en.lproj/MainMenu.xib - - - $class - - CF$UID - 116 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 218 - - - - $class - - CF$UID - 101 - - NS.string - file://localhost/Users/Indragie/Desktop/INPopoverController/PopoverSampleApp/PopoverSampleApp/ContentViewController.xib - - - $class - - CF$UID - 46 - - NS.keys - - - CF$UID - 220 - - - CF$UID - 221 - - - CF$UID - 222 - - - CF$UID - 223 - - - NS.objects - - - CF$UID - 224 - - - CF$UID - 227 - - - CF$UID - 229 - - - CF$UID - 230 - - - - IBDockViewController - SelectedObjectIDs - SelectionProvider - IBCanvasViewController - - $class - - CF$UID - 46 - - NS.keys - - - CF$UID - 225 - - - NS.objects - - - CF$UID - 226 - - - - LastKnownOutlineViewWidth - 270 - - $class - - CF$UID - 59 - - NS.objects - - - CF$UID - 228 - - - - 567 - IBStructureViewController - - $class - - CF$UID - 46 - - NS.keys - - - CF$UID - 231 - - - CF$UID - 232 - - - NS.objects - - - CF$UID - 233 - - - CF$UID - 234 - - - - ObjectIDToLastKnownCanvasPositionMap - EditedTopLevelObjectIDs - - $class - - CF$UID - 46 - - NS.keys - - NS.objects - - - - $class - - CF$UID - 59 - - NS.objects - - - CF$UID - 235 - - - CF$UID - 236 - - - - 29 - 371 - - $class - - CF$UID - 46 - - NS.keys - - - CF$UID - 220 - - - CF$UID - 221 - - - CF$UID - 222 - - - CF$UID - 223 - - - NS.objects - - - CF$UID - 238 - - - CF$UID - 240 - - - CF$UID - 223 - - - CF$UID - 242 - - - - - $class - - CF$UID - 46 - - NS.keys - - - CF$UID - 225 - - - NS.objects - - - CF$UID - 239 - - - - 270 - - $class - - CF$UID - 59 - - NS.objects - - - CF$UID - 241 - - - - 6 - - $class - - CF$UID - 46 - - NS.keys - - - CF$UID - 231 - - - CF$UID - 232 - - - NS.objects - - - CF$UID - 243 - - - CF$UID - 244 - - - - - $class - - CF$UID - 46 - - NS.keys - - NS.objects - - - - $class - - CF$UID - 59 - - NS.objects - - - CF$UID - 42 - - - - - $class - - CF$UID - 46 - - NS.keys - - - CF$UID - 246 - - - NS.objects - - - CF$UID - 248 - - - - - $class - - CF$UID - 116 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 247 - - - - $class - - CF$UID - 101 - - NS.string - file://localhost/Users/Indragie/Desktop/INPopoverController/PopoverSampleApp/PopoverSampleApp/PopoverSampleApp-Info.plist - - - $class - - CF$UID - 46 - - NS.keys - - - CF$UID - 249 - - - CF$UID - 250 - - - CF$UID - 251 - - - NS.objects - - - CF$UID - 252 - - - CF$UID - 253 - - - CF$UID - 254 - - - - IDE_PLIST_EDITOR_SELECTION_KEY - IDE_PLIST_EDITOR_VISIBLERECT_KEY - IDE_PLIST_EDITOR_EXPANSION_KEY - - $class - - CF$UID - 13 - - NS.objects - - - {{0, 0}, {880, 642}} - - $class - - CF$UID - 165 - - NS.objects - - - - $class - - CF$UID - 46 - - NS.keys - - - CF$UID - 256 - - - NS.objects - - - CF$UID - 258 - - - - - $class - - CF$UID - 116 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 257 - - - - $class - - CF$UID - 101 - - NS.string - file://localhost/Users/Indragie/Desktop/INPopoverController/PopoverSampleApp/PopoverSampleApp.xcodeproj/ - - - $class - - CF$UID - 46 - - NS.keys - - - CF$UID - 259 - - - CF$UID - 260 - - - CF$UID - 261 - - - CF$UID - 262 - - - CF$UID - 263 - - - NS.objects - - - CF$UID - 264 - - - CF$UID - 265 - - - CF$UID - 271 - - - CF$UID - 272 - - - CF$UID - 479 - - - - Xcode3ProjectEditorPreviousProjectEditorClass - Xcode3ProjectEditor.sourceList.splitview - Xcode3ProjectEditorPreviousTargetEditorClass - Xcode3ProjectEditorSelectedDocumentLocations - Xcode3ProjectEditor_Xcode3BuildSettingsEditor - Xcode3ProjectInfoEditor - - $class - - CF$UID - 46 - - NS.keys - - - CF$UID - 48 - - - NS.objects - - - CF$UID - 266 - - - - - $class - - CF$UID - 59 - - NS.objects - - - CF$UID - 267 - - - CF$UID - 269 - - - - - $class - - CF$UID - 55 - - NS.keys - - - CF$UID - 51 - - - CF$UID - 52 - - - NS.objects - - - CF$UID - 144 - - - CF$UID - 268 - - - - 170 - - $class - - CF$UID - 55 - - NS.keys - - - CF$UID - 51 - - - CF$UID - 52 - - - NS.objects - - - CF$UID - 144 - - - CF$UID - 270 - - - - 710 - Xcode3BuildSettingsEditor - - $class - - CF$UID - 13 - - NS.objects - - - CF$UID - 273 - - - - - $class - - CF$UID - 478 - - documentURL - - CF$UID - 274 - - selection - - CF$UID - 276 - - timestamp - - CF$UID - 275 - - - file://localhost/Users/Indragie/Desktop/INPopoverController/PopoverSampleApp/PopoverSampleApp.xcodeproj/ - 320865973.94789898 - - $class - - CF$UID - 46 - - NS.keys - - - CF$UID - 277 - - - CF$UID - 278 - - - CF$UID - 279 - - - NS.objects - - - CF$UID - 280 - - - CF$UID - 96 - - - CF$UID - 281 - - - - Editor - Target - Xcode3BuildSettingsEditorLocations - Xcode3BuildSettingsEditor - - $class - - CF$UID - 13 - - NS.objects - - - CF$UID - 282 - - - - - $class - - CF$UID - 46 - - NS.keys - - - CF$UID - 283 - - - CF$UID - 284 - - - CF$UID - 285 - - - CF$UID - 286 - - - CF$UID - 287 - - - CF$UID - 288 - - - NS.objects - - - CF$UID - 289 - - - CF$UID - 476 - - - CF$UID - 45 - - - CF$UID - 45 - - - CF$UID - 45 - - - CF$UID - 42 - - - - Collapsed Build Property Categories - Selected Build Properties - Xcode3BuildSettingsEditorDisplayMode - Xcode3BuildPropertyValueDisplayMode - Xcode3BuildSettingsEditorMode - Xcode3BuildPropertyNameDisplayMode - - $class - - CF$UID - 59 - - NS.objects - - - CF$UID - 290 - - - CF$UID - 291 - - - CF$UID - 292 - - - CF$UID - 293 - - - CF$UID - 294 - - - CF$UID - 295 - - - CF$UID - 296 - - - CF$UID - 297 - - - CF$UID - 298 - - - CF$UID - 299 - - - CF$UID - 300 - - - CF$UID - 301 - - - CF$UID - 302 - - - CF$UID - 303 - - - CF$UID - 304 - - - CF$UID - 305 - - - CF$UID - 306 - - - CF$UID - 307 - - - CF$UID - 308 - - - CF$UID - 309 - - - CF$UID - 310 - - - CF$UID - 311 - - - CF$UID - 312 - - - CF$UID - 313 - - - CF$UID - 314 - - - CF$UID - 315 - - - CF$UID - 316 - - - CF$UID - 317 - - - CF$UID - 318 - - - CF$UID - 319 - - - CF$UID - 320 - - - CF$UID - 321 - - - CF$UID - 322 - - - CF$UID - 323 - - - CF$UID - 324 - - - CF$UID - 325 - - - CF$UID - 326 - - - CF$UID - 327 - - - CF$UID - 328 - - - CF$UID - 329 - - - CF$UID - 330 - - - CF$UID - 331 - - - CF$UID - 332 - - - CF$UID - 333 - - - CF$UID - 334 - - - CF$UID - 335 - - - CF$UID - 336 - - - CF$UID - 337 - - - CF$UID - 338 - - - CF$UID - 339 - - - CF$UID - 340 - - - CF$UID - 341 - - - CF$UID - 342 - - - CF$UID - 343 - - - CF$UID - 344 - - - CF$UID - 345 - - - CF$UID - 346 - - - CF$UID - 347 - - - CF$UID - 348 - - - CF$UID - 349 - - - CF$UID - 350 - - - CF$UID - 351 - - - CF$UID - 352 - - - CF$UID - 353 - - - CF$UID - 354 - - - CF$UID - 355 - - - CF$UID - 356 - - - CF$UID - 357 - - - CF$UID - 358 - - - CF$UID - 359 - - - CF$UID - 360 - - - CF$UID - 361 - - - CF$UID - 362 - - - CF$UID - 363 - - - CF$UID - 364 - - - CF$UID - 365 - - - CF$UID - 366 - - - CF$UID - 367 - - - CF$UID - 368 - - - CF$UID - 369 - - - CF$UID - 370 - - - CF$UID - 371 - - - CF$UID - 372 - - - CF$UID - 373 - - - CF$UID - 374 - - - CF$UID - 375 - - - CF$UID - 376 - - - CF$UID - 377 - - - CF$UID - 378 - - - CF$UID - 379 - - - CF$UID - 380 - - - CF$UID - 381 - - - CF$UID - 382 - - - CF$UID - 383 - - - CF$UID - 384 - - - CF$UID - 385 - - - CF$UID - 386 - - - CF$UID - 387 - - - CF$UID - 388 - - - CF$UID - 389 - - - CF$UID - 390 - - - CF$UID - 391 - - - CF$UID - 392 - - - CF$UID - 393 - - - CF$UID - 394 - - - CF$UID - 395 - - - CF$UID - 396 - - - CF$UID - 397 - - - CF$UID - 398 - - - CF$UID - 399 - - - CF$UID - 400 - - - CF$UID - 401 - - - CF$UID - 402 - - - CF$UID - 403 - - - CF$UID - 404 - - - CF$UID - 405 - - - CF$UID - 406 - - - CF$UID - 407 - - - CF$UID - 408 - - - CF$UID - 409 - - - CF$UID - 410 - - - CF$UID - 411 - - - CF$UID - 412 - - - CF$UID - 413 - - - CF$UID - 414 - - - CF$UID - 415 - - - CF$UID - 416 - - - CF$UID - 417 - - - CF$UID - 418 - - - CF$UID - 419 - - - CF$UID - 420 - - - CF$UID - 421 - - - CF$UID - 422 - - - CF$UID - 423 - - - CF$UID - 424 - - - CF$UID - 425 - - - CF$UID - 426 - - - CF$UID - 427 - - - CF$UID - 428 - - - CF$UID - 429 - - - CF$UID - 430 - - - CF$UID - 431 - - - CF$UID - 432 - - - CF$UID - 433 - - - CF$UID - 434 - - - CF$UID - 435 - - - CF$UID - 436 - - - CF$UID - 437 - - - CF$UID - 438 - - - CF$UID - 439 - - - CF$UID - 440 - - - CF$UID - 441 - - - CF$UID - 442 - - - CF$UID - 443 - - - CF$UID - 444 - - - CF$UID - 445 - - - CF$UID - 446 - - - CF$UID - 447 - - - CF$UID - 448 - - - CF$UID - 449 - - - CF$UID - 450 - - - CF$UID - 451 - - - CF$UID - 452 - - - CF$UID - 453 - - - CF$UID - 454 - - - CF$UID - 455 - - - CF$UID - 456 - - - CF$UID - 457 - - - CF$UID - 458 - - - CF$UID - 459 - - - CF$UID - 460 - - - CF$UID - 461 - - - CF$UID - 462 - - - CF$UID - 463 - - - CF$UID - 464 - - - CF$UID - 465 - - - CF$UID - 466 - - - CF$UID - 467 - - - CF$UID - 468 - - - CF$UID - 469 - - - CF$UID - 470 - - - CF$UID - 471 - - - CF$UID - 472 - - - CF$UID - 473 - - - CF$UID - 474 - - - CF$UID - 475 - - - - - $class - - CF$UID - 101 - - NS.string - Architectures||ADDITIONAL_SDKS - - - $class - - CF$UID - 101 - - NS.string - Architectures||ARCHS - - - $class - - CF$UID - 101 - - NS.string - Architectures||SDKROOT - - - $class - - CF$UID - 101 - - NS.string - Architectures||SUPPORTED_PLATFORMS - - - $class - - CF$UID - 101 - - NS.string - Architectures||VALID_ARCHS - - - $class - - CF$UID - 101 - - NS.string - Build Locations||SYMROOT - - - $class - - CF$UID - 101 - - NS.string - Build Locations||OBJROOT - - - $class - - CF$UID - 101 - - NS.string - Build Locations||SHARED_PRECOMPS_DIR - - - $class - - CF$UID - 101 - - NS.string - Build Options||BUILD_VARIANTS - - - $class - - CF$UID - 101 - - NS.string - Build Options||ENABLE_OPENMP_SUPPORT - - - $class - - CF$UID - 101 - - NS.string - Build Options||GENERATE_PROFILING_CODE - - - $class - - CF$UID - 101 - - NS.string - Build Options||PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR - - - $class - - CF$UID - 101 - - NS.string - Build Options||RUN_CLANG_STATIC_ANALYZER - - - $class - - CF$UID - 101 - - NS.string - Build Options||SCAN_ALL_SOURCE_FILES_FOR_INCLUDES - - - $class - - CF$UID - 101 - - NS.string - Build Options||VALIDATE_PRODUCT - - - $class - - CF$UID - 101 - - NS.string - Code Signing||CODE_SIGN_ENTITLEMENTS - - - $class - - CF$UID - 101 - - NS.string - Code Signing||CODE_SIGN_IDENTITY - - - $class - - CF$UID - 101 - - NS.string - Code Signing||CODE_SIGN_RESOURCE_RULES_PATH - - - $class - - CF$UID - 101 - - NS.string - Code Signing||OTHER_CODE_SIGN_FLAGS - - - $class - - CF$UID - 101 - - NS.string - Compiler Version||GCC_VERSION - - - $class - - CF$UID - 101 - - NS.string - Deployment||STRIPFLAGS - - - $class - - CF$UID - 101 - - NS.string - Deployment||ALTERNATE_GROUP - - - $class - - CF$UID - 101 - - NS.string - Deployment||ALTERNATE_OWNER - - - $class - - CF$UID - 101 - - NS.string - Deployment||ALTERNATE_MODE - - - $class - - CF$UID - 101 - - NS.string - Deployment||ALTERNATE_PERMISSIONS_FILES - - - $class - - CF$UID - 101 - - NS.string - Deployment||COMBINE_HIDPI_IMAGES - - - $class - - CF$UID - 101 - - NS.string - Deployment||DEPLOYMENT_LOCATION - - - $class - - CF$UID - 101 - - NS.string - Deployment||DEPLOYMENT_POSTPROCESSING - - - $class - - CF$UID - 101 - - NS.string - Deployment||INSTALL_GROUP - - - $class - - CF$UID - 101 - - NS.string - Deployment||INSTALL_OWNER - - - $class - - CF$UID - 101 - - NS.string - Deployment||INSTALL_MODE_FLAG - - - $class - - CF$UID - 101 - - NS.string - Deployment||DSTROOT - - - $class - - CF$UID - 101 - - NS.string - Deployment||INSTALL_PATH - - - $class - - CF$UID - 101 - - NS.string - Deployment||MACOSX_DEPLOYMENT_TARGET - - - $class - - CF$UID - 101 - - NS.string - Deployment||SKIP_INSTALL - - - $class - - CF$UID - 101 - - NS.string - Deployment||STRIP_INSTALLED_PRODUCT - - - $class - - CF$UID - 101 - - NS.string - Deployment||STRIP_STYLE - - - $class - - CF$UID - 101 - - NS.string - Deployment||SEPARATE_STRIP - - - $class - - CF$UID - 101 - - NS.string - Kernel Module||MODULE_NAME - - - $class - - CF$UID - 101 - - NS.string - Kernel Module||MODULE_START - - - $class - - CF$UID - 101 - - NS.string - Kernel Module||MODULE_STOP - - - $class - - CF$UID - 101 - - NS.string - Kernel Module||MODULE_VERSION - - - $class - - CF$UID - 101 - - NS.string - Linking||BUNDLE_LOADER - - - $class - - CF$UID - 101 - - NS.string - Linking||STANDARD_C_PLUS_PLUS_LIBRARY_TYPE - - - $class - - CF$UID - 101 - - NS.string - Linking||DYLIB_COMPATIBILITY_VERSION - - - $class - - CF$UID - 101 - - NS.string - Linking||DYLIB_CURRENT_VERSION - - - $class - - CF$UID - 101 - - NS.string - Linking||DEAD_CODE_STRIPPING - - - $class - - CF$UID - 101 - - NS.string - Linking||LINKER_DISPLAYS_MANGLED_NAMES - - - $class - - CF$UID - 101 - - NS.string - Linking||PRESERVE_DEAD_CODE_INITS_AND_TERMS - - - $class - - CF$UID - 101 - - NS.string - Linking||LD_DYLIB_INSTALL_NAME - - - $class - - CF$UID - 101 - - NS.string - Linking||EXPORTED_SYMBOLS_FILE - - - $class - - CF$UID - 101 - - NS.string - Linking||INIT_ROUTINE - - - $class - - CF$UID - 101 - - NS.string - Linking||LINK_WITH_STANDARD_LIBRARIES - - - $class - - CF$UID - 101 - - NS.string - Linking||MACH_O_TYPE - - - $class - - CF$UID - 101 - - NS.string - Linking||LD_OPENMP_FLAGS - - - $class - - CF$UID - 101 - - NS.string - Linking||ORDER_FILE - - - $class - - CF$UID - 101 - - NS.string - Linking||OTHER_LDFLAGS - - - $class - - CF$UID - 101 - - NS.string - Linking||GENERATE_MASTER_OBJECT_FILE - - - $class - - CF$UID - 101 - - NS.string - Linking||PRELINK_LIBS - - - $class - - CF$UID - 101 - - NS.string - Linking||KEEP_PRIVATE_EXTERNS - - - $class - - CF$UID - 101 - - NS.string - Linking||LD_RUNPATH_SEARCH_PATHS - - - $class - - CF$UID - 101 - - NS.string - Linking||SEPARATE_SYMBOL_EDIT - - - $class - - CF$UID - 101 - - NS.string - Linking||PRELINK_FLAGS - - - $class - - CF$UID - 101 - - NS.string - Linking||SECTORDER_FLAGS - - - $class - - CF$UID - 101 - - NS.string - Linking||UNEXPORTED_SYMBOLS_FILE - - - $class - - CF$UID - 101 - - NS.string - Linking||WARNING_LDFLAGS - - - $class - - CF$UID - 101 - - NS.string - Linking||LD_GENERATE_MAP_FILE - - - $class - - CF$UID - 101 - - NS.string - Packaging||APPLY_RULES_IN_COPY_FILES - - - $class - - CF$UID - 101 - - NS.string - Packaging||EXECUTABLE_EXTENSION - - - $class - - CF$UID - 101 - - NS.string - Packaging||EXECUTABLE_PREFIX - - - $class - - CF$UID - 101 - - NS.string - Packaging||INFOPLIST_EXPAND_BUILD_SETTINGS - - - $class - - CF$UID - 101 - - NS.string - Packaging||GENERATE_PKGINFO_FILE - - - $class - - CF$UID - 101 - - NS.string - Packaging||FRAMEWORK_VERSION - - - $class - - CF$UID - 101 - - NS.string - Packaging||INFOPLIST_FILE - - - $class - - CF$UID - 101 - - NS.string - Packaging||INFOPLIST_OTHER_PREPROCESSOR_FLAGS - - - $class - - CF$UID - 101 - - NS.string - Packaging||INFOPLIST_OUTPUT_FORMAT - - - $class - - CF$UID - 101 - - NS.string - Packaging||INFOPLIST_PREPROCESSOR_DEFINITIONS - - - $class - - CF$UID - 101 - - NS.string - Packaging||INFOPLIST_PREFIX_HEADER - - - $class - - CF$UID - 101 - - NS.string - Packaging||INFOPLIST_PREPROCESS - - - $class - - CF$UID - 101 - - NS.string - Packaging||COPYING_PRESERVES_HFS_DATA - - - $class - - CF$UID - 101 - - NS.string - Packaging||PRIVATE_HEADERS_FOLDER_PATH - - - $class - - CF$UID - 101 - - NS.string - Packaging||PRODUCT_NAME - - - $class - - CF$UID - 101 - - NS.string - Packaging||PLIST_FILE_OUTPUT_FORMAT - - - $class - - CF$UID - 101 - - NS.string - Packaging||PUBLIC_HEADERS_FOLDER_PATH - - - $class - - CF$UID - 101 - - NS.string - Packaging||STRINGS_FILE_OUTPUT_ENCODING - - - $class - - CF$UID - 101 - - NS.string - Packaging||WRAPPER_EXTENSION - - - $class - - CF$UID - 101 - - NS.string - Search Paths||ALWAYS_SEARCH_USER_PATHS - - - $class - - CF$UID - 101 - - NS.string - Search Paths||FRAMEWORK_SEARCH_PATHS - - - $class - - CF$UID - 101 - - NS.string - Search Paths||HEADER_SEARCH_PATHS - - - $class - - CF$UID - 101 - - NS.string - Search Paths||LIBRARY_SEARCH_PATHS - - - $class - - CF$UID - 101 - - NS.string - Search Paths||REZ_SEARCH_PATHS - - - $class - - CF$UID - 101 - - NS.string - Search Paths||EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES - - - $class - - CF$UID - 101 - - NS.string - Search Paths||INCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES - - - $class - - CF$UID - 101 - - NS.string - Search Paths||USER_HEADER_SEARCH_PATHS - - - $class - - CF$UID - 101 - - NS.string - Unit Testing||OTHER_TEST_FLAGS - - - $class - - CF$UID - 101 - - NS.string - Unit Testing||TEST_AFTER_BUILD - - - $class - - CF$UID - 101 - - NS.string - Unit Testing||TEST_HOST - - - $class - - CF$UID - 101 - - NS.string - Unit Testing||TEST_RIG - - - $class - - CF$UID - 101 - - NS.string - Versioning||CURRENT_PROJECT_VERSION - - - $class - - CF$UID - 101 - - NS.string - Versioning||VERSION_INFO_FILE - - - $class - - CF$UID - 101 - - NS.string - Versioning||VERSION_INFO_EXPORT_DECL - - - $class - - CF$UID - 101 - - NS.string - Versioning||VERSION_INFO_PREFIX - - - $class - - CF$UID - 101 - - NS.string - Versioning||VERSION_INFO_SUFFIX - - - $class - - CF$UID - 101 - - NS.string - Versioning||VERSIONING_SYSTEM - - - $class - - CF$UID - 101 - - NS.string - Versioning||VERSION_INFO_BUILDER - - - $class - - CF$UID - 101 - - NS.string - Interface Builder XIB Compiler - Options||IBC_FLATTEN_NIBS - - - $class - - CF$UID - 101 - - NS.string - Interface Builder XIB Compiler - Options||IBC_OTHER_FLAGS - - - $class - - CF$UID - 101 - - NS.string - Interface Builder XIB Compiler - Options||IBC_OVERRIDING_PLUGINS_AND_FRAMEWORKS_DIR - - - $class - - CF$UID - 101 - - NS.string - Interface Builder XIB Compiler - Options||IBC_PLUGIN_SEARCH_PATHS - - - $class - - CF$UID - 101 - - NS.string - Interface Builder XIB Compiler - Options||IBC_PLUGINS - - - $class - - CF$UID - 101 - - NS.string - Interface Builder XIB Compiler - Options||IBC_ERRORS - - - $class - - CF$UID - 101 - - NS.string - Interface Builder XIB Compiler - Options||IBC_NOTICES - - - $class - - CF$UID - 101 - - NS.string - Interface Builder XIB Compiler - Options||IBC_WARNINGS - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Code Generation||GCC_FAST_OBJC_DISPATCH - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Code Generation||GCC_ENABLE_SSE3_EXTENSIONS - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Code Generation||GCC_ENABLE_SSE41_EXTENSIONS - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Code Generation||GCC_ENABLE_SSE42_EXTENSIONS - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Code Generation||GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Code Generation||GCC_STRICT_ALIASING - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Code Generation||GCC_GENERATE_DEBUGGING_SYMBOLS - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Code Generation||GCC_INLINES_ARE_PRIVATE_EXTERN - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Code Generation||GCC_ENABLE_KERNEL_DEVELOPMENT - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Code Generation||LLVM_LTO - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Code Generation||GCC_REUSE_STRINGS - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Code Generation||GCC_NO_COMMON_BLOCKS - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Code Generation||GCC_ENABLE_OBJC_GC - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Code Generation||GCC_FAST_MATH - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Code Generation||GCC_THREADSAFE_STATICS - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Code Generation||GCC_UNROLL_LOOPS - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Language||GCC_CHAR_IS_UNSIGNED_CHAR - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Language||GCC_ENABLE_ASM_KEYWORD - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Language||GCC_C_LANGUAGE_STANDARD - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Language||GCC_CW_ASM_SYNTAX - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Language||GCC_INPUT_FILETYPE - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Language||GCC_ENABLE_CPP_EXCEPTIONS - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Language||GCC_ENABLE_CPP_RTTI - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Language||GCC_LINK_WITH_DYNAMIC_LIBRARIES - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Language||GCC_ENABLE_OBJC_EXCEPTIONS - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Language||GCC_ENABLE_TRIGRAPHS - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Language||GCC_ENABLE_FLOATING_POINT_LIBRARY_CALLS - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Language||GCC_USE_INDIRECT_FUNCTION_CALLS - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Language||GCC_USE_REGISTER_FUNCTION_CALLS - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Language||GCC_INCREASE_PRECOMPILED_HEADER_SHARING - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Language||OTHER_CFLAGS - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Language||OTHER_CPLUSPLUSFLAGS - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Language||GCC_PRECOMPILE_PREFIX_HEADER - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Language||GCC_PREFIX_HEADER - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Language||GCC_ENABLE_BUILTIN_FUNCTIONS - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Language||GCC_ENABLE_PASCAL_STRINGS - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Language||GCC_FORCE_CPU_SUBTYPE_ALL - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Language||GCC_SHORT_ENUMS - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Language||GCC_USE_STANDARD_INCLUDE_SEARCHING - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Preprocessing||GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_CHECK_SWITCH_STATEMENTS - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_FOUR_CHARACTER_CONSTANTS - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_SHADOW - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_64_TO_32_BIT_CONVERSION - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_INHIBIT_ALL_WARNINGS - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_ABOUT_RETURN_TYPE - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_MISSING_PARENTHESES - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_ABOUT_MISSING_PROTOTYPES - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_ABOUT_MISSING_NEWLINE - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_NON_VIRTUAL_DESTRUCTOR - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Warnings||WARNING_CFLAGS - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_PEDANTIC - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_ABOUT_POINTER_SIGNEDNESS - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_SIGN_COMPARE - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_STRICT_SELECTOR_MATCH - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_TREAT_WARNINGS_AS_ERRORS - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_TYPECHECK_CALLS_TO_PRINTF - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_UNDECLARED_SELECTOR - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_UNINITIALIZED_AUTOS - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_UNKNOWN_PRAGMAS - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_UNUSED_FUNCTION - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_UNUSED_LABEL - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_UNUSED_PARAMETER - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_UNUSED_VALUE - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_UNUSED_VARIABLE - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS - - - $class - - CF$UID - 101 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO - - - $class - - CF$UID - 59 - - NS.objects - - - CF$UID - 477 - - - - - $class - - CF$UID - 101 - - NS.string - Deployment||MACOSX_DEPLOYMENT_TARGET - - - $classes - - Xcode3ProjectDocumentLocation - DVTDocumentLocation - NSObject - - $classname - Xcode3ProjectDocumentLocation - - - $class - - CF$UID - 46 - - NS.keys - - NS.objects - - - - $class - - CF$UID - 46 - - NS.keys - - - CF$UID - 481 - - - CF$UID - 483 - - - CF$UID - 485 - - - CF$UID - 487 - - - CF$UID - 489 - - - CF$UID - 491 - - - CF$UID - 493 - - - CF$UID - 494 - - - CF$UID - 496 - - - NS.objects - - - CF$UID - 498 - - - CF$UID - 502 - - - CF$UID - 506 - - - CF$UID - 510 - - - CF$UID - 514 - - - CF$UID - 518 - - - CF$UID - 522 - - - CF$UID - 526 - - - CF$UID - 530 - - - - - $class - - CF$UID - 116 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 482 - - - - $class - - CF$UID - 101 - - NS.string - file://localhost/Users/Indragie/Desktop/INPopoverController/PopoverSampleApp/PopoverSampleApp/PopoverSampleAppAppDelegate.m - - - $class - - CF$UID - 116 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 484 - - - - $class - - CF$UID - 101 - - NS.string - file://localhost/Users/Indragie/Desktop/INPopoverController/PopoverSampleApp/PopoverSampleApp/ContentViewController.h - - - $class - - CF$UID - 116 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 486 - - - - $class - - CF$UID - 101 - - NS.string - file://localhost/Users/Indragie/Desktop/INPopoverController/INPopoverController.m - - - $class - - CF$UID - 116 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 488 - - - - $class - - CF$UID - 101 - - NS.string - file://localhost/Users/Indragie/Desktop/INPopoverController/PopoverSampleApp/PopoverSampleApp/ContentViewController.m - - - $class - - CF$UID - 116 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 490 - - - - $class - - CF$UID - 101 - - NS.string - file://localhost/Users/Indragie/Desktop/INPopoverController/INPopoverWindow.m - - - $class - - CF$UID - 116 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 492 - - - - $class - - CF$UID - 101 - - NS.string - file://localhost/Users/Indragie/Desktop/INPopoverController/INPopoverWindowFrame.m - - - $class - - CF$UID - 116 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 100 - - - - $class - - CF$UID - 116 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 495 - - - - $class - - CF$UID - 101 - - NS.string - file://localhost/Users/Indragie/Desktop/INPopoverController/PopoverSampleApp/PopoverSampleApp/PopoverSampleAppAppDelegate.h - - - $class - - CF$UID - 116 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 497 - - - - $class - - CF$UID - 101 - - NS.string - file://localhost/Users/Indragie/Desktop/INPopoverController/PopoverSampleApp/PopoverSampleApp/en.lproj/InfoPlist.strings - - - $class - - CF$UID - 46 - - NS.keys - - - CF$UID - 105 - - - CF$UID - 106 - - - CF$UID - 107 - - - CF$UID - 108 - - - NS.objects - - - CF$UID - 499 - - - CF$UID - 500 - - - CF$UID - 34 - - - CF$UID - 501 - - - - 320866219.72986901 - {0, 2221} - {1616, 0} - - $class - - CF$UID - 46 - - NS.keys - - - CF$UID - 105 - - - CF$UID - 106 - - - CF$UID - 107 - - - CF$UID - 108 - - - NS.objects - - - CF$UID - 503 - - - CF$UID - 504 - - - CF$UID - 34 - - - CF$UID - 505 - - - - 320865903.92568803 - {0, 1043} - {1037, 0} - - $class - - CF$UID - 46 - - NS.keys - - - CF$UID - 105 - - - CF$UID - 106 - - - CF$UID - 107 - - - CF$UID - 108 - - - NS.objects - - - CF$UID - 507 - - - CF$UID - 508 - - - CF$UID - 34 - - - CF$UID - 509 - - - - 320869090.72201502 - {3472, 2511} - {14463, 0} - - $class - - CF$UID - 46 - - NS.keys - - - CF$UID - 105 - - - CF$UID - 106 - - - CF$UID - 107 - - - CF$UID - 108 - - - NS.objects - - - CF$UID - 511 - - - CF$UID - 512 - - - CF$UID - 34 - - - CF$UID - 513 - - - - 320865914.25018799 - {0, 1301} - {1115, 0} - - $class - - CF$UID - 46 - - NS.keys - - - CF$UID - 105 - - - CF$UID - 106 - - - CF$UID - 107 - - - CF$UID - 108 - - - NS.objects - - - CF$UID - 515 - - - CF$UID - 516 - - - CF$UID - 34 - - - CF$UID - 517 - - - - 320869042.04521501 - {1528, 731} - {1972, 0} - - $class - - CF$UID - 46 - - NS.keys - - - CF$UID - 105 - - - CF$UID - 106 - - - CF$UID - 107 - - - CF$UID - 108 - - - NS.objects - - - CF$UID - 519 - - - CF$UID - 520 - - - CF$UID - 34 - - - CF$UID - 521 - - - - 320865980.57852799 - {2485, 2625} - {3580, 0} - - $class - - CF$UID - 46 - - NS.keys - - - CF$UID - 105 - - - CF$UID - 106 - - - CF$UID - 107 - - - CF$UID - 108 - - - NS.objects - - - CF$UID - 523 - - - CF$UID - 524 - - - CF$UID - 34 - - - CF$UID - 525 - - - - 320869095.56090403 - {4929, 1925} - {3751, 0} - - $class - - CF$UID - 46 - - NS.keys - - - CF$UID - 105 - - - CF$UID - 106 - - - CF$UID - 107 - - - CF$UID - 108 - - - NS.objects - - - CF$UID - 527 - - - CF$UID - 528 - - - CF$UID - 34 - - - CF$UID - 529 - - - - 320865906.39201403 - {0, 1312} - {1084, 0} - - $class - - CF$UID - 46 - - NS.keys - - - CF$UID - 105 - - - CF$UID - 106 - - - CF$UID - 107 - - - CF$UID - 108 - - - NS.objects - - - CF$UID - 531 - - - CF$UID - 532 - - - CF$UID - 34 - - - CF$UID - 533 - - - - 320866361.17092699 - {0, 45} - {0, 0} - - $class - - CF$UID - 46 - - NS.keys - - - CF$UID - 535 - - - CF$UID - 536 - - - NS.objects - - - CF$UID - 537 - - - CF$UID - 538 - - - - IDEDeviceLocation - IDEDeviceArchitecture - dvtdevice-local-computer:localhost - x86_64 - - $class - - CF$UID - 46 - - NS.keys - - - CF$UID - 540 - - - NS.objects - - - CF$UID - 541 - - - - IDENameString - PopoverSampleApp - - $class - - CF$UID - 46 - - NS.keys - - - CF$UID - 543 - - - CF$UID - 544 - - - CF$UID - 545 - - - NS.objects - - - CF$UID - 546 - - - CF$UID - 572 - - - CF$UID - 96 - - - - IDEActivityReportCompletionSummaryStringSegments - IDEActivityReportOptions - IDEActivityReportTitle - - $class - - CF$UID - 59 - - NS.objects - - - CF$UID - 547 - - - CF$UID - 554 - - - CF$UID - 558 - - - CF$UID - 563 - - - - - $class - - CF$UID - 46 - - NS.keys - - - CF$UID - 548 - - - CF$UID - 549 - - - CF$UID - 550 - - - NS.objects - - - CF$UID - 551 - - - CF$UID - 552 - - - CF$UID - 553 - - - - IDEActivityReportStringSegmentPriority - IDEActivityReportStringSegmentBackSeparator - IDEActivityReportStringSegmentStringValue - 2 - - Build - - $class - - CF$UID - 46 - - NS.keys - - - CF$UID - 548 - - - CF$UID - 549 - - - CF$UID - 550 - - - NS.objects - - - CF$UID - 555 - - - CF$UID - 556 - - - CF$UID - 557 - - - - 4 - : - PopoverSampleApp - - $class - - CF$UID - 46 - - NS.keys - - - CF$UID - 548 - - - CF$UID - 549 - - - CF$UID - 550 - - - NS.objects - - - CF$UID - 559 - - - CF$UID - 560 - - - CF$UID - 561 - - - - 1 - - - $class - - CF$UID - 562 - - NS.data - - YnBsaXN0MDDUAQIDBAUGOzxYJHZlcnNpb25YJG9iamVjdHNZJGFy - Y2hpdmVyVCR0b3ASAAGGoK0HCA8QGhscJCUrMTQ3VSRudWxs0wkK - CwwNDlxOU0F0dHJpYnV0ZXNWJGNsYXNzWE5TU3RyaW5ngAOADIAC - WVN1Y2NlZWRlZNMKERITFBdXTlMua2V5c1pOUy5vYmplY3RzgAui - FRaABIAFohgZgAaACVZOU0ZvbnRXTlNDb2xvctQKHR4fICEiI1ZO - U05hbWVWTlNTaXplWE5TZkZsYWdzgAiAByNAJgAAAAAAABENEF8Q - EUx1Y2lkYUdyYW5kZS1Cb2xk0iYnKClaJGNsYXNzbmFtZVgkY2xh - c3Nlc1ZOU0ZvbnSiKCpYTlNPYmplY3TTCiwtLi8wXE5TQ29sb3JT - cGFjZVdOU1doaXRlgAoQA0IwANImJzIzV05TQ29sb3KiMirSJic1 - NlxOU0RpY3Rpb25hcnmiNSrSJic4OV8QEk5TQXR0cmlidXRlZFN0 - cmluZ6I6Kl8QEk5TQXR0cmlidXRlZFN0cmluZ18QD05TS2V5ZWRB - cmNoaXZlctE9PlRyb290gAEACAARABoAIwAtADIANwBFAEsAUgBf - AGYAbwBxAHMAdQB/AIYAjgCZAJsAngCgAKIApQCnAKkAsAC4AMEA - yADPANgA2gDcAOUA6AD8AQEBDAEVARwBHwEoAS8BPAFEAUYBSAFL - AVABWAFbAWABbQFwAXUBigGNAaIBtAG3AbwAAAAAAAACAQAAAAAA - AAA/AAAAAAAAAAAAAAAAAAABvg== - - - - $classes - - NSMutableData - NSData - NSObject - - $classname - NSMutableData - - - $class - - CF$UID - 46 - - NS.keys - - - CF$UID - 548 - - - CF$UID - 564 - - - CF$UID - 565 - - - CF$UID - 550 - - - CF$UID - 566 - - - CF$UID - 567 - - - NS.objects - - - CF$UID - 568 - - - CF$UID - 42 - - - CF$UID - 569 - - - CF$UID - 571 - - - CF$UID - 42 - - - CF$UID - 42 - - - - IDEActivityReportStringSegmentType - IDEActivityReportStringSegmentDate - IDEActivityReportStringSegmentDateStyle - IDEActivityReportStringSegmentTimeStyle - 3 - - $class - - CF$UID - 570 - - NS.time - 320866303.90189099 - - - $classes - - NSDate - NSObject - - $classname - NSDate - - Today at 10:31 AM - 106 - - $class - - CF$UID - 59 - - NS.objects - - - CF$UID - 2 - - - - - $class - - CF$UID - 59 - - NS.objects - - - CF$UID - 575 - - - CF$UID - 577 - - - CF$UID - 579 - - - CF$UID - 581 - - - CF$UID - 583 - - - CF$UID - 585 - - - CF$UID - 587 - - - CF$UID - 589 - - - CF$UID - 590 - - - CF$UID - 592 - - - - - $class - - CF$UID - 116 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 576 - - - file://localhost/Users/Indragie/Desktop/INPopoverController/INPopoverController.h - - $class - - CF$UID - 116 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 578 - - - file://localhost/Users/Indragie/Desktop/INPopoverController/INPopoverController.m - - $class - - CF$UID - 116 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 580 - - - file://localhost/Users/Indragie/Desktop/INPopoverController/INPopoverWindow.m - - $class - - CF$UID - 116 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 582 - - - file://localhost/Users/Indragie/Desktop/INPopoverController/PopoverSampleApp/PopoverSampleApp/PopoverSampleApp-Info.plist - - $class - - CF$UID - 116 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 584 - - - file://localhost/Users/Indragie/Desktop/INPopoverController/PopoverSampleApp/PopoverSampleApp/en.lproj/InfoPlist.strings - - $class - - CF$UID - 116 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 586 - - - file://localhost/Users/Indragie/Desktop/INPopoverController/PopoverSampleApp/PopoverSampleApp/PopoverSampleAppAppDelegate.m - - $class - - CF$UID - 116 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 588 - - - file://localhost/Users/Indragie/Desktop/INPopoverController/INPopoverWindowFrame.m - - $class - - CF$UID - 116 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 274 - - - - $class - - CF$UID - 116 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 591 - - - file://localhost/Users/Indragie/Desktop/INPopoverController/PopoverSampleApp/PopoverSampleApp/ContentViewController.m - - $class - - CF$UID - 116 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 593 - - - file://localhost/Users/Indragie/Desktop/INPopoverController/PopoverSampleApp/PopoverSampleApp/PopoverSampleAppAppDelegate.h - - $top - - State - - CF$UID - 1 - - - $version - 100000 - - diff --git a/PopoverSampleApp/PopoverSampleApp.xcodeproj/xcuserdata/Indragie.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist b/PopoverSampleApp/PopoverSampleApp.xcodeproj/xcuserdata/Indragie.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist old mode 100644 new mode 100755 diff --git a/PopoverSampleApp/PopoverSampleApp.xcodeproj/xcuserdata/Indragie.xcuserdatad/xcschemes/PopoverSampleApp.xcscheme b/PopoverSampleApp/PopoverSampleApp.xcodeproj/xcuserdata/Indragie.xcuserdatad/xcschemes/PopoverSampleApp.xcscheme old mode 100644 new mode 100755 index 3bf161f..a14339d --- a/PopoverSampleApp/PopoverSampleApp.xcodeproj/xcuserdata/Indragie.xcuserdatad/xcschemes/PopoverSampleApp.xcscheme +++ b/PopoverSampleApp/PopoverSampleApp.xcodeproj/xcuserdata/Indragie.xcuserdatad/xcschemes/PopoverSampleApp.xcscheme @@ -1,6 +1,7 @@ + LastUpgradeVersion = "0500" + version = "1.8"> @@ -22,21 +23,24 @@ + buildConfiguration = "Debug" + ignoresPersistentStateOnLaunch = "NO" + debugDocumentVersioning = "YES" + allowLocationSimulation = "YES"> + buildConfiguration = "Release" + debugDocumentVersioning = "YES"> + +@interface AlphaColorWell : NSColorWell + +@end diff --git a/PopoverSampleApp/PopoverSampleApp/AlphaColorWell.m b/PopoverSampleApp/PopoverSampleApp/AlphaColorWell.m new file mode 100755 index 0000000..df51bc7 --- /dev/null +++ b/PopoverSampleApp/PopoverSampleApp/AlphaColorWell.m @@ -0,0 +1,18 @@ +// +// AlphaColorWell.m +// PopoverSampleApp +// +// Created by Indragie Karunaratne on 1/11/2014. +// + +#import "AlphaColorWell.h" + +@implementation AlphaColorWell + +- (void)activate:(BOOL)exclusive +{ + [[NSColorPanel sharedColorPanel] setShowsAlpha:YES]; + [super activate:exclusive]; +} + +@end diff --git a/PopoverSampleApp/PopoverSampleApp/ContentViewController.h b/PopoverSampleApp/PopoverSampleApp/ContentViewController.h old mode 100644 new mode 100755 index d50d57f..38b6a58 --- a/PopoverSampleApp/PopoverSampleApp/ContentViewController.h +++ b/PopoverSampleApp/PopoverSampleApp/ContentViewController.h @@ -1,9 +1,7 @@ // // ContentViewController.h -// Copyright 2011 Indragie Karunaratne. All rights reserved. +// Copyright 2011-2014 Indragie Karunaratne. All rights reserved. // -// Licensed under the BSD License -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #import diff --git a/PopoverSampleApp/PopoverSampleApp/ContentViewController.m b/PopoverSampleApp/PopoverSampleApp/ContentViewController.m old mode 100644 new mode 100755 index 60618c8..73861a5 --- a/PopoverSampleApp/PopoverSampleApp/ContentViewController.m +++ b/PopoverSampleApp/PopoverSampleApp/ContentViewController.m @@ -1,9 +1,7 @@ // // ContentViewController.m -// Copyright 2011 Indragie Karunaratne. All rights reserved. +// Copyright 2011-2014 Indragie Karunaratne. All rights reserved. // -// Licensed under the BSD License -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #import "ContentViewController.h" diff --git a/PopoverSampleApp/PopoverSampleApp/ContentViewController.xib b/PopoverSampleApp/PopoverSampleApp/ContentViewController.xib old mode 100644 new mode 100755 index 7c86289..1ae1f89 --- a/PopoverSampleApp/PopoverSampleApp/ContentViewController.xib +++ b/PopoverSampleApp/PopoverSampleApp/ContentViewController.xib @@ -2,19 +2,19 @@ 1070 - 11A390 - 1510 - 1110.91 - 544.00 + 13E19 + 6154.21 + 1265.21 + 698.00 com.apple.InterfaceBuilder.CocoaPlugin - 1510 + 6154.21 + NSCustomObject NSCustomView NSTextField NSTextFieldCell - NSCustomObject com.apple.InterfaceBuilder.CocoaPlugin @@ -43,14 +43,15 @@ _NS:3583 YES - 67239424 + 67108864 272629760 This is view content loaded from ContentViewController.xib - LucidaGrande + YES 13 - 16 + 1044 + _NS:3583 6 @@ -66,6 +67,8 @@ MCAwIDAAA + NO + 1 {351, 204} @@ -138,10 +141,8 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{633, 728}, {480, 272}} + com.apple.InterfaceBuilder.CocoaPlugin - {628, 654} - {{357, 416}, {480, 272}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -149,10 +150,18 @@ - 7 + 8 + + ContentViewController + NSViewController + + IBProjectSource + ../PopoverSampleApp/ContentViewController.h + + ContentViewController NSViewController @@ -161,10 +170,26 @@ ./Classes/ContentViewController.h + + FirstResponder + + IBUserSource + + + 0 IBCocoaFramework + NO + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + YES 3 diff --git a/PopoverSampleApp/PopoverSampleApp/PopoverSampleApp-Info.plist b/PopoverSampleApp/PopoverSampleApp/PopoverSampleApp-Info.plist old mode 100644 new mode 100755 diff --git a/PopoverSampleApp/PopoverSampleApp/PopoverSampleApp-Prefix.pch b/PopoverSampleApp/PopoverSampleApp/PopoverSampleApp-Prefix.pch old mode 100644 new mode 100755 diff --git a/PopoverSampleApp/PopoverSampleApp/PopoverSampleAppAppDelegate.h b/PopoverSampleApp/PopoverSampleApp/PopoverSampleAppAppDelegate.h old mode 100644 new mode 100755 index 71fd675..95d90c9 --- a/PopoverSampleApp/PopoverSampleApp/PopoverSampleAppAppDelegate.h +++ b/PopoverSampleApp/PopoverSampleApp/PopoverSampleAppAppDelegate.h @@ -1,9 +1,7 @@ // // PopoverSampleAppAppDelegate.h -// Copyright 2011 Indragie Karunaratne. All rights reserved. +// Copyright 2011-2014 Indragie Karunaratne. All rights reserved. // -// Licensed under the BSD License -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #import diff --git a/PopoverSampleApp/PopoverSampleApp/PopoverSampleAppAppDelegate.m b/PopoverSampleApp/PopoverSampleApp/PopoverSampleAppAppDelegate.m old mode 100644 new mode 100755 index eb49279..c3f027b --- a/PopoverSampleApp/PopoverSampleApp/PopoverSampleAppAppDelegate.m +++ b/PopoverSampleApp/PopoverSampleApp/PopoverSampleAppAppDelegate.m @@ -1,21 +1,20 @@ // // PopoverSampleAppAppDelegate.m -// Copyright 2011 Indragie Karunaratne. All rights reserved. +// Copyright 2011-2014 Indragie Karunaratne. All rights reserved. // -// Licensed under the BSD License -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #import "PopoverSampleAppAppDelegate.h" #import "ContentViewController.h" -#import "INPopoverController.h" +#import @implementation PopoverSampleAppAppDelegate - @synthesize window, popoverController; - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { ContentViewController *viewController = [[ContentViewController alloc] initWithNibName:@"ContentViewController" bundle:nil]; + viewController.view.wantsLayer = YES; + viewController.view.layer.backgroundColor = [NSColor redColor].CGColor; self.popoverController = [[INPopoverController alloc] initWithContentViewController:viewController]; } @@ -24,7 +23,7 @@ - (IBAction)togglePopover:(id)sender if (self.popoverController.popoverIsVisible) { [self.popoverController closePopover:nil]; } else { - [self.popoverController presentPopoverFromRect:[sender bounds] inView:sender preferredArrowDirection:INPopoverArrowDirectionLeft anchorsToPositionView:YES]; + [self.popoverController presentPopoverFromRect:[sender bounds] inView:sender preferredArrowDirection:INPopoverArrowDirectionUp anchorsToPositionView:YES]; } } diff --git a/PopoverSampleApp/PopoverSampleApp/en.lproj/Credits.rtf b/PopoverSampleApp/PopoverSampleApp/en.lproj/Credits.rtf old mode 100644 new mode 100755 diff --git a/PopoverSampleApp/PopoverSampleApp/en.lproj/InfoPlist.strings b/PopoverSampleApp/PopoverSampleApp/en.lproj/InfoPlist.strings old mode 100644 new mode 100755 diff --git a/PopoverSampleApp/PopoverSampleApp/en.lproj/MainMenu.xib b/PopoverSampleApp/PopoverSampleApp/en.lproj/MainMenu.xib old mode 100644 new mode 100755 index 0cf6c21..e2c09df --- a/PopoverSampleApp/PopoverSampleApp/en.lproj/MainMenu.xib +++ b/PopoverSampleApp/PopoverSampleApp/en.lproj/MainMenu.xib @@ -1,4154 +1,774 @@ - - - - 1060 - 11B26 - 907 - 1138 - 566.00 - - com.apple.InterfaceBuilder.CocoaPlugin - 907 - - - YES - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - - - YES - - YES - - - YES - - - - YES - - NSApplication - - - FirstResponder - - - NSApplication - - - AMainMenu - - YES - - - PopoverSampleApp - - 1048576 - 2147483647 - - NSImage - NSMenuCheckmark - - - NSImage - NSMenuMixedState - - submenuAction: - - PopoverSampleApp - - YES - - - About PopoverSampleApp - - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Preferences… - , - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Services - - 1048576 - 2147483647 - - - submenuAction: - - Services - - YES - - _NSServicesMenu - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Hide PopoverSampleApp - h - 1048576 - 2147483647 - - - - - - Hide Others - h - 1572864 - 2147483647 - - - - - - Show All - - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Quit PopoverSampleApp - q - 1048576 - 2147483647 - - - - - _NSAppleMenu - - - - - File - - 1048576 - 2147483647 - - - submenuAction: - - File - - YES - - - New - n - 1048576 - 2147483647 - - - - - - Open… - o - 1048576 - 2147483647 - - - - - - Open Recent - - 1048576 - 2147483647 - - - submenuAction: - - Open Recent - - YES - - - Clear Menu - - 1048576 - 2147483647 - - - - - _NSRecentDocumentsMenu - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Close - w - 1048576 - 2147483647 - - - - - - Save - s - 1048576 - 2147483647 - - - - - - Save As… - S - 1179648 - 2147483647 - - - - - - Revert to Saved - - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Page Setup... - P - 1179648 - 2147483647 - - - - - - - Print… - p - 1048576 - 2147483647 - - - - - - - - - Edit - - 1048576 - 2147483647 - - - submenuAction: - - Edit - - YES - - - Undo - z - 1048576 - 2147483647 - - - - - - Redo - Z - 1179648 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Cut - x - 1048576 - 2147483647 - - - - - - Copy - c - 1048576 - 2147483647 - - - - - - Paste - v - 1048576 - 2147483647 - - - - - - Paste and Match Style - V - 1572864 - 2147483647 - - - - - - Delete - - 1048576 - 2147483647 - - - - - - Select All - a - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Find - - 1048576 - 2147483647 - - - submenuAction: - - Find - - YES - - - Find… - f - 1048576 - 2147483647 - - - 1 - - - - Find Next - g - 1048576 - 2147483647 - - - 2 - - - - Find Previous - G - 1179648 - 2147483647 - - - 3 - - - - Use Selection for Find - e - 1048576 - 2147483647 - - - 7 - - - - Jump to Selection - j - 1048576 - 2147483647 - - - - - - - - - Spelling and Grammar - - 1048576 - 2147483647 - - - submenuAction: - - Spelling and Grammar - - YES - - - Show Spelling and Grammar - : - 1048576 - 2147483647 - - - - - - Check Document Now - ; - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Check Spelling While Typing - - 1048576 - 2147483647 - - - - - - Check Grammar With Spelling - - 1048576 - 2147483647 - - - - - - Correct Spelling Automatically - - 2147483647 - - - - - - - - - Substitutions - - 1048576 - 2147483647 - - - submenuAction: - - Substitutions - - YES - - - Show Substitutions - - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Smart Copy/Paste - f - 1048576 - 2147483647 - - - 1 - - - - Smart Quotes - g - 1048576 - 2147483647 - - - 2 - - - - Smart Dashes - - 2147483647 - - - - - - Smart Links - G - 1179648 - 2147483647 - - - 3 - - - - Text Replacement - - 2147483647 - - - - - - - - - Transformations - - 2147483647 - - - submenuAction: - - Transformations - - YES - - - Make Upper Case - - 2147483647 - - - - - - Make Lower Case - - 2147483647 - - - - - - Capitalize - - 2147483647 - - - - - - - - - Speech - - 1048576 - 2147483647 - - - submenuAction: - - Speech - - YES - - - Start Speaking - - 1048576 - 2147483647 - - - - - - Stop Speaking - - 1048576 - 2147483647 - - - - - - - - - - - - Format - - 2147483647 - - - submenuAction: - - Format - - YES - - - Font - - 2147483647 - - - submenuAction: - - Font - - YES - - - Show Fonts - t - 1048576 - 2147483647 - - - - - - Bold - b - 1048576 - 2147483647 - - - 2 - - - - Italic - i - 1048576 - 2147483647 - - - 1 - - - - Underline - u - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Bigger - + - 1048576 - 2147483647 - - - 3 - - - - Smaller - - - 1048576 - 2147483647 - - - 4 - - - - YES - YES - - - 2147483647 - - - - - - Kern - - 2147483647 - - - submenuAction: - - Kern - - YES - - - Use Default - - 2147483647 - - - - - - Use None - - 2147483647 - - - - - - Tighten - - 2147483647 - - - - - - Loosen - - 2147483647 - - - - - - - - - Ligature - - 2147483647 - - - submenuAction: - - Ligature - - YES - - - Use Default - - 2147483647 - - - - - - Use None - - 2147483647 - - - - - - Use All - - 2147483647 - - - - - - - - - Baseline - - 2147483647 - - - submenuAction: - - Baseline - - YES - - - Use Default - - 2147483647 - - - - - - Superscript - - 2147483647 - - - - - - Subscript - - 2147483647 - - - - - - Raise - - 2147483647 - - - - - - Lower - - 2147483647 - - - - - - - - - YES - YES - - - 2147483647 - - - - - - Show Colors - C - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Copy Style - c - 1572864 - 2147483647 - - - - - - Paste Style - v - 1572864 - 2147483647 - - - - - _NSFontMenu - - - - - Text - - 2147483647 - - - submenuAction: - - Text - - YES - - - Align Left - { - 1048576 - 2147483647 - - - - - - Center - | - 1048576 - 2147483647 - - - - - - Justify - - 2147483647 - - - - - - Align Right - } - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Writing Direction - - 2147483647 - - - submenuAction: - - Writing Direction - - YES - - - YES - Paragraph - - 2147483647 - - - - - - CURlZmF1bHQ - - 2147483647 - - - - - - CUxlZnQgdG8gUmlnaHQ - - 2147483647 - - - - - - CVJpZ2h0IHRvIExlZnQ - - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - YES - Selection - - 2147483647 - - - - - - CURlZmF1bHQ - - 2147483647 - - - - - - CUxlZnQgdG8gUmlnaHQ - - 2147483647 - - - - - - CVJpZ2h0IHRvIExlZnQ - - 2147483647 - - - - - - - - - YES - YES - - - 2147483647 - - - - - - Show Ruler - - 2147483647 - - - - - - Copy Ruler - c - 1310720 - 2147483647 - - - - - - Paste Ruler - v - 1310720 - 2147483647 - - - - - - - - - - - - View - - 1048576 - 2147483647 - - - submenuAction: - - View - - YES - - - Show Toolbar - t - 1572864 - 2147483647 - - - - - - Customize Toolbar… - - 1048576 - 2147483647 - - - - - - - - - Window - - 1048576 - 2147483647 - - - submenuAction: - - Window - - YES - - - Minimize - m - 1048576 - 2147483647 - - - - - - Zoom - - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Bring All to Front - - 1048576 - 2147483647 - - - - - _NSWindowsMenu - - - - - Help - - 2147483647 - - - submenuAction: - - Help - - YES - - - PopoverSampleApp Help - ? - 1048576 - 2147483647 - - - - - _NSHelpMenu - - - - _NSMainMenu - - - 7 - 2 - {{335, 390}, {373, 185}} - 1954021376 - PopoverSampleApp - INPopoverParentWindow - - - {1.7976931348623157e+308, 1.7976931348623157e+308} - - - 256 - - YES - - - 268 - - YES - - YES - NSColor pasteboard type - - - {{132, 145}, {44, 23}} - - - _NS:3884 - YES - YES - - 1 - MC4wNTgxMzA0OTg5OCAwLjA1NTU0MTg5OTA2IDEAA - - - - - 268 - - YES - - YES - NSColor pasteboard type - - - {{132, 114}, {44, 23}} - - - _NS:3884 - YES - YES - - 1 - MC4wNTgxMzA0OTg5OCAwLjA1NTU0MTg5OTA2IDEAA - - - - - 268 - {{17, 148}, {97, 17}} - - - _NS:3897 - YES - - 68288064 - 272630784 - Popover Color: - - LucidaGrande - 13 - 1040 - - _NS:3897 - - - 6 - System - controlColor - - 3 - MC42NjY2NjY2NjY3AA - - - - 6 - System - controlTextColor - - 3 - MAA - - - - - - - 268 - {{25, 117}, {97, 17}} - - - _NS:3897 - YES - - 68288064 - 272630784 - Border Color: - - _NS:3897 - - - - - - - - 268 - {{24, 87}, {97, 17}} - - - _NS:3897 - YES - - 68288064 - 272630784 - Border Width: - - _NS:3897 - - - - - - - - 268 - {{220, 109}, {139, 32}} - - - _NS:164 - YES - - 67239424 - 134217728 - Toggle Popover - - _NS:164 - - -2038284033 - 129 - - - 200 - 25 - - - - - 268 - {{132, 82}, {44, 22}} - - - _NS:3819 - YES - - -1803944383 - 272630784 - - - - YES - - YES - allowsFloats - formatterBehavior - locale - negativeInfinitySymbol - nilSymbol - numberStyle - positiveInfinitySymbol - - - YES - - - - - - -∞ - - - +∞ - - - #,##0.### - #,##0.### - - - - - - - - NaN - - YES - - - YES - - - - - 0 - 0 - YES - NO - 1 - AAAAAAAAAAAAAAAAAAAAAA - - - - 3 - YES - YES - YES - - . - , - YES - NO - YES - - _NS:3819 - - YES - - 6 - System - textBackgroundColor - - 3 - MQA - - - - 6 - System - textColor - - - - - - - 268 - {{18, 38}, {232, 18}} - - - _NS:239 - YES - - -2080244224 - 0 - Closes when popover resigns key - - _NS:239 - - 1211912703 - 2 - - NSImage - NSSwitch - - - NSSwitch - - - - 200 - 25 - - - - - 268 - {{18, 18}, {287, 18}} - - _NS:239 - YES - - -2080244224 - 0 - Closes when application becomes inactive - - _NS:239 - - 1211912703 - 2 - - - - - 200 - 25 - - - - - 268 - {{18, 58}, {81, 18}} - - - _NS:239 - YES - - -2080244224 - 0 - Animates - - _NS:239 - - 1211912703 - 2 - - - - - 200 - 25 - - - - {373, 185} - - - {{0, 0}, {1680, 1028}} - {1.7976931348623157e+308, 1.7976931348623157e+308} - YES - - - PopoverSampleAppAppDelegate - - - NSFontManager - - - - - YES - - - performMiniaturize: - - - - 37 - - - - arrangeInFront: - - - - 39 - - - - print: - - - - 86 - - - - runPageLayout: - - - - 87 - - - - clearRecentDocuments: - - - - 127 - - - - orderFrontStandardAboutPanel: - - - - 142 - - - - performClose: - - - - 193 - - - - toggleContinuousSpellChecking: - - - - 222 - - - - undo: - - - - 223 - - - - copy: - - - - 224 - - - - checkSpelling: - - - - 225 - - - - paste: - - - - 226 - - - - stopSpeaking: - - - - 227 - - - - cut: - - - - 228 - - - - showGuessPanel: - - - - 230 - - - - redo: - - - - 231 - - - - selectAll: - - - - 232 - - - - startSpeaking: - - - - 233 - - - - delete: - - - - 235 - - - - performZoom: - - - - 240 - - - - performFindPanelAction: - - - - 241 - - - - centerSelectionInVisibleArea: - - - - 245 - - - - toggleGrammarChecking: - - - - 347 - - - - toggleSmartInsertDelete: - - - - 355 - - - - toggleAutomaticQuoteSubstitution: - - - - 356 - - - - toggleAutomaticLinkDetection: - - - - 357 - - - - saveDocument: - - - - 362 - - - - saveDocumentAs: - - - - 363 - - - - revertDocumentToSaved: - - - - 364 - - - - runToolbarCustomizationPalette: - - - - 365 - - - - toggleToolbarShown: - - - - 366 - - - - hide: - - - - 367 - - - - hideOtherApplications: - - - - 368 - - - - unhideAllApplications: - - - - 370 - - - - newDocument: - - - - 373 - - - - openDocument: - - - - 374 - - - - addFontTrait: - - - - 421 - - - - addFontTrait: - - - - 422 - - - - modifyFont: - - - - 423 - - - - orderFrontFontPanel: - - - - 424 - - - - modifyFont: - - - - 425 - - - - raiseBaseline: - - - - 426 - - - - lowerBaseline: - - - - 427 - - - - copyFont: - - - - 428 - - - - subscript: - - - - 429 - - - - superscript: - - - - 430 - - - - tightenKerning: - - - - 431 - - - - underline: - - - - 432 - - - - orderFrontColorPanel: - - - - 433 - - - - useAllLigatures: - - - - 434 - - - - loosenKerning: - - - - 435 - - - - pasteFont: - - - - 436 - - - - unscript: - - - - 437 - - - - useStandardKerning: - - - - 438 - - - - useStandardLigatures: - - - - 439 - - - - turnOffLigatures: - - - - 440 - - - - turnOffKerning: - - - - 441 - - - - terminate: - - - - 449 - - - - toggleAutomaticSpellingCorrection: - - - - 456 - - - - orderFrontSubstitutionsPanel: - - - - 458 - - - - toggleAutomaticDashSubstitution: - - - - 461 - - - - toggleAutomaticTextReplacement: - - - - 463 - - - - uppercaseWord: - - - - 464 - - - - capitalizeWord: - - - - 467 - - - - lowercaseWord: - - - - 468 - - - - pasteAsPlainText: - - - - 486 - - - - performFindPanelAction: - - - - 487 - - - - performFindPanelAction: - - - - 488 - - - - performFindPanelAction: - - - - 489 - - - - showHelp: - - - - 493 - - - - delegate - - - - 495 - - - - alignCenter: - - - - 518 - - - - pasteRuler: - - - - 519 - - - - toggleRuler: - - - - 520 - - - - alignRight: - - - - 521 - - - - copyRuler: - - - - 522 - - - - alignJustified: - - - - 523 - - - - alignLeft: - - - - 524 - - - - makeBaseWritingDirectionNatural: - - - - 525 - - - - makeBaseWritingDirectionLeftToRight: - - - - 526 - - - - makeBaseWritingDirectionRightToLeft: - - - - 527 - - - - makeTextWritingDirectionNatural: - - - - 528 - - - - makeTextWritingDirectionLeftToRight: - - - - 529 - - - - makeTextWritingDirectionRightToLeft: - - - - 530 - - - - window - - - - 532 - - - - togglePopover: - - - - 556 - - - - value: popoverController.color - - - - - - value: popoverController.color - value - popoverController.color - 2 - - - 559 - - - - value: popoverController.borderColor - - - - - - value: popoverController.borderColor - value - popoverController.borderColor - 2 - - - 563 - - - - value: popoverController.borderWidth - - - - - - value: popoverController.borderWidth - value - popoverController.borderWidth - 2 - - - 573 - - - - value: popoverController.closesWhenPopoverResignsKey - - - - - - value: popoverController.closesWhenPopoverResignsKey - value - popoverController.closesWhenPopoverResignsKey - 2 - - - 577 - - - - value: popoverController.closesWhenApplicationBecomesInactive - - - - - - value: popoverController.closesWhenApplicationBecomesInactive - value - popoverController.closesWhenApplicationBecomesInactive - 2 - - - 581 - - - - value: popoverController.animates - - - - - - value: popoverController.animates - value - popoverController.animates - 2 - - - 585 - - - - - YES - - 0 - - - - - - -2 - - - File's Owner - - - -1 - - - First Responder - - - -3 - - - Application - - - 29 - - - YES - - - - - - - - - - - - 19 - - - YES - - - - - - 56 - - - YES - - - - - - 217 - - - YES - - - - - - 83 - - - YES - - - - - - 81 - - - YES - - - - - - - - - - - - - - - - 75 - - - - - 80 - - - - - 78 - - - - - 72 - - - - - 82 - - - - - 124 - - - YES - - - - - - 77 - - - - - 73 - - - - - 79 - - - - - 112 - - - - - 74 - - - - - 125 - - - YES - - - - - - 126 - - - - - 205 - - - YES - - - - - - - - - - - - - - - - - - - - 202 - - - - - 198 - - - - - 207 - - - - - 214 - - - - - 199 - - - - - 203 - - - - - 197 - - - - - 206 - - - - - 215 - - - - - 218 - - - YES - - - - - - 216 - - - YES - - - - - - 200 - - - YES - - - - - - - - - - - 219 - - - - - 201 - - - - - 204 - - - - - 220 - - - YES - - - - - - - - - - 213 - - - - - 210 - - - - - 221 - - - - - 208 - - - - - 209 - - - - - 57 - - - YES - - - - - - - - - - - - - - - - 58 - - - - - 134 - - - - - 150 - - - - - 136 - - - - - 144 - - - - - 129 - - - - - 143 - - - - - 236 - - - - - 131 - - - YES - - - - - - 149 - - - - - 145 - - - - - 130 - - - - - 24 - - - YES - - - - - - - - - 92 - - - - - 5 - - - - - 239 - - - - - 23 - - - - - 295 - - - YES - - - - - - 296 - - - YES - - - - - - - 297 - - - - - 298 - - - - - 211 - - - YES - - - - - - 212 - - - YES - - - - - - - 195 - - - - - 196 - - - - - 346 - - - - - 348 - - - YES - - - - - - 349 - - - YES - - - - - - - - - - - - 350 - - - - - 351 - - - - - 354 - - - - - 371 - - - YES - - - - - - 372 - - - YES - - - - - - - - - - - - - - - 375 - - - YES - - - - - - 376 - - - YES - - - - - - - 377 - - - YES - - - - - - 388 - - - YES - - - - - - - - - - - - - - - - - - - - - 389 - - - - - 390 - - - - - 391 - - - - - 392 - - - - - 393 - - - - - 394 - - - - - 395 - - - - - 396 - - - - - 397 - - - YES - - - - - - 398 - - - YES - - - - - - 399 - - - YES - - - - - - 400 - - - - - 401 - - - - - 402 - - - - - 403 - - - - - 404 - - - - - 405 - - - YES - - - - - - - - - - 406 - - - - - 407 - - - - - 408 - - - - - 409 - - - - - 410 - - - - - 411 - - - YES - - - - - - - - 412 - - - - - 413 - - - - - 414 - - - - - 415 - - - YES - - - - - - - - - 416 - - - - - 417 - - - - - 418 - - - - - 419 - - - - - 420 - - - - - 450 - - - YES - - - - - - 451 - - - YES - - - - - - - - 452 - - - - - 453 - - - - - 454 - - - - - 457 - - - - - 459 - - - - - 460 - - - - - 462 - - - - - 465 - - - - - 466 - - - - - 485 - - - - - 490 - - - YES - - - - - - 491 - - - YES - - - - - - 492 - - - - - 494 - - - - - 496 - - - YES - - - - - - 497 - - - YES - - - - - - - - - - - - - - - 498 - - - - - 499 - - - - - 500 - - - - - 501 - - - - - 502 - - - - - 503 - - - YES - - - - - - 504 - - - - - 505 - - - - - 506 - - - - - 507 - - - - - 508 - - - YES - - - - - - - - - - - - - - 509 - - - - - 510 - - - - - 511 - - - - - 512 - - - - - 513 - - - - - 514 - - - - - 515 - - - - - 516 - - - - - 517 - - - - - 533 - - - - - 534 - - - - - 538 - - - YES - - - - - - 539 - - - - - 540 - - - YES - - - - - - 541 - - - - - 552 - - - YES - - - - - - 553 - - - - - 554 - - - YES - - - - - - 555 - - - - - 567 - - - YES - - - - - - 568 - - - YES - - - - - - 569 - - - - - 574 - - - YES - - - - - - 575 - - - - - 578 - - - YES - - - - - - 579 - - - - - 582 - - - YES - - - - - - 583 - - - - - - - YES - - YES - -1.IBPluginDependency - -2.IBPluginDependency - -3.IBPluginDependency - 112.IBPluginDependency - 124.IBPluginDependency - 125.IBPluginDependency - 126.IBPluginDependency - 129.IBPluginDependency - 130.IBPluginDependency - 131.IBPluginDependency - 134.IBPluginDependency - 136.IBPluginDependency - 143.IBPluginDependency - 144.IBPluginDependency - 145.IBPluginDependency - 149.IBPluginDependency - 150.IBPluginDependency - 19.IBPluginDependency - 195.IBPluginDependency - 196.IBPluginDependency - 197.IBPluginDependency - 198.IBPluginDependency - 199.IBPluginDependency - 200.IBPluginDependency - 201.IBPluginDependency - 202.IBPluginDependency - 203.IBPluginDependency - 204.IBPluginDependency - 205.IBPluginDependency - 206.IBPluginDependency - 207.IBPluginDependency - 208.IBPluginDependency - 209.IBPluginDependency - 210.IBPluginDependency - 211.IBPluginDependency - 212.IBPluginDependency - 213.IBPluginDependency - 214.IBPluginDependency - 215.IBPluginDependency - 216.IBPluginDependency - 217.IBPluginDependency - 218.IBPluginDependency - 219.IBPluginDependency - 220.IBPluginDependency - 221.IBPluginDependency - 23.IBPluginDependency - 236.IBPluginDependency - 239.IBPluginDependency - 24.IBPluginDependency - 29.IBPluginDependency - 295.IBPluginDependency - 296.IBPluginDependency - 297.IBPluginDependency - 298.IBPluginDependency - 346.IBPluginDependency - 348.IBPluginDependency - 349.IBPluginDependency - 350.IBPluginDependency - 351.IBPluginDependency - 354.IBPluginDependency - 371.IBPluginDependency - 371.IBWindowTemplateEditedContentRect - 371.NSWindowTemplate.visibleAtLaunch - 372.IBPluginDependency - 375.IBPluginDependency - 376.IBPluginDependency - 377.IBPluginDependency - 388.IBPluginDependency - 389.IBPluginDependency - 390.IBPluginDependency - 391.IBPluginDependency - 392.IBPluginDependency - 393.IBPluginDependency - 394.IBPluginDependency - 395.IBPluginDependency - 396.IBPluginDependency - 397.IBPluginDependency - 398.IBPluginDependency - 399.IBPluginDependency - 400.IBPluginDependency - 401.IBPluginDependency - 402.IBPluginDependency - 403.IBPluginDependency - 404.IBPluginDependency - 405.IBPluginDependency - 406.IBPluginDependency - 407.IBPluginDependency - 408.IBPluginDependency - 409.IBPluginDependency - 410.IBPluginDependency - 411.IBPluginDependency - 412.IBPluginDependency - 413.IBPluginDependency - 414.IBPluginDependency - 415.IBPluginDependency - 416.IBPluginDependency - 417.IBPluginDependency - 418.IBPluginDependency - 419.IBPluginDependency - 420.IBPluginDependency - 450.IBPluginDependency - 451.IBPluginDependency - 452.IBPluginDependency - 453.IBPluginDependency - 454.IBPluginDependency - 457.IBPluginDependency - 459.IBPluginDependency - 460.IBPluginDependency - 462.IBPluginDependency - 465.IBPluginDependency - 466.IBPluginDependency - 485.IBPluginDependency - 490.IBPluginDependency - 491.IBPluginDependency - 492.IBPluginDependency - 494.IBPluginDependency - 496.IBPluginDependency - 497.IBPluginDependency - 498.IBPluginDependency - 499.IBPluginDependency - 5.IBPluginDependency - 500.IBPluginDependency - 501.IBPluginDependency - 502.IBPluginDependency - 503.IBPluginDependency - 504.IBPluginDependency - 505.IBPluginDependency - 506.IBPluginDependency - 507.IBPluginDependency - 508.IBPluginDependency - 509.IBPluginDependency - 510.IBPluginDependency - 511.IBPluginDependency - 512.IBPluginDependency - 513.IBPluginDependency - 514.IBPluginDependency - 515.IBPluginDependency - 516.IBPluginDependency - 517.IBPluginDependency - 533.IBPluginDependency - 534.IBPluginDependency - 538.IBPluginDependency - 539.IBPluginDependency - 540.IBPluginDependency - 541.IBPluginDependency - 552.IBPluginDependency - 553.IBPluginDependency - 554.IBPluginDependency - 555.IBPluginDependency - 56.IBPluginDependency - 567.IBPluginDependency - 568.IBPluginDependency - 569.IBNumberFormatterBehaviorMetadataKey - 569.IBNumberFormatterLocalizesFormatMetadataKey - 569.IBPluginDependency - 57.IBPluginDependency - 574.IBPluginDependency - 575.IBPluginDependency - 578.IBPluginDependency - 579.IBPluginDependency - 58.IBPluginDependency - 582.IBPluginDependency - 583.IBPluginDependency - 72.IBPluginDependency - 73.IBPluginDependency - 74.IBPluginDependency - 75.IBPluginDependency - 77.IBPluginDependency - 78.IBPluginDependency - 79.IBPluginDependency - 80.IBPluginDependency - 81.IBPluginDependency - 82.IBPluginDependency - 83.IBPluginDependency - 92.IBPluginDependency - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{380, 496}, {480, 360}} - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - - - YES - - - YES - - - - - YES - - - YES - - - - 585 - - - - YES - - INPopoverParentWindow - NSWindow - - IBUserSource - - - - - NSDocument - - YES - - YES - printDocument: - revertDocumentToSaved: - runPageLayout: - saveDocument: - saveDocumentAs: - saveDocumentTo: - - - YES - id - id - id - id - id - id - - - - YES - - YES - printDocument: - revertDocumentToSaved: - runPageLayout: - saveDocument: - saveDocumentAs: - saveDocumentTo: - - - YES - - printDocument: - id - - - revertDocumentToSaved: - id - - - runPageLayout: - id - - - saveDocument: - id - - - saveDocumentAs: - id - - - saveDocumentTo: - id - - - - - IBProjectSource - ./Classes/NSDocument.h - - - - PopoverSampleAppAppDelegate - NSObject - - togglePopover: - id - - - togglePopover: - - togglePopover: - id - - - - window - NSWindow - - - window - - window - NSWindow - - - - IBProjectSource - ./Classes/PopoverSampleAppAppDelegate.h - - - - - 0 - IBCocoaFramework - - com.apple.InterfaceBuilder.CocoaPlugin.macosx - - - - com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 - - - YES - - 3 - - YES - - YES - NSMenuCheckmark - NSMenuMixedState - NSSwitch - - - YES - {9, 8} - {7, 2} - {15, 15} - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/PopoverSampleApp/PopoverSampleApp/main.m b/PopoverSampleApp/PopoverSampleApp/main.m old mode 100644 new mode 100755 index 394c2c3..f99521c --- a/PopoverSampleApp/PopoverSampleApp/main.m +++ b/PopoverSampleApp/PopoverSampleApp/main.m @@ -3,7 +3,7 @@ // PopoverSampleApp // // Created by Indragie Karunaratne on 11-03-02. -// Copyright 2011 PCWiz Computer. All rights reserved. +// Copyright 2011-2014 PCWiz Computer. All rights reserved. // #import diff --git a/README.md b/README.md index 1fcb2be..5921a82 100644 --- a/README.md +++ b/README.md @@ -1,36 +1,33 @@ -What is INPopoverController? -==================== +## INPopoverController +### Open source OS X popover implementation -It's no secret that a certain upcoming of Mac OS X has an API for displaying popovers. That said, developers who want to support older versions of OS X (like me) are unable to use that API without breaking backward compatibility. So I developed this class that will allow developers to easily add popovers into their applications and also have it be compatible with older versions of OS X (tested on 10.6, should work for 10.5 as well). I've included a sample app to demonstrate how to use INPopoverController: +OS X 10.7 introduced the `NSPopover` class for displaying popover windows. That said, developers who want to support older versions of OS X (like me) are unable to use that API without breaking backward compatibility. So I developed this class that will allow developers to easily add popovers into their applications and also have it be compatible with older versions of OS X. I've included a sample app to demonstrate how to use INPopoverController: -![INPopoverController](http://i52.tinypic.com/2v9dl5c.png) +![INPopoverController](https://raw.github.com/indragiek/INPopoverController/master/screenshot.png) -Features: +**Features:** -- Customizable color, border color, and border width (arrow width/height and popover corner radius are also customizable by editing the INPopoverControllerDefines.h file) -- Autocalculates the best arrow direction depending on screen space and popover position -- Displays content from a regular NSViewController (can be loaded from a NIB) +- Customizable color, border color, border width, arrow size, and corner radius. +- Automatically calculates the best arrow direction depending on screen space and popover position +- Displays content from a regular `NSViewController` (can be loaded from a NIB) - Animation for when the popover appears/disappears and when the content size is changed - Popover can anchor to a view - Customizable popover behaviour (close when key status is lost, when application resigns active) -How to use it -==================== +### How to use it The headers are well documented (and I've also included a sample app) so it should be simple to figure out how to use it. There are `color`, `borderColor`, and `borderWidth` properties to customize the appearance of the popover. There are also some hard-coded defines in the `INPopoverControllerDefines.h` file which can be changed to further customize the appearance. The `closesWhenPopoverResignsKey` and `closesWhenApplicationBecomesInactive` properties can be used to control the behaviour of the popover. Everything else should be pretty much self explanatory. If you want to completely customize the drawing of the popover, you can edit the `INPopoverWindowFrame.m` file to run your own drawing code instead of the default. Make sure that you're taking the `arrowDirection` property into account when drawing. -**Important note:** You may notice that there's a little quirk that when interacting with views inside the popover, the main window resigns its key status (and causes it to take on an inactive window appearance). If this is an issue, then I've included a simple `NSWindow` subclass (`/Extras/INAlwaysKeyWindow.h`) that will make a window look like it's key regardless of which window has key status. This might be useful for your main application window. - **Create a new issue if you have trouble getting it working, or if you want to request new features** -Who am I? -==================== +### Contact -I'm Indragie Karunaratne, a 16 year old Mac OS X and iOS Developer from Edmonton AB, Canada. Visit [my website](http://indragie.com) to check out my work, or to get in touch with me. +* Indragie Karunaratne +* [@indragie](http://twitter.com/indragie) +* [http://indragie.com](http://indragie.com) -Licensing -==================== +### Licensing INPopoverController is licensed under the [BSD license](http://www.opensource.org/licenses/bsd-license.php). \ No newline at end of file diff --git a/screenshot.png b/screenshot.png new file mode 100644 index 0000000..72c747c Binary files /dev/null and b/screenshot.png differ