home *** CD-ROM | disk | FTP | other *** search
- /*
- 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.
- */
-
- #import <AppKit/AppKit.h>
-
- typedef enum ToDoItemStatus {
- incomplete = 0,
- complete,
- deferToNextDay
- } ToDoItemStatus;
-
- enum {
- minInSecs = 60,
- hrInSecs = (minInSecs * 60),
- dayInSecs = (hrInSecs * 24),
- weekInSecs = (dayInSecs * 7)
- };
-
- BOOL ConvertSecondsToTime(long secs, int *hour, int *minute);
- long ConvertTimeToSeconds(int hr, int min, BOOL pmFlag);
-
- @interface ToDoItem : NSObject
- {
- NSCalendarDate *day;
- NSString *itemName;
- NSString *notes;
- NSTimer *itemTimer;
- long secsUntilDue;
- long secsUntilNotif;
- ToDoItemStatus itemStatus;
- }
- - (id)initWithName:(NSString *)name andDate:(NSCalendarDate *)date;
- - (void)dealloc;
- - (BOOL)isEqual:(id)anObject;
- - (id)copyWithZone:(NSZone *)zone;
- - (id)initWithCoder:(NSCoder *)coder;
- - (void)encodeWithCoder:(NSCoder *)coder;
- - (void) setDay:(NSCalendarDate *)newDay;
- - (NSCalendarDate *)day;
- - (void)setItemName:(NSString *)newName;
- - (NSString *)itemName;
- - (void)setNotes:(NSString *)notes;
- - (NSString *)notes;
- - (void)setSecsUntilNotif:(long)secs;
- - (long)secsUntilNotif;
- - (void)setSecsUntilDue:(long)secs;
- - (long)secsUntilDue;
- - (void)setItemStatus:(ToDoItemStatus)newStatus;
- - (ToDoItemStatus)itemStatus;
- - (void)setItemTimer:(NSTimer *)aTimer;
- - (NSTimer *)itemTimer;
-
- @end
-