This is Clock.h in view mode; [Download] [Up]
// // Clock.h -- Part of Cassandra // Original Author: Ali Ozer // Modifier: Jiro Nakamura // Modifications Copyright (c) 1990 by Jiro Nakamura // All rights reserved. // #import <appkit/View.h> #import <appkit/NXImage.h> #import <dpsclient/event.h> // For NXCoord, NXRect, etc #import <dpsclient/dpsclient.h> // For DPSTimedEntry, used below #import <objc/typedstream.h> // For read: and write: decls, below #import "Global.h" @interface Clock:View { DPSTimedEntry clockTE; // The clock timed entry NXImage *clockFace; // The bitmap of the clock background NXPoint compositeTo; // The point to composite the bitmap to... float minuteLen, hourLen; // The length of the arms float backgroundGray; // To fill background float clockGray; // To draw the arms (minute, hour, second) BOOL showSeconds; // Show seconds hand? BOOL showDate; // Show date like fancy Rolexes? BOOL militaryTime; int clockType; char eventTime[80], eventMessage[80]; // Added by Jiro for target/action response. Jan 6, 1990 id target; // the target SEL action; // and the action } + newFrame:(const NXRect *)frm; - initMoreStuff; // used to set our-own default values - free; // The following methods can be connected to user interface objects in // Interface Builder. - setShowSeconds:sender; // Connect to a two-state button - setShowDate: sender; // ditto - setClockFace:sender; // Connect to something with string value - setBackgroundGray:sender; // Connect to a floating value source - setClockGray:sender; // Same with this one // Call the following methods to set/get values of various parameters // affecting the look of the clock. - setClockFaceToBitmapNamed:(const char *)bitmapName; - setShowSecondsToBool:(BOOL)seconds; - setShowDateToBool:(BOOL)date; - setMilitaryTimeToBool:(BOOL)mt; - setBackgroundGrayToFloat:(float)gray; - setClockGrayToFloat:(float)gray; - setClockTypeToInt: (int) type; - setMessage: (char *) buf1 : (char *) buf2; // Added by jiro to allow target/action response from Cassandra // Modified Jan 6, 1990 - setTarget: (id) aTarget; - setAction: (SEL) anAction; - (const char *)clockFaceBitmapName; - (BOOL)showSeconds; - (BOOL)showDate; - (float)backgroundGray; - (float)clockGray; // The following methods are internal and are used to maintain the clock. - drawSelf:(NXRect *)rects :(int)rectCount; - startTimedEntry:(BOOL)fireASAP; - stopTimedEntry; - computeNewSizes; - computeBitmapLocation; - sizeTo:(NXCoord)w :(NXCoord)h; // Archiver methods. - awake; - read:(NXTypedStream *)stream; - write:(NXTypedStream *)stream; @end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.