home *** CD-ROM | disk | FTP | other *** search
- // ClockView.h
- // By Jayson Adams, NeXT Developer Support Team
- // You may freely copy, distribute and reuse the code in this example.
- // NeXT disclaims any warranty of any kind, expressed or implied, as to its
- // fitness for any particular use.
- /* Modified by Scott Stark, Thu Jan 16 1992 */
-
- #import <appkit/View.h>
- #import <dpsclient/dpsclient.h>
-
- @interface ClockView : View
- {
- /* The NXImages used to display the clock */
- id clockImage;
- id numbers[10];
- id amImage;
- id pmImage;
- id colon;
- id meridianImage;
- NXPoint colonPosition_clock; // : position for normal time
- NXPoint colonPosition_timer; // : position for timer
- /* My Date class object used to store the time and date */
- id dateObj;
- /* The timed entry procedure activated by the startMinSecTimer: method */
- DPSTimedEntry min_sec_timer;
- BOOL timerActive;
- }
-
- /* instance methods */
- - initFrame : (NXRect *) frameRect;
- - drawSelf : (NXRect *) rects : (int) count;
-
- /* Date initialization methods */
- - setDate : (short) d : (short) m : (short) y;
- - setTime : (short) hr : (short) min : (short) sec;
- - now;
-
- /* A minute/second timer display method */
- - startMinSecTimer : sender;
- - endTimer : sender;
-
- @end
-