home *** CD-ROM | disk | FTP | other *** search
- //
- // MiscClockView.h -- a simple view class for displaying date/time
- // Written by Scott Anguish (c) 1993 by Scott Anguish.
- // Version 1.0. All rights reserved.
- //
- // This notice may not be removed from this source code.
- //
- // This object is included in the MiscKit by permission from the author
- // and its use is governed by the MiscKit license, found in the file
- // "LICENSE.rtf" in the MiscKit distribution. Please refer to that file
- // for a list of all applicable permissions and restrictions.
- //
-
- #import <appkit/appkit.h>
-
- @interface MiscClockView:View
- {
- id theImage;
- id clockbase;
-
- NXImage *imageA;
- NXImage *imageP;
-
- NXImage *imageColon;
- NXImage *YearColon;
- NXImage *imageAM;
- NXImage *imagePM;
-
- NXImage *DigitalNumbers[10];
- NXImage *DateNumbers[10];
- NXImage *YearNumbers[10];
- NXImage *DayNames[7];
- NXImage *MonthNames[12];
- NXPoint colonPosition;
-
- int seconds;
- int minutes;
- int hours;
- int date;
- int month;
- int year;
- int weekday;
- int meridian;
-
- BOOL militaryTime;
- BOOL showYear;
-
- }
-
- - initFrame:(const NXRect *)frameRect;
- - awake;
- - awakeFromNib;
- - setTime: (struct tm*)theTime;
-
- - takeMinutesFrom:sender;
- - takeHoursFrom:sender;
- - takeWeekdayFrom:sender;
- - takeDateFrom:sender;
- - takeMonthFrom:sender;
-
- - setSeconds:(int)theSeconds;
- - setMinutes:(int)theMinutes;
- - setHours:(int)theHours;
- - setWeekday:(int)theWeekday;
- - setDate:(int)theDate;
- - setMonth:(int)theMonth;
- - setYear:(int)theYear;
- - setMeridian:(int)theMeridian;
-
- - (int)year;
- - (int)month;
- - (int)weekday;
- - (int)date;
- - (int)hours;
- - (int)minutes;
- - (int)seconds;
-
- - (BOOL)militaryTime;
- - (BOOL)showYear;
- - setShowYear:(BOOL)state;
- - setMilitaryTime:(BOOL)state;
-
-
- @end
-