Annotation of chimera/BookmarksToolbar.mm, revision 1.1

1.1     ! hyatt       1: //
        !             2: //  BookmarksToolbar.mm
        !             3: //  Chimera
        !             4: //
        !             5: //  Created by David Hyatt on Mon Apr 15 2002.
        !             6: //  Copyright (c) 2001 __MyCompanyName__. All rights reserved.
        !             7: //
        !             8: 
        !             9: #import "BookmarksToolbar.h"
        !            10: 
        !            11: 
        !            12: @implementation BookmarksToolbar
        !            13: 
        !            14: - (id)initWithFrame:(NSRect)frame {
        !            15:   self = [super initWithFrame:frame];
        !            16:   if (self) {
        !            17:     // Initialization code here.
        !            18:   }
        !            19:   return self;
        !            20: }
        !            21: 
        !            22: - (void)drawRect:(NSRect)aRect {
        !            23:   // Fill the background with our background color.
        !            24:   [[NSColor colorWithCalibratedWhite: 0.98 alpha: 1.0] set];
        !            25:   NSRectFill(aRect);
        !            26: 
        !            27:   //printf("The rect is: %f %f %f %f\n", aRect.origin.x, aRect.origin.y, aRect.size.width, aRect.size.height);
        !            28:   
        !            29:   if (aRect.origin.y + aRect.size.height ==
        !            30:       [self bounds].size.height) {
        !            31:     // The personal toolbar is 21 pixels tall.  The bottom two pixels
        !            32:     // are a separator.
        !            33:     [[NSColor colorWithCalibratedWhite: 0.92 alpha: 1.0] set];
        !            34:     NSRectFill(NSMakeRect(aRect.origin.x, aRect.origin.y, aRect.size.width, 2));
        !            35:   }
        !            36: 
        !            37:   // Paint only those cells that overlap.
        !            38:   
        !            39: }
        !            40: 
        !            41: @end

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