File:  [NeXTSTEP 3.3 examples] / Examples / AppKit / BusyBox / ClockView.h
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:48:27 2018 UTC (8 years, 1 month ago) by root
Branches: NeXT, MAIN
CVS tags: NeXTSTEP33, HEAD
Sample Programs from NeXSTEP 3.3


#import <appkit/View.h>
#import <dpsclient/dpsclient.h>  
#import <objc/typedstream.h> 

@interface ClockView:View
{
  DPSTimedEntry teNum;     	/* The clock timed entry */
  id face;			/* NXImage for clock face */
  float radius; 	 	/* Radius of clock face */
  NXPoint center;		/* Center of clock face */
  BOOL showSeconds;          	/* Show seconds hand on clock */
  BOOL showDate;	 	/* Show date on clock */
  int clockType;		/* Type of clock (analog, digital, sundial) */
  id littleFont,mediumFont, bigFont;	/* fonts used */
  id sTable;			/* string table for clock strings */
}

/* INIT/FREE METHODS */
- initFrame:(const NXRect *)frameRect;
- free;
- setSTable:anObject;

/* SET/GET CLOCK PARAMETERS */

- setShowSeconds:(BOOL)newValue;
- setShowDate:(BOOL)newValue;
- setClockType:(int)newValue;

- (BOOL)showSeconds;
- (BOOL)showDate;
- (int)clockType;

/* TARGET/ACTION METHODS */

- changeShowDate:sender;	/* connect to toggle (2-state) control */
- changeShowSeconds:sender;	/* connect to toggle (2-state) control */
- changeClockType:sender;	/* connect to int value (3 value) control */

/* PRIVATE METHODS */

- drawAnalog:(struct tm *)time;
- drawDigital:(struct tm *)time;
- drawSundial:(struct tm *)time;
- drawFace:image;
- drawSelf:(NXRect *)rects :(int)rectCount;

- startTimedEntry:(BOOL)fireASAP;
- stopTimedEntry;
- sizeTo:(NXCoord)w :(NXCoord)h;

@end

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.