aboutsummaryrefslogtreecommitdiff
path: root/AppKit
diff options
context:
space:
mode:
authorGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2010-03-09 20:36:55 +0000
committerGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2010-03-09 20:36:55 +0000
commitf736aed5642b3c7f19533653e1ddfd4599f1ee7d (patch)
tree22b044ba2b807e5903853958c2bb9d6de9561751 /AppKit
parent0f6b25f7efe11c2a4102b2d74c5f57ddfab341c1 (diff)
[Author: thomasvl]
Add an api for forcing a NSTextField to a fixed height but what ever width is needed. R=dmaclach DELTA=634 (631 added, 0 deleted, 3 changed)
Diffstat (limited to 'AppKit')
-rw-r--r--AppKit/GTMUILocalizerAndLayoutTweaker.h16
-rw-r--r--AppKit/GTMUILocalizerAndLayoutTweaker.m77
-rw-r--r--AppKit/GTMUILocalizerAndLayoutTweakerTest.m57
-rw-r--r--AppKit/GTMUILocalizerAndLayoutTweakerTest7.xib443
-rw-r--r--AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest7-Min-0.tiffbin0 -> 10640 bytes
-rw-r--r--AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest7-Min-1.tiffbin0 -> 12170 bytes
-rw-r--r--AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest7-Min-2.tiffbin0 -> 19638 bytes
-rw-r--r--AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest7-Min-3.tiffbin0 -> 22596 bytes
-rw-r--r--AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest7-NoMin-0.tiffbin0 -> 10890 bytes
-rw-r--r--AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest7-NoMin-1.tiffbin0 -> 12842 bytes
-rw-r--r--AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest7-NoMin-2.tiffbin0 -> 20578 bytes
-rw-r--r--AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest7-NoMin-3.tiffbin0 -> 22904 bytes
12 files changed, 590 insertions, 3 deletions
diff --git a/AppKit/GTMUILocalizerAndLayoutTweaker.h b/AppKit/GTMUILocalizerAndLayoutTweaker.h
index edbfc25..4a9b666 100644
--- a/AppKit/GTMUILocalizerAndLayoutTweaker.h
+++ b/AppKit/GTMUILocalizerAndLayoutTweaker.h
@@ -56,11 +56,21 @@
// Returns the amount the field changed height.
+ (CGFloat)sizeToFitFixedWidthTextField:(NSTextField *)textField;
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
+// If you call sizeToFit on a NSTextField it will try not to word wrap, so it
+// can get really wide. This method will keep the height fixed, but figure out
+// how wide the textfield needs to be to fit its text.
+// Returns the amount the field changed width.
++ (CGFloat)sizeToFitFixedHeightTextField:(NSTextField *)textField;
++ (CGFloat)sizeToFitFixedHeightTextField:(NSTextField *)textField
+ minWidth:(NSUInteger)minWidth;
+#endif // MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
+
// Insert newlines into the title of the button (radio or checkbox) or all cells
// in the radio group (NSMatrix) so they will word wrap to the item's current
-// width. Then +sizeToFitView can be called to have then resize to the exact
-// width and height needed. Note: any existing Opt-Return forced wraps are
-// removed from the existing titles.
+// width. Then +sizeToFitView can be called to then resize to the exact width
+// and height needed. Note: any existing Opt-Return forced wraps are removed
+// from the existing titles.
+ (void)wrapButtonTitleForWidth:(NSButton *)button;
+ (void)wrapRadioGroupForWidth:(NSMatrix *)radioGroup;
diff --git a/AppKit/GTMUILocalizerAndLayoutTweaker.m b/AppKit/GTMUILocalizerAndLayoutTweaker.m
index 94bb637..6c1ae78 100644
--- a/AppKit/GTMUILocalizerAndLayoutTweaker.m
+++ b/AppKit/GTMUILocalizerAndLayoutTweaker.m
@@ -265,6 +265,83 @@ static BOOL IsRightAnchored(NSView *view);
}
}
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
+
++ (CGFloat)sizeToFitFixedHeightTextField:(NSTextField *)textField {
+ return [self sizeToFitFixedHeightTextField:textField minWidth:(CGFloat)0];
+}
+
++ (CGFloat)sizeToFitFixedHeightTextField:(NSTextField *)textField
+ minWidth:(NSUInteger)minWidth {
+ NSRect initialRect = [textField frame];
+ NSCell *cell = [textField cell];
+ NSSize titleSize = [cell titleRectForBounds:initialRect].size;
+
+ // Find linebreak point, and keep trying them until we're under the height
+ // requested.
+ NSString *str = [textField stringValue];
+ CFStringTokenizerRef tokenizer =
+ CFStringTokenizerCreate(NULL,
+ (CFStringRef)str,
+ CFRangeMake(0, [str length]),
+ kCFStringTokenizerUnitLineBreak,
+ NULL);
+ if (!tokenizer) {
+ _GTMDevAssert(tokenizer, @"failed to get a tokenizer");
+ return 0.0;
+ }
+ NSCell *workerCell = [cell copy];
+ NSCharacterSet *whiteSpaceSet = [NSCharacterSet whitespaceCharacterSet];
+
+ // Loop trying line break points until the height fits.
+ while (1) {
+ CFStringTokenizerTokenType tokenType =
+ CFStringTokenizerAdvanceToNextToken(tokenizer);
+ if (tokenType == kCFStringTokenizerTokenNone) {
+ // Reached the end without ever find a good width, how?
+ _GTMDevAssert(0, @"Failed to find a good size?!");
+ [textField sizeToFit];
+ break;
+ }
+ CFRange tokenRange = CFStringTokenizerGetCurrentTokenRange(tokenizer);
+
+ NSRange subStringRange =
+ NSMakeRange(0, tokenRange.location + tokenRange.length);
+ NSString *subString = [str substringWithRange:subStringRange];
+ subString = [subString stringByTrimmingCharactersInSet:whiteSpaceSet];
+
+ // Find how wide the cell would be for this sub string.
+ [workerCell setStringValue:subString];
+ CGFloat testWidth = [workerCell cellSize].width;
+
+ // Find the overall size if wrapped to this width.
+ NSRect sizeRect = NSMakeRect(0, 0, testWidth, CGFLOAT_MAX);
+ NSSize newSize = [cell cellSizeForBounds:sizeRect];
+ if (newSize.height <= titleSize.height) {
+ [textField setFrameSize:newSize];
+ break;
+ }
+ }
+
+ CFRelease(tokenizer);
+
+ NSSize fixedSize = [textField frame].size;
+ NSSize finalSize = NSMakeSize(fixedSize.width, NSHeight(initialRect));
+
+ // Enforce the minWidth
+ if (minWidth > fixedSize.width) {
+ finalSize.width = minWidth;
+ }
+ if (!NSEqualSizes(fixedSize, finalSize)) {
+ [textField setFrameSize:finalSize];
+ }
+
+ // Return how much things changed
+ return NSWidth(initialRect) - finalSize.width;
+}
+
+#endif // MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
+
+ (void)resizeWindowWithoutAutoResizingSubViews:(NSWindow*)window
delta:(NSSize)delta {
NSView *contentView = [window contentView];
diff --git a/AppKit/GTMUILocalizerAndLayoutTweakerTest.m b/AppKit/GTMUILocalizerAndLayoutTweakerTest.m
index fed8359..d5b111c 100644
--- a/AppKit/GTMUILocalizerAndLayoutTweakerTest.m
+++ b/AppKit/GTMUILocalizerAndLayoutTweakerTest.m
@@ -211,6 +211,63 @@ static NSUInteger gTestPass = 0;
}
}
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
+- (void)testSizeToFitFixedHeightTextField {
+ struct {
+ const char *name;
+ NSUInteger minWidth;
+ } kTestModes[] = {
+ { "NoMin", 0 },
+ { "Min", 450 },
+ };
+ NSString *kTestStrings[] = {
+ @"The fox jumps the dog.",
+ @"The quick brown fox jumps over the lazy dog.",
+ @"The quick brown fox jumps over the lazy dog. The quick brown fox jumps "
+ @"over the lazy dog. The quick brown fox jumps over the lazy dog. "
+ @"The quick brown fox jumps over the lazy dog. The quick brown fox "
+ @"jumps over the lazy dog.",
+ @"The quick brown fox jumps over the lazy dog. The quick brown fox jumps "
+ @"over the lazy dog. The quick brown fox jumps over the lazy dog. "
+ @"The quick brown fox jumps over the lazy dog. The quick brown fox "
+ @"jumps over the lazy dog. The quick brown fox jumps over the lazy "
+ @"dog. The quick brown fox jumps over the lazy dog. The End.",
+ };
+ for (size_t modeLoop = 0;
+ modeLoop < (sizeof(kTestModes) / sizeof(kTestModes[0]));
+ ++modeLoop) {
+ for (size_t lp = 0;
+ lp < (sizeof(kTestStrings) / sizeof(kTestStrings[0]));
+ ++lp) {
+ GTMUILocalizerAndLayoutTweakerTestWindowController *controller =
+ [[GTMUILocalizerAndLayoutTweakerTestWindowController alloc]
+ initWithWindowNibName:@"GTMUILocalizerAndLayoutTweakerTest7"];
+ NSWindow *window = [controller window];
+ STAssertNotNil(window, @"Pass %zu", lp);
+ NSTextField *field;
+ GTM_FOREACH_OBJECT(field, [[window contentView] subviews]) {
+ STAssertTrue([field isMemberOfClass:[NSTextField class]],
+ @"Pass %zu", lp);
+ [field setStringValue:kTestStrings[lp]];
+ NSUInteger minWidth = kTestModes[modeLoop].minWidth;
+ if (minWidth) {
+ [GTMUILocalizerAndLayoutTweaker sizeToFitFixedHeightTextField:field
+ minWidth:minWidth];
+ } else {
+ [GTMUILocalizerAndLayoutTweaker sizeToFitFixedHeightTextField:field];
+ }
+ }
+ NSString *imageName =
+ [NSString stringWithFormat:@"GTMUILocalizerAndLayoutTweakerTest7-%s-%ld",
+ kTestModes[modeLoop].name, (long)lp];
+ GTMAssertObjectImageEqualToImageNamed(window, imageName,
+ @"Pass %zu-%zu", modeLoop, lp);
+ [controller release];
+ }
+ }
+}
+#endif // MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
+
@end
@implementation GTMUILocalizerAndLayoutTweakerTestWindowController
diff --git a/AppKit/GTMUILocalizerAndLayoutTweakerTest7.xib b/AppKit/GTMUILocalizerAndLayoutTweakerTest7.xib
new file mode 100644
index 0000000..04b30e4
--- /dev/null
+++ b/AppKit/GTMUILocalizerAndLayoutTweakerTest7.xib
@@ -0,0 +1,443 @@
+<?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">9L30</string>
+ <string key="IBDocument.InterfaceBuilderVersion">680</string>
+ <string key="IBDocument.AppKitVersion">949.54</string>
+ <string key="IBDocument.HIToolboxVersion">353.00</string>
+ <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <integer value="2"/>
+ </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="1000">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSCustomObject" id="1001">
+ <string key="NSClassName">GTMUILocalizerAndLayoutTweakerTestWindowController</string>
+ </object>
+ <object class="NSCustomObject" id="1003">
+ <string key="NSClassName">FirstResponder</string>
+ </object>
+ <object class="NSCustomObject" id="1004">
+ <string key="NSClassName">NSApplication</string>
+ </object>
+ <object class="NSWindowTemplate" id="1005">
+ <int key="NSWindowStyleMask">3</int>
+ <int key="NSWindowBacking">2</int>
+ <string key="NSWindowRect">{{123, 807}, {475, 308}}</string>
+ <int key="NSWTFlags">536870912</int>
+ <string key="NSWindowTitle">Window7</string>
+ <string key="NSWindowClass">NSWindow</string>
+ <nil key="NSViewClass"/>
+ <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
+ <object class="NSView" key="NSWindowView" id="1006">
+ <reference key="NSNextResponder"/>
+ <int key="NSvFlags">256</int>
+ <object class="NSMutableArray" key="NSSubviews">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSTextField" id="374380249">
+ <reference key="NSNextResponder" ref="1006"/>
+ <int key="NSvFlags">268</int>
+ <string key="NSFrame">{{17, 213}, {137, 38}}</string>
+ <reference key="NSSuperview" ref="1006"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="929792690">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">272891904</int>
+ <string key="NSContents">Multiline Label</string>
+ <object class="NSFont" key="NSSupport" id="554297525">
+ <string key="NSName">LucidaGrande</string>
+ <double key="NSSize">1.300000e+01</double>
+ <int key="NSfFlags">16</int>
+ </object>
+ <reference key="NSControlView" ref="374380249"/>
+ <object class="NSColor" key="NSBackgroundColor" id="584893825">
+ <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="215232119">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">controlTextColor</string>
+ <object class="NSColor" key="NSColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MAA</bytes>
+ </object>
+ </object>
+ </object>
+ </object>
+ <object class="NSTextField" id="616557491">
+ <reference key="NSNextResponder" ref="1006"/>
+ <int key="NSvFlags">268</int>
+ <string key="NSFrame">{{17, 259}, {137, 29}}</string>
+ <reference key="NSSuperview" ref="1006"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="596183282">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">272891904</int>
+ <string key="NSContents">Multiline Label</string>
+ <reference key="NSSupport" ref="554297525"/>
+ <reference key="NSControlView" ref="616557491"/>
+ <reference key="NSBackgroundColor" ref="584893825"/>
+ <reference key="NSTextColor" ref="215232119"/>
+ </object>
+ </object>
+ <object class="NSTextField" id="617797386">
+ <reference key="NSNextResponder" ref="1006"/>
+ <int key="NSvFlags">268</int>
+ <string key="NSFrame">{{17, 132}, {137, 73}}</string>
+ <reference key="NSSuperview" ref="1006"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="383941342">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">272891904</int>
+ <string key="NSContents">Multiline Label</string>
+ <reference key="NSSupport" ref="554297525"/>
+ <reference key="NSControlView" ref="617797386"/>
+ <reference key="NSBackgroundColor" ref="584893825"/>
+ <reference key="NSTextColor" ref="215232119"/>
+ </object>
+ </object>
+ <object class="NSTextField" id="1057400229">
+ <reference key="NSNextResponder" ref="1006"/>
+ <int key="NSvFlags">268</int>
+ <string key="NSFrame">{{17, 20}, {137, 104}}</string>
+ <reference key="NSSuperview" ref="1006"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="399518885">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">272891904</int>
+ <string key="NSContents">Multiline Label</string>
+ <reference key="NSSupport" ref="554297525"/>
+ <reference key="NSControlView" ref="1057400229"/>
+ <reference key="NSBackgroundColor" ref="584893825"/>
+ <reference key="NSTextColor" ref="215232119"/>
+ </object>
+ </object>
+ </object>
+ <string key="NSFrameSize">{475, 308}</string>
+ <reference key="NSSuperview"/>
+ </object>
+ <string key="NSScreenRect">{{0, 0}, {1920, 1178}}</string>
+ <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</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">window</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="1005"/>
+ </object>
+ <int key="connectionID">122</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="1002">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <reference key="children" ref="1000"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-2</int>
+ <reference key="object" ref="1001"/>
+ <reference key="parent" ref="1002"/>
+ <string type="base64-UTF8" key="objectName">RmlsZSdzIE93bmVyA</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-1</int>
+ <reference key="object" ref="1003"/>
+ <reference key="parent" ref="1002"/>
+ <string key="objectName">First Responder</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-3</int>
+ <reference key="object" ref="1004"/>
+ <reference key="parent" ref="1002"/>
+ <string key="objectName">Application</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">1</int>
+ <reference key="object" ref="1005"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="1006"/>
+ </object>
+ <reference key="parent" ref="1002"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">2</int>
+ <reference key="object" ref="1006"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="374380249"/>
+ <reference ref="617797386"/>
+ <reference ref="1057400229"/>
+ <reference ref="616557491"/>
+ </object>
+ <reference key="parent" ref="1005"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">123</int>
+ <reference key="object" ref="374380249"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="929792690"/>
+ </object>
+ <reference key="parent" ref="1006"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">124</int>
+ <reference key="object" ref="929792690"/>
+ <reference key="parent" ref="374380249"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">129</int>
+ <reference key="object" ref="617797386"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="383941342"/>
+ </object>
+ <reference key="parent" ref="1006"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">130</int>
+ <reference key="object" ref="383941342"/>
+ <reference key="parent" ref="617797386"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">131</int>
+ <reference key="object" ref="1057400229"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="399518885"/>
+ </object>
+ <reference key="parent" ref="1006"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">132</int>
+ <reference key="object" ref="399518885"/>
+ <reference key="parent" ref="1057400229"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">139</int>
+ <reference key="object" ref="616557491"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="596183282"/>
+ </object>
+ <reference key="parent" ref="1006"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">140</int>
+ <reference key="object" ref="596183282"/>
+ <reference key="parent" ref="616557491"/>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="flattenedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMutableArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>-1.IBPluginDependency</string>
+ <string>-2.IBPluginDependency</string>
+ <string>-3.IBPluginDependency</string>
+ <string>1.IBEditorWindowLastContentRect</string>
+ <string>1.IBPluginDependency</string>
+ <string>1.IBWindowTemplateEditedContentRect</string>
+ <string>1.NSWindowTemplate.visibleAtLaunch</string>
+ <string>1.WindowOrigin</string>
+ <string>1.editorWindowContentRectSynchronizationRect</string>
+ <string>123.IBPluginDependency</string>
+ <string>124.IBPluginDependency</string>
+ <string>129.IBPluginDependency</string>
+ <string>130.IBPluginDependency</string>
+ <string>131.IBPluginDependency</string>
+ <string>132.IBPluginDependency</string>
+ <string>139.IBPluginDependency</string>
+ <string>140.IBPluginDependency</string>
+ <string>2.IBPluginDependency</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilderKit</string>
+ <string>com.apple.InterfaceBuilderKit</string>
+ <string>{{632, 820}, {475, 308}}</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>{{632, 820}, {475, 308}}</string>
+ <boolean value="NO"/>
+ <string>{196, 240}</string>
+ <string>{{202, 428}, {480, 270}}</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>
+ <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>
+ <nil key="activeLocalization"/>
+ <object class="NSMutableDictionary" key="localizations">
+ <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>
+ <nil key="sourceID"/>
+ <int key="maxID">140</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <object class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">GTMUILocalizerAndLayoutTweakerTestWindowController</string>
+ <string key="superclassName">NSWindowController</string>
+ <object class="NSMutableDictionary" key="outlets">
+ <string key="NS.key.0">tabView_</string>
+ <string key="NS.object.0">NSTabView</string>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">AppKit/GTMUILocalizerAndLayoutTweakerTest.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSApplication</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier" id="112385276">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">UnitTesting/GTMAppKit+UnitTesting.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSCell</string>
+ <reference key="sourceIdentifier" ref="112385276"/>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSControl</string>
+ <reference key="sourceIdentifier" ref="112385276"/>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSMenu</string>
+ <reference key="sourceIdentifier" ref="112385276"/>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">AppKit/GTMCarbonEvent.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">AppKit/GTMDelegatingTableColumn.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Foundation/GTMHTTPServer.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Foundation/GTMNSAppleEventDescriptor+Foundation.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Foundation/GTMNSObject+KeyValueObserving.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">UnitTesting/GTMCALayer+UnitTesting.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">UnitTesting/GTMNSObject+BindingUnitTesting.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">UnitTesting/GTMNSObject+UnitTesting.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSTabView</string>
+ <reference key="sourceIdentifier" ref="112385276"/>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSTextField</string>
+ <reference key="sourceIdentifier" ref="112385276"/>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSView</string>
+ <reference key="sourceIdentifier" ref="112385276"/>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSWindow</string>
+ <reference key="sourceIdentifier" ref="112385276"/>
+ </object>
+ </object>
+ </object>
+ <int key="IBDocument.localizationMode">0</int>
+ <string key="IBDocument.LastKnownRelativeProjectPath">../GTM.xcodeproj</string>
+ <int key="IBDocument.defaultPropertyAccessControl">3</int>
+ </data>
+</archive>
diff --git a/AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest7-Min-0.tiff b/AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest7-Min-0.tiff
new file mode 100644
index 0000000..8106dd4
--- /dev/null
+++ b/AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest7-Min-0.tiff
Binary files differ
diff --git a/AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest7-Min-1.tiff b/AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest7-Min-1.tiff
new file mode 100644
index 0000000..1fd16b1
--- /dev/null
+++ b/AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest7-Min-1.tiff
Binary files differ
diff --git a/AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest7-Min-2.tiff b/AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest7-Min-2.tiff
new file mode 100644
index 0000000..11f0caf
--- /dev/null
+++ b/AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest7-Min-2.tiff
Binary files differ
diff --git a/AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest7-Min-3.tiff b/AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest7-Min-3.tiff
new file mode 100644
index 0000000..018b225
--- /dev/null
+++ b/AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest7-Min-3.tiff
Binary files differ
diff --git a/AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest7-NoMin-0.tiff b/AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest7-NoMin-0.tiff
new file mode 100644
index 0000000..3fab864
--- /dev/null
+++ b/AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest7-NoMin-0.tiff
Binary files differ
diff --git a/AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest7-NoMin-1.tiff b/AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest7-NoMin-1.tiff
new file mode 100644
index 0000000..5875e42
--- /dev/null
+++ b/AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest7-NoMin-1.tiff
Binary files differ
diff --git a/AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest7-NoMin-2.tiff b/AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest7-NoMin-2.tiff
new file mode 100644
index 0000000..4afb82f
--- /dev/null
+++ b/AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest7-NoMin-2.tiff
Binary files differ
diff --git a/AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest7-NoMin-3.tiff b/AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest7-NoMin-3.tiff
new file mode 100644
index 0000000..61cefe0
--- /dev/null
+++ b/AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest7-NoMin-3.tiff
Binary files differ