Annotation of chimera/IconTabViewItem.m, revision 1.2

1.1       macserv     1: //
                      2: //  IconTabViewItem.m
                      3: //  Chimera
                      4: //
                      5: //  Created by Matt L.  Judy on Sun Mar 10 2002.
                      6: //  Copyright (c) 2001 __MyCompanyName__. All rights reserved.
                      7: //
                      8: 
                      9: #import "IconTabViewItem.h"
                     10: 
                     11: 
                     12: @implementation IconTabViewItem
                     13: 
                     14: -(id)initWithIdentifier:(id)identifier withTabIcon:(NSImage *)tabIcon
                     15: {
                     16:     if ( (self = [super initWithIdentifier:identifier]) ) {
                     17:         [self setTabIcon:tabIcon];
                     18:     }
                     19:     return self;
                     20: }
                     21: 
                     22: - (NSSize)sizeOfLabel:(BOOL)computeMin
                     23: {
1.2     ! macserv    24:     return( NSMakeSize(15,15) );
1.1       macserv    25: }
                     26: 
                     27: -(void)drawLabel:(BOOL)shouldTruncateLabel inRect:(NSRect)tabRect
                     28: {
1.2     ! macserv    29:     NSPoint    drawPoint = NSMakePoint( (tabRect.origin.x), (tabRect.origin.y + 15) );
        !            30:     [[self tabIcon] compositeToPoint:drawPoint operation:NSCompositeSourceOver];    
1.1       macserv    31: }
                     32: 
                     33: -(NSImage *)tabIcon { return _tabIcon; }
                     34: -(void)setTabIcon:(NSImage *)newIcon
                     35: {
                     36:     [_tabIcon autorelease];
                     37:     _tabIcon = [newIcon copy];
                     38: }
                     39: 
                     40: 
                     41: @end

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>