File:  [mozdev] / chimera / IconTabViewItem.m
Revision 1.2: download - view: text, annotated - select for diffs - revision graph
Wed Mar 13 06:44:38 2002 UTC (17 years, 6 months ago) by macserv
Branches: MAIN
CVS tags: HEAD
A couple ui tweaks, but the main thing is the icons in the sidebar tabs.  Also, a bit of Project cleanup.

    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: {
   24:     return( NSMakeSize(15,15) );
   25: }
   26: 
   27: -(void)drawLabel:(BOOL)shouldTruncateLabel inRect:(NSRect)tabRect
   28: {
   29:     NSPoint	drawPoint = NSMakePoint( (tabRect.origin.x), (tabRect.origin.y + 15) );
   30:     [[self tabIcon] compositeToPoint:drawPoint operation:NSCompositeSourceOver];    
   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>