File: programming/cocoa/Filie.zip/Filie/Filie/UKMosEisleyBar.m


/* =============================================================================
    PROJECT:    Filie
    FILE:       UKMosEisleyBar.m
    
    COPYRIGHT:  (c) 2004 by M. Uli Kusterer, all rights reserved.
    
    AUTHORS:    M. Uli Kusterer - UK
    
    LICENSES:   GNU GPL
    
    REVISIONS:
        2004-12-02  UK  Created.
   ========================================================================== */
 
// -----------------------------------------------------------------------------
//  Headers:
// -----------------------------------------------------------------------------
 
#import "UKMosEisleyBar.h"
#include <time.h>
// -----------------------------------------------------------------------------
//  initWithFrame:
//      Designated initializer. Loads all images we might need for
//      active/inactive/aqua/graphite and initializes the segments of this view
//      with a default width.
//
//      TODO: We should probably load the segments dictionary from a .plist file
//      to make it easier to customize. Or better, we may want to create an
//      IBPalette for this critter and implement NSCoding constructors so the
//      segments can be set up in IB/Gorm.
//
//  REVISIONS:
//      2004-12-22  UK  Documented.
// -----------------------------------------------------------------------------
"moseisleybar01""moseisleybar02""moseisleybar03""moseisleybar04""moseisleybar12""moseisleybar13""moseisleybar14""moseisleybar22""moseisleybar23""moseisleybar24""moseisleybar32""moseisleybar33""moseisleybar34""width",
                            @"white", @"color""width",
                            @"white", @"color""width",
                            @"white", @"color""width",
                            @"blue", @"color"// -----------------------------------------------------------------------------
//  awakeFromNib:
//      Here we register for the notifications that tell us to change our look.
//      In particular for the user changing control tint, and for our window's
//      activity changes.
//
//      FIX ME! Should move this into viewMovedToWindow: or whatever it's
//      called. Otherwise manually-created views of this kind won't register.
//
//  REVISIONS:
//      2004-12-22  UK  Documented.
// -----------------------------------------------------------------------------
//[super awakeFromNib];
// ---------------------------------------------------------- 
//  - dealloc:
// ---------------------------------------------------------- 
// -----------------------------------------------------------------------------
//  drawRect:
//      Draw the view, including all of its segments.
//
//  REVISIONS:
//      2004-12-22  UK  Documented.
// -----------------------------------------------------------------------------
// isKeyWindow ?
// Draw left edge:
// Now draw segments:
"width""color""white"// Draw join:
// This isn't the first one, which doesn't get a join.
// Draw body:
// Draw right edge:
// Easter egg:
"moseisleybar45"// ---------------------------------------------------------- 
// - segments:
// ---------------------------------------------------------- 
// ---------------------------------------------------------- 
// - setSegments:
// ---------------------------------------------------------- 
// -----------------------------------------------------------------------------
//  redrawUponNotification:
//      All notifications (tint change, window activity change) call this
//      method to cause an appropriate change in display style.
//
//  REVISIONS:
//      2004-12-22  UK  Documented.
// -----------------------------------------------------------------------------
 

This code uses the PclZip Zip File reading code, which is subject to the GNU LGPL. It also uses the GeSHi syntax highlighter, subject to the GPL. Ask if you want this for your own web site, it's free.