Cocoa conformance and bug fixes

- showRelativeToRect:ofView:preferredEdge: must take provide a view, and if the rect is empty it defaults to the view's bounds.
- If If showRelativeToRect is called while a popover is closing, it is ignored.
- If showRelativeToRect is called when the popover is already open, it should just reposition the existing popover.
- close should NOT consult the delegate's popoverShouldClose. Only performClose should do that.
- If a window is closed, all of its popovers immediately order out.
- Updated demo app to cover more cases.
- Note that child popovers are currently not supported, as this requires support for child windows in CPWindow.
This commit is contained in:
Aparajita Fishman committed 2012-03-31 18:40:47 -07:00
1 parent 8fed89164f
commit 93cc97002a
10 files changed
+1162 -333

No files matched your search

+65 -30
View File
@@ -68,7 +68,6 @@ var CPPopoverDelegate_popover_willShow_ = 1 << 0,
int _behavior @accessors(getter=behavior);
_CPAttachedWindow _attachedWindow;
BOOL _needsNewAttachedWindow;
int _implementedDelegateMethods;
}
@@ -79,16 +78,15 @@ var CPPopoverDelegate_popover_willShow_ = 1 << 0,
/*!
Initialize the CPPopover witn default values
@returns anInitialized CPPopover
@returns an initialized CPPopover
*/
- (CPPopover)init
{
if (self = [super init])
{
_animates = YES;
_appearance = CPPopoverAppearanceMinimal;
_behavior = CPPopoverBehaviorApplicationDefined;
_needsNewAttachedWindow = YES;
_animates = YES;
_appearance = CPPopoverAppearanceMinimal;
_behavior = CPPopoverBehaviorApplicationDefined;
}
return self;
@@ -106,7 +104,7 @@ var CPPopoverDelegate_popover_willShow_ = 1 << 0,
- (CGRect)positioningRect
{
if (![_attachedWindow isVisible])
return nil;
return CGRectMakeZero();
return [_attachedWindow frame];
}
@@ -128,7 +126,7 @@ var CPPopoverDelegate_popover_willShow_ = 1 << 0,
- (CGSize)contentSize
{
if (![_attachedWindow isVisible])
return nil;
return CGRectMakeZero();
return [[_contentViewController view] frameSize];
}
@@ -147,7 +145,7 @@ var CPPopoverDelegate_popover_willShow_ = 1 << 0,
@returns \c YES if visible
*/
- (BOOL)shown
- (BOOL)isShown
{
return [_attachedWindow isVisible];
}
@@ -166,7 +164,7 @@ Set the behaviour of the CPPopover. It can be:
return;
_behavior = aBehaviour;
_needsNewAttachedWindow = YES;
[_attachedWindow setStyleMask:[self styleMaskForBehavior]];
}
- (void)setDelegate:(id)aDelegate
@@ -205,17 +203,27 @@ Set the behaviour of the CPPopover. It can be:
*/
- (void)showRelativeToRect:(CGRect)positioningRect ofView:(CPView)positioningView preferredEdge:(CPRectEdge)preferredEdge
{
if (!positioningView)
[CPException raise:CPInvalidArgumentException reason:"positionView must not be nil"];
if (!_contentViewController)
[CPException raise:CPInternalInconsistencyException reason:@"contentViewController must not be nil"];
[CPException raise:CPInternalInconsistencyException reason:@"contentViewController must not be nil"];
// If the popover is currently closing, do nothing. That is what Cocoa does.
if ([_attachedWindow isClosing])
return;
if (_implementedDelegateMethods & CPPopoverDelegate_popover_willShow_)
[_delegate popoverWillShow:self];
if (!_attachedWindow || _needsNewAttachedWindow || [_attachedWindow isVisible])
if (!_attachedWindow)
{
var styleMask = (_behavior == CPPopoverBehaviorTransient) ? CPClosableOnBlurWindowMask : nil;
_attachedWindow = [[_CPAttachedWindow alloc] initWithContentRect:CGRectMakeZero() styleMask:styleMask];
_needsNewAttachedWindow = NO;
_attachedWindow = [[_CPAttachedWindow alloc] initWithContentRect:CGRectMakeZero() styleMask:[self styleMaskForBehavior]];
var parentWindow = [positioningView window];
if (![parentWindow isKindOfClass:_CPAttachedWindow])
[[CPNotificationCenter defaultCenter] addObserver:self selector:@selector(parentWindowWillClose:) name:CPWindowWillCloseNotification object:parentWindow];
}
[_attachedWindow setAppearance:_appearance];
@@ -224,26 +232,32 @@ Set the behaviour of the CPPopover. It can be:
[_attachedWindow setMovableByWindowBackground:NO];
[_attachedWindow setFrame:[_attachedWindow frameRectForContentRect:[[_contentViewController view] frame]]];
[_attachedWindow setContentView:[_contentViewController view]];
if (positioningRect)
[_attachedWindow positionRelativeToRect:positioningRect preferredEdge:preferredEdge];
else if (positioningView)
[_attachedWindow positionRelativeToView:positioningView preferredEdge:preferredEdge];
else
[CPException raise:CPInvalidArgumentException reason:@"a value must be passed for positioningRect or positioningView"];
[_attachedWindow positionRelativeToRect:positioningRect ofView:positioningView preferredEdge:preferredEdge];
if (_implementedDelegateMethods & CPPopoverDelegate_popover_didShow_)
[_delegate popoverDidShow:self];
}
- (unsigned)styleMaskForBehavior
{
return (_behavior == CPPopoverBehaviorTransient) ? CPClosableOnBlurWindowMask : 0;
}
/*!
Closes the popover
*/
- (void)close
{
if (_implementedDelegateMethods & CPPopoverDelegate_popover_shouldClose_)
if (![_delegate popoverShouldClose:self])
return;
[self _close];
}
/*!
Closes the popover
*/
- (void)_close
{
if ([_attachedWindow isClosing] || ![self isShown])
return;
if (_implementedDelegateMethods & CPPopoverDelegate_popover_willClose_)
[_delegate popoverWillClose:self];
@@ -261,11 +275,18 @@ Set the behaviour of the CPPopover. It can be:
/*!
Close the popover
@param aSender the sender of the action
@param sender the sender of the action
*/
- (IBAction)performClose:(id)aSender
- (IBAction)performClose:(id)sender
{
[self close];
if ([_attachedWindow isClosing])
return;
if (_implementedDelegateMethods & CPPopoverDelegate_popover_shouldClose_)
if (![_delegate popoverShouldClose:self])
return;
[self _close];
}
@@ -290,6 +311,22 @@ Set the behaviour of the CPPopover. It can be:
[_delegate popoverDidClose:self];
}
#pragma mark -
#pragma mark Notifications
/*!
@ignore
This method is called only when a non-popover parent window
is closing. In that case popovers should order out.
*/
- (void)parentWindowWillClose:(CPNotification)aNotification
{
[_attachedWindow orderOut:nil];
[self performClose:nil];
}
@end
var CPPopoverNeedsNewAttachedWindowKey = @"CPPopoverNeedsNewAttachedWindowKey",
@@ -307,7 +344,6 @@ var CPPopoverNeedsNewAttachedWindowKey = @"CPPopoverNeedsNewAttachedWindowKey",
if (self)
{
_needsNewAttachedWindow = [aCoder decodeBoolForKey:CPPopoverNeedsNewAttachedWindowKey];
_appearance = [aCoder decodeIntForKey:CPPopoverAppearanceKey];
_animates = [aCoder decodeBoolForKey:CPPopoverAnimatesKey];
_contentViewController = [aCoder decodeObjectForKey:CPPopoverContentViewControllerKey];
@@ -321,7 +357,6 @@ var CPPopoverNeedsNewAttachedWindowKey = @"CPPopoverNeedsNewAttachedWindowKey",
{
[super encodeWithCoder:aCoder];
[aCoder encodeBool:_needsNewAttachedWindow forKey:CPPopoverNeedsNewAttachedWindowKey];
[aCoder encodeInt:_appearance forKey:CPPopoverAppearanceKey];
[aCoder encodeBool:_animates forKey:CPPopoverAnimatesKey];
[aCoder encodeObject:_contentViewController forKey:CPPopoverContentViewControllerKey];
+31 -32
View File
@@ -25,7 +25,11 @@
#define ALIGN_STROKE(point) (FLOOR(point) === (point) ? (point) + halfStrokeWidth : (point))
#define ALIGN_COORD(point) (FLOOR(point))
var _CPAttachedWindowViewDefaultCursorSize = CGSizeMake(16, 10);
var _CPAttachedWindowViewDefaultCursorSize = CGSizeMake(16, 10),
_CPAttachedWindowViewRadius = 5.0,
_CPAttachedWindowViewStrokeWidth = 1.0,
_CPAttachedWindowViewShadowSize = CGSizeMake(0, 6),
_CPAttachedWindowViewShadowBlur = 15.0;
/*!
@ignore
@@ -34,13 +38,12 @@ var _CPAttachedWindowViewDefaultCursorSize = CGSizeMake(16, 10);
*/
@implementation _CPAttachedWindowView : _CPWindowView
{
BOOL _mouseDownPressed @accessors(getter=isMouseDownPressed, setter=setMouseDownPressed:);
float _arrowOffsetX @accessors(property=arrowOffsetX);
float _arrowOffsetY @accessors(property=arrowOffsetY);
int _appearance @accessors(property=appearance);
unsigned _preferredEdge @accessors(property=preferredEdge);
float _arrowOffsetX @accessors(property=arrowOffsetX);
float _arrowOffsetY @accessors(property=arrowOffsetY);
int _appearance @accessors(property=appearance);
unsigned _preferredEdge @accessors(property=preferredEdge);
CGSize _cursorSize;
CGSize _cursorSize;
}
/*!
@@ -91,8 +94,6 @@ var _CPAttachedWindowViewDefaultCursorSize = CGSizeMake(16, 10);
{
_arrowOffsetX = 0.0;
_arrowOffsetY = 0.0;
// @TODO: make this themable
_appearance = CPPopoverAppearanceMinimal;
_cursorSize = CGSizeMakeCopy(_CPAttachedWindowViewDefaultCursorSize);
}
@@ -116,7 +117,6 @@ var _CPAttachedWindowViewDefaultCursorSize = CGSizeMake(16, 10);
{
_cursorSize = CGSizeMakeCopy(_CPAttachedWindowViewDefaultCursorSize);
[self setNeedsDisplay:YES];
_mouseDownPressed = NO;
}
/*!
@@ -127,28 +127,41 @@ var _CPAttachedWindowViewDefaultCursorSize = CGSizeMake(16, 10);
[super drawRect:aRect];
var context = [[CPGraphicsContext currentContext] graphicsPort],
radius = 5,
radius = _CPAttachedWindowViewRadius,
arrowWidth = _cursorSize.width,
arrowHeight = _cursorSize.height,
strokeWidth = 1,
strokeWidth = _CPAttachedWindowViewStrokeWidth,
halfStrokeWidth = strokeWidth / 2.0,
strokeColor,
shadowColor = [[CPColor blackColor] colorWithAlphaComponent:.2],
shadowSize = CGSizeMake(0, 6),
shadowBlur = 15,
shadowSize = _CPAttachedWindowViewShadowSize,
shadowBlur = _CPAttachedWindowViewShadowBlur,
gradient,
frame = [self bounds];
if (_appearance == CPPopoverAppearanceMinimal)
{
gradient = CGGradientCreateWithColorComponents(CGColorSpaceCreateDeviceRGB(), [(254.0 / 255), (254.0 / 255), (254.0 / 255), 0.93,
(231.0 / 255), (231.0 / 255), (231.0 / 255), 0.93], [0,1], 2);
gradient = CGGradientCreateWithColorComponents(
CGColorSpaceCreateDeviceRGB(),
[
(254.0 / 255), (254.0 / 255), (254.0 / 255), 0.93,
(231.0 / 255), (231.0 / 255), (231.0 / 255), 0.93
],
[0, 1],
2
);
strokeColor = [CPColor colorWithHexString:@"B8B8B8"];
}
else
{
gradient = CGGradientCreateWithColorComponents(CGColorSpaceCreateDeviceRGB(), [(38.0 / 255), (38.0 / 255), (38.0 / 255), 0.93,
(18.0 / 255), (18.0 / 255), (18.0 / 255), 0.93], [0,1], 2);
gradient = CGGradientCreateWithColorComponents(
CGColorSpaceCreateDeviceRGB(),
[
(38.0 / 255), (38.0 / 255), (38.0 / 255), 0.93,
(18.0 / 255), (18.0 / 255), (18.0 / 255), 0.93
],
[0, 1],
2);
strokeColor = [CPColor colorWithHexString:@"222222"];
}
@@ -367,22 +380,8 @@ var _CPAttachedWindowViewDefaultCursorSize = CGSizeMake(16, 10);
}
CGContextClosePath(context);
//Draw it
CGContextStrokePath(context);
CGContextFillPath(context);
}
- (void)mouseDown:(CPEvent)anEvent
{
_mouseDownPressed = YES;
[super mouseDown:anEvent];
}
- (void)mouseUp:(CPEvent)anEvent
{
_mouseDownPressed = NO;
[super mouseUp:anEvent];
}
@end
+143 -189
View File
@@ -45,12 +45,11 @@ var _CPAttachedWindow_attachedWindowShouldClose_ = 1 << 0,
BOOL _animates @accessors(property=animates);
id _targetView @accessors(property=targetView);
int _appearance @accessors(getter=appearance);
BOOL _isClosing @accessors(property=isClosing);
BOOL _closeOnBlur;
BOOL _isClosing;
BOOL _browserAnimates;
BOOL _shouldPerformAnimation;
CPButton _closeButton;
CPInteger _implementedDelegateMethods;
}
@@ -82,7 +81,7 @@ var _CPAttachedWindow_attachedWindowShouldClose_ = 1 << 0,
*/
+ (id)attachedWindowWithSize:(CGSize)aSize forView:(CPView)aView
{
return [_CPAttachedWindow attachedWindowWithSize:aSize forView:aView styleMask:nil];
return [_CPAttachedWindow attachedWindowWithSize:aSize forView:aView styleMask:0];
}
/*!
@@ -95,7 +94,7 @@ var _CPAttachedWindow_attachedWindowShouldClose_ = 1 << 0,
*/
+ (id)attachedWindowWithSize:(CGSize)aSize forView:(CPView)aView styleMask:(int)aMask
{
var attachedWindow = [[_CPAttachedWindow alloc] initWithContentRect:CGRectMake(0.0, 0.0, aSize.width, aSize.height) styleMask:aMask];
var attachedWindow = [[_CPAttachedWindow alloc] initWithContentRect:_CGRectMake(0.0, 0.0, aSize.width, aSize.height) styleMask:aMask];
[attachedWindow attachToView:aView];
@@ -110,12 +109,12 @@ var _CPAttachedWindow_attachedWindowShouldClose_ = 1 << 0,
*/
- (id)initWithContentRect:(CGRect)aFrame
{
self = [self initWithContentRect:aFrame styleMask:nil];
self = [self initWithContentRect:aFrame styleMask:0];
return self;
}
/*!
Create and init a _CPAttachedWindow with the given frame and style mask.
Designated initializer. Create and init a _CPAttachedWindow with the given frame and style mask.
@param aFrame the frame of the attached window
@param styleMask the window style mask (combine CPClosableWindowMask and CPClosableOnBlurWindowMask)
@@ -154,6 +153,11 @@ var _CPAttachedWindow_attachedWindowShouldClose_ = 1 << 0,
[_windowView setAppearance:anAppearance];
}
- (void)setStyleMask:(unsigned)aStyleMask
{
_closeOnBlur = (aStyleMask & CPClosableOnBlurWindowMask);
}
- (void)setDelegate:(id)aDelegate
{
if (_delegate === aDelegate)
@@ -180,25 +184,9 @@ var _CPAttachedWindow_attachedWindowShouldClose_ = 1 << 0,
if ([aPath isEqual:@"frame"])
{
// TODO: don't recompute everything, just compute the move offset
var g = [_windowView preferredEdge];
var edge = [_windowView preferredEdge];
[self positionRelativeToView:_targetView preferredEdge:g];
}
}
#pragma mark -
#pragma mark Notification handlers
- (void)_attachedWindowDidMove:(CPNotification)aNotification
{
if ([_windowView isMouseDownPressed])
{
[_targetView removeObserver:self forKeyPath:@"frame"];
[_windowView hideCursor];
[self setLevel:CPNormalWindowLevel];
[_closeButton setFrameOrigin:CGPointMake(1.0, 1.0)];
[[CPNotificationCenter defaultCenter] removeObserver:self name:CPWindowDidMoveNotification object:self];
[self positionRelativeToView:_targetView preferredEdge:edge];
}
}
@@ -206,58 +194,34 @@ var _CPAttachedWindow_attachedWindowShouldClose_ = 1 << 0,
#pragma mark -
#pragma mark Utilities
- (CGPoint)computeOrigin:(CPView)aView preferredEdge:(int)anEdge
- (CGPoint)computeOriginFromRect:(CGRect)aRect ofView:(CPView)positioningView preferredEdge:(int)anEdge
{
var frameView = [aView frame],
currentView = aView,
origin = [aView frameOrigin],
lastView;
// FIXME: make this work with the conversion function of CPView
while (currentView = [currentView superview])
{
origin.x += [currentView frameOrigin].x;
origin.y += [currentView frameOrigin].y;
lastView = currentView;
}
origin.x += [[lastView window] frame].origin.x;
origin.y += [[lastView window] frame].origin.y;
// take care of the scrolling point
if ([aView enclosingScrollView])
{
var offsetPoint = [[[aView enclosingScrollView] contentView] boundsOrigin];
origin.x -= offsetPoint.x;
origin.y -= offsetPoint.y;
}
return [self computeOriginFromRect:CGRectMake(origin.x, origin.y, CGRectGetWidth(frameView), CGRectGetHeight(frameView)) preferredEdge:anEdge];
}
- (CGPoint)computeOriginFromRect:(CGRect)aRect preferredEdge:(int)anEdge
{
var nativeRect = [[[CPApp mainWindow] platformWindow] nativeContentRect],
originLeft = CGPointCreateCopy(aRect.origin),
originRight = CGPointCreateCopy(aRect.origin),
originTop = CGPointCreateCopy(aRect.origin),
originBottom = CGPointCreateCopy(aRect.origin),
var mainWindow = [CPApp mainWindow],
platformWindow = [mainWindow platformWindow],
nativeRect = [platformWindow nativeContentRect],
baseOrigin = [positioningView convertPointToBase:aRect.origin],
platformOrigin = [mainWindow convertBaseToPlatformWindow:baseOrigin],
platformRect = _CGRectMake(platformOrigin.x, platformOrigin.y, aRect.size.width, aRect.size.height),
originLeft = _CGPointCreateCopy(platformOrigin),
originRight = _CGPointCreateCopy(platformOrigin),
originTop = _CGPointCreateCopy(platformOrigin),
originBottom = _CGPointCreateCopy(platformOrigin),
frameSize = [self frame].size;
// CPMaxXEdge
originRight.x += aRect.size.width;
originRight.y += (aRect.size.height / 2.0) - (frameSize.height / 2.0);
originRight.x += platformRect.size.width;
originRight.y += (platformRect.size.height / 2.0) - (frameSize.height / 2.0);
// CPMinXEdge
originLeft.x -= frameSize.width;
originLeft.y += (aRect.size.height / 2.0) - (frameSize.height / 2.0);
originLeft.y += (platformRect.size.height / 2.0) - (frameSize.height / 2.0);
// CPMaxYEdge
originBottom.x += aRect.size.width / 2.0 - frameSize.width / 2.0;
originBottom.y += aRect.size.height;
originBottom.x += platformRect.size.width / 2.0 - frameSize.width / 2.0;
originBottom.y += platformRect.size.height;
// CPMinYEdge
originTop.x += aRect.size.width / 2.0 - frameSize.width / 2.0;
originTop.x += platformRect.size.width / 2.0 - frameSize.width / 2.0;
originTop.y -= frameSize.height;
var requestedEdge = (anEdge !== nil) ? anEdge : CPMaxXEdge,
@@ -284,51 +248,57 @@ var _CPAttachedWindow_attachedWindowShouldClose_ = 1 << 0,
for (var i = 0; i < origins.length; i++)
{
var o = origins[i],
g = edges[i];
var origin = origins[i],
edge = edges[i];
[_windowView setArrowOffsetX:0];
[_windowView setArrowOffsetY:0];
[_windowView setPreferredEdge:g];
[_windowView setPreferredEdge:edge];
if (o.x < 0)
if (origin.x < 0)
{
[_windowView setArrowOffsetX:o.x];
o.x = 0;
}
if (o.x + frameSize.width > nativeRect.size.width)
{
[_windowView setArrowOffsetX:(o.x + frameSize.width - nativeRect.size.width)];
o.x = nativeRect.size.width - frameSize.width;
}
if (o.y < 0)
{
[_windowView setArrowOffsetY:o.y];
o.y = 0;
}
if (o.y + frameSize.height > nativeRect.size.height)
{
[_windowView setArrowOffsetY:(frameSize.height + o.y - nativeRect.size.height)];
o.y = nativeRect.size.height - frameSize.height;
[_windowView setArrowOffsetX:origin.x];
origin.x = 0;
}
switch (g)
if (origin.x + frameSize.width > nativeRect.size.width)
{
[_windowView setArrowOffsetX:(origin.x + frameSize.width - nativeRect.size.width)];
origin.x = nativeRect.size.width - frameSize.width;
}
if (origin.y < 0)
{
[_windowView setArrowOffsetY:origin.y];
origin.y = 0;
}
if (origin.y + frameSize.height > nativeRect.size.height)
{
[_windowView setArrowOffsetY:(frameSize.height + origin.y - nativeRect.size.height)];
origin.y = nativeRect.size.height - frameSize.height;
}
switch (edge)
{
case CPMaxXEdge:
if (o.x >= (aRect.origin.x + aRect.size.width))
return o;
if (origin.x >= _CGRectGetMaxX(platformRect))
return origin;
break;
case CPMinXEdge:
if ((o.x + frameSize.width) <= aRect.origin.x)
return o;
if ((origin.x + frameSize.width) <= platformRect.origin.x)
return origin;
break;
case CPMaxYEdge:
if (o.y >= (aRect.origin.y + aRect.size.height))
return o;
if (origin.y >= _CGRectGetMaxY(platformRect))
return origin;
break;
case CPMinYEdge:
if ((o.y + frameSize.height) <= aRect.origin.y)
return o;
if ((origin.y + frameSize.height) <= platformRect.origin.y)
return origin;
break;
}
}
@@ -345,58 +315,35 @@ var _CPAttachedWindow_attachedWindowShouldClose_ = 1 << 0,
*/
- (void)positionRelativeToView:(CPView)aView
{
[self positionRelativeToView:aView preferredEdge:nil];
}
/*!
Compute the frame needed to be placed to the given view
and position the attached window according to this view
@param aView the view where _CPAttachedWindow must be attached
@param anEdge the preferd edge to use
*/
- (void)positionRelativeToView:(CPView)aView preferredEdge:(int)anEdge
{
var point = [self computeOrigin:aView preferredEdge:anEdge];
[self setFrameOrigin:point];
[_windowView showCursor];
[self setLevel:CPStatusWindowLevel];
[_closeButton setFrameOrigin:CGPointMake(1.0, 1.0)];
[_windowView setNeedsDisplay:YES];
[self makeKeyAndOrderFront:nil];
_targetView = aView;
[_targetView addObserver:self forKeyPath:@"frame" options:nil context:nil];
}
/*!
Position the _CPAttachedWindow relative to a given rect,
automatically calculating the edge.
@param aPoint the point where the _CPAttachedWindow will be attached
*/
- (void)positionRelativeToRect:(CGRect)aRect
{
[self positionRelativeToRect:aRect preferredEdge:nil];
[self positionRelativeToRect:nil ofView:aView preferredEdge:nil];
}
/*!
Position the _CPAttachedWindow relative to a given rect's edge.
@param aPoint the point where the _CPAttachedWindow will be attached
@param aRect the rect relative to which the attached window will be positioned
@param positioningView the view to which the attached window is attached
@param anEdge the prefered edge
*/
- (void)positionRelativeToRect:(CGRect)aRect preferredEdge:(int)anEdge
- (void)positionRelativeToRect:(CGRect)aRect ofView:(CPView)positioningView preferredEdge:(int)anEdge
{
var point = [self computeOriginFromRect:aRect preferredEdge:anEdge];
if (!aRect || _CGRectIsEmpty(aRect))
aRect = [positioningView bounds];
var point = [self computeOriginFromRect:aRect ofView:positioningView preferredEdge:anEdge];
[self setFrameOrigin:point];
[_windowView showCursor];
[self setLevel:CPStatusWindowLevel];
[_closeButton setFrameOrigin:CGPointMake(1.0, 1.0)];
[_windowView setNeedsDisplay:YES];
[self makeKeyAndOrderFront:nil];
if (positioningView !== _targetView)
{
[_targetView removeObserver:self forKeyPath:@"frame"];
_targetView = positioningView;
[_targetView addObserver:self forKeyPath:@"frame" options:0 context:nil];
}
}
/*! @ignore */
@@ -440,15 +387,17 @@ var _CPAttachedWindow_attachedWindowShouldClose_ = 1 << 0,
/*!
Called when the window is losing focus.
Close the window if CPClosableOnBlurWindowMask is set.
*/
- (void)resignMainWindow
{
if (_closeOnBlur && !_isClosing)
{
if (!_delegate || ((_implementedDelegateMethods & _CPAttachedWindow_attachedWindowShouldClose_)
&& [_delegate attachedWindowShouldClose:self]))
[self close];
if (!_delegate ||
((_implementedDelegateMethods & _CPAttachedWindow_attachedWindowShouldClose_) &&
[_delegate attachedWindowShouldClose:self]))
{
[self close];
}
}
}
@@ -460,66 +409,67 @@ var _CPAttachedWindow_attachedWindowShouldClose_ = 1 << 0,
*/
- (IBAction)orderFront:(is)aSender
{
[super orderFront:aSender];
if (_animates && _browserAnimates && _shouldPerformAnimation)
if (![self isMainWindow])
{
var transformOrigin = "50% 100%",
frame = [self frame],
preferredEdge = [_windowView preferredEdge],
posX;
[super orderFront:aSender];
switch (preferredEdge)
if (_animates && _browserAnimates && _shouldPerformAnimation)
{
case CPMaxYEdge:
case CPMinYEdge:
posX = 50 + (([_windowView arrowOffsetX] * 100) / frame.size.width);
transformOrigin = posX + "% " + (preferredEdge === CPMaxYEdge ? "0%" : "100%");
break;
var transformOrigin = "50% 100%",
frame = [self frame],
preferredEdge = [_windowView preferredEdge],
posX;
case CPMinXEdge:
case CPMaxXEdge:
posY = 50 + (([_windowView arrowOffsetY] * 100) / frame.size.height);
transformOrigin = (preferredEdge === CPMaxXEdge ? "0% " : "100% ") + posY + "%";
break;
}
// This is the initial transform. We start scaled to zero and watch for opacity changes.
[self setCSS3Property:@"Transform" value:@"scale(0)"];
[self setCSS3Property:@"TransformOrigin" value:transformOrigin];
[self setCSS3Property:@"Transition" value:"opacity 0 linear"];
window.setTimeout(function()
{
// We are watching opacity, so this triggers the next transition
_DOMElement.style.opacity = 1;
_DOMElement.style.height = frame.size.height + @"px";
_DOMElement.style.width = frame.size.width + @"px";
// Set up the pop-out transition
[self setCSS3Property:@"Transform" value:@"scale(1.1)"];
[self setCSS3Property:@"Transition" value:@"-webkit-transform 200ms ease-in"];
var transitionEndFunction = function()
switch (preferredEdge)
{
_DOMElement.removeEventListener("webkitTransitionEnd", transitionEndFunction, YES);
case CPMaxYEdge:
case CPMinYEdge:
posX = 50 + (([_windowView arrowOffsetX] * 100) / frame.size.width);
transformOrigin = posX + "% " + (preferredEdge === CPMaxYEdge ? "0%" : "100%");
break;
// Now set up the pop-in to normal size transition.
// Because we are watching the -webkit-transform, it will occur now.
[self setCSS3Property:@"Transform" value:@"scale(1)"];
[self setCSS3Property:@"Transition" value:@"-webkit-transform 50ms linear"];
};
case CPMinXEdge:
case CPMaxXEdge:
posY = 50 + (([_windowView arrowOffsetY] * 100) / frame.size.height);
transformOrigin = (preferredEdge === CPMaxXEdge ? "0% " : "100% ") + posY + "%";
break;
}
_DOMElement.addEventListener("webkitTransitionEnd", transitionEndFunction, YES);
}, 0);
// This is the initial transform. We start scaled to zero and watch for opacity changes.
[self setCSS3Property:@"Transform" value:@"scale(0)"];
[self setCSS3Property:@"TransformOrigin" value:transformOrigin];
[self setCSS3Property:@"Transition" value:"opacity 0 linear"];
window.setTimeout(function()
{
// We are watching opacity, so this triggers the next transition
_DOMElement.style.opacity = 1;
_DOMElement.style.height = frame.size.height + @"px";
_DOMElement.style.width = frame.size.width + @"px";
// Set up the pop-out transition
[self setCSS3Property:@"Transform" value:@"scale(1.1)"];
[self setCSS3Property:@"Transition" value:@"-webkit-transform 200ms ease-in"];
var transitionEndFunction = function()
{
_DOMElement.removeEventListener("webkitTransitionEnd", transitionEndFunction, YES);
// Now set up the pop-in to normal size transition.
// Because we are watching the -webkit-transform, it will occur now.
[self setCSS3Property:@"Transform" value:@"scale(1)"];
[self setCSS3Property:@"Transition" value:@"-webkit-transform 50ms linear"];
};
_DOMElement.addEventListener("webkitTransitionEnd", transitionEndFunction, YES);
}, 0);
}
else
{
[self setCSS3Property:@"Transition" value:@""];
_DOMElement.style.opacity = 1;
}
}
else
{
[self setCSS3Property:@"Transition" value:@""];
_DOMElement.style.opacity = 1;
}
[[CPNotificationCenter defaultCenter] addObserver:self selector:@selector(_attachedWindowDidMove:) name:CPWindowDidMoveNotification object:self];
_shouldPerformAnimation = NO;
_isClosing = NO;
@@ -530,6 +480,9 @@ var _CPAttachedWindow_attachedWindowShouldClose_ = 1 << 0,
*/
- (void)close
{
if (![self isVisible])
return;
// set a flag to avoid an infinite loop in resignMainWindow
_isClosing = YES;
@@ -559,6 +512,7 @@ var _CPAttachedWindow_attachedWindowShouldClose_ = 1 << 0,
[_targetView removeObserver:self forKeyPath:@"frame"];
_shouldPerformAnimation = YES;
_isClosing = NO;
if (_implementedDelegateMethods & _CPAttachedWindow_attachedWindowDidClose_)
[_delegate attachedWindowDidClose:self];
+65 -59
View File
@@ -12,12 +12,15 @@
@implementation AppController : CPObject
{
CPPopUpButton buttonEdge;
CPPopUpButton buttonStyle;
CPPopUpButton buttonAnimation;
CPPopUpButton buttonBehaviour;
CPPopover popover;
CPTextField appearanceLabel;
CPPopUpButton buttonEdge;
CPPopUpButton buttonStyle;
CPPopUpButton buttonAnimation;
CPPopUpButton buttonBehaviour;
CPButton lastButton;
int lastPreferredEdge;
@outlet CPPopover popover;
@outlet CPPopover windowPopover;
@outlet CPWindow popoverWindow;
}
- (void)applicationDidFinishLaunching:(CPNotification)aNotification
@@ -41,52 +44,59 @@
button = [CPButton buttonWithTitle:@"click"];
[button setTarget:self];
[button setAction:@selector(open:)];
[button setAutoresizingMask:CPViewMinXMargin]
[button setAutoresizingMask:CPViewMinXMargin];
[button setFrameOrigin:CGPointMake(contentViewSize.width - CGRectGetWidth([button frame]) - 1, 1)];
[contentView addSubview:button];
button = [CPButton buttonWithTitle:@"click"];
[button setTarget:self];
[button setAction:@selector(open:)];
[button setAutoresizingMask:CPViewMinXMargin]
[button setAutoresizingMask:CPViewMinXMargin];
[button setFrameOrigin:CGPointMake(contentViewSize.width - CGRectGetWidth([button frame]) - 1, 100)];
[contentView addSubview:button];
button = [CPButton buttonWithTitle:@"click"];
[button setTarget:self];
[button setAction:@selector(open:)];
[button setAutoresizingMask:CPViewMinXMargin | CPViewMinYMargin]
[button setAutoresizingMask:CPViewMinXMargin | CPViewMinYMargin];
[button setFrameOrigin:CGPointMake(contentViewSize.width - CGRectGetWidth([button frame])- 1, contentViewSize.height - CGRectGetHeight([button frame]) - 1)];
[contentView addSubview:button];
button = [CPButton buttonWithTitle:@"click"];
[button setTarget:self];
[button setAction:@selector(open:)];
[button setAutoresizingMask:CPViewMinXMargin | CPViewMinYMargin]
[button setAutoresizingMask:CPViewMinXMargin | CPViewMinYMargin];
[button setFrameOrigin:CGPointMake(contentViewSize.width - CGRectGetWidth([button frame])- 1, contentViewSize.height - 100)];
[contentView addSubview:button];
button = [CPButton buttonWithTitle:@"click"];
[button setTarget:self];
[button setAction:@selector(open:)];
[button setAutoresizingMask:CPViewMaxXMargin | CPViewMinYMargin]
[button setAutoresizingMask:CPViewMaxXMargin | CPViewMinYMargin];
[button setFrameOrigin:CGPointMake(1, contentViewSize.height - CGRectGetHeight([button frame]) - 1)];
[contentView addSubview:button];
button = [CPButton buttonWithTitle:@"click"];
[button setTarget:self];
[button setAction:@selector(open:)];
[button setAutoresizingMask:CPViewMaxXMargin | CPViewMinYMargin]
[button setAutoresizingMask:CPViewMaxXMargin | CPViewMinYMargin];
[button setFrameOrigin:CGPointMake(1, contentViewSize.height - 100)];
[contentView addSubview:button];
button = [CPButton buttonWithTitle:@"click"];
[button setTarget:self];
[button setAction:@selector(open:)];
[button setAutoresizingMask:CPViewMinXMargin | CPViewMaxXMargin | CPViewMinYMargin | CPViewMaxYMargin]
[button setAutoresizingMask:CPViewMinXMargin | CPViewMaxXMargin | CPViewMinYMargin | CPViewMaxYMargin];
[button setCenter:[contentView center]];
[contentView addSubview:button];
button = [CPButton buttonWithTitle:@"Open window"];
[button setTarget:self];
[button setAction:@selector(openWindow:)];
[button setAutoresizingMask:CPViewMinXMargin | CPViewMaxXMargin];
[button setCenter:[contentView center]];
[button setFrameOrigin:CGPointMake(CGRectGetMinX([button frame]), 70)];
[contentView addSubview:button];
buttonEdge = [[CPPopUpButton alloc] initWithFrame:CGRectMake(150, 10, 130, 24)];
[buttonEdge addItemWithTitle:"Automatic"];
@@ -114,30 +124,29 @@
[theWindow orderFront:self];
}
- (IBAction)open:(id)sender
- (int)popoverEdge
{
var edge;
switch ([buttonEdge title])
{
case "Automatic":
edge = nil;
break;
return nil;
case "Bottom":
edge = CPMaxYEdge;
break;
return CPMaxYEdge;
case "Top":
edge = CPMinYEdge;
break;
return CPMinYEdge;
case "Left":
edge = CPMinXEdge;
break;
return CPMinXEdge;
case "Right":
edge = CPMaxXEdge;
break;
return CPMaxXEdge;
default:
return nil;
}
}
var appearance;
- (IBAction)open:(id)sender
{
var edge = [self popoverEdge],
appearance;
switch ([buttonStyle title])
{
@@ -149,45 +158,36 @@
break;
}
var pop = [self popoverWithAppearance:appearance];
[pop showRelativeToRect:nil ofView:sender preferredEdge:edge];
CPLog.info("content size - w:" + [pop contentSize].width + " h:" + [pop contentSize].width);
CPLog.info("positioning rect - x: " + [pop positioningRect].origin.x + " y: " + [pop positioningRect].origin.x
+ " w:" + [pop positioningRect].size.width + " h:" + [pop positioningRect].size.width);
[self initPopover:popover withAppearance:appearance];
lastButton = sender;
lastPreferredEdge = edge;
[popover showRelativeToRect:nil ofView:sender preferredEdge:edge];
}
- (CPPopover)popoverWithAppearance:(int)appearance
- (void)openWindow:(id)sender
{
if (!popover || [buttonBehaviour title] === @"Not managed")
{
popover = [CPPopover new];
[popoverWindow orderFront:nil];
}
var controller = [[CPViewController alloc] init],
view = [[CPView alloc] initWithFrame:CGRectMake(0.0, 0.0, 320, 300)];
- (IBAction)openWindowPopover:(id)sender
{
[windowPopover showRelativeToRect:nil ofView:sender preferredEdge:[self popoverEdge]];
}
appearanceLabel = [CPTextField labelWithTitle:[buttonEdge title]];
[appearanceLabel setFont:[CPFont boldSystemFontOfSize:30.0]];
[appearanceLabel setFrameOrigin:CGPointMake(0, 70)];
[appearanceLabel setValue:CGSizeMake(0.0, 1.0) forThemeAttribute:@"text-shadow-offset"];
[appearanceLabel setFrameSize:CPSizeMake([view frame].size.width, 50)];
[appearanceLabel setAlignment:CPCenterTextAlignment];
[view addSubview:appearanceLabel];
- (IBAction)movePopover:(id)sender
{
if (++lastPreferredEdge > CPMaxYEdge)
lastPreferredEdge = CPMinXEdge;
[controller setView:view];
[popover setContentViewController:controller];
[popover setDelegate:self];
}
[popover showRelativeToRect:CGRectMakeZero() ofView:lastButton preferredEdge:lastPreferredEdge];
}
[appearanceLabel setTextColor:(appearance === CPPopoverAppearanceHUD) ? [CPColor whiteColor] : [CPColor colorWithHexString:@"444"]];
[appearanceLabel setValue:(appearance === CPPopoverAppearanceHUD) ? [CPColor colorWithHexString:@"333"] : [CPColor colorWithHexString:@"fff"] forThemeAttribute:@"text-shadow-color"];
[appearanceLabel setStringValue:[buttonEdge title]];
[popover setAnimates:([buttonAnimation title] === @"With animation")];
[popover setBehaviour:([buttonBehaviour title] === @"Transient") ? CPPopoverBehaviorTransient : CPPopoverBehaviorApplicationDefined];
[popover setAppearance:appearance];
return popover;
- (void)initPopover:(CPPopover)aPopover withAppearance:(int)appearance
{
[aPopover setDelegate:self];
[aPopover setAnimates:([buttonAnimation title] === @"With animation")];
[aPopover setBehaviour:([buttonBehaviour title] === @"Transient") ? CPPopoverBehaviorTransient : CPPopoverBehaviorApplicationDefined];
[aPopover setAppearance:appearance];
}
#pragma mark -
@@ -203,6 +203,12 @@
CPLog.info("popover " + aPopover + " did show");
}
- (BOOL)popoverShouldClose:(CPPopover)aPopover
{
CPLog.info("popover " + aPopover + " should close");
return YES;
}
- (void)popoverWillClose:(CPPopover)aPopover
{
+3 -5
View File
@@ -2,11 +2,9 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CPApplicationDelegateClass</key>
<string>AppController</string>
<key>Main cib file base name</key>
<string>MainMenu.cib</string>
<key>CPBundleName</key>
<string>test</string>
<key>CPPrincipalClass</key>
<string>CPApplication</string>
<string>CPPopover</string>
</dict>
</plist>
+18 -17
View File
@@ -1,9 +1,9 @@
/*
* Jakefile
* test
* CPPopover
*
* Created by You on July 6, 2011.
* Copyright 2011, Your Company All rights reserved.
* Created by You on March 29, 2012.
* Copyright 2012, Your Company All rights reserved.
*/
var ENV = require("system").env,
@@ -15,21 +15,22 @@ var ENV = require("system").env,
configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug",
OS = require("os");
app ("test", function(task)
app ("CPPopover", function(task)
{
task.setBuildIntermediatesPath(FILE.join("Build", "test.build", configuration));
task.setBuildIntermediatesPath(FILE.join("Build", "CPPopover.build", configuration));
task.setBuildPath(FILE.join("Build", configuration));
task.setProductName("test");
task.setIdentifier("com.yourcompany.test");
task.setProductName("CPPopover");
task.setIdentifier("com.yourcompany.CPPopover");
task.setVersion("1.0");
task.setAuthor("Your Company");
task.setEmail("feedback @nospam@ yourcompany.com");
task.setSummary("test");
task.setSummary("CPPopover");
task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**")));
task.setResources(new FileList("Resources/**"));
task.setIndexFilePath("index.html");
task.setInfoPlistPath("Info.plist");
task.setNib2CibFlags("-R Resources/");
if (configuration === "Debug")
task.setCompilerFlags("-DDEBUG -g");
@@ -37,7 +38,7 @@ app ("test", function(task)
task.setCompilerFlags("-O");
});
task ("default", ["test"], function()
task ("default", ["CPPopover"], function()
{
printResults(configuration);
});
@@ -58,36 +59,36 @@ task ("release", function()
task ("run", ["debug"], function()
{
OS.system(["open", FILE.join("Build", "Debug", "test", "index.html")]);
OS.system(["open", FILE.join("Build", "Debug", "CPPopover", "index.html")]);
});
task ("run-release", ["release"], function()
{
OS.system(["open", FILE.join("Build", "Release", "test", "index.html")]);
OS.system(["open", FILE.join("Build", "Release", "CPPopover", "index.html")]);
});
task ("deploy", ["release"], function()
{
FILE.mkdirs(FILE.join("Build", "Deployment", "test"));
OS.system(["press", "-f", FILE.join("Build", "Release", "test"), FILE.join("Build", "Deployment", "test")]);
FILE.mkdirs(FILE.join("Build", "Deployment", "CPPopover"));
OS.system(["press", "-f", FILE.join("Build", "Release", "CPPopover"), FILE.join("Build", "Deployment", "CPPopover")]);
printResults("Deployment")
});
task ("desktop", ["release"], function()
{
FILE.mkdirs(FILE.join("Build", "Desktop", "test"));
require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "test"), FILE.join("Build", "Desktop", "test", "test.app"));
FILE.mkdirs(FILE.join("Build", "Desktop", "CPPopover"));
require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPPopover"), FILE.join("Build", "Desktop", "CPPopover", "CPPopover.app"));
printResults("Desktop")
});
task ("run-desktop", ["desktop"], function()
{
OS.system([FILE.join("Build", "Desktop", "test", "test.app", "Contents", "MacOS", "NativeHost"), "-i"]);
OS.system([FILE.join("Build", "Desktop", "CPPopover", "CPPopover.app", "Contents", "MacOS", "NativeHost"), "-i"]);
});
function printResults(configuration)
{
print("----------------------------");
print(configuration+" app built at path: "+FILE.join("Build", configuration, "test"));
print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPPopover"));
print("----------------------------");
}
@@ -0,0 +1 @@
280NPLIST;1.0;D;K;4;$topD;K;18;CPCibObjectDataKeyD;K;6;CP$UIDd;1;2E;E;K;8;$objectsA;S;5;$nullD;K;10;$classnameS;16;_CPCibObjectDataK;8;$classesA;S;16;_CPCibObjectDataS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;1;1E;K;28;_CPCibObjectDataNamesKeysKeyD;K;6;CP$UIDd;1;0E;K;30;_CPCibObjectDataNamesValuesKeyD;K;6;CP$UIDd;1;0E;K;30;_CPCibObjectDataClassesKeysKeyD;K;6;CP$UIDd;1;0E;K;32;_CPCibObjectDataClassesValuesKeyD;K;6;CP$UIDd;1;0E;K;30;_CPCibObjectDataConnectionsKeyD;K;6;CP$UIDd;1;4E;K;28;_CPCibObjectDataFrameworkKeyD;K;6;CP$UIDd;1;0E;K;26;_CPCibObjectDataNextOidKeyD;K;6;CP$UIDd;1;5E;K;30;_CPCibObjectDataObjectsKeysKeyD;K;6;CP$UIDd;1;6E;K;32;_CPCibObjectDataObjectsValuesKeyD;K;6;CP$UIDd;1;7E;K;26;_CPCibObjectDataOidKeysKeyD;K;6;CP$UIDd;1;8E;K;28;_CPCibObjectDataOidValuesKeyD;K;6;CP$UIDd;1;9E;K;28;_CPCibObjectDataFileOwnerKeyD;K;6;CP$UIDd;2;11E;K;33;_CPCibObjectDataVisibleWindowsKeyD;K;6;CP$UIDd;2;13E;E;D;K;10;$classnameS;7;CPArrayK;8;$classesA;S;7;CPArrayS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;15E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;17E;D;K;6;CP$UIDd;2;18E;D;K;6;CP$UIDd;2;19E;D;K;6;CP$UIDd;2;20E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;24E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;2;26E;D;K;6;CP$UIDd;2;27E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;2;29E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;33E;D;K;6;CP$UIDd;2;35E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;38E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;40E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;41E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;43E;D;K;6;CP$UIDd;2;45E;D;K;6;CP$UIDd;2;46E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;47E;D;K;6;CP$UIDd;2;48E;D;K;6;CP$UIDd;2;49E;D;K;6;CP$UIDd;2;50E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;51E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;52E;D;K;6;CP$UIDd;1;0E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;35E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;35E;D;K;6;CP$UIDd;2;38E;D;K;6;CP$UIDd;2;35E;D;K;6;CP$UIDd;2;40E;D;K;6;CP$UIDd;2;35E;D;K;6;CP$UIDd;2;41E;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;43E;D;K;6;CP$UIDd;2;45E;D;K;6;CP$UIDd;2;46E;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;49E;D;K;6;CP$UIDd;2;50E;D;K;6;CP$UIDd;2;49E;D;K;6;CP$UIDd;2;51E;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;52E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;10;$classnameS;18;_CPCibCustomObjectK;8;$classesA;S;18;_CPCibCustomObjectS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;10E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;2;53E;E;D;K;10;$classnameS;5;CPSetK;8;$classesA;S;5;CPSetS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;12E;K;15;CPSetObjectsKeyD;K;6;CP$UIDd;2;54E;E;D;K;10;$classnameS;20;CPCibOutletConnectorK;8;$classesA;S;20;CPCibOutletConnectorS;14;CPCibConnectorS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;11E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;29E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;55E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;29E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;33E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;56E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;29E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;43E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;57E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;29E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;48E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;58E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;31E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;35E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;59E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;33E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;31E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;60E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;47E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;49E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;59E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;48E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;47E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;60E;E;D;K;10;$classnameS;21;CPCibControlConnectorK;8;$classesA;S;21;CPCibControlConnectorS;14;CPCibConnectorS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;40E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;33E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;61E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;41E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;29E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;62E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;Line truncated
@@ -0,0 +1,832 @@
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
<data>
<int key="IBDocument.SystemTarget">1050</int>
<string key="IBDocument.SystemVersion">11D50</string>
<string key="IBDocument.InterfaceBuilderVersion">2182</string>
<string key="IBDocument.AppKitVersion">1138.32</string>
<string key="IBDocument.HIToolboxVersion">568.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="NS.object.0">2182</string>
</object>
<object class="NSArray" key="IBDocument.IntegratedClassDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>NSTextField</string>
<string>NSCustomObject</string>
<string>NSWindowTemplate</string>
<string>NSView</string>
<string>NSCustomView</string>
<string>NSViewController</string>
<string>NSButtonCell</string>
<string>NSPopover</string>
<string>NSButton</string>
<string>NSTextFieldCell</string>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
</object>
<object class="NSMutableDictionary" key="IBDocument.Metadata">
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
<integer value="1" key="NS.object.0"/>
</object>
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1048">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSCustomObject" id="1021">
<string key="NSClassName">NSApplication</string>
</object>
<object class="NSCustomObject" id="1014">
<string key="NSClassName">FirstResponder</string>
</object>
<object class="NSCustomObject" id="1050">
<string key="NSClassName">NSApplication</string>
</object>
<object class="NSCustomObject" id="635946545">
<string key="NSClassName">AppController</string>
</object>
<object class="NSViewController" id="513062816"/>
<object class="NSPopover" id="941567867">
<nil key="NSNextResponder"/>
<int key="NSAppearance">0</int>
<int key="NSBehavior">1</int>
<double key="NSContentWidth">0.0</double>
<double key="NSContentHeight">0.0</double>
<bool key="NSAnimates">YES</bool>
</object>
<object class="NSCustomView" id="857722922">
<reference key="NSNextResponder"/>
<int key="NSvFlags">268</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSTextField" id="545120110">
<reference key="NSNextResponder" ref="857722922"/>
<int key="NSvFlags">301</int>
<string key="NSFrame">{{31, 97}, {239, 22}}</string>
<reference key="NSSuperview" ref="857722922"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="767709548"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="79646772">
<int key="NSCellFlags">-1804468671</int>
<int key="NSCellFlags2">272630784</int>
<string key="NSContents"/>
<object class="NSFont" key="NSSupport" id="500612644">
<string key="NSName">LucidaGrande</string>
<double key="NSSize">13</double>
<int key="NSfFlags">1044</int>
</object>
<string key="NSPlaceholderString">Write something</string>
<string key="NSCellIdentifier">_NS:9</string>
<reference key="NSControlView" ref="545120110"/>
<bool key="NSDrawsBackground">YES</bool>
<object class="NSColor" key="NSBackgroundColor">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">textBackgroundColor</string>
<object class="NSColor" key="NSColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MQA</bytes>
</object>
</object>
<object class="NSColor" key="NSTextColor">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">textColor</string>
<object class="NSColor" key="NSColor" id="44855948">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MAA</bytes>
</object>
</object>
</object>
</object>
<object class="NSButton" id="13055898">
<reference key="NSNextResponder" ref="857722922"/>
<int key="NSvFlags">293</int>
<string key="NSFrame">{{193, 34}, {74, 32}}</string>
<reference key="NSSuperview" ref="857722922"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="673410962">
<int key="NSCellFlags">67239424</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents">Move</string>
<reference key="NSSupport" ref="500612644"/>
<string key="NSCellIdentifier">_NS:9</string>
<reference key="NSControlView" ref="13055898"/>
<int key="NSButtonFlags">-2038284033</int>
<int key="NSButtonFlags2">129</int>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">200</int>
<int key="NSPeriodicInterval">25</int>
</object>
</object>
<object class="NSButton" id="767709548">
<reference key="NSNextResponder" ref="857722922"/>
<int key="NSvFlags">293</int>
<string key="NSFrame">{{34, 34}, {126, 32}}</string>
<reference key="NSSuperview" ref="857722922"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="13055898"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="550729654">
<int key="NSCellFlags">67239424</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents">performClose</string>
<reference key="NSSupport" ref="500612644"/>
<string key="NSCellIdentifier">_NS:9</string>
<reference key="NSControlView" ref="767709548"/>
<int key="NSButtonFlags">-2038284033</int>
<int key="NSButtonFlags2">129</int>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">200</int>
<int key="NSPeriodicInterval">25</int>
</object>
</object>
<object class="NSTextField" id="143820433">
<reference key="NSNextResponder" ref="857722922"/>
<int key="NSvFlags">269</int>
<string key="NSFrame">{{28, 141}, {245, 32}}</string>
<reference key="NSSuperview" ref="857722922"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="545120110"/>
<string key="NSReuseIdentifierKey">_NS:1505</string>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="308389570">
<int key="NSCellFlags">67239424</int>
<int key="NSCellFlags2">138412544</int>
<string key="NSContents">I’m a popover!</string>
<object class="NSFont" key="NSSupport">
<string key="NSName">LucidaGrande-Bold</string>
<double key="NSSize">20</double>
<int key="NSfFlags">16</int>
</object>
<string key="NSCellIdentifier">_NS:1505</string>
<reference key="NSControlView" ref="143820433"/>
<object class="NSColor" key="NSBackgroundColor" id="516425847">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">controlColor</string>
<object class="NSColor" key="NSColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
</object>
</object>
<object class="NSColor" key="NSTextColor" id="807438272">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">controlTextColor</string>
<reference key="NSColor" ref="44855948"/>
</object>
</object>
</object>
</object>
<string key="NSFrameSize">{301, 217}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="143820433"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<string key="NSClassName">NSView</string>
</object>
<object class="NSWindowTemplate" id="1044407869">
<int key="NSWindowStyleMask">15</int>
<int key="NSWindowBacking">2</int>
<string key="NSWindowRect">{{344, 821}, {212, 112}}</string>
<int key="NSWTFlags">607650816</int>
<string key="NSWindowTitle">Window</string>
<string key="NSWindowClass">NSWindow</string>
<nil key="NSViewClass"/>
<nil key="NSUserInterfaceItemIdentifier"/>
<object class="NSView" key="NSWindowView" id="757557230">
<reference key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSButton" id="58551230">
<reference key="NSNextResponder" ref="757557230"/>
<int key="NSvFlags">301</int>
<string key="NSFrame">{{56, 39}, {99, 32}}</string>
<reference key="NSSuperview" ref="757557230"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="151393059">
<int key="NSCellFlags">67239424</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents">Click me!</string>
<reference key="NSSupport" ref="500612644"/>
<string key="NSCellIdentifier">_NS:9</string>
<reference key="NSControlView" ref="58551230"/>
<int key="NSButtonFlags">-2038284033</int>
<int key="NSButtonFlags2">129</int>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">200</int>
<int key="NSPeriodicInterval">25</int>
</object>
</object>
</object>
<string key="NSFrameSize">{212, 112}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="58551230"/>
<string key="NSReuseIdentifierKey">_NS:20</string>
</object>
<string key="NSScreenRect">{{0, 0}, {1920, 1178}}</string>
<string key="NSMaxSize">{10000000000000, 10000000000000}</string>
<bool key="NSWindowIsRestorable">YES</bool>
</object>
<object class="NSViewController" id="147280416"/>
<object class="NSPopover" id="975947371">
<nil key="NSNextResponder"/>
<int key="NSAppearance">0</int>
<int key="NSBehavior">0</int>
<double key="NSContentWidth">0.0</double>
<double key="NSContentHeight">0.0</double>
<bool key="NSAnimates">YES</bool>
</object>
<object class="NSCustomView" id="200356413">
<reference key="NSNextResponder"/>
<int key="NSvFlags">268</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSButton" id="400712972">
<reference key="NSNextResponder" ref="200356413"/>
<int key="NSvFlags">293</int>
<string key="NSFrame">{{18, 12}, {126, 32}}</string>
<reference key="NSSuperview" ref="200356413"/>
<reference key="NSWindow"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="1032520345">
<int key="NSCellFlags">67239424</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents">performClose</string>
<reference key="NSSupport" ref="500612644"/>
<string key="NSCellIdentifier">_NS:9</string>
<reference key="NSControlView" ref="400712972"/>
<int key="NSButtonFlags">-2038284033</int>
<int key="NSButtonFlags2">129</int>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">200</int>
<int key="NSPeriodicInterval">25</int>
</object>
</object>
<object class="NSTextField" id="934009527">
<reference key="NSNextResponder" ref="200356413"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{37, 59}, {89, 17}}</string>
<reference key="NSSuperview" ref="200356413"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView"/>
<string key="NSReuseIdentifierKey">_NS:1505</string>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="420985577">
<int key="NSCellFlags">68288064</int>
<int key="NSCellFlags2">138413056</int>
<string key="NSContents">From window</string>
<reference key="NSSupport" ref="500612644"/>
<string key="NSCellIdentifier">_NS:1505</string>
<reference key="NSControlView" ref="934009527"/>
<reference key="NSBackgroundColor" ref="516425847"/>
<reference key="NSTextColor" ref="807438272"/>
</object>
</object>
</object>
<string key="NSFrameSize">{163, 96}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="934009527"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<string key="NSClassName">NSView</string>
</object>
<object class="NSTextField" id="260721902">
<reference key="NSNextResponder"/>
<int key="NSvFlags">268</int>
<string key="NSFrameSize">{38, 17}</string>
<reference key="NSSuperview"/>
<reference key="NSNextKeyView"/>
<string key="NSReuseIdentifierKey">_NS:1505</string>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="171236348">
<int key="NSCellFlags">68288064</int>
<int key="NSCellFlags2">272630784</int>
<string key="NSContents">Label</string>
<reference key="NSSupport" ref="500612644"/>
<string key="NSCellIdentifier">_NS:1505</string>
<reference key="NSControlView" ref="260721902"/>
<reference key="NSBackgroundColor" ref="516425847"/>
<reference key="NSTextColor" ref="807438272"/>
</object>
</object>
</object>
<object class="IBObjectContainer" key="IBDocument.Objects">
<object class="NSMutableArray" key="connectionRecords">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">delegate</string>
<reference key="source" ref="1021"/>
<reference key="destination" ref="635946545"/>
</object>
<int key="connectionID">451</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">popover</string>
<reference key="source" ref="635946545"/>
<reference key="destination" ref="941567867"/>
</object>
<int key="connectionID">473</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">windowPopover</string>
<reference key="source" ref="635946545"/>
<reference key="destination" ref="975947371"/>
</object>
<int key="connectionID">519</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">openWindowPopover:</string>
<reference key="source" ref="635946545"/>
<reference key="destination" ref="58551230"/>
</object>
<int key="connectionID">521</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">movePopover:</string>
<reference key="source" ref="635946545"/>
<reference key="destination" ref="13055898"/>
</object>
<int key="connectionID">550</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">popoverWindow</string>
<reference key="source" ref="635946545"/>
<reference key="destination" ref="1044407869"/>
</object>
<int key="connectionID">555</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">view</string>
<reference key="source" ref="513062816"/>
<reference key="destination" ref="857722922"/>
</object>
<int key="connectionID">468</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">contentViewController</string>
<reference key="source" ref="941567867"/>
<reference key="destination" ref="513062816"/>
</object>
<int key="connectionID">462</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">performClose:</string>
<reference key="source" ref="941567867"/>
<reference key="destination" ref="767709548"/>
</object>
<int key="connectionID">484</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">view</string>
<reference key="source" ref="147280416"/>
<reference key="destination" ref="200356413"/>
</object>
<int key="connectionID">529</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">contentViewController</string>
<reference key="source" ref="975947371"/>
<reference key="destination" ref="147280416"/>
</object>
<int key="connectionID">508</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">performClose:</string>
<reference key="source" ref="975947371"/>
<reference key="destination" ref="400712972"/>
</object>
<int key="connectionID">554</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBObjectRecord">
<int key="objectID">0</int>
<object class="NSArray" key="object" id="0">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<reference key="children" ref="1048"/>
<nil key="parent"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">-2</int>
<reference key="object" ref="1021"/>
<reference key="parent" ref="0"/>
<string key="objectName">File's Owner</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">-1</int>
<reference key="object" ref="1014"/>
<reference key="parent" ref="0"/>
<string key="objectName">First Responder</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">-3</int>
<reference key="object" ref="1050"/>
<reference key="parent" ref="0"/>
<string key="objectName">Application</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">450</int>
<reference key="object" ref="635946545"/>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">460</int>
<reference key="object" ref="513062816"/>
<reference key="parent" ref="0"/>
<string key="objectName">Popover View Controller</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">461</int>
<reference key="object" ref="941567867"/>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">463</int>
<reference key="object" ref="857722922"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="545120110"/>
<reference ref="143820433"/>
<reference ref="767709548"/>
<reference ref="13055898"/>
</object>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">464</int>
<reference key="object" ref="143820433"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="308389570"/>
</object>
<reference key="parent" ref="857722922"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">465</int>
<reference key="object" ref="308389570"/>
<reference key="parent" ref="143820433"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">466</int>
<reference key="object" ref="767709548"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="550729654"/>
</object>
<reference key="parent" ref="857722922"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">467</int>
<reference key="object" ref="550729654"/>
<reference key="parent" ref="767709548"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">476</int>
<reference key="object" ref="545120110"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="79646772"/>
</object>
<reference key="parent" ref="857722922"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">477</int>
<reference key="object" ref="79646772"/>
<reference key="parent" ref="545120110"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">488</int>
<reference key="object" ref="13055898"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="673410962"/>
</object>
<reference key="parent" ref="857722922"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">489</int>
<reference key="object" ref="673410962"/>
<reference key="parent" ref="13055898"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">502</int>
<reference key="object" ref="1044407869"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="757557230"/>
</object>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">503</int>
<reference key="object" ref="757557230"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="58551230"/>
</object>
<reference key="parent" ref="1044407869"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">504</int>
<reference key="object" ref="58551230"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="151393059"/>
</object>
<reference key="parent" ref="757557230"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">505</int>
<reference key="object" ref="151393059"/>
<reference key="parent" ref="58551230"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">506</int>
<reference key="object" ref="147280416"/>
<reference key="parent" ref="0"/>
<string key="objectName">Window Popover View Controller</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">507</int>
<reference key="object" ref="975947371"/>
<reference key="parent" ref="0"/>
<string key="objectName">Window Popover</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">510</int>
<reference key="object" ref="200356413"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="934009527"/>
<reference ref="400712972"/>
</object>
<reference key="parent" ref="0"/>
<string key="objectName">Parent View</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">511</int>
<reference key="object" ref="934009527"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="420985577"/>
</object>
<reference key="parent" ref="200356413"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">512</int>
<reference key="object" ref="420985577"/>
<reference key="parent" ref="934009527"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">535</int>
<reference key="object" ref="260721902"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="171236348"/>
</object>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">536</int>
<reference key="object" ref="171236348"/>
<reference key="parent" ref="260721902"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">551</int>
<reference key="object" ref="400712972"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="1032520345"/>
</object>
<reference key="parent" ref="200356413"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">552</int>
<reference key="object" ref="1032520345"/>
<reference key="parent" ref="400712972"/>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>-1.IBPluginDependency</string>
<string>-2.IBPluginDependency</string>
<string>-3.IBPluginDependency</string>
<string>450.IBPluginDependency</string>
<string>460.IBPluginDependency</string>
<string>461.IBPluginDependency</string>
<string>463.IBPluginDependency</string>
<string>464.IBPluginDependency</string>
<string>465.IBPluginDependency</string>
<string>466.IBPluginDependency</string>
<string>467.IBPluginDependency</string>
<string>476.IBPluginDependency</string>
<string>477.IBPluginDependency</string>
<string>488.IBPluginDependency</string>
<string>489.IBPluginDependency</string>
<string>502.IBNSWindowAutoPositionCentersHorizontal</string>
<string>502.IBNSWindowAutoPositionCentersVertical</string>
<string>502.IBPluginDependency</string>
<string>502.NSWindowTemplate.visibleAtLaunch</string>
<string>503.IBPluginDependency</string>
<string>504.IBPluginDependency</string>
<string>505.IBPluginDependency</string>
<string>506.IBPluginDependency</string>
<string>507.IBPluginDependency</string>
<string>510.IBPluginDependency</string>
<string>511.IBPluginDependency</string>
<string>512.IBPluginDependency</string>
<string>535.IBPluginDependency</string>
<string>536.IBPluginDependency</string>
<string>551.IBPluginDependency</string>
<string>552.IBPluginDependency</string>
</object>
<object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="NO"/>
<boolean value="NO"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="NO"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
</object>
</object>
<object class="NSMutableDictionary" key="unlocalizedProperties">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference key="dict.sortedKeys" ref="0"/>
<reference key="dict.values" ref="0"/>
</object>
<nil key="activeLocalization"/>
<object class="NSMutableDictionary" key="localizations">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference key="dict.sortedKeys" ref="0"/>
<reference key="dict.values" ref="0"/>
</object>
<nil key="sourceID"/>
<int key="maxID">555</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
<string key="className">AppController</string>
<string key="superclassName">NSObject</string>
<object class="NSMutableDictionary" key="actions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>movePopover:</string>
<string>open:</string>
<string>openWindowPopover:</string>
</object>
<object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>id</string>
<string>id</string>
<string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>movePopover:</string>
<string>open:</string>
<string>openWindowPopover:</string>
</object>
<object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBActionInfo">
<string key="name">movePopover:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">open:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">openWindowPopover:</string>
<string key="candidateClassName">id</string>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>popover</string>
<string>popoverWindow</string>
<string>windowPopover</string>
</object>
<object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>NSPopover</string>
<string>NSWindow</string>
<string>NSPopover</string>
</object>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>popover</string>
<string>popoverWindow</string>
<string>windowPopover</string>
</object>
<object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBToOneOutletInfo">
<string key="name">popover</string>
<string key="candidateClassName">NSPopover</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">popoverWindow</string>
<string key="candidateClassName">NSWindow</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">windowPopover</string>
<string key="candidateClassName">NSPopover</string>
</object>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/AppController.h</string>
</object>
</object>
</object>
</object>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencies">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.macosx</string>
<integer value="1050" key="NS.object.0"/>
</object>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3</string>
<integer value="3000" key="NS.object.0"/>
</object>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
</data>
</archive>
+4
View File
@@ -52,6 +52,10 @@
// Uncomment to enable a specific logger:
//CPLogRegister(CPLogConsole);
//CPLogRegister(CPLogPopup);
// Tag view DOM elements with a "data-cappuccino-view" attribute that contains
// the class name of the view that created them. Comment this or set to false to disable.
appkit_tag_dom_elements = true;
</script>
<style type="text/css">
-1
View File
@@ -31,7 +31,6 @@
if (self)
{
_needsNewAttachedWindow = YES;
_behavior = [aCoder decodeIntForKey:@"NSBehavior"];
_appearance = [aCoder decodeIntForKey:@"NSAppearance"];
_animates = [aCoder decodeBoolForKey:@"NSAnimates"];