diff --git a/AppKit/CPSegmentedControl.j b/AppKit/CPSegmentedControl.j index 3721bc29b..07a57cb9b 100644 --- a/AppKit/CPSegmentedControl.j +++ b/AppKit/CPSegmentedControl.j @@ -46,27 +46,25 @@ CPSegmentSwitchTrackingMomentary = 2; */ @implementation CPSegmentedControl : CPControl { - unsigned _segmentCount; - CPArray _segments; - CPArray _selectedSegment; - + int _selectedSegment; + int _segmentStyle; CPSegmentSwitchTracking _trackingMode; + unsigned _trackingSegment; BOOL _trackingHighlighted; } - (id)initWithFrame:(CGRect)aRect { + _segments = []; + self = [super initWithFrame:aRect]; if (self) { - _segments = []; _selectedSegment = -1; - _segmentCount = 0; - _trackingMode = CPSegmentSwitchTrackingSelectOne; } @@ -88,26 +86,26 @@ CPSegmentSwitchTrackingMomentary = 2; */ - (void)setSegmentCount:(unsigned)aCount { - if (_segmentCount == aCount) + if (_segments.length == aCount) return; var height = CGRectGetHeight([self bounds]); - if (_segmentCount < aCount) + if (_segments.length < aCount) { - var index = _segmentCount; + var index = _segments.length; for (; index < aCount; ++index) { - _segments[index] = _CPSegmentMake(); + _segments[index] = [[_CPSegmentItem alloc] init]; _segments[index].frame.size.height = height; } } - else if (aCount < _segmentCount) + else if (aCount < _segments.length) { var index = aCount; - for (; index < _segmentCount; ++index) + for (; index < _segments.length; ++index) { [_segments[index].imageView removeFromSuperview]; [_segments[index].labelView removeFromSuperview]; @@ -116,9 +114,7 @@ CPSegmentSwitchTrackingMomentary = 2; } } - _segmentCount = aCount; - - if (_selectedSegment < _segmentCount) + if (_selectedSegment < _segments.length) _selectedSegment = -1; [self tileWithChangedSegment:0]; @@ -129,7 +125,7 @@ CPSegmentSwitchTrackingMomentary = 2; */ - (unsigned)segmentCount { - return _segmentCount; + return _segments.length; } // Specifying Selected Segment @@ -159,7 +155,7 @@ CPSegmentSwitchTrackingMomentary = 2; { var index = 0; - for (; index < _segmentCount; ++index) + for (; index < _segments.length; ++index) if (_segments[index].tag == aTag) { [self setSelectedSegment:index]; @@ -189,7 +185,7 @@ CPSegmentSwitchTrackingMomentary = 2; var index = 0, selected = NO; - for (; index < _segmentCount; ++index) + for (; index < _segments.length; ++index) if (_segments[index].selected) if (selected) [self setSelected:NO forSegment:index]; @@ -201,7 +197,7 @@ CPSegmentSwitchTrackingMomentary = 2; { var index = 0; - for (; index < _segmentCount; ++index) + for (; index < _segments.length; ++index) if (_segments[index].selected) [self setSelected:NO forSegment:index]; } @@ -536,7 +532,7 @@ CPSegmentSwitchTrackingMomentary = 2; // Update Following Segments Widths var index = aSegment + 1; - for (; index < _segmentCount; ++index) + for (; index < _segments.length; ++index) { _segments[index].frame.origin.x += delta; @@ -631,6 +627,7 @@ CPSegmentSwitchTrackingMomentary = 2; { _trackingHighlighted = YES; _trackingSegment = [self testSegment:location]; + CPLog.error("_trackingSegment="+_trackingSegment); [self drawSegmentBezel:_trackingSegment highlight:YES]; } @@ -654,7 +651,7 @@ CPSegmentSwitchTrackingMomentary = 2; { [super setFont:aFont]; - var count = _segmentCount; + var count = _segments.length; if (!count) return; @@ -667,7 +664,142 @@ CPSegmentSwitchTrackingMomentary = 2; @end -var _CPSegmentMake = function() +var CPSegmentedControlSegmentsKey = "CPSegmentedControlSegmentsKey", + CPSegmentedControlSelectedKey = "CPSegmentedControlSelectedKey", + CPSegmentedControlSegmentStyleKey = "CPSegmentedControlSegmentStyleKey", + CPSegmentedControlTrackingModeKey = "CPSegmentedControlTrackingModeKey"; + +@implementation CPSegmentedControl (CPCoding) + +- (id)initWithCoder:(CPCoder)aCoder { - return { width:0, image:nil, label:@"", menu:nil, selected:NO, enabled:NO, tag:0, labelView:nil, imageView:nil, frame:CGRectMakeZero() } + self = [super initWithCoder:aCoder]; + + if (self) + { + _segments = [aCoder decodeObjectForKey:CPSegmentedControlSegmentsKey]; + _segmentStyle = [aCoder decodeIntForKey:CPSegmentedControlSegmentStyleKey]; + + if ([aCoder containsValueForKey:CPSegmentedControlSelectedKey]) + _selectedSegment = [aCoder decodeIntForKey:CPSegmentedControlSelectedKey]; + else + _selectedSegment = -1; + + if ([aCoder containsValueForKey:CPSegmentedControlTrackingModeKey]) + _trackingMode = [aCoder decodeIntForKey:CPSegmentedControlTrackingModeKey]; + else + _trackingMode = CPSegmentSwitchTrackingSelectOne; + + // HACK + for (var i = 0; i < _segments.length; i++) + { + if (_segments[i].image != undefined) + [self setImage:_segments[i].image forSegment:i]; + if (_segments[i].label != undefined) + [self setLabel:_segments[i].label forSegment:i]; + } + } + + return self; } + +- (void)encodeWithCoder:(CPCoder)aCoder +{ + var actualSubviews = _subviews; + + _subviews = []; + + [super encodeWithCoder:aCoder]; + + _subviews = actualSubviews; + + [aCoder encodeObject:_segments forKey:CPSegmentedControlSegmentsKey]; + [aCoder encodeInt:_selectedSegment forKey:CPSegmentedControlSelectedKey]; + [aCoder encodeInt:_segmentStyle forKey:CPSegmentedControlSegmentStyleKey]; + [aCoder encodeInt:_trackingMode forKey:CPSegmentedControlTrackingModeKey]; +} + +@end + + +@implementation _CPSegmentItem : CPObject +{ + CPImage image; + CPString label; + CPMenu menu; + BOOL selected; + BOOL enabled; + int tag; + + int width; + CPView labelView; + CPView imageView; + CPRect frame; +} + +- (id)init +{ + if (self = [super init]) + { + image = nil; + label = @""; + menu = nil; + selected = NO; + enabled = NO; + tag = 0; + + labelView = nil; + imageView = nil; + + width = 0; + frame = CGRectMakeZero(); + } + return self; +} + +@end + +var CPSegmentItemImageKey = "CPSegmentItemImageKey", + CPSegmentItemLabelKey = "CPSegmentItemLabelKey", + CPSegmentItemMenuKey = "CPSegmentItemMenuKey", + CPSegmentItemSelectedKey = "CPSegmentItemSelectedKey", + CPSegmentItemEnabledKey = "CPSegmentItemEnabledKey", + CPSegmentItemTagKey = "CPSegmentItemTagKey"; + +@implementation _CPSegmentItem (CPCoding) + +- (id)initWithCoder:(CPCoder)aCoder +{ + self = [super init]; + + if (self) + { + image = [aCoder decodeObjectForKey:CPSegmentItemImageKey]; + label = [aCoder decodeObjectForKey:CPSegmentItemLabelKey]; + menu = [aCoder decodeObjectForKey:CPSegmentItemMenuKey]; + selected = [aCoder decodeBoolForKey:CPSegmentItemSelectedKey]; + enabled = [aCoder decodeBoolForKey:CPSegmentItemEnabledKey]; + tag = [aCoder decodeIntForKey:CPSegmentItemTagKey]; + + labelView = nil; + imageView = nil; + + width = 0; + frame = CGRectMakeZero(); + } + + return self; +} + +- (void)encodeWithCoder:(CPCoder)aCoder +{ + [aCoder encodeObject:image forKey:CPSegmentItemImageKey]; + [aCoder encodeObject:label forKey:CPSegmentItemLabelKey]; + [aCoder encodeObject:menu forKey:CPSegmentItemMenuKey]; + [aCoder encodeBool:selected forKey:CPSegmentItemSelectedKey]; + [aCoder encodeBool:enabled forKey:CPSegmentItemEnabledKey]; + [aCoder encodeInt:tag forKey:CPSegmentItemTagKey]; +} + +@end + diff --git a/AppKit/CPSplitView.j b/AppKit/CPSplitView.j index 028d85164..e6c07a987 100644 --- a/AppKit/CPSplitView.j +++ b/AppKit/CPSplitView.j @@ -190,9 +190,11 @@ var CPSplitViewHorizontalImage = nil, { var count = [_subviews count] - 1; - if (count > 0) - while (count--) - [self drawDividerInRect:[self rectOfDividerAtIndex:count]]; + while ((count--) > 0) + { + _drawingDivider = count; + [self drawDividerInRect:[self rectOfDividerAtIndex:count]]; + } } - (void)drawDividerInRect:(CGRect)aRect diff --git a/AppKit/CPTabViewItem.j b/AppKit/CPTabViewItem.j index 8a3d37369..2027daea4 100644 --- a/AppKit/CPTabViewItem.j +++ b/AppKit/CPTabViewItem.j @@ -182,8 +182,6 @@ var CPTabViewItemIdentifierKey = "CPTabViewItemIdentifierKey", _view = [aCoder decodeObjectForKey:CPTabViewItemViewKey]; _auxiliaryView = [aCoder decodeObjectForKey:CPTabViewItemAuxViewKey]; - - CPLog.warn("_identifier="+_identifier+" _label="+_label+" _view="+_view+" _auxiliaryView="+_auxiliaryView); } return self; diff --git a/AppKit/CPTextField.j b/AppKit/CPTextField.j index e71c71f78..a6f128cd5 100644 --- a/AppKit/CPTextField.j +++ b/AppKit/CPTextField.j @@ -297,7 +297,7 @@ var _CPTextFieldSquareBezelColor = nil, Sets the background color, which is shown for non-bezeled text fields with drawsBackground set to YES @param aColor The background color */ -- (void)setTextFieldBackgroundColor:(BOOL)aColor +- (void)setTextFieldBackgroundColor:(CPColor)aColor { if (_textFieldBackgroundColor == aColor) return; @@ -310,7 +310,7 @@ var _CPTextFieldSquareBezelColor = nil, /*! Returns the background color. */ -- (BOOL)textFieldBackgroundColor +- (CPColor)textFieldBackgroundColor { return _textFieldBackgroundColor; } diff --git a/AppKit/CPView.j b/AppKit/CPView.j index 50a677535..f330dfd15 100644 --- a/AppKit/CPView.j +++ b/AppKit/CPView.j @@ -1317,7 +1317,7 @@ setBoundsOrigin: /*! Initiates a drag operation from the receiver to another view that accepts dragged data. @param aView the view to be dragged - @param aLocation the lower-left corner coordinate of aView + @param aLocation the top-left corner coordinate of aView @param mouseOffset the distance from the mouseDown: location and the current location @param anEvent the mouseDown: that triggered the drag @param aPastebaord the pasteboard that holds the drag data diff --git a/AppKit/Cib/_CPCibCustomObject.j b/AppKit/Cib/_CPCibCustomObject.j index 37f627b10..847c12f28 100644 --- a/AppKit/Cib/_CPCibCustomObject.j +++ b/AppKit/Cib/_CPCibCustomObject.j @@ -9,6 +9,11 @@ var _CPCibCustomObjectClassName = @"_CPCibCustomObjectClassName"; CPString _className; } +- (CPString)customClassName +{ + return _className; +} + @end @implementation _CPCibCustomObject (CPCoding) diff --git a/AppKit/Cib/_CPCibCustomView.j b/AppKit/Cib/_CPCibCustomView.j index b71fa4593..601f44cd0 100644 --- a/AppKit/Cib/_CPCibCustomView.j +++ b/AppKit/Cib/_CPCibCustomView.j @@ -30,6 +30,11 @@ CPString _className; } +- (CPString)customClassName +{ + return _className; +} + @end var _CPCibCustomViewClassNameKey = @"_CPCibCustomViewClassNameKey"; diff --git a/Foundation/CPObject.j b/Foundation/CPObject.j index e498847cb..224439bd6 100644 --- a/Foundation/CPObject.j +++ b/Foundation/CPObject.j @@ -126,7 +126,8 @@ var theClass = self; for(; theClass; theClass = theClass.super_class) - if(theClass == aClass) return YES; + if(theClass === aClass) + return YES; return NO; } @@ -140,13 +141,23 @@ return [isa isSubclassOfClass:aClass]; } ++ (BOOL)isKindOfClass:(Class)aClass +{ + return [self isSubclassOfClass:aClass]; +} + /*! Returns YES if the receiver is of the aClass class type. @param aClass the class to test the receiper */ - (BOOL)isMemberOfClass:(Class)aClass { - return self.isa == aClass; + return self.isa === aClass; +} + ++ (BOOL)isMemberOfClass:(Class)aClass +{ + return self === aClass; } /*! diff --git a/Foundation/CPSet.j b/Foundation/CPSet.j new file mode 100644 index 000000000..94d46f765 --- /dev/null +++ b/Foundation/CPSet.j @@ -0,0 +1,416 @@ +/* + * CPSet.j + * Foundation + * + * Created by Bailey Carlson + * Extended by Ross Boucher + * Extended by Nabil Elisa + * + * TODO: Needs to implement CPCoding, CPCopying, CPEnumerator. + */ + +@import "CPObject.j" +@import "CPArray.j" +@import "CPNumber.j" +//import "CPEnumerator.j" + + +@implementation CPSet : CPObject +{ + Object _contents; + unsigned _count; +} + +/* + Creates and returns an empty set. +*/ ++ (id)set +{ + return [[self alloc] init]; +} + +/* + Creates and returns a set containing a uniqued collection of those objects contained in a given array. + @param anArray array containing the objects to add to the new set. If the same object appears more than once objects, it is added only once to the returned set. +*/ ++ (id)setWithArray:(CPArray)array +{ + return [[self alloc] initWithArray:array]; +} + +/* + Creates and returns a set that contains a single given object. + @param anObject The object to add to the new set. +*/ ++ (id)setWithObject:(id)anObject +{ + return [[self alloc] initWithArray:[anObject]]; +} + +/* + Creates and returns a set containing a specified number of objects from a given array of objects. + @param objects A array of objects to add to the new set. If the same object appears more than once objects, it is added only once to the returned set. + @param count The number of objects from objects to add to the new set. +*/ ++ (id)setWithObjects:(id)objects count:(unsigned)count +{ + return [[self alloc] initWithObjects:objects count:count]; +} + +/* + Creates and returns a set containing the objects in a given argument list. + @param anObject The first object to add to the new set. + @param ... A comma-separated list of objects, ending with nil, to add to the new set. If the same object appears more than once objects, it is added only once to the returned set. +*/ ++ (id)setWithObjects:(id)anObject, ... +{ + var set = [[self alloc] init], + argLength = arguments.length, + i = 2; + + for(; i < argLength && (argument = arguments[i]) != nil; ++i) + [set addObject:argument]; + + return set; +} + +/* + Creates and returns a set containing the objects from another set. + @param aSet A set containing the objects to add to the new set. +*/ ++ (id)setWithSet:(CPSet)set +{ + return [[self alloc] initWithSet:set]; +} + +/* + Basic initializer, returns an empty set +*/ +- (id)init +{ + if (self = [super init]) + { + _count = 0; + _contents = {}; + } + + return self; +} + +/* + Initializes a newly allocated set with the objects that are contained in a given array. + @param array An array of objects to add to the new set. If the same object appears more than once in array, it is represented only once in the returned set. +*/ +- (id)initWithArray:(CPArray)array +{ + if (self = [self init]) + { + for (var i = 0; i 0; i--) + { + // If the sets share at least one item, they intersect + if ([self containsObject:items[i]]) + return YES; + } + + return NO; +} + +/* + Compares the receiver to another set. + @param set The set with which to compare the receiver. +*/ +- (BOOL)isEqualToSet:(CPSet)set +{ + // If both are subsets of each other, they are equal + return [self isSubsetOfSet:set] && [set isSubsetOfSet:self]; +} + +/* + Returns a Boolean value that indicates whether every object in the receiver is also present in another given set. + @param set The set with which to compare the receiver. +*/ +- (BOOL)isSubsetOfSet:(CPSet)set +{ + var items = [self allObjects]; + for (var i = 0; i < items.length; i++) + { + // If at least one item is not in both sets, self isn't a subset + if (![set containsObject:items[i]]) + return NO; + } + + return YES; +} + +/* + Sends to each object in the receiver a message specified by a given selector. + @param aSelector A selector that specifies the message to send to the members of the receiver. The method must not take any arguments. It should not have the side effect of modifying the receiver. This value must not be NULL. +*/ +- (void)makeObjectsPerformSelector:(SEL)aSelector +{ + [self makeObjectsPerformSelector:aSelector withObject:nil]; +} + +/* + Sends to each object in the receiver a message specified by a given selector. + @param aSelector A selector that specifies the message to send to the receiver's members. The method must take a single argument of type id. The method should not, as a side effect, modify the receiver. The value must not be NULL. + @param anObject The object to pass as an argument to the method specified by aSelector. +*/ +- (void)makeObjectsPerformSelector:(SEL)aSelector withObject:(id)argument +{ + var items = [self allObjects]; + for (var i = 0; i < items.length; i++) + { + [items[i] performSelector:aSelector withObject:argument]; + } +} + +/* + Determines whether the receiver contains an object equal to a given object, and returns that object if it is present. + @param anObject The object for which to test for membership of the receiver. +*/ +- (id)member:(id)object +{ + if ([self containsObject:object]) + return object; + + return nil; +} + +//- (CPEnumerator)objectEnumerator; + + +// Mutable Set Methods +/* + Returns an initialized set with a given initial capacity. + @param numItems, only present for compatability +*/ +- (id)initWithCapacity:(unsigned)numItems +{ + // Only here for compatability with Cocoa + self = [self init]; + return self; +} + +/* + Creates and returns a set with a given initial capacity. + @param numItems, only present for compatability +*/ ++ (id)setWithCapacity:(unsigned)numItems +{ + return [[self alloc] initWithCapacity:numItems]; +} + +/* + Empties the receiver, then adds to the receiver each object contained in another given set. + @param set The set whose members replace the receiver's content. +*/ +- (void)setSet:(CPSet)set +{ + [self removeAllObjects]; + [self addObjectsFromArray:[set allObjects]]; +} + +/* + Adds a given object to the receiver. + @param anObject The object to add to the receiver. +*/ +- (void)addObject:(id)anObject +{ + _contents[[anObject hash]] = anObject; + _count++; +} + +/* + Adds to the receiver each object contained in a given array that is not already a member. + @param array An array of objects to add to the receiver. +*/ +- (void)addObjectsFromArray:(CPArray)array +{ + for (var i = 0, count = array.length; i < count; i++) + { + [self addObject:array[i]]; + } +} + +/* + Removes a given object from the receiver. + @param anObject The object to remove from the receiver. +*/ +- (void)removeObject:(id)anObject +{print("removing: "+anObject); + if ([self containsObject:anObject]) + { + delete _contents[[anObject hash]]; + _count--; + } +} + +/* + Empties the receiver of all of its members. +*/ +- (void)removeAllObjects +{ + _contents = {}; + _count = 0; +} + +/* + Removes from the receiver each object that isn’t a member of another given set. + @param set The set with which to perform the intersection. +*/ +- (void)intersectSet:(CPSet)set +{ + var items = [self allObjects]; + for (var i = 0, count = items.length; i < count; i++) + { + if (![set containsObject:items[i]]) + [self removeObject:items[i]]; + } +} + +/* + Removes from the receiver each object contained in another given set that is present in the receiver. + @param set The set of objects to remove from the receiver. +*/ +- (void)minusSet:(CPSet)set +{ + var items = [set allObjects]; + for (var i = 0; i < items.length; i++) + { + if ([self containsObject:items[i]]) + [self removeObject:items[i]]; + } +} + +/* + Adds to the receiver each object contained in another given set + @param set The set of objects to add to the receiver. +*/ +- (void)unionSet:(CPSet)set +{ + var items = [set allObjects]; + for (var i = 0, count = items.length; i < count; i++) + { + [self addObject:items[i]]; + } +} + +@end + + +@implementation CPMutableSet : CPSet +@end + diff --git a/Foundation/Foundation.j b/Foundation/Foundation.j index 172d879a3..0fbdad3c3 100755 --- a/Foundation/Foundation.j +++ b/Foundation/Foundation.j @@ -45,6 +45,7 @@ @import "CPPropertyListSerialization.j" @import "CPRange.j" @import "CPRunLoop.j" +@import "CPSet.j" @import "CPSortDescriptor.j" @import "CPString.j" @import "CPTimer.j" diff --git a/Tools/nib2cib/NSAppKit.j b/Tools/nib2cib/NSAppKit.j index 38670100e..d35bcc452 100644 --- a/Tools/nib2cib/NSAppKit.j +++ b/Tools/nib2cib/NSAppKit.j @@ -34,6 +34,7 @@ @import "NSNibConnector.j" @import "NSPopUpButton.j" @import "NSResponder.j" +@import "NSSegmentedControl.j" @import "NSSlider.j" @import "NSSplitView.j" @import "NSTabView.j" diff --git a/Tools/nib2cib/NSSegmentedControl.j b/Tools/nib2cib/NSSegmentedControl.j new file mode 100644 index 000000000..619a5773c --- /dev/null +++ b/Tools/nib2cib/NSSegmentedControl.j @@ -0,0 +1,126 @@ +/* + * NSSegmentedControl.j + * nib2cib + * + * Created by Thomas Robinson. + * Copyright 2008, 280 North, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +@import + +@import "NSSegmentedControl.j" + + +@implementation CPSegmentedControl (CPCoding) + +- (id)NS_initWithCoder:(CPCoder)aCoder +{ + if (self = [super NS_initWithCoder:aCoder]) + { + var cell = [aCoder decodeObjectForKey:"NSCell"]; + + _segments = [cell segments]; + _selectedSegment = [cell selectedSegment]; + _segmentStyle = [cell segmentStyle]; + _trackingMode = [cell trackingMode]; + } + + return self; +} + +@end + +@implementation NSSegmentedControl : CPSegmentedControl +{ +} + +- (id)initWithCoder:(CPCoder)aCoder +{ + return [self NS_initWithCoder:aCoder]; +} + +- (Class)classForKeyedArchiver +{ + return [CPSegmentedControl class]; +} + +@end + +@implementation NSSegmentedCell : NSActionCell +{ + CPArray _segments @accessors(readonly, getter=segments); + int _selectedSegment @accessors(readonly, getter=selectedSegment); + int _segmentStyle @accessors(readonly, getter=segmentStyle); + CPSegmentSwitchTracking _trackingMode @accessors(readonly, getter=trackingMode); +} + +- (id)initWithCoder:(CPCoder)aCoder +{ + if (self = [super initWithCoder:aCoder]) + { + _segments = [aCoder decodeObjectForKey:"NSSegmentImages"]; + _selectedSegment = [aCoder decodeIntForKey:"NSSelectedSegment"]; + _segmentStyle = [aCoder decodeIntForKey:"NSSegmentStyle"]; + _trackingMode = [aCoder decodeIntForKey:"NSTrackingMode"]; + + + } + + return self; +} + +@end + + +@implementation _CPSegmentItem (CPCoding) + +- (id)NS_initWithCoder:(CPCoder)aCoder +{ + if (self = [super init]) + { + image = [aCoder decodeObjectForKey:"NSSegmentItemImage"]; + label = [aCoder decodeObjectForKey:"NSSegmentItemLabel"]; + menu = [aCoder decodeObjectForKey:"NSSegmentItemMenu"]; + selected = [aCoder decodeBoolForKey:"NSSegmentItemSelected"]; + enabled = ![aCoder decodeBoolForKey:"NSSegmentItemDisabled"]; + tag = [aCoder decodeIntForKey:"NSSegmentItemTag"]; + + // NSSegmentItemImageScaling + // NSSegmentItemTooltip + } + + return self; +} + +@end + +@implementation NSSegmentItem : _CPSegmentItem +{ +} + +- (id)initWithCoder:(CPCoder)aCoder +{ + return [self NS_initWithCoder:aCoder]; +} + +- (Class)classForKeyedArchiver +{ + return [_CPSegmentItem class]; +} + +@end +