Anonymous avatar Anonymous committed b48f0b7

First add

Comments (0)

Files changed (272)

BWAddMiniBottomBar.classdescription

+{
+	Actions = {
+		// Define action descriptions here, for example
+		// "myAction:" = id;
+	};
+	Outlets = {
+		// Define outlet descriptions here, for example
+		// myOutlet = NSView;
+	};
+    ClassName = BWAddMiniBottomBar; 
+    SuperClass = NSView; 
+}

BWAddMiniBottomBar.h

+//
+//  BWAddMiniBottomBar.h
+//  BWToolkit
+//
+//  Created by Brandon Walkin (www.brandonwalkin.com)
+//  All code is provided under the New BSD license.
+//
+
+#import <Cocoa/Cocoa.h>
+
+@interface BWAddMiniBottomBar : NSView 
+{
+
+}
+
+@end

BWAddMiniBottomBar.m

+//
+//  BWAddMiniBottomBar.m
+//  BWToolkit
+//
+//  Created by Brandon Walkin (www.brandonwalkin.com)
+//  All code is provided under the New BSD license.
+//
+
+#import "BWAddMiniBottomBar.h"
+
+@interface NSWindow (BWBBPrivate)
+- (void)setBottomCornerRounded:(BOOL)flag;
+@end
+
+@implementation BWAddMiniBottomBar
+
+- (id)initWithCoder:(NSCoder *)decoder;
+{
+    if ((self = [super initWithCoder:decoder]) != nil)
+	{
+		if ([self respondsToSelector:@selector(ibDidAddToDesignableDocument:)])
+			[self performSelector:@selector(addBottomBar) withObject:nil afterDelay:0];			
+	}
+	return self;
+}
+
+- (void)awakeFromNib
+{
+	[[self window] setContentBorderThickness:16	forEdge:NSMinYEdge];
+	
+	// Private method
+	if ([[self window] respondsToSelector:@selector(setBottomCornerRounded:)])
+		[[self window] setBottomCornerRounded:NO];
+}
+
+- (NSRect)bounds
+{
+	return NSMakeRect(-10000,-10000,0,0);
+}
+
+@end

BWAddMiniBottomBarIntegration.m

+//
+//  BWAddMiniBottomBarIntegration.m
+//  BWToolkit
+//
+//  Created by Brandon Walkin (www.brandonwalkin.com)
+//  All code is provided under the New BSD license.
+//
+
+#import <InterfaceBuilderKit/InterfaceBuilderKit.h>
+#import "BWAddSmallBottomBar.h"
+#import "BWAddRegularBottomBar.h"
+#import "BWAddMiniBottomBar.h"
+#import "BWAddSheetBottomBar.h"
+#import "NSWindow+BWAdditions.h"
+
+@interface NSWindow (BWBBPrivate)
+- (void)setBottomCornerRounded:(BOOL)flag;
+@end
+
+@implementation BWAddMiniBottomBar ( BWAddMiniBottomBarIntegration )
+
+- (void)ibDidAddToDesignableDocument:(IBDocument *)document
+{
+	[super ibDidAddToDesignableDocument:document];
+	
+	[self performSelector:@selector(addBottomBar) withObject:nil afterDelay:0];
+	[self performSelector:@selector(removeOtherBottomBarViewsInDocument:) withObject:document afterDelay:0];
+}
+
+- (void)addBottomBar
+{
+	if ([[self window] isTextured] == NO)
+	{
+		[[self window] setContentBorderThickness:16 forEdge:NSMinYEdge];
+		
+		// Private method
+		if ([[self window] respondsToSelector:@selector(setBottomCornerRounded:)])
+			[[self window] setBottomCornerRounded:NO];		
+	}
+}
+
+- (void)removeOtherBottomBarViewsInDocument:(IBDocument *)document
+{
+	NSArray *subviews = [[[self window] contentView] subviews];
+	
+	int i;
+	for (i = 0; i < [subviews count]; i++)
+	{
+		NSView *view = [subviews objectAtIndex:i];
+		if (view != self && ([view isKindOfClass:[BWAddRegularBottomBar class]] || [view isKindOfClass:[BWAddSmallBottomBar class]] || [view isKindOfClass:[BWAddMiniBottomBar class]] || [view isKindOfClass:[BWAddSheetBottomBar class]]))
+		{
+			[document removeObject:view];
+			[view removeFromSuperview];
+		}
+	}
+}
+
+@end

BWAddRegularBottomBar.classdescription

+{
+	Actions = {
+		// Define action descriptions here, for example
+		// "myAction:" = id;
+	};
+	Outlets = {
+		// Define outlet descriptions here, for example
+		// myOutlet = NSView;
+	};
+    ClassName = BWAddRegularBottomBar; 
+    SuperClass = NSView; 
+}

BWAddRegularBottomBar.h

+//
+//  BWAddRegularBottomBar.h
+//  BWToolkit
+//
+//  Created by Brandon Walkin (www.brandonwalkin.com)
+//  All code is provided under the New BSD license.
+//
+
+#import <Cocoa/Cocoa.h>
+
+@interface BWAddRegularBottomBar : NSView
+{
+
+}
+
+@end

BWAddRegularBottomBar.m

+//
+//  BWAddRegularBottomBar.m
+//  BWToolkit
+//
+//  Created by Brandon Walkin (www.brandonwalkin.com)
+//  All code is provided under the New BSD license.
+//
+
+#import "BWAddRegularBottomBar.h"
+
+@implementation BWAddRegularBottomBar
+
+- (id)initWithCoder:(NSCoder *)decoder;
+{
+    if ((self = [super initWithCoder:decoder]) != nil)
+	{
+		if ([self respondsToSelector:@selector(ibDidAddToDesignableDocument:)])
+			[self performSelector:@selector(addBottomBar) withObject:nil afterDelay:0];			
+	}
+	return self;
+}
+
+- (void)awakeFromNib
+{
+	[[self window] setContentBorderThickness:34	forEdge:NSMinYEdge];
+}
+
+- (NSRect)bounds
+{
+	return NSMakeRect(-10000,-10000,0,0);
+}
+
+@end

BWAddRegularBottomBarIntegration.m

+//
+//  BWAddRegularBottomBarIntegration.m
+//  BWToolkit
+//
+//  Created by Brandon Walkin (www.brandonwalkin.com)
+//  All code is provided under the New BSD license.
+//
+
+#import <InterfaceBuilderKit/InterfaceBuilderKit.h>
+#import "BWAddSmallBottomBar.h"
+#import "BWAddRegularBottomBar.h"
+#import "BWAddMiniBottomBar.h"
+#import "BWAddSheetBottomBar.h"
+#import "NSWindow+BWAdditions.h"
+
+@interface NSWindow (BWBBPrivate)
+- (void)setBottomCornerRounded:(BOOL)flag;
+@end
+
+@implementation BWAddRegularBottomBar ( BWAddRegularBottomBarIntegration )
+
+- (void)ibDidAddToDesignableDocument:(IBDocument *)document
+{
+	[super ibDidAddToDesignableDocument:document];
+	
+	[self performSelector:@selector(addBottomBar) withObject:nil afterDelay:0];
+	[self performSelector:@selector(removeOtherBottomBarViewsInDocument:) withObject:document afterDelay:0];
+}
+
+- (void)addBottomBar
+{
+	if ([[self window] isTextured] == NO)
+	{
+		[[self window] setContentBorderThickness:34 forEdge:NSMinYEdge];
+		
+		// Private method 
+		if ([[self window] respondsToSelector:@selector(setBottomCornerRounded:)])
+			[[self window] setBottomCornerRounded:YES];	
+	}
+}
+
+- (void)removeOtherBottomBarViewsInDocument:(IBDocument *)document
+{
+	NSArray *subviews = [[[self window] contentView] subviews];
+	
+	int i;
+	for (i = 0; i < [subviews count]; i++)
+	{
+		NSView *view = [subviews objectAtIndex:i];
+		if (view != self && ([view isKindOfClass:[BWAddRegularBottomBar class]] || [view isKindOfClass:[BWAddSmallBottomBar class]] || [view isKindOfClass:[BWAddMiniBottomBar class]] || [view isKindOfClass:[BWAddSheetBottomBar class]]))
+		{
+			[document removeObject:view];
+			[view removeFromSuperview];
+		}
+	}
+}
+
+@end

BWAddSheetBottomBar.classdescription

+{
+	Actions = {
+		// Define action descriptions here, for example
+		// "myAction:" = id;
+	};
+	Outlets = {
+		// Define outlet descriptions here, for example
+		// myOutlet = NSView;
+	};
+    ClassName = BWAddSheetBottomBar; 
+    SuperClass = NSView; 
+}

BWAddSheetBottomBar.h

+//
+//  BWAddSheetBottomBar.h
+//  BWToolkit
+//
+//  Created by Brandon Walkin (www.brandonwalkin.com)
+//  All code is provided under the New BSD license.
+//
+
+#import <Cocoa/Cocoa.h>
+
+@interface BWAddSheetBottomBar : NSView 
+{
+
+}
+
+@end

BWAddSheetBottomBar.m

+//
+//  BWAddSheetBottomBar.m
+//  BWToolkit
+//
+//  Created by Brandon Walkin (www.brandonwalkin.com)
+//  All code is provided under the New BSD license.
+//
+
+#import "BWAddSheetBottomBar.h"
+
+@interface NSWindow (BWPrivate)
+- (void)setBottomCornerRounded:(BOOL)flag;
+@end
+
+@implementation BWAddSheetBottomBar
+
+- (id)initWithCoder:(NSCoder *)decoder;
+{
+    if ((self = [super initWithCoder:decoder]) != nil)
+	{
+		if ([self respondsToSelector:@selector(ibDidAddToDesignableDocument:)])
+			[self performSelector:@selector(addBottomBar) withObject:nil afterDelay:0];			
+	}
+	return self;
+}
+
+- (void)awakeFromNib
+{
+	[[self window] setContentBorderThickness:40	forEdge:NSMinYEdge];
+	
+	// Private method
+	if ([[self window] respondsToSelector:@selector(setBottomCornerRounded:)])
+		[[self window] setBottomCornerRounded:NO];
+}
+
+- (NSRect)bounds
+{
+	return NSMakeRect(-10000,-10000,0,0);
+}
+
+@end

BWAddSheetBottomBarIntegration.m

+//
+//  BWAddSheetBottomBarIntegration.m
+//  BWToolkit
+//
+//  Created by Brandon Walkin (www.brandonwalkin.com)
+//  All code is provided under the New BSD license.
+//
+
+#import <InterfaceBuilderKit/InterfaceBuilderKit.h>
+#import "BWAddSmallBottomBar.h"
+#import "BWAddRegularBottomBar.h"
+#import "BWAddMiniBottomBar.h"
+#import "BWAddSheetBottomBar.h"
+#import "NSWindow+BWAdditions.h"
+
+@interface NSWindow (BWBBPrivate)
+- (void)setBottomCornerRounded:(BOOL)flag;
+@end
+
+@implementation BWAddSheetBottomBar ( BWAddSheetBottomBarIntegration )
+
+- (void)ibDidAddToDesignableDocument:(IBDocument *)document
+{
+	[super ibDidAddToDesignableDocument:document];
+	
+	[self performSelector:@selector(addBottomBar) withObject:nil afterDelay:0];
+	[self performSelector:@selector(removeOtherBottomBarViewsInDocument:) withObject:document afterDelay:0];
+}
+
+- (void)addBottomBar
+{
+	if ([[self window] isTextured] == NO)
+	{
+		[[self window] setContentBorderThickness:40 forEdge:NSMinYEdge];
+		
+		// Private method
+		if ([[self window] respondsToSelector:@selector(setBottomCornerRounded:)])
+			[[self window] setBottomCornerRounded:NO];		
+	}
+}
+
+- (void)removeOtherBottomBarViewsInDocument:(IBDocument *)document
+{
+	NSArray *subviews = [[[self window] contentView] subviews];
+	
+	int i;
+	for (i = 0; i < [subviews count]; i++)
+	{
+		NSView *view = [subviews objectAtIndex:i];
+		if (view != self && ([view isKindOfClass:[BWAddRegularBottomBar class]] || [view isKindOfClass:[BWAddSmallBottomBar class]] || [view isKindOfClass:[BWAddMiniBottomBar class]] || [view isKindOfClass:[BWAddSheetBottomBar class]]))
+		{
+			[document removeObject:view];
+			[view removeFromSuperview];
+		}
+	}
+}
+
+@end

BWAddSmallBottomBar.classdescription

+{
+	Actions = {
+		// Define action descriptions here, for example
+		// "myAction:" = id;
+	};
+	Outlets = {
+		// Define outlet descriptions here, for example
+		// myOutlet = NSView;
+	};
+    ClassName = BWAddSmallBottomBar; 
+    SuperClass = NSView; 
+}

BWAddSmallBottomBar.h

+//
+//  BWAddSmallBottomBar.h
+//  BWToolkit
+//
+//  Created by Brandon Walkin (www.brandonwalkin.com)
+//  All code is provided under the New BSD license.
+//
+
+#import <Cocoa/Cocoa.h>
+
+@interface BWAddSmallBottomBar : NSView
+{
+
+}
+
+@end

BWAddSmallBottomBar.m

+//
+//  BWAddSmallBottomBar.m
+//  BWToolkit
+//
+//  Created by Brandon Walkin (www.brandonwalkin.com)
+//  All code is provided under the New BSD license.
+//
+
+#import "BWAddSmallBottomBar.h"
+
+@implementation BWAddSmallBottomBar
+
+- (id)initWithCoder:(NSCoder *)decoder;
+{
+    if ((self = [super initWithCoder:decoder]) != nil)
+	{
+		if ([self respondsToSelector:@selector(ibDidAddToDesignableDocument:)])
+			[self performSelector:@selector(addBottomBar) withObject:nil afterDelay:0];			
+	}
+	return self;
+}
+
+- (void)awakeFromNib
+{
+	[[self window] setContentBorderThickness:24	forEdge:NSMinYEdge];
+}
+
+- (NSRect)bounds
+{
+	return NSMakeRect(-10000,-10000,0,0);
+}
+
+@end

BWAddSmallBottomBarIntegration.m

+//
+//  BWAddSmallBottomBarIntegration.m
+//  BWToolkit
+//
+//  Created by Brandon Walkin (www.brandonwalkin.com)
+//  All code is provided under the New BSD license.
+//
+
+#import <InterfaceBuilderKit/InterfaceBuilderKit.h>
+#import "BWAddSmallBottomBar.h"
+#import "BWAddRegularBottomBar.h"
+#import "BWAddMiniBottomBar.h"
+#import "BWAddSheetBottomBar.h"
+#import "NSWindow+BWAdditions.h"
+
+@interface NSWindow (BWBBPrivate)
+- (void)setBottomCornerRounded:(BOOL)flag;
+@end
+
+@implementation BWAddSmallBottomBar ( BWAddSmallBottomBarIntegration )
+
+- (void)ibDidAddToDesignableDocument:(IBDocument *)document
+{
+	[super ibDidAddToDesignableDocument:document];
+	
+	[self performSelector:@selector(addBottomBar) withObject:nil afterDelay:0];
+	[self performSelector:@selector(removeOtherBottomBarViewsInDocument:) withObject:document afterDelay:0];
+}
+
+- (void)addBottomBar
+{
+	if ([[self window] isTextured] == NO)
+	{
+		[[self window] setContentBorderThickness:24 forEdge:NSMinYEdge];
+	
+		// Private method 
+		if ([[self window] respondsToSelector:@selector(setBottomCornerRounded:)])
+			[[self window] setBottomCornerRounded:YES];	
+	}
+}
+
+- (void)removeOtherBottomBarViewsInDocument:(IBDocument *)document
+{
+	NSArray *subviews = [[[self window] contentView] subviews];
+	
+	int i;
+	for (i = 0; i < [subviews count]; i++)
+	{
+		NSView *view = [subviews objectAtIndex:i];
+		if (view != self && ([view isKindOfClass:[BWAddRegularBottomBar class]] || [view isKindOfClass:[BWAddSmallBottomBar class]] || [view isKindOfClass:[BWAddMiniBottomBar class]] || [view isKindOfClass:[BWAddSheetBottomBar class]]))
+		{
+			[document removeObject:view];
+			[view removeFromSuperview];
+		}
+	}
+}
+
+
+@end

BWAnchoredButton.classdescription

+{
+	Actions = {
+		// Define action descriptions here, for example
+		// "myAction:" = id;
+	};
+	Outlets = {
+		// Define outlet descriptions here, for example
+		// myOutlet = NSView;
+	};
+    ClassName = BWAnchoredButton; 
+    SuperClass = NSButton; 
+}

BWAnchoredButton.h

+//
+//  BWAnchoredButton.h
+//  BWToolkit
+//
+//  Created by Brandon Walkin (www.brandonwalkin.com)
+//  All code is provided under the New BSD license.
+//
+
+#import <Cocoa/Cocoa.h>
+#import "BWAnchoredButtonCell.h"
+
+@interface BWAnchoredButton : NSButton 
+{
+	BOOL isAtLeftEdgeOfBar;
+	BOOL isAtRightEdgeOfBar;
+	NSPoint topAndLeftInset;
+}
+
+@property BOOL isAtLeftEdgeOfBar;
+@property BOOL isAtRightEdgeOfBar;
+
+@end

BWAnchoredButton.m

+//
+//  BWAnchoredButton.m
+//  BWToolkit
+//
+//  Created by Brandon Walkin (www.brandonwalkin.com)
+//  All code is provided under the New BSD license.
+//
+
+#import "BWAnchoredButton.h"
+#import "BWAnchoredButtonBar.h"
+#import "NSView+BWAdditions.h"
+
+@implementation BWAnchoredButton
+
+@synthesize isAtLeftEdgeOfBar;
+@synthesize isAtRightEdgeOfBar;
+
++ (Class)cellClass
+{
+	return [BWAnchoredButtonCell class];
+}
+
+- (id)initWithCoder:(NSCoder *)decoder
+{
+	// Fail gracefully on non-keyed coders
+	if (![decoder isKindOfClass:[NSKeyedUnarchiver class]])
+		return [super initWithCoder:decoder];
+	
+	NSKeyedUnarchiver *coder = (NSKeyedUnarchiver *)decoder;
+	Class oldClass = [[self superclass] cellClass];
+	Class newClass = [[self class] cellClass];
+	
+	[coder setClass:newClass forClassName:NSStringFromClass(oldClass)];
+	self = [super initWithCoder:coder];
+	
+	if ([BWAnchoredButtonBar wasBorderedBar])
+		topAndLeftInset = NSMakePoint(0, 0);
+	else
+		topAndLeftInset = NSMakePoint(1, 1);
+	
+	[coder setClass:oldClass forClassName:NSStringFromClass(oldClass)];
+	
+	return self;
+}
+
+- (void)mouseDown:(NSEvent *)theEvent
+{
+	[self bringToFront];
+	[super mouseDown:theEvent];
+}
+
+- (NSRect)frame
+{
+	NSRect frame = [super frame];
+	frame.size.height = 24;
+	return frame;
+}
+
+@end

BWAnchoredButtonBar.classdescription

+{
+	Actions = {
+		// Define action descriptions here, for example
+		// "myAction:" = id;
+	};
+	Outlets = {
+		// Define outlet descriptions here, for example
+		// myOutlet = NSView;
+	};
+    ClassName = BWAnchoredButtonBar; 
+    SuperClass = NSView; 
+}

BWAnchoredButtonBar.h

+//
+//  BWAnchoredButtonBar.h
+//  BWToolkit
+//
+//  Created by Brandon Walkin (www.brandonwalkin.com)
+//  All code is provided under the New BSD license.
+//
+
+#import <Cocoa/Cocoa.h>
+
+@interface BWAnchoredButtonBar : NSView 
+{
+	BOOL isResizable;
+	BOOL isAtBottom;
+	int selectedIndex, selectedMinWidthUnit, selectedMaxWidthUnit;
+	NSNumber *minWidth, *maxWidth;
+}
+
+@property BOOL isResizable;
+@property BOOL isAtBottom;
+@property int selectedIndex;
+@property int selectedMinWidthUnit;
+@property int selectedMaxWidthUnit;
+@property (copy) NSNumber *minWidth;
+@property (copy) NSNumber *maxWidth;
+
++ (BOOL)wasBorderedBar;
+
+@end

BWAnchoredButtonBar.m

+//
+//  BWAnchoredButtonBar.m
+//  BWToolkit
+//
+//  Created by Brandon Walkin (www.brandonwalkin.com)
+//  All code is provided under the New BSD license.
+//
+
+#import "BWAnchoredButtonBar.h"
+#import "NSColor+BWAdditions.h"
+#import "NSView+BWAdditions.h"
+#import "BWAnchoredButton.h"
+
+static NSColor *topLineColor, *bottomLineColor;
+static NSColor *topColor, *middleTopColor, *middleBottomColor, *bottomColor;
+static NSColor *sideInsetColor, *borderedTopLineColor;
+static NSColor *resizeHandleColor, *resizeInsetColor;
+static NSGradient *gradient;
+static BOOL wasBorderedBar;
+static float scaleFactor = 0.0f;
+
+@interface BWAnchoredButtonBar (BWABBPrivate)
+- (void)drawResizeHandleInRect:(NSRect)handleRect withColor:(NSColor *)color;
+- (void)drawLastButtonInsetInRect:(NSRect)rect;
+@end
+
+@implementation BWAnchoredButtonBar
+
+@synthesize selectedIndex;
+@synthesize isAtBottom;
+@synthesize isResizable;
+@synthesize selectedMinWidthUnit;
+@synthesize selectedMaxWidthUnit;
+@synthesize minWidth;
+@synthesize maxWidth;
+
++ (void)initialize;
+{
+	topLineColor		 = [[NSColor colorWithCalibratedWhite:(202.0f / 255.0f) alpha:1] retain];
+	bottomLineColor		 = [[NSColor colorWithCalibratedWhite:(170.0f / 255.0f) alpha:1] retain];
+    topColor			 = [[NSColor colorWithCalibratedWhite:(253.0f / 255.0f) alpha:1] retain];
+    middleTopColor		 = [[NSColor colorWithCalibratedWhite:(242.0f / 255.0f) alpha:1] retain];
+    middleBottomColor	 = [[NSColor colorWithCalibratedWhite:(230.0f / 255.0f) alpha:1] retain];
+	bottomColor			 = [[NSColor colorWithCalibratedWhite:(230.0f / 255.0f) alpha:1] retain];
+	sideInsetColor		 = [[NSColor colorWithCalibratedWhite:(255.0f / 255.0f) alpha:0.5] retain];
+	borderedTopLineColor = [[NSColor colorWithCalibratedWhite:(190.0f / 255.0f) alpha:1] retain];
+    
+	gradient			 = [[NSGradient alloc] initWithColorsAndLocations:
+						   topColor, (CGFloat)0.0,
+						   middleTopColor, (CGFloat)0.45454,
+						   middleBottomColor, (CGFloat)0.45454,
+						   bottomColor, (CGFloat)1.0,
+						   nil];
+	
+	resizeHandleColor	 = [[NSColor colorWithCalibratedWhite:(0.0f / 255.0f) alpha:0.598] retain];
+	resizeInsetColor	 = [[NSColor colorWithCalibratedWhite:(255.0f / 255.0f) alpha:0.55] retain];
+}
+
+- (id)initWithFrame:(NSRect)frame 
+{
+    self = [super initWithFrame:frame];
+    if (self) 
+	{
+        scaleFactor = [[NSScreen mainScreen] userSpaceScaleFactor];
+		[self setIsResizable:YES];
+		[self setIsAtBottom:YES];
+    }
+    return self;
+}
+
+- (id)initWithCoder:(NSCoder *)decoder;
+{
+    if ((self = [super initWithCoder:decoder]) != nil)
+	{
+		[self setIsResizable:[decoder decodeBoolForKey:@"BWABBIsResizable"]];
+		[self setIsAtBottom:[decoder decodeBoolForKey:@"BWABBIsAtBottom"]];
+		[self setSelectedIndex:[decoder decodeIntForKey:@"BWABBSelectedIndex"]];
+		[self setSelectedMinWidthUnit:[decoder decodeIntForKey:@"BWABBSelectedMinWidthUnit"]];
+		[self setSelectedMaxWidthUnit:[decoder decodeIntForKey:@"BWABBSelectedMaxWidthUnit"]];
+		[self setMinWidth:[decoder decodeObjectForKey:@"BWABBMinWidth"]];
+		[self setMaxWidth:[decoder decodeObjectForKey:@"BWABBMaxWidth"]];
+	}
+	return self;
+}
+
+- (void)encodeWithCoder:(NSCoder*)coder
+{
+    [super encodeWithCoder:coder];
+	
+	[coder encodeBool:[self isResizable] forKey:@"BWABBIsResizable"];
+	[coder encodeBool:[self isAtBottom] forKey:@"BWABBIsAtBottom"];
+	[coder encodeInt:[self selectedIndex] forKey:@"BWABBSelectedIndex"];
+	[coder encodeInt:[self selectedMinWidthUnit] forKey:@"BWABBSelectedMinWidthUnit"];
+	[coder encodeInt:[self selectedMaxWidthUnit] forKey:@"BWABBSelectedMaxWidthUnit"];
+	[coder encodeObject:[self minWidth] forKey:@"BWABBMinWidth"];
+	[coder encodeObject:[self maxWidth] forKey:@"BWABBMaxWidth"];
+}
+
+- (void)awakeFromNib
+{
+	scaleFactor = [[NSScreen mainScreen] userSpaceScaleFactor];
+	
+	// Iterate through superviews, see if we're in a split view, and set its delegate
+	NSSplitView *splitView = nil;
+	id currentView = self;
+	
+	while (![currentView isKindOfClass:[NSSplitView class]] && currentView != nil)
+	{
+		currentView = [currentView superview];
+		if ([currentView isKindOfClass:[NSSplitView class]])
+			splitView = currentView;
+	}
+	
+	if (splitView != nil && [splitView isVertical] && [self isResizable])
+		[splitView setDelegate:self];
+		
+	[self bringToFront];
+}
+
+- (void)drawRect:(NSRect)rect 
+{	
+	rect = self.bounds;
+	
+	// Draw gradient
+	NSRect gradientRect;
+	if (isAtBottom)
+		gradientRect = NSMakeRect(rect.origin.x,rect.origin.y,rect.size.width,rect.size.height - 1);
+	else
+		gradientRect = NSInsetRect(rect, 0, 1); 
+	[gradient drawInRect:gradientRect angle:270];
+	
+	// Draw top line
+	if (isAtBottom)
+		[topLineColor drawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:YES flip:YES];
+	else
+		[borderedTopLineColor drawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:YES flip:YES];
+	
+	// Draw resize handle
+	if (isResizable)
+	{
+		NSRect handleRect = NSMakeRect(NSMaxX(rect)-11,6,6,10);
+		[self drawResizeHandleInRect:handleRect withColor:resizeHandleColor];
+		
+		NSRect insetRect = NSOffsetRect(handleRect,1,-1);
+		[self drawResizeHandleInRect:insetRect withColor:resizeInsetColor];
+	}
+	
+	[self drawLastButtonInsetInRect:rect];
+	
+	// Draw bottom line and sides if it's in non-bottom mode
+	if (!isAtBottom)
+	{
+		[bottomLineColor drawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:YES flip:NO];
+		[bottomLineColor drawPixelThickLineAtPosition:0 withInset:1 inRect:rect inView:self horizontal:NO flip:NO];
+		[bottomLineColor drawPixelThickLineAtPosition:0 withInset:1 inRect:rect inView:self horizontal:NO flip:YES];
+	}
+}
+
+- (void)drawResizeHandleInRect:(NSRect)handleRect withColor:(NSColor *)color
+{
+	[color drawPixelThickLineAtPosition:0 withInset:0 inRect:handleRect inView:self horizontal:NO flip:NO];
+	[color drawPixelThickLineAtPosition:3 withInset:0 inRect:handleRect inView:self horizontal:NO flip:NO];
+	[color drawPixelThickLineAtPosition:6 withInset:0 inRect:handleRect inView:self horizontal:NO flip:NO];
+}
+
+- (void)drawLastButtonInsetInRect:(NSRect)rect
+{
+	NSView *rightMostView = nil;
+	
+	if ([[self subviews] count] > 0)
+	{
+		rightMostView = [[self subviews] objectAtIndex:0];
+		
+		NSView *currentSubview = nil;
+		for (currentSubview in [self subviews])
+		{
+			if ([[currentSubview className] isEqualToString:@"BWAnchoredButton"] || [[currentSubview className] isEqualToString:@"BWAnchoredPopUpButton"])
+			{
+				if (NSMaxX([currentSubview frame]) > NSMaxX([rightMostView frame]))
+					rightMostView = currentSubview;
+				
+				if ([currentSubview frame].origin.x == 0)
+					[(BWAnchoredButton *)currentSubview setIsAtLeftEdgeOfBar:YES];
+				else
+					[(BWAnchoredButton *)currentSubview setIsAtLeftEdgeOfBar:NO];
+				
+				if (NSMaxX([currentSubview frame]) == NSMaxX([self bounds]))
+					[(BWAnchoredButton *)currentSubview setIsAtRightEdgeOfBar:YES];
+				else
+					[(BWAnchoredButton *)currentSubview setIsAtRightEdgeOfBar:NO];
+			}
+		}
+	}
+	
+	if (rightMostView != nil && ([[rightMostView className] isEqualToString:@"BWAnchoredButton"] || [[rightMostView className] isEqualToString:@"BWAnchoredPopUpButton"]))
+	{
+		NSRect newRect = NSOffsetRect(rect,0,-1);
+		[sideInsetColor drawPixelThickLineAtPosition:NSMaxX([rightMostView frame]) withInset:0 inRect:newRect inView:self horizontal:NO flip:NO];
+	}
+}
+
+- (void)setIsAtBottom:(BOOL)flag
+{
+	isAtBottom = flag;
+
+	if (flag)
+	{
+		[self setFrameSize:NSMakeSize(self.frame.size.width,23)];
+		wasBorderedBar = NO;
+	}
+	else
+	{
+		[self setFrameSize:NSMakeSize(self.frame.size.width,24)];
+		wasBorderedBar = YES;
+	}
+
+	[self setNeedsDisplay:YES];
+}
+
+- (void)setSelectedIndex:(int)anIndex
+{
+	if (anIndex == 0)
+	{
+		[self setIsAtBottom:YES];
+		[self setIsResizable:YES];
+	}
+	else if (anIndex == 1)
+	{
+		[self setIsAtBottom:YES];
+		[self setIsResizable:NO];
+	}
+	else if (anIndex == 2)
+	{
+		[self setIsAtBottom:NO];
+		[self setIsResizable:NO];
+	}
+	selectedIndex = anIndex;
+	
+	[self setNeedsDisplay:YES];
+}
+
++ (BOOL)wasBorderedBar
+{
+	return wasBorderedBar;
+}
+
+#pragma mark NSSplitView Delegate Methods
+
+// Add the resize handle rect to the split view hot zone
+- (NSRect)splitView:(NSSplitView *)aSplitView additionalEffectiveRectOfDividerAtIndex:(NSInteger)dividerIndex
+{
+	NSRect paddedHandleRect;
+	paddedHandleRect.origin.y = [aSplitView frame].size.height - [self frame].origin.y - [self bounds].size.height;
+	paddedHandleRect.origin.x = NSMaxX([self bounds]) - 15;
+	paddedHandleRect.size.width = 15;
+	paddedHandleRect.size.height = [self bounds].size.height;
+	
+	return paddedHandleRect;
+}
+
+// Set the min width of the left most pane
+- (CGFloat)splitView:(NSSplitView *)sender constrainMinCoordinate:(CGFloat)proposedMin ofSubviewAt:(NSInteger)offset
+{
+	if (minWidth != nil && offset == 0)
+	{
+		if (selectedMinWidthUnit == 0) // Points
+			return [minWidth floatValue];
+		else if (selectedMinWidthUnit == 1) // %
+		{
+			float splitViewWidth = [sender bounds].size.width;
+			return splitViewWidth * [minWidth floatValue] * 0.01;
+		}
+	}
+	
+	return 0.0;
+}
+
+// Set the max width of the left most pane
+- (CGFloat)splitView:(NSSplitView *)sender constrainMaxCoordinate:(CGFloat)proposedMax ofSubviewAt:(NSInteger)offset
+{
+	if (maxWidth != nil && offset == 0)
+	{
+		if (selectedMaxWidthUnit == 0) // Points
+			return [maxWidth floatValue];
+		else if (selectedMaxWidthUnit == 1) // %
+		{
+			float splitViewWidth = [sender bounds].size.width;
+			return splitViewWidth * [maxWidth floatValue] * 0.01;
+		}
+	}
+	
+	return [sender bounds].size.width;
+}
+
+// When the window resizes, keep all of the split view subviews at a constant width except for the right most view
+- (void)splitView:(NSSplitView*)sender resizeSubviewsWithOldSize:(NSSize)oldSize
+{
+	NSRect newFrame = [sender frame];
+	float totalDividerThickness = [sender dividerThickness] * ([[sender subviews] count] - 1);
+	float totalSubviewWidth;
+	
+	// Sum the total width of the views except for the right most one
+	int i;
+	for (i = 0; i < [sender subviews].count - 1; i++)
+	{
+		NSView *view = [[sender subviews] objectAtIndex:i];
+		NSRect viewFrame = [view frame];
+		
+		totalSubviewWidth += viewFrame.size.width;
+	}
+	
+	// Calculate the frame for the right most view
+	NSView *lastView = [[sender subviews] lastObject];
+	NSRect lastViewFrame = [lastView frame];
+	lastViewFrame.size.height = newFrame.size.height;
+	lastViewFrame.size.width = newFrame.size.width - totalDividerThickness - totalSubviewWidth;
+	
+	// Workaround for a bug
+	if (newFrame.size.width - totalDividerThickness - totalSubviewWidth == lastViewFrame.size.width)
+	{
+		// Set frames on all views except the right most view
+		int j;
+		for (j = 0; j < [sender subviews].count - 1; j++)
+		{
+			NSView *view = [[sender subviews] objectAtIndex:j];
+			NSRect viewFrame = [view frame];
+			viewFrame.size.height = newFrame.size.height;
+			[view setFrame:viewFrame];
+		}
+		
+		// Set frame on the right most view
+		[lastView setFrame:lastViewFrame];
+	}
+	else
+	{
+		[sender adjustSubviews];
+	}
+}
+
+@end

BWAnchoredButtonBarInspector.h

+//
+//  BWAnchoredButtonBarViewInspector.h
+//  BWToolkit
+//
+//  Created by Brandon Walkin (www.brandonwalkin.com)
+//  All code is provided under the New BSD license.
+//
+
+#import <InterfaceBuilderKit/InterfaceBuilderKit.h>
+
+@interface BWAnchoredButtonBarInspector : IBInspector 
+{
+	IBOutlet NSMatrix *matrix;
+	IBOutlet NSImageView *selectionView;
+	IBOutlet NSView *contentView;
+}
+
+- (IBAction)selectMode1:(id)sender;
+- (IBAction)selectMode2:(id)sender;
+- (IBAction)selectMode3:(id)sender;
+
+@end

BWAnchoredButtonBarInspector.m

+//
+//  BWAnchoredButtonBarViewInspector.m
+//  BWToolkit
+//
+//  Created by Brandon Walkin (www.brandonwalkin.com)
+//  All code is provided under the New BSD license.
+//
+
+#import "BWAnchoredButtonBarInspector.h"
+
+@implementation BWAnchoredButtonBarInspector
+
+- (NSString *)viewNibName {
+    return @"BWAnchoredButtonBarInspector";
+}
+
+- (void)refresh {
+	// Synchronize your inspector's content view with the currently selected objects
+	[super refresh];
+}
+
+- (IBAction)selectMode1:(id)sender
+{
+	float xOrigin = matrix.frame.origin.x-1;
+	float deltaX = fabsf(xOrigin - selectionView.frame.origin.x);
+	float doubleSpaceMultiplier = 1;
+	
+	if (deltaX > 65)
+		doubleSpaceMultiplier = 1.5;
+	
+	float duration = 0.1*doubleSpaceMultiplier;
+	
+	[NSAnimationContext beginGrouping];
+	[[NSAnimationContext currentContext] setDuration:(duration)];
+	[[selectionView animator] setFrameOrigin:NSMakePoint(xOrigin,selectionView.frame.origin.y)];
+	[NSAnimationContext endGrouping];
+	
+	[self performSelector:@selector(resizeInspectorForMode:) withObject:[NSNumber numberWithInt:1] afterDelay:(duration)];
+}
+
+- (IBAction)selectMode2:(id)sender
+{
+	float xOrigin = matrix.frame.origin.x + NSWidth(matrix.frame) / matrix.numberOfColumns;
+	float deltaX = fabsf(xOrigin - selectionView.frame.origin.x);
+	float doubleSpaceMultiplier = 1;
+	
+	if (deltaX > 65)
+		doubleSpaceMultiplier = 1.5;
+	
+	float duration = 0.1*doubleSpaceMultiplier;
+	
+	[NSAnimationContext beginGrouping];
+	[[NSAnimationContext currentContext] setDuration:(duration)];
+	[[selectionView animator] setFrameOrigin:NSMakePoint(xOrigin,selectionView.frame.origin.y)];
+	[NSAnimationContext endGrouping];
+	
+	[self performSelector:@selector(resizeInspectorForMode:) withObject:[NSNumber numberWithInt:2] afterDelay:(duration)];
+}
+
+- (IBAction)selectMode3:(id)sender
+{
+	float xOrigin = NSMaxX(matrix.frame) - NSWidth(matrix.frame) / matrix.numberOfColumns + matrix.numberOfColumns - 1;
+	float deltaX = fabsf(xOrigin - selectionView.frame.origin.x);
+	float doubleSpaceMultiplier = 1;
+	
+	if (deltaX > 65)
+		doubleSpaceMultiplier = 1.5;
+	
+	float duration = 0.1*doubleSpaceMultiplier;
+	
+	[NSAnimationContext beginGrouping];
+	[[NSAnimationContext currentContext] setDuration:(duration)];
+	[[selectionView animator] setFrameOrigin:NSMakePoint(xOrigin,selectionView.frame.origin.y)];
+	[NSAnimationContext endGrouping];
+	
+	[self performSelector:@selector(resizeInspectorForMode:) withObject:[NSNumber numberWithInt:3] afterDelay:(duration)];
+}
+
+-(void)resizeInspectorForMode:(NSNumber *)aMode
+{
+	int mode = [aMode intValue];
+	float animationDuration = 0.16;
+	float smallHeight = 77;
+	float largeHeight = 170;
+	
+	if (mode == 1 && contentView.frame.size.height == smallHeight)
+	{
+		NSSize frameSize = [contentView frame].size;
+		frameSize.height = largeHeight;
+		
+		[NSAnimationContext beginGrouping];
+		[[NSAnimationContext currentContext] setDuration:(animationDuration)];
+		[[contentView animator] setFrameSize:frameSize];
+		[NSAnimationContext endGrouping];
+	}
+	else if ((mode == 2 || mode == 3) && contentView.frame.size.height == largeHeight)
+	{
+		NSSize frameSize = [contentView frame].size;
+		frameSize.height = smallHeight;
+		
+		[NSAnimationContext beginGrouping];
+		[[NSAnimationContext currentContext] setDuration:(animationDuration)];
+		[[contentView animator] setFrameSize:frameSize];
+		[NSAnimationContext endGrouping];
+	}
+}
+
+@end

BWAnchoredButtonBarInspector.xib

+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.03">
+	<data>
+		<int key="IBDocument.SystemTarget">1050</int>
+		<string key="IBDocument.SystemVersion">9E17</string>
+		<string key="IBDocument.InterfaceBuilderVersion">677</string>
+		<string key="IBDocument.AppKitVersion">949.33</string>
+		<string key="IBDocument.HIToolboxVersion">352.00</string>
+		<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+			<bool key="EncodedWithXMLCoder">YES</bool>
+			<integer value="1" id="9"/>
+		</object>
+		<object class="NSArray" key="IBDocument.PluginDependencies">
+			<bool key="EncodedWithXMLCoder">YES</bool>
+			<string>com.apple.InterfaceBuilderKit</string>
+			<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+		</object>
+		<object class="NSMutableDictionary" key="IBDocument.Metadata">
+			<bool key="EncodedWithXMLCoder">YES</bool>
+			<object class="NSArray" key="dict.sortedKeys">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+			</object>
+			<object class="NSMutableArray" key="dict.values">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+			</object>
+		</object>
+		<object class="NSMutableArray" key="IBDocument.RootObjects" id="110858478">
+			<bool key="EncodedWithXMLCoder">YES</bool>
+			<object class="NSCustomObject" id="762632889">
+				<string key="NSClassName">BWAnchoredButtonBarInspector</string>
+			</object>
+			<object class="NSCustomObject" id="932410077">
+				<string key="NSClassName">FirstResponder</string>
+			</object>
+			<object class="NSCustomObject" id="858592610">
+				<string key="NSClassName">NSApplication</string>
+			</object>
+			<object class="NSCustomView" id="537708911">
+				<reference key="NSNextResponder"/>
+				<int key="NSvFlags">268</int>
+				<object class="NSMutableArray" key="NSSubviews">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<object class="NSTextField" id="184291607">
+						<reference key="NSNextResponder" ref="537708911"/>
+						<int key="NSvFlags">268</int>
+						<string key="NSFrame">{{8, 149}, {70, 14}}</string>
+						<reference key="NSSuperview" ref="537708911"/>
+						<bool key="NSEnabled">YES</bool>
+						<object class="NSTextFieldCell" key="NSCell" id="1056778467">
+							<int key="NSCellFlags">67239488</int>
+							<int key="NSCellFlags2">4326400</int>
+							<string key="NSContents">Mode</string>
+							<object class="NSFont" key="NSSupport" id="197904708">
+								<string key="NSName">LucidaGrande-Bold</string>
+								<double key="NSSize">1.100000e+01</double>
+								<int key="NSfFlags">16</int>
+							</object>
+							<reference key="NSControlView" ref="184291607"/>
+							<object class="NSColor" key="NSBackgroundColor" id="556188844">
+								<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">MC42NjY2NjY2OQA</bytes>
+								</object>
+							</object>
+							<object class="NSColor" key="NSTextColor" id="887215734">
+								<int key="NSColorSpace">6</int>
+								<string key="NSCatalogName">System</string>
+								<string key="NSColorName">controlTextColor</string>
+								<object class="NSColor" key="NSColor" id="382472000">
+									<int key="NSColorSpace">3</int>
+									<bytes key="NSWhite">MAA</bytes>
+								</object>
+							</object>
+						</object>
+					</object>
+					<object class="NSMatrix" id="3461072">
+						<reference key="NSNextResponder" ref="537708911"/>
+						<int key="NSvFlags">268</int>
+						<string key="NSFrame">{{82, 96}, {185, 72}}</string>
+						<reference key="NSSuperview" ref="537708911"/>
+						<bool key="NSEnabled">YES</bool>
+						<int key="NSNumRows">1</int>
+						<int key="NSNumCols">3</int>
+						<object class="NSMutableArray" key="NSCells">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<object class="NSButtonCell" id="777969747">
+								<int key="NSCellFlags">-2080244224</int>
+								<int key="NSCellFlags2">0</int>
+								<string key="NSContents"/>
+								<object class="NSFont" key="NSSupport" id="569015772">
+									<string key="NSName">LucidaGrande</string>
+									<double key="NSSize">1.300000e+01</double>
+									<int key="NSfFlags">1044</int>
+								</object>
+								<int key="NSTag">1</int>
+								<reference key="NSControlView" ref="3461072"/>
+								<int key="NSButtonFlags">142360831</int>
+								<int key="NSButtonFlags2">128</int>
+								<object class="NSCustomResource" key="NSNormalImage">
+									<string key="NSClassName">NSImage</string>
+									<string key="NSResourceName">Inspector-ButtonBarMode2</string>
+								</object>
+								<object class="NSCustomResource" key="NSAlternateImage">
+									<string key="NSClassName">NSImage</string>
+									<string key="NSResourceName">Inspector-ButtonBarMode2Pressed</string>
+								</object>
+								<string key="NSAlternateContents"/>
+								<string key="NSKeyEquivalent"/>
+								<int key="NSPeriodicDelay">200</int>
+								<int key="NSPeriodicInterval">25</int>
+							</object>
+							<object class="NSButtonCell" id="1006665412">
+								<int key="NSCellFlags">67239424</int>
+								<int key="NSCellFlags2">0</int>
+								<string key="NSContents"/>
+								<reference key="NSSupport" ref="569015772"/>
+								<reference key="NSControlView" ref="3461072"/>
+								<int key="NSButtonFlags">142360831</int>
+								<int key="NSButtonFlags2">128</int>
+								<object class="NSCustomResource" key="NSNormalImage">
+									<string key="NSClassName">NSImage</string>
+									<string key="NSResourceName">Inspector-ButtonBarMode1</string>
+								</object>
+								<object class="NSCustomResource" key="NSAlternateImage">
+									<string key="NSClassName">NSImage</string>
+									<string key="NSResourceName">Inspector-ButtonBarMode1Pressed</string>
+								</object>
+								<int key="NSPeriodicDelay">400</int>
+								<int key="NSPeriodicInterval">75</int>
+							</object>
+							<object class="NSButtonCell" id="211863971">
+								<int key="NSCellFlags">67239424</int>
+								<int key="NSCellFlags2">0</int>
+								<string key="NSContents"/>
+								<reference key="NSSupport" ref="569015772"/>
+								<reference key="NSControlView" ref="3461072"/>
+								<int key="NSButtonFlags">142360831</int>
+								<int key="NSButtonFlags2">128</int>
+								<object class="NSCustomResource" key="NSNormalImage">
+									<string key="NSClassName">NSImage</string>
+									<string key="NSResourceName">Inspector-ButtonBarMode3</string>
+								</object>
+								<object class="NSCustomResource" key="NSAlternateImage">
+									<string key="NSClassName">NSImage</string>
+									<string key="NSResourceName">Inspector-ButtonBarMode3Pressed</string>
+								</object>
+								<int key="NSPeriodicDelay">400</int>
+								<int key="NSPeriodicInterval">75</int>
+							</object>
+						</object>
+						<string key="NSCellSize">{59, 72}</string>
+						<string key="NSIntercellSpacing">{4, 2}</string>
+						<int key="NSMatrixFlags">1151868928</int>
+						<string key="NSCellClass">NSActionCell</string>
+						<object class="NSButtonCell" key="NSProtoCell" id="592270554">
+							<int key="NSCellFlags">67239424</int>
+							<int key="NSCellFlags2">0</int>
+							<string key="NSContents">Radio</string>
+							<reference key="NSSupport" ref="569015772"/>
+							<int key="NSButtonFlags">1211912703</int>
+							<int key="NSButtonFlags2">128</int>
+							<object class="NSImage" key="NSNormalImage">
+								<int key="NSImageFlags">549453824</int>
+								<string key="NSSize">{18, 18}</string>
+								<object class="NSMutableArray" key="NSReps">
+									<bool key="EncodedWithXMLCoder">YES</bool>
+									<object class="NSArray">
+										<bool key="EncodedWithXMLCoder">YES</bool>
+										<integer value="0"/>
+										<object class="NSBitmapImageRep">
+											<object class="NSData" key="NSTIFFRepresentation">
+												<bytes key="NS.bytes">TU0AKgAABRgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAADwRERGLJycnySsrK/A1NTXw
+IyMjyRwcHIsJCQk8AAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFRUVdVBQUOCoqKj/
+29vb//n5+f/6+vr/2tra/6qqqv9UVFTgHx8fdQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUZGRl5
+dXV198PDw//8/Pz////////////////////////////U1NT/fHx89yUlJXkAAAAFAAAAAAAAAAAAAAAA
+AAAAAxEREUZqamrmtbW1/+3t7f/+/v7//v7+//7+/v/9/f3//f39//39/f/39/f/xMTE/3d3d+YZGRlG
+AAAAAwAAAAAAAAAAAAAACkJCQqGtra3/xsbG/+vr6//y8vL/9fX1//X19f/z8/P/9fX1//Ly8v/u7u7/
+0tLS/6+vr/9KSkqhAAAACgAAAAAAAAAAAAAAF3h4eN2/v7//z8/P/93d3f/q6ur/7+/v/+/v7//w8PD/
+7e3t/+3t7f/i4uL/zs7O/8XFxf98fHzdAAAAFwAAAAAAAAADAAAAJKSkpPjOzs7/2dnZ/+Dg4P/i4uL/
+5eXl/+bm5v/n5+f/5eXl/+Li4v/e3t7/2tra/9DQ0P+srKz4AAAAJAAAAAMAAAADAAAALrCwsPrW1tb/
+3t7e/+Tk5P/p6en/6+vr/+zs7P/p6en/6+vr/+fn5//k5OT/4ODg/9nZ2f+zs7P6AAAALgAAAAMAAAAD
+AAAALp2dnezg4OD/5eXl/+rq6v/u7u7/8PDw//Dw8P/x8fH/8PDw/+7u7v/q6ur/5ubm/+Hh4f+ZmZns
+AAAALgAAAAMAAAADAAAAJG5ubs/l5eX/6enp/+/v7//y8vL/9vb2//r6+v/5+fn/9/f3//b29v/x8fH/
+6+vr/+Tk5P9ra2vPAAAAJAAAAAMAAAAAAAAAFy4uLpPCwsL67Ozs//Pz8//5+fn//v7+//7+/v/+/v7/
+/v7+//v7+//19fX/8PDw/8LCwvosLCyTAAAAFwAAAAAAAAAAAAAACgAAAENfX1/S5OTk/vn5+f/+/v7/
+///////////////////////////8/Pz/5ubm/l9fX9IAAABDAAAACgAAAAAAAAAAAAAAAwAAABcAAABl
+YmJi3NLS0v3////////////////////////////////V1dX9ZGRk3AAAAGUAAAAXAAAAAwAAAAAAAAAA
+AAAAAAAAAAUAAAAfAAAAZTMzM8KAgIDwv7+//O3t7f/t7e3/v7+//ICAgPAzMzPCAAAAZQAAAB8AAAAF
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAFwAAAEMAAAB3AAAAnwAAALMAAACzAAAAnwAAAHcAAABD
+AAAAFwAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAoAAAAXAAAAJAAAAC4AAAAu
+AAAAJAAAABcAAAAKAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAwAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADQEAAAMAAAABABIAAAEB
+AAMAAAABABIAAAECAAMAAAAEAAAFugEDAAMAAAABAAEAAAEGAAMAAAABAAIAAAERAAQAAAABAAAACAES
+AAMAAAABAAEAAAEVAAMAAAABAAQAAAEWAAMAAAABBxwAAAEXAAQAAAABAAAFEAEcAAMAAAABAAEAAAFS
+AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
+											</object>
+										</object>
+									</object>
+								</object>
+								<object class="NSColor" key="NSColor">
+									<int key="NSColorSpace">3</int>
+									<bytes key="NSWhite">MCAwAA</bytes>
+								</object>
+							</object>
+							<object class="NSButtonImageSource" key="NSAlternateImage">
+								<string key="NSImageName">NSRadioButton</string>
+							</object>
+							<int key="NSPeriodicDelay">400</int>
+							<int key="NSPeriodicInterval">75</int>
+						</object>
+						<reference key="NSSelectedCell" ref="777969747"/>
+						<reference key="NSBackgroundColor" ref="556188844"/>
+						<object class="NSColor" key="NSCellBackgroundColor" id="447356778">
+							<int key="NSColorSpace">3</int>
+							<bytes key="NSWhite">MQA</bytes>
+						</object>
+						<reference key="NSFont" ref="569015772"/>
+					</object>
+					<object class="NSImageView" id="648774205">
+						<reference key="NSNextResponder" ref="537708911"/>
+						<int key="NSvFlags">268</int>
+						<object class="NSMutableSet" key="NSDragTypes">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<object class="NSMutableArray" key="set.sortedObjects">
+								<bool key="EncodedWithXMLCoder">YES</bool>
+								<string>Apple PDF pasteboard type</string>
+								<string>Apple PICT pasteboard type</string>
+								<string>Apple PNG pasteboard type</string>
+								<string>NSFilenamesPboardType</string>
+								<string>NeXT Encapsulated PostScript v1.2 pasteboard type</string>
+								<string>NeXT TIFF v4.0 pasteboard type</string>
+							</object>
+						</object>
+						<string key="NSFrame">{{81, 99}, {61, 66}}</string>
+						<reference key="NSSuperview" ref="537708911"/>
+						<bool key="NSEnabled">YES</bool>
+						<object class="NSImageCell" key="NSCell" id="86113623">
+							<int key="NSCellFlags">130560</int>
+							<int key="NSCellFlags2">33554432</int>
+							<object class="NSCustomResource" key="NSContents">
+								<string key="NSClassName">NSImage</string>
+								<string key="NSResourceName">Inspector-ButtonBarModeSelection</string>
+							</object>
+							<int key="NSAlign">0</int>
+							<int key="NSScale">0</int>
+							<int key="NSStyle">0</int>
+							<bool key="NSAnimates">YES</bool>
+						</object>
+						<bool key="NSEditable">YES</bool>
+					</object>
+					<object class="NSTextField" id="631416897">
+						<reference key="NSNextResponder" ref="537708911"/>
+						<int key="NSvFlags">268</int>
+						<string key="NSFrame">{{8, 66}, {70, 14}}</string>
+						<reference key="NSSuperview" ref="537708911"/>
+						<bool key="NSEnabled">YES</bool>
+						<object class="NSTextFieldCell" key="NSCell" id="806045107">
+							<int key="NSCellFlags">67239488</int>
+							<int key="NSCellFlags2">4326400</int>
+							<string key="NSContents">Split View</string>
+							<reference key="NSSupport" ref="197904708"/>
+							<reference key="NSControlView" ref="631416897"/>
+							<reference key="NSBackgroundColor" ref="556188844"/>
+							<reference key="NSTextColor" ref="887215734"/>
+						</object>
+					</object>
+					<object class="NSTextField" id="811250512">
+						<reference key="NSNextResponder" ref="537708911"/>
+						<int key="NSvFlags">268</int>
+						<string key="NSFrame">{{81, 48}, {88, 14}}</string>
+						<reference key="NSSuperview" ref="537708911"/>
+						<bool key="NSEnabled">YES</bool>
+						<object class="NSTextFieldCell" key="NSCell" id="417877414">
+							<int key="NSCellFlags">67239488</int>
+							<int key="NSCellFlags2">4326400</int>
+							<string key="NSContents">Min Width</string>
+							<object class="NSFont" key="NSSupport" id="815128650">
+								<string key="NSName">LucidaGrande</string>
+								<double key="NSSize">1.100000e+01</double>
+								<int key="NSfFlags">16</int>
+							</object>
+							<reference key="NSControlView" ref="811250512"/>
+							<reference key="NSBackgroundColor" ref="556188844"/>
+							<reference key="NSTextColor" ref="887215734"/>
+						</object>
+					</object>
+					<object class="NSTextField" id="970210030">
+						<reference key="NSNextResponder" ref="537708911"/>
+						<int key="NSvFlags">268</int>
+						<string key="NSFrame">{{84, 64}, {58, 19}}</string>
+						<reference key="NSSuperview" ref="537708911"/>
+						<bool key="NSEnabled">YES</bool>
+						<object class="NSTextFieldCell" key="NSCell" id="21823992">
+							<int key="NSCellFlags">-1804468671</int>
+							<int key="NSCellFlags2">71435264</int>
+							<string key="NSContents"/>
+							<object class="NSFont" key="NSSupport" id="26">
+								<string key="NSName">LucidaGrande</string>
+								<double key="NSSize">1.100000e+01</double>
+								<int key="NSfFlags">3100</int>
+							</object>
+							<reference key="NSControlView" ref="970210030"/>
+							<bool key="NSDrawsBackground">YES</bool>
+							<object class="NSColor" key="NSBackgroundColor" id="645574152">
+								<int key="NSColorSpace">6</int>
+								<string key="NSCatalogName">System</string>
+								<string key="NSColorName">textBackgroundColor</string>
+								<reference key="NSColor" ref="447356778"/>
+							</object>
+							<object class="NSColor" key="NSTextColor" id="483471883">
+								<int key="NSColorSpace">6</int>
+								<string key="NSCatalogName">System</string>
+								<string key="NSColorName">textColor</string>
+								<reference key="NSColor" ref="382472000"/>
+							</object>
+						</object>
+					</object>
+					<object class="NSPopUpButton" id="564544544">
+						<reference key="NSNextResponder" ref="537708911"/>
+						<int key="NSvFlags">268</int>
+						<string key="NSFrame">{{147, 61}, {83, 22}}</string>
+						<reference key="NSSuperview" ref="537708911"/>
+						<bool key="NSEnabled">YES</bool>
+						<object class="NSPopUpButtonCell" key="NSCell" id="792685253">
+							<int key="NSCellFlags">-2076049856</int>
+							<int key="NSCellFlags2">133120</int>
+							<reference key="NSSupport" ref="26"/>
+							<reference key="NSControlView" ref="564544544"/>
+							<int key="NSButtonFlags">109199615</int>
+							<int key="NSButtonFlags2">129</int>
+							<reference key="NSAlternateImage" ref="26"/>
+							<string key="NSAlternateContents"/>
+							<string key="NSKeyEquivalent"/>
+							<int key="NSPeriodicDelay">400</int>
+							<int key="NSPeriodicInterval">75</int>
+							<object class="NSMenuItem" key="NSMenuItem" id="656539876">
+								<reference key="NSMenu" ref="787315346"/>
+								<string key="NSTitle">points</string>
+								<string key="NSKeyEquiv"/>
+								<int key="NSKeyEquivModMask">1048576</int>
+								<int key="NSMnemonicLoc">2147483647</int>
+								<int key="NSState">1</int>
+								<object class="NSCustomResource" key="NSOnImage" id="215537861">
+									<string key="NSClassName">NSImage</string>
+									<string key="NSResourceName">NSMenuCheckmark</string>
+								</object>
+								<object class="NSCustomResource" key="NSMixedImage" id="145896814">
+									<string key="NSClassName">NSImage</string>
+									<string key="NSResourceName">NSMenuMixedState</string>
+								</object>
+								<string key="NSAction">_popUpItemAction:</string>
+								<reference key="NSTarget" ref="792685253"/>
+							</object>
+							<bool key="NSMenuItemRespectAlignment">YES</bool>
+							<object class="NSMenu" key="NSMenu" id="787315346">
+								<string key="NSTitle">OtherViews</string>
+								<object class="NSMutableArray" key="NSMenuItems">
+									<bool key="EncodedWithXMLCoder">YES</bool>
+									<reference ref="656539876"/>
+									<object class="NSMenuItem" id="26319146">
+										<reference key="NSMenu" ref="787315346"/>
+										<string key="NSTitle">%</string>
+										<string key="NSKeyEquiv"/>
+										<int key="NSKeyEquivModMask">1048576</int>
+										<int key="NSMnemonicLoc">2147483647</int>
+										<reference key="NSOnImage" ref="215537861"/>
+										<reference key="NSMixedImage" ref="145896814"/>
+										<string key="NSAction">_popUpItemAction:</string>
+										<reference key="NSTarget" ref="792685253"/>
+									</object>
+								</object>
+							</object>
+							<int key="NSPreferredEdge">1</int>
+							<bool key="NSUsesItemFromMenu">YES</bool>
+							<bool key="NSAltersState">YES</bool>
+							<int key="NSArrowPosition">2</int>
+						</object>
+					</object>
+					<object class="NSTextField" id="891103430">
+						<reference key="NSNextResponder" ref="537708911"/>
+						<int key="NSvFlags">268</int>
+						<string key="NSFrame">{{81, 5}, {91, 14}}</string>
+						<reference key="NSSuperview" ref="537708911"/>
+						<bool key="NSEnabled">YES</bool>
+						<object class="NSTextFieldCell" key="NSCell" id="1015262462">
+							<int key="NSCellFlags">67239488</int>
+							<int key="NSCellFlags2">4326400</int>
+							<string key="NSContents">Max Width</string>
+							<reference key="NSSupport" ref="815128650"/>
+							<reference key="NSControlView" ref="891103430"/>
+							<reference key="NSBackgroundColor" ref="556188844"/>
+							<reference key="NSTextColor" ref="887215734"/>
+						</object>
+					</object>
+					<object class="NSTextField" id="715584956">
+						<reference key="NSNextResponder" ref="537708911"/>
+						<int key="NSvFlags">268</int>
+						<string key="NSFrame">{{84, 21}, {58, 19}}</string>
+						<reference key="NSSuperview" ref="537708911"/>
+						<bool key="NSEnabled">YES</bool>
+						<object class="NSTextFieldCell" key="NSCell" id="477820425">
+							<int key="NSCellFlags">-1804468671</int>
+							<int key="NSCellFlags2">71435264</int>
+							<string key="NSContents"/>
+							<reference key="NSSupport" ref="26"/>
+							<reference key="NSControlView" ref="715584956"/>
+							<bool key="NSDrawsBackground">YES</bool>
+							<reference key="NSBackgroundColor" ref="645574152"/>
+							<reference key="NSTextColor" ref="483471883"/>
+						</object>
+					</object>
+					<object class="NSPopUpButton" id="633923075">
+						<reference key="NSNextResponder" ref="537708911"/>
+						<int key="NSvFlags">268</int>
+						<string key="NSFrame">{{147, 18}, {83, 22}}</string>
+						<reference key="NSSuperview" ref="537708911"/>
+						<bool key="NSEnabled">YES</bool>
+						<object class="NSPopUpButtonCell" key="NSCell" id="474886861">
+							<int key="NSCellFlags">-2076049856</int>
+							<int key="NSCellFlags2">133120</int>
+							<reference key="NSSupport" ref="26"/>
+							<reference key="NSControlView" ref="633923075"/>
+							<int key="NSButtonFlags">109199615</int>
+							<int key="NSButtonFlags2">129</int>
+							<reference key="NSAlternateImage" ref="26"/>
+							<string key="NSAlternateContents"/>
+							<string key="NSKeyEquivalent"/>
+							<int key="NSPeriodicDelay">400</int>
+							<int key="NSPeriodicInterval">75</int>
+							<object class="NSMenuItem" key="NSMenuItem" id="563288992">
+								<reference key="NSMenu" ref="154885631"/>
+								<string key="NSTitle">points</string>
+								<string key="NSKeyEquiv"/>
+								<int key="NSKeyEquivModMask">1048576</int>
+								<int key="NSMnemonicLoc">2147483647</int>
+								<int key="NSState">1</int>
+								<reference key="NSOnImage" ref="215537861"/>
+								<reference key="NSMixedImage" ref="145896814"/>
+								<string key="NSAction">_popUpItemAction:</string>
+								<reference key="NSTarget" ref="474886861"/>
+							</object>
+							<bool key="NSMenuItemRespectAlignment">YES</bool>
+							<object class="NSMenu" key="NSMenu" id="154885631">
+								<string key="NSTitle">OtherViews</string>
+								<object class="NSMutableArray" key="NSMenuItems">
+									<bool key="EncodedWithXMLCoder">YES</bool>
+									<reference ref="563288992"/>
+									<object class="NSMenuItem" id="582166788">
+										<reference key="NSMenu" ref="154885631"/>
+										<string key="NSTitle">%</string>
+										<string key="NSKeyEquiv"/>
+										<int key="NSKeyEquivModMask">1048576</int>
+										<int key="NSMnemonicLoc">2147483647</int>
+										<reference key="NSOnImage" ref="215537861"/>
+										<reference key="NSMixedImage" ref="145896814"/>
+										<string key="NSAction">_popUpItemAction:</string>
+										<reference key="NSTarget" ref="474886861"/>
+									</object>
+								</object>
+							</object>
+							<int key="NSPreferredEdge">1</int>
+							<bool key="NSUsesItemFromMenu">YES</bool>
+							<bool key="NSAltersState">YES</bool>
+							<int key="NSArrowPosition">2</int>
+						</object>
+					</object>
+				</object>
+				<string key="NSFrameSize">{272, 170}</string>
+				<reference key="NSSuperview"/>
+				<string key="NSClassName">NSView</string>
+			</object>
+		</object>
+		<object class="IBObjectContainer" key="IBDocument.Objects">
+			<object class="NSMutableArray" key="connectionRecords">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">inspectorView</string>
+						<reference key="source" ref="762632889"/>
+						<reference key="destination" ref="537708911"/>
+					</object>
+					<int key="connectionID">16</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBBindingConnection" key="connection">
+						<string key="label">selectedIndex: inspectedObjectsController.selection.selectedIndex</string>
+						<reference key="source" ref="3461072"/>
+						<reference key="destination" ref="762632889"/>
+						<object class="NSNibBindingConnector" key="connector">
+							<reference key="NSSource" ref="3461072"/>
+							<reference key="NSDestination" ref="762632889"/>
+							<string key="NSLabel">selectedIndex: inspectedObjectsController.selection.selectedIndex</string>
+							<string key="NSBinding">selectedIndex</string>
+							<string key="NSKeyPath">inspectedObjectsController.selection.selectedIndex</string>
+							<int key="NSNibBindingConnectorVersion">2</int>
+						</object>
+					</object>
+					<int key="connectionID">142</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">selectionView</string>
+						<reference key="source" ref="762632889"/>
+						<reference key="destination" ref="648774205"/>
+					</object>
+					<int key="connectionID">154</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">selectMode1:</string>
+						<reference key="source" ref="762632889"/>
+						<reference key="destination" ref="777969747"/>
+					</object>
+					<int key="connectionID">155</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">selectMode2:</string>
+						<reference key="source" ref="762632889"/>
+						<reference key="destination" ref="1006665412"/>
+					</object>
+					<int key="connectionID">156</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">selectMode3:</string>
+						<reference key="source" ref="762632889"/>
+						<reference key="destination" ref="211863971"/>
+					</object>
+					<int key="connectionID">157</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">matrix</string>
+						<reference key="source" ref="762632889"/>
+						<reference key="destination" ref="3461072"/>
+					</object>
+					<int key="connectionID">161</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">contentView</string>
+						<reference key="source" ref="762632889"/>
+						<reference key="destination" ref="537708911"/>
+					</object>
+					<int key="connectionID">200</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBBindingConnection" key="connection">
+						<string key="label">selectedIndex: inspectedObjectsController.selection.selectedMinWidthUnit</string>
+						<reference key="source" ref="564544544"/>
+						<reference key="destination" ref="762632889"/>
+						<object class="NSNibBindingConnector" key="connector">
+							<reference key="NSSource" ref="564544544"/>
+							<reference key="NSDestination" ref="762632889"/>
+							<string key="NSLabel">selectedIndex: inspectedObjectsController.selection.selectedMinWidthUnit</string>
+							<string key="NSBinding">selectedIndex</string>
+							<string key="NSKeyPath">inspectedObjectsController.selection.selectedMinWidthUnit</string>
+							<int key="NSNibBindingConnectorVersion">2</int>
+						</object>
+					</object>
+					<int key="connectionID">202</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBBindingConnection" key="connection">
+						<string key="label">selectedIndex: inspectedObjectsController.selection.selectedMaxWidthUnit</string>
+						<reference key="source" ref="633923075"/>
+						<reference key="destination" ref="762632889"/>
+						<object class="NSNibBindingConnector" key="connector">
+							<reference key="NSSource" ref="633923075"/>
+							<reference key="NSDestination" ref="762632889"/>
+							<string key="NSLabel">selectedIndex: inspectedObjectsController.selection.selectedMaxWidthUnit</string>
+							<string key="NSBinding">selectedIndex</string>
+							<string key="NSKeyPath">inspectedObjectsController.selection.selectedMaxWidthUnit</string>
+							<int key="NSNibBindingConnectorVersion">2</int>
+						</object>
+					</object>
+					<int key="connectionID">204</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBBindingConnection" key="connection">
+						<string key="label">value: inspectedObjectsController.selection.minWidth</string>
+						<reference key="source" ref="970210030"/>
+						<reference key="destination" ref="762632889"/>
+						<object class="NSNibBindingConnector" key="connector">
+							<reference key="NSSource" ref="970210030"/>
+							<reference key="NSDestination" ref="762632889"/>
+							<string key="NSLabel">value: inspectedObjectsController.selection.minWidth</string>
+							<string key="NSBinding">value</string>
+							<string key="NSKeyPath">inspectedObjectsController.selection.minWidth</string>
+							<int key="NSNibBindingConnectorVersion">2</int>
+						</object>
+					</object>
+					<int key="connectionID">205</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBBindingConnection" key="connection">
+						<string key="label">value: inspectedObjectsController.selection.maxWidth</string>
+						<reference key="source" ref="715584956"/>
+						<reference key="destination" ref="762632889"/>
+						<object class="NSNibBindingConnector" key="connector">
+							<reference key="NSSource" ref="715584956"/>
+							<reference key="NSDestination" ref="762632889"/>
+							<string key="NSLabel">value: inspectedObjectsController.selection.maxWidth</string>
+							<string key="NSBinding">value</string>
+							<string key="NSKeyPath">inspectedObjectsController.selection.maxWidth</string>
+							<int key="NSNibBindingConnectorVersion">2</int>
+						</object>
+					</object>
+					<int key="connectionID">207</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="485438096">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+						</object>
+						<reference key="children" ref="110858478"/>
+						<nil key="parent"/>
+					</object>