diff --git a/.gitignore b/.gitignore index 31e6fd9..ec6efda 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # Xcode .DS_Store */build/* +Build/* *.pbxuser !default.pbxuser *.mode1v3 @@ -15,3 +16,5 @@ profile DerivedData .idea/ *.hmap + +Demo.xcodeproj/project.xcworkspace/xcshareddata/Demo.xccheckout diff --git a/AXStatusItemPopup/AXStatusItemPopup.h b/AXStatusItemPopup/AXStatusItemPopup.h index 1d3d948..7afc78a 100644 --- a/AXStatusItemPopup/AXStatusItemPopup.h +++ b/AXStatusItemPopup/AXStatusItemPopup.h @@ -8,15 +8,37 @@ #import -@interface AXStatusItemPopup : NSView +@interface NSWindow (canBecomeKeyWindow) + +@end + +@protocol AXStatusItemPopupDelegate + +@optional + +- (BOOL) shouldPopupOpen; +- (void) popupWillOpen; +- (void) popupDidOpen; + +- (BOOL) shouldPopupClose; +- (void) popupWillClose; +- (void) popupDidClose; + +@end + +@interface AXStatusItemPopup : NSView // properties -@property(assign, nonatomic, getter=isActive) BOOL active; -@property(assign, nonatomic) BOOL animated; +@property(assign, nonatomic, getter=isAnimated) BOOL animated; @property(strong, nonatomic) NSImage *image; @property(strong, nonatomic) NSImage *alternateImage; -@property(strong, nonatomic) NSStatusItem *statusItem; +@property(weak) id delegate; + +// alloc ++ (id)statusItemPopupWithViewController:(NSViewController *)controller; ++ (id)statusItemPopupWithViewController:(NSViewController *)controller image:(NSImage *)image; ++ (id)statusItemPopupWithViewController:(NSViewController *)controller image:(NSImage *)image alternateImage:(NSImage *)alternateImage; // init - (id)initWithViewController:(NSViewController *)controller; @@ -25,6 +47,8 @@ // show / hide popover +- (void)togglePopover; +- (void)togglePopoverAnimated: (BOOL)animated; - (void)showPopover; - (void)showPopoverAnimated:(BOOL)animated; - (void)hidePopover; diff --git a/AXStatusItemPopup/AXStatusItemPopup.m b/AXStatusItemPopup/AXStatusItemPopup.m index dac12e3..d1b86bf 100644 --- a/AXStatusItemPopup/AXStatusItemPopup.m +++ b/AXStatusItemPopup/AXStatusItemPopup.m @@ -10,43 +10,79 @@ #define kMinViewWidth 22 +BOOL shouldBecomeKeyWindow; +NSWindow* windowToOverride; + // -// Private variables +// Private properties // -@interface AXStatusItemPopup () { - NSViewController *_viewController; - BOOL _active; - NSImageView *_imageView; - NSStatusItem *_statusItem; - NSPopover *_popover; - id _popoverTransiencyMonitor; -} +@interface AXStatusItemPopup () + +@property NSViewController *viewController; +@property NSImageView *imageView; +@property NSStatusItem *statusItem; +@property NSPopover *popover; +@property(assign, nonatomic, getter=isActive) BOOL active; + +@property NSWindow* oldKeyWindow; +@property NSMutableArray* hiddenWindows; +@property BOOL appWasActive; +@property BOOL isUpdatingWindows; +@property BOOL isActiveWithDelay; +@property id popoverTransiencyMonitor; + +@property (nonatomic) NSRunningApplication* previousRunningApp; + @end +/////////////////////////////////// +#pragma mark - Implementation AXStatusItemPopup /////////////////////////////////// +@implementation AXStatusItemPopup + // -// Implementation +#pragma mark - Allocators // -@implementation AXStatusItemPopup -- (id)initWithViewController:(NSViewController *)controller -{ ++ (id)statusItemPopupWithViewController:(NSViewController *)controller { + return [[self alloc] initWithViewController:controller]; +} + ++ (id)statusItemPopupWithViewController:(NSViewController *)controller image:(NSImage *)image { + return [[self alloc] initWithViewController:controller image:image]; +} + ++ (id)statusItemPopupWithViewController:(NSViewController *)controller image:(NSImage *)image alternateImage:(NSImage *)alternateImage { + return [[self alloc] initWithViewController:controller image:image alternateImage:alternateImage]; +} + +// +#pragma mark - Initialization & Dealloc +// + +- (id)initWithViewController:(NSViewController *)controller { return [self initWithViewController:controller image:nil]; } -- (id)initWithViewController:(NSViewController *)controller image:(NSImage *)image -{ +- (id)initWithViewController:(NSViewController *)controller image:(NSImage *)image { return [self initWithViewController:controller image:image alternateImage:nil]; } -- (id)initWithViewController:(NSViewController *)controller image:(NSImage *)image alternateImage:(NSImage *)alternateImage -{ +- (id)initWithViewController:(NSViewController *)controller image:(NSImage *)image alternateImage:(NSImage *)alternateImage { CGFloat height = [NSStatusBar systemStatusBar].thickness; self = [super initWithFrame:NSMakeRect(0, 0, kMinViewWidth, height)]; if (self) { + _active = NO; + _animated = YES; + _appWasActive = NO; + _isUpdatingWindows = NO; + _isActiveWithDelay = NO; + _oldKeyWindow = nil; + _hiddenWindows = [NSMutableArray new]; _viewController = controller; + _previousRunningApp = nil; self.image = image; self.alternateImage = alternateImage; @@ -56,22 +92,34 @@ - (id)initWithViewController:(NSViewController *)controller image:(NSImage *)ima self.statusItem = [[NSStatusBar systemStatusBar] statusItemWithLength:NSVariableStatusItemLength]; self.statusItem.view = self; + self.statusItem.target = self; + self.statusItem.action = @selector(togglePopover:); - _active = NO; - _animated = YES; + self.popover = [[NSPopover alloc] init]; + self.popover.contentViewController = self.viewController; + self.popover.animates = self.animated; + self.popover.delegate = self; + + windowToOverride = self.window; + + [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(applicationDidResignActive:) name:NSApplicationDidResignActiveNotification object:nil]; + [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(windowDidBecomeKey:) name:NSWindowDidBecomeKeyNotification object:nil]; + [[[NSWorkspace sharedWorkspace]notificationCenter]addObserver:self selector:@selector(activeSpaceHasChanged:) name:NSWorkspaceActiveSpaceDidChangeNotification object:nil]; } return self; } +- (void) dealloc { + [[NSNotificationCenter defaultCenter]removeObserver:self]; +} -//////////////////////////////////// +// #pragma mark - Drawing -//////////////////////////////////// +// -- (void)drawRect:(NSRect)dirtyRect -{ +- (void)drawRect:(NSRect)dirtyRect { // set view background color - if (_active) { + if (self.isActive) { [[NSColor selectedMenuItemColor] setFill]; } else { [[NSColor clearColor] setFill]; @@ -79,41 +127,81 @@ - (void)drawRect:(NSRect)dirtyRect NSRectFill(dirtyRect); // set image - NSImage *image = (_active ? _alternateImage : _image); + NSImage *image = (self.isActive ? self.alternateImage : self.image); _imageView.image = image; } -//////////////////////////////////// -#pragma mark - Mouse Actions -//////////////////////////////////// +// +#pragma mark - Mouse Events +// -- (void)mouseDown:(NSEvent *)theEvent -{ - if (_popover.isShown) { - [self hidePopover]; - } else { - [self showPopover]; - } +- (void)mouseDown:(NSEvent *)theEvent { + [self togglePopover]; } -//////////////////////////////////// +// #pragma mark - Setter -//////////////////////////////////// +// + +- (void)setPreviousRunningApp:(NSRunningApplication*)previousRunningApp { + if (![previousRunningApp.executableURL isEqual:[NSRunningApplication currentApplication]]) { + _previousRunningApp = previousRunningApp; + } +} -- (void)setActive:(BOOL)active -{ +- (void)setActive:(BOOL)active { _active = active; + shouldBecomeKeyWindow = active; + if (active) { + self.popoverTransiencyMonitor = [NSEvent addGlobalMonitorForEventsMatchingMask:NSLeftMouseDownMask|NSRightMouseDownMask handler:^(NSEvent* event) { + [self hidePopover]; + }]; + self.previousRunningApp = nil; + self.isActiveWithDelay = YES; + if ([NSApp isActive]) { + self.appWasActive = YES; + self.oldKeyWindow = [NSApp keyWindow]; + } else { + self.previousRunningApp = [[NSWorkspace sharedWorkspace] frontmostApplication]; + self.appWasActive = NO; + //remind open windows of app and hide then (they shouldn't popup into foreground when only activating Popover) + [NSApp activateIgnoringOtherApps:YES]; + for (NSWindow* window in [NSApp windows]) { + if (window.isVisible && window != self.window) { + /* Activate this statement to prevent visible but not active windows from hiding. Problem is that they geht activated then*/ + if (/*true || */!(window.occlusionState & NSWindowOcclusionStateVisible)) { + window.isVisible = NO; + self.isUpdatingWindows = YES; + [self.hiddenWindows addObject:window]; + self.isUpdatingWindows = NO; + } + + } + } + } + } else { + if (self.popoverTransiencyMonitor) { + [NSEvent removeMonitor:_popoverTransiencyMonitor]; + self.popoverTransiencyMonitor = nil; + } + if (self.appWasActive) { + [self.oldKeyWindow makeKeyAndOrderFront:self]; + self.isActiveWithDelay = NO; + } else { + [self hideWithDelay]; + } + self.appWasActive = NO; + self.oldKeyWindow = nil; + } [self setNeedsDisplay:YES]; } -- (void)setImage:(NSImage *)image -{ +- (void)setImage:(NSImage *)image { _image = image; [self updateViewFrame]; } -- (void)setAlternateImage:(NSImage *)image -{ +- (void)setAlternateImage:(NSImage *)image { _alternateImage = image; if (!image && _image) { _alternateImage = _image; @@ -121,58 +209,152 @@ - (void)setAlternateImage:(NSImage *)image [self updateViewFrame]; } -//////////////////////////////////// +// +#pragma mark - Notification Handler +// + +- (void) windowDidBecomeKey:(NSNotification *)notification { + NSWindow* window = (NSWindow*)notification.object; + if (window != self.window && !self.isUpdatingWindows) { + window.isVisible = YES; + if (self.isActiveWithDelay) { + [self.hiddenWindows removeObject:window]; + } + [[NSRunningApplication currentApplication] activateWithOptions:(NSApplicationActivateIgnoringOtherApps)]; + } + if (window != self.window && self.isUpdatingWindows) { + [self.window makeKeyWindow]; + } +} + +- (void)applicationDidResignActive:(NSNotification*)note { + [self hidePopover]; +} + +- (void)activeSpaceHasChanged: (NSNotification*)note { + self.appWasActive = NO; + [self hidePopover]; +} + +// +#pragma mark - Popover Delegate +// + + //This is safer then caring for the sended events. Sometimes the popup doesn't close, in these + //cases popover and status item became out of sync +- (void) popoverWillShow: (NSNotification*) note { + self.active = YES; +} + +- (void) popoverWillClose: (NSNotification*) note { + self.active = NO; +} + +// +#pragma mark - Show / Hide Popover +// + +- (void) togglePopover { + [self togglePopoverAnimated:self.isAnimated]; +} + +- (void) togglePopoverAnimated:(BOOL)animated { + if (self.isActive) { + [self hidePopover]; + } else { + [self showPopoverAnimated:animated]; + } +} + +- (void)showPopover { + [self showPopoverAnimated:self.isAnimated]; +} + +- (void)showPopoverAnimated:(BOOL)animated { + BOOL willAnswer = [self.delegate respondsToSelector:@selector(shouldPopupOpen)]; + if (!willAnswer || (willAnswer && [self.delegate shouldPopupOpen])) { + if (!self.popover.isShown) { + _popover.animates = animated; + if ([self.delegate respondsToSelector:@selector(popupWillOpen)]) { + [self.delegate popupWillOpen]; + } + [_popover showRelativeToRect:self.frame ofView:self preferredEdge:NSMinYEdge]; + } + [self.window makeKeyWindow]; + if ([self.delegate respondsToSelector:@selector(popupDidOpen)]) { + [self.delegate popupDidOpen]; + } + } +} + +- (void)hidePopover { + BOOL willAnswer = [self.delegate respondsToSelector:@selector(shouldPopupClose)]; + if (!willAnswer || (willAnswer && [self.delegate shouldPopupClose])) { + if (_popover && _popover.isShown) { + if ([self.delegate respondsToSelector:@selector(popupWillClose)]) { + [self.delegate popupWillClose]; + } + [_popover close]; + } + if ([self.delegate respondsToSelector:@selector(popupDidClose)]) { + [self.delegate popupDidClose]; + } + } +} + +// #pragma mark - Helper -//////////////////////////////////// +// -- (void)updateViewFrame -{ +- (void)updateViewFrame { CGFloat width = MAX(MAX(kMinViewWidth, self.alternateImage.size.width), self.image.size.width); CGFloat height = [NSStatusBar systemStatusBar].thickness; NSRect frame = NSMakeRect(0, 0, width, height); self.frame = frame; - _imageView.frame = frame; + self.imageView.frame = frame; [self setNeedsDisplay:YES]; } +- (void)hideWithDelay { + if (self.previousRunningApp) { + [[NSWorkspace sharedWorkspace]launchApplication:self.previousRunningApp.executableURL.path]; + self.previousRunningApp = nil; + } + self.isUpdatingWindows = YES; + for (NSWindow* window in self.hiddenWindows) { + window.isVisible = YES; + } + self.isUpdatingWindows = NO; + self.isActiveWithDelay = NO; + [self.hiddenWindows removeAllObjects]; +} -//////////////////////////////////// -#pragma mark - Show / Hide Popover -//////////////////////////////////// +@end -- (void)showPopover -{ - [self showPopoverAnimated:_animated]; -} +/////////////////////////////////// +#pragma mark - Implementation NSWindow+canBecomeKeyWindow +/////////////////////////////////// -- (void)showPopoverAnimated:(BOOL)animated -{ - self.active = YES; - - if (!_popover) { - _popover = [[NSPopover alloc] init]; - _popover.contentViewController = _viewController; - } - - if (!_popover.isShown) { - _popover.animates = animated; - [_popover showRelativeToRect:self.frame ofView:self preferredEdge:NSMinYEdge]; - _popoverTransiencyMonitor = [NSEvent addGlobalMonitorForEventsMatchingMask:NSLeftMouseDownMask|NSRightMouseDownMask handler:^(NSEvent* event) { - [self hidePopover]; - }]; +#import + +@implementation NSWindow (canBecomeKeyWindow) + + //This is to fix a bug with 10.7 where an NSPopover with a text field + //cannot be edited if its parent window won't become key +- (BOOL)swizzledPopoverCanBecomeKeyWindow { + if (self == windowToOverride) { + return shouldBecomeKeyWindow; + } else { + return [self swizzledPopoverCanBecomeKeyWindow]; } } -- (void)hidePopover -{ - self.active = NO; - - if (_popover && _popover.isShown) { - [_popover close]; - [NSEvent removeMonitor:_popoverTransiencyMonitor]; - } ++ (void)load { + method_exchangeImplementations( + class_getInstanceMethod(self, @selector(canBecomeKeyWindow)), + class_getInstanceMethod(self, @selector(swizzledPopoverCanBecomeKeyWindow))); } @end diff --git a/Demo.xcodeproj/project.pbxproj b/Demo.xcodeproj/project.pbxproj index c08b828..2a00628 100644 --- a/Demo.xcodeproj/project.pbxproj +++ b/Demo.xcodeproj/project.pbxproj @@ -177,7 +177,7 @@ 4D35953316E8A7D40047F4BD /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0460; + LastUpgradeCheck = 0500; ORGANIZATIONNAME = "Alexander Schuch"; }; buildConfigurationList = 4D35953616E8A7D40047F4BD /* Build configuration list for PBXProject "Demo" */; @@ -253,7 +253,6 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_OBJC_ARC = YES; @@ -286,7 +285,6 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_OBJC_ARC = YES; diff --git a/Demo/Code/AppDelegate.h b/Demo/Code/AppDelegate.h index 28b2592..2e61d90 100644 --- a/Demo/Code/AppDelegate.h +++ b/Demo/Code/AppDelegate.h @@ -16,4 +16,7 @@ - (IBAction)showPopoverAnimated:(id)sender; - (IBAction)hidePopover:(id)sender; +- (IBAction)togglePopoverAnimated:(id)sender; +- (IBAction)togglePopover:(id)sender; + @end diff --git a/Demo/Code/AppDelegate.m b/Demo/Code/AppDelegate.m index 6eb4e98..b33ad80 100644 --- a/Demo/Code/AppDelegate.m +++ b/Demo/Code/AppDelegate.m @@ -62,4 +62,13 @@ - (IBAction)hidePopover:(id)sender [_statusItemPopup hidePopover]; } +- (IBAction)togglePopoverAnimated:(id)sender +{ + [_statusItemPopup togglePopoverAnimated:YES]; +} + +- (IBAction)togglePopover:(id)sender +{ + [_statusItemPopup togglePopoverAnimated:NO]; +} @end diff --git a/Demo/Code/ContentViewController.xib b/Demo/Code/ContentViewController.xib index 3bbd7e6..bc9479a 100644 --- a/Demo/Code/ContentViewController.xib +++ b/Demo/Code/ContentViewController.xib @@ -1,354 +1,57 @@ - - - - 1070 - 12C2034 - 3084 - 1187.34 - 625.00 - - com.apple.InterfaceBuilder.CocoaPlugin - 3084 - - - IBNSLayoutConstraint - NSButton - NSButtonCell - NSCustomObject - NSCustomView - NSTextField - NSTextFieldCell - - - com.apple.InterfaceBuilder.CocoaPlugin - - - PluginDependencyRecalculationVersion - - - - - ContentViewController - - - FirstResponder - - - NSApplication - - - - 268 - - - - 268 - {{110, 59}, {46, 19}} - - - _NS:9 - YES - - -2080374784 - 134217728 - Close - - LucidaGrande - 12 - 16 - - _NS:9 - - -2038153216 - 164 - - - 400 - 75 - - NO - - - - 268 - {{78, 86}, {111, 17}} - - - _NS:1535 - YES - - 68157504 - 272630784 - StatusItemPopup - - LucidaGrande - 13 - 1044 - - _NS:1535 - - - 6 - System - controlColor - - 3 - MC42NjY2NjY2NjY3AA - - - - 6 - System - controlTextColor - - 3 - MAA - - - - NO - - - {267, 162} - - - - NSView - - - - - - - view - - - - 2 - - - - closeButtonPressed: - - - - 15 - - - - - - 0 - - - - - - -2 - - - File's Owner - - - -1 - - - First Responder - - - -3 - - - Application - - - 1 - - - - - 3 - 0 - - 4 - 1 - - 8 - - 1000 - - 6 - 24 - 3 - - - - 9 - 0 - - 9 - 1 - - 0.0 - - 1000 - - 5 - 22 - 2 - - - - 9 - 0 - - 9 - 1 - - 0.0 - - 1000 - - 6 - 24 - 2 - - - - 3 - 0 - - 3 - 1 - - 59 - - 1000 - - 3 - 9 - 3 - - - - - - - - 3 - - - - - - - - 4 - - - - - 7 - - - - - - - - 8 - - - - - 9 - - - - - 11 - - - - - 13 - - - - - 14 - - - - - - - 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 - - - - - - 15 - - - - - ContentViewController - NSViewController - - closeButtonPressed: - id - - - closeButtonPressed: - - closeButtonPressed: - id - - - - IBProjectSource - ./Classes/ContentViewController.h - - - - NSLayoutConstraint - NSObject - - IBProjectSource - ./Classes/NSLayoutConstraint.h - - - - - 0 - IBCocoaFramework - - com.apple.InterfaceBuilder.CocoaPlugin.macosx - - - YES - 3 - YES - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Demo/Code/MainMenu.xib b/Demo/Code/MainMenu.xib index 2b18450..3178b88 100644 --- a/Demo/Code/MainMenu.xib +++ b/Demo/Code/MainMenu.xib @@ -1,3472 +1,732 @@ - - - - 1080 - 12C2034 - 3084 - 1187.34 - 625.00 - - com.apple.InterfaceBuilder.CocoaPlugin - 3084 - - - IBNSLayoutConstraint - NSButton - NSButtonCell - NSCustomObject - NSMenu - NSMenuItem - NSView - NSWindowTemplate - - - com.apple.InterfaceBuilder.CocoaPlugin - - - PluginDependencyRecalculationVersion - - - - - NSApplication - - - FirstResponder - - - NSApplication - - - AMainMenu - - - - StatusItemPopup - - 1048576 - 2147483647 - - NSImage - NSMenuCheckmark - - - NSImage - NSMenuMixedState - - submenuAction: - - StatusItemPopup - - - - About StatusItemPopup - - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Preferences… - , - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Services - - 1048576 - 2147483647 - - - submenuAction: - - Services - - _NSServicesMenu - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Hide StatusItemPopup - h - 1048576 - 2147483647 - - - - - - Hide Others - h - 1572864 - 2147483647 - - - - - - Show All - - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Quit StatusItemPopup - q - 1048576 - 2147483647 - - - - - _NSAppleMenu - - - - - File - - 1048576 - 2147483647 - - - submenuAction: - - File - - - - New - n - 1048576 - 2147483647 - - - - - - Open… - o - 1048576 - 2147483647 - - - - - - Open Recent - - 1048576 - 2147483647 - - - submenuAction: - - Open Recent - - - - Clear Menu - - 1048576 - 2147483647 - - - - - _NSRecentDocumentsMenu - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Close - w - 1048576 - 2147483647 - - - - - - Save… - s - 1048576 - 2147483647 - - - - - - Revert to Saved - - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Page Setup... - P - 1179648 - 2147483647 - - - - - - - Print… - p - 1048576 - 2147483647 - - - - - - - - - Edit - - 1048576 - 2147483647 - - - submenuAction: - - Edit - - - - 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 - - - - Find… - f - 1048576 - 2147483647 - - - 1 - - - - Find and Replace… - f - 1572864 - 2147483647 - - - 12 - - - - 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 - - - - 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 - - - - 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 - - - - Make Upper Case - - 2147483647 - - - - - - Make Lower Case - - 2147483647 - - - - - - Capitalize - - 2147483647 - - - - - - - - - Speech - - 1048576 - 2147483647 - - - submenuAction: - - Speech - - - - Start Speaking - - 1048576 - 2147483647 - - - - - - Stop Speaking - - 1048576 - 2147483647 - - - - - - - - - - - - Format - - 2147483647 - - - submenuAction: - - Format - - - - Font - - 2147483647 - - - submenuAction: - - Font - - - - 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 - - - - Use Default - - 2147483647 - - - - - - Use None - - 2147483647 - - - - - - Tighten - - 2147483647 - - - - - - Loosen - - 2147483647 - - - - - - - - - Ligatures - - 2147483647 - - - submenuAction: - - Ligatures - - - - Use Default - - 2147483647 - - - - - - Use None - - 2147483647 - - - - - - Use All - - 2147483647 - - - - - - - - - Baseline - - 2147483647 - - - submenuAction: - - Baseline - - - - 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 - - - - Align Left - { - 1048576 - 2147483647 - - - - - - Center - | - 1048576 - 2147483647 - - - - - - Justify - - 2147483647 - - - - - - Align Right - } - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Writing Direction - - 2147483647 - - - submenuAction: - - Writing Direction - - - - 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 - - - - Show Toolbar - t - 1572864 - 2147483647 - - - - - - Customize Toolbar… - - 1048576 - 2147483647 - - - - - - - - - Window - - 1048576 - 2147483647 - - - submenuAction: - - Window - - - - Minimize - m - 1048576 - 2147483647 - - - - - - Zoom - - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Bring All to Front - - 1048576 - 2147483647 - - - - - _NSWindowsMenu - - - - - Help - - 2147483647 - - - submenuAction: - - Help - - - - StatusItemPopup Help - ? - 1048576 - 2147483647 - - - - - _NSHelpMenu - - - - _NSMainMenu - - - 15 - 2 - {{335, 390}, {480, 360}} - 1954021376 - StatusItemPopup - NSWindow - - - - - 256 - - - - 268 - {{176, 214}, {128, 32}} - - - _NS:9 - YES - - 67108864 - 134217728 - Show Popover - - LucidaGrande - 13 - 1044 - - _NS:9 - - -2038284288 - 129 - - - 200 - 25 - - NO - - - - 268 - {{143, 181}, {191, 32}} - - - _NS:9 - YES - - 67108864 - 134217728 - Show Popover animated - - _NS:9 - - -2038284288 - 129 - - - 200 - 25 - - NO - - - - 268 - {{176, 148}, {124, 32}} - - _NS:9 - YES - - 67108864 - 134217728 - Hide Popover - - _NS:9 - - -2038284288 - 129 - - - 200 - 25 - - NO - - - {480, 360} - - - - {{0, 0}, {1920, 1058}} - {10000000000000, 10000000000000} - YES - - - AppDelegate - - - NSFontManager - - - - - - - terminate: - - - - 449 - - - - orderFrontStandardAboutPanel: - - - - 142 - - - - delegate - - - - 495 - - - - performMiniaturize: - - - - 37 - - - - arrangeInFront: - - - - 39 - - - - print: - - - - 86 - - - - runPageLayout: - - - - 87 - - - - clearRecentDocuments: - - - - 127 - - - - 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 - - - - revertDocumentToSaved: - - - - 364 - - - - runToolbarCustomizationPalette: - - - - 365 - - - - toggleToolbarShown: - - - - 366 - - - - hide: - - - - 367 - - - - hideOtherApplications: - - - - 368 - - - - unhideAllApplications: - - - - 370 - - - - newDocument: - - - - 373 - - - - openDocument: - - - - 374 - - - - 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 - - - - toggleAutomaticSpellingCorrection: - - - - 456 - - - - orderFrontSubstitutionsPanel: - - - - 458 - - - - toggleAutomaticDashSubstitution: - - - - 461 - - - - toggleAutomaticTextReplacement: - - - - 463 - - - - uppercaseWord: - - - - 464 - - - - capitalizeWord: - - - - 467 - - - - lowercaseWord: - - - - 468 - - - - pasteAsPlainText: - - - - 486 - - - - performFindPanelAction: - - - - 487 - - - - performFindPanelAction: - - - - 488 - - - - performFindPanelAction: - - - - 489 - - - - showHelp: - - - - 493 - - - - 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 - - - - performFindPanelAction: - - - - 535 - - - - addFontTrait: - - - - 421 - - - - addFontTrait: - - - - 422 - - - - modifyFont: - - - - 423 - - - - orderFrontFontPanel: - - - - 424 - - - - modifyFont: - - - - 425 - - - - window - - - - 532 - - - - showPopover: - - - - 551 - - - - hidePopover: - - - - 552 - - - - showPopoverAnimated: - - - - 568 - - - - - - 0 - - - - - - -2 - - - File's Owner - - - -1 - - - First Responder - - - -3 - - - Application - - - 29 - - - - - - - - - - - - - - 19 - - - - - - - - 56 - - - - - - - - 217 - - - - - - - - 83 - - - - - - - - 81 - - - - - - - - - - - - - - - - - 75 - - - - - 78 - - - - - 72 - - - - - 82 - - - - - 124 - - - - - - - - 77 - - - - - 73 - - - - - 79 - - - - - 112 - - - - - 74 - - - - - 125 - - - - - - - - 126 - - - - - 205 - - - - - - - - - - - - - - - - - - - - - - 202 - - - - - 198 - - - - - 207 - - - - - 214 - - - - - 199 - - - - - 203 - - - - - 197 - - - - - 206 - - - - - 215 - - - - - 218 - - - - - - - - 216 - - - - - - - - 200 - - - - - - - - - - - - - 219 - - - - - 201 - - - - - 204 - - - - - 220 - - - - - - - - - - - - - 213 - - - - - 210 - - - - - 221 - - - - - 208 - - - - - 209 - - - - - 57 - - - - - - - - - - - - - - - - - - 58 - - - - - 134 - - - - - 150 - - - - - 136 - - - - - 144 - - - - - 129 - - - - - 143 - - - - - 236 - - - - - 131 - - - - - - - - 149 - - - - - 145 - - - - - 130 - - - - - 24 - - - - - - - - - - - 92 - - - - - 5 - - - - - 239 - - - - - 23 - - - - - 295 - - - - - - - - 296 - - - - - - - - - 297 - - - - - 298 - - - - - 211 - - - - - - - - 212 - - - - - - - - - 195 - - - - - 196 - - - - - 346 - - - - - 348 - - - - - - - - 349 - - - - - - - - - - - - - - 350 - - - - - 351 - - - - - 354 - - - - - 371 - - - - - - - - 372 - - - - - 5 - 0 - - 5 - 1 - - 0.0 - - 1000 - - 6 - 24 - 2 - - - - 9 - 0 - - 9 - 1 - - 0.0 - - 1000 - - 6 - 24 - 2 - - - - 3 - 0 - - 4 - 1 - - 12 - - 1000 - - 6 - 24 - 3 - - - - 3 - 0 - - 3 - 1 - - 118 - - 1000 - - 3 - 9 - 3 - - - - 9 - 0 - - 9 - 1 - - 0.0 - - 1000 - - 5 - 22 - 2 - - - - 3 - 0 - - 4 - 1 - - 12 - - 1000 - - 6 - 24 - 3 - - - - - - - - - 375 - - - - - - - - 376 - - - - - - - - - 377 - - - - - - - - 388 - - - - - - - - - - - - - - - - - - - - - - - 389 - - - - - 390 - - - - - 391 - - - - - 392 - - - - - 393 - - - - - 394 - - - - - 395 - - - - - 396 - - - - - 397 - - - - - - - - 398 - - - - - - - - 399 - - - - - - - - 400 - - - - - 401 - - - - - 402 - - - - - 403 - - - - - 404 - - - - - 405 - - - - - - - - - - - - 406 - - - - - 407 - - - - - 408 - - - - - 409 - - - - - 410 - - - - - 411 - - - - - - - - - - 412 - - - - - 413 - - - - - 414 - - - - - 415 - - - - - - - - - - - 416 - - - - - 417 - - - - - 418 - - - - - 419 - - - - - 420 - - - - - 450 - - - - - - - - 451 - - - - - - - - - - 452 - - - - - 453 - - - - - 454 - - - - - 457 - - - - - 459 - - - - - 460 - - - - - 462 - - - - - 465 - - - - - 466 - - - - - 485 - - - - - 490 - - - - - - - - 491 - - - - - - - - 492 - - - - - 494 - - - - - 496 - - - - - - - - 497 - - - - - - - - - - - - - - - - - 498 - - - - - 499 - - - - - 500 - - - - - 501 - - - - - 502 - - - - - 503 - - - - - - - - 504 - - - - - 505 - - - - - 506 - - - - - 507 - - - - - 508 - - - - - - - - - - - - - - - - 509 - - - - - 510 - - - - - 511 - - - - - 512 - - - - - 513 - - - - - 514 - - - - - 515 - - - - - 516 - - - - - 517 - - - - - 534 - - - - - 536 - - - - - - - - 537 - - - - - 540 - - - - - - - - 541 - - - - - 548 - - - - - 555 - - - - - - - - 556 - - - - - 562 - - - - - 564 - - - - - 565 - - - - - 566 - - - - - 567 - - - - - - - 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 - - - - - - 568 - - - 0 - IBCocoaFramework - YES - 3 - - {11, 11} - {10, 3} - - YES - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Demo/Demo-Info.plist b/Demo/Demo-Info.plist index e96d8af..664658d 100644 --- a/Demo/Demo-Info.plist +++ b/Demo/Demo-Info.plist @@ -2,6 +2,8 @@ + LSUIElement + CFBundleDevelopmentRegion en CFBundleExecutable diff --git a/README.md b/README.md index cd266a7..dc2049d 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,8 @@ AXStatusItemPopup *statusItemPopup = [[AXStatusItemPopup alloc] initWithViewCont ```contentViewController``` an NSViewController instance. The contents of this view controllers view will be shown inside the popup. ```image``` is an NSImage that should be shown in the status bar. ```alternateImage``` an NSImage that should be shown if the popover is currently active. +To avoid problems and to hide the MainMenu set ```Application is agent``` in the .plist file to ```YES```. + ### Full Example ```objective-c @@ -51,8 +53,29 @@ The popover can be shown and hidden manually within code by calling the followin // hides popover [statusItemPopup hidePopover]; + +// toggle popover (when it's active, it'll disappear, else it is showed) +[statusItemPopup togglePopover]; + +// This should be clear +[statusItemPopup togglePopoverAnimated:YES]; +``` + +### The AXStatusItemPopupDelegate +You can add a delegate to an ```AXStatusItemPopup``` object. The following delegate methods are available, all aren't required: +```objective-c +- (BOOL) shouldPopupOpen; +- (void) popupWillOpen; +- (void) popupDidOpen; + +- (BOOL) shouldPopupClose; +- (void) popupWillClose; +- (void) popupDidClose; ``` +### Please notice + +The popover won't be able to close if in its content view another popup is open (Maybe something else won't work too). As a workaround set the delegate of the StatusItemPopup and listen for ```popoverWillClose``` to close these before the popover itself is closed. ## Contributing