RememberDefsPrivate.mesa;
Last Edited by: Teitelman, June 29, 1983 1:09 pm
Last Edited by: Pier, March 13, 1984 6:11:12 pm PST
Last Edited by: Binding, June 21, 1984 2:41:47 pm PDT
See Remember.Tioga for documentation and examples of how to use the Remember package.
DIRECTORY
BasicTime USING [nullGMT, GMT],
Menus USING [MenuEntry],
Rope USING [ROPE],
Tempus USING [Packed, PackedSeconds, Seconds],
Hickory USING [ Event, nullEvent, EventTuple],
IO USING [ STREAM],
ViewerClasses USING [Viewer]
;
RememberDefsPrivate:
CEDAR DEFINITIONS =
BEGIN
ROPE: TYPE = Rope.ROPE;
Packed: TYPE = Tempus.Packed;
PackedSeconds: TYPE = Tempus.PackedSeconds;
Seconds: TYPE = Tempus.Seconds; -- a long cardinal, time interval measured in seconds
Viewer: TYPE = ViewerClasses.Viewer;
ProtectedData:
TYPE =
MONITORED
RECORD [
eventList: LIST OF Event ← NIL,
logEvents: BOOLEAN ← FALSE,
eventLogStream: IO.STREAM ← NIL,
eventMinderDisabled: BOOL ← FALSE
];
protData: ProtectedData;
Event: TYPE = REF EventRecord;
EventRecord:
TYPE =
RECORD[
-- find out how to make this opaque
text: ROPE,
timeToStartNotification: PackedSeconds ← [0],
trueTimeToStartNotification: PackedSeconds ← [0],
newStartTime: BOOL ← TRUE,
justPretending: BOOL ← FALSE,
restoreTrueTimes: BOOL ← FALSE,
blink: BOOL ← FALSE,
destroyed: BOOL ← FALSE,
repeat: ROPE,
nextNotification: PackedSeconds ← [0], -- cache for use with repeat so don't have to compute each time
trueNextNotification: PackedSeconds ← [0],
leadTime: Seconds ← 0, -- saved separately from timeToStartNotification so can write it back out
untilTime: Packed ← LOOPHOLE[ BasicTime.nullGMT], -- repeated until this time
durationTime: Seconds ← 0,
getSeriousAfter: Seconds ← 0,
message: ROPE ← NIL,
place: ROPE ← NIL,
keyWord: ROPE ← NIL, -- associates a keyword with an event
keepUntil: Packed ← LOOPHOLE[ BasicTime.nullGMT], -- specifies when event to be deleted from data base
viewer: Viewer ← NIL,
iconLabel: ROPE,
iconFlavor: ROPE, -- no point in constructing flavor until you need it.
dbKey: Hickory.Event ← Hickory.nullEvent -- database key for this event
];
IconLabelType: TYPE = {prev, next, this, none};
Construct: PRIVATE PROC;
ComputeRepetitionInterval: PRIVATE PROCEDURE [r: Rope.ROPE, time: Tempus.PackedSeconds] RETURNS[Tempus.PackedSeconds];
LogEvent: PRIVATE PROC [event: Event, stream: IO.STREAM];
EnterEventMinder:
PRIVATE
PROC [itIsNow: Packed, itIsLater: Packed ← BasicTime.nullGMT];
pretend it is now for the purposes of posting reminders. If a second time is specified (itIsLater), look for a range of reminders to display between itIsNow and itIsLater.
DisableEventMinder: PRIVATE PROC;
EnableEventMinder:
PRIVATE
PROC;
itIsNow:
PRIVATE Tempus.Packed;
determines now both for the purposes of posting reminders and also registration of events.
Save: PRIVATE PROC;
BuildHickEvent: PRIVATE PROC [ ev: Event] RETURNS [ hEv: Hickory.EventTuple];
AddEvent: PRIVATE PROC [event: Event];
walnutUser: PRIVATE BOOL;
peanutUser: PRIVATE BOOL;
reminderButtons: Menus.MenuEntry;
END.
Edited on March 13, 1984 6:11:12 pm PST, by Pier
changes to: EnterEventMinder to take an early and a later time and display a range of events, DIRECTORY
Edited on June 19, 1984 9:16:07 am PDT, by Binding
changes to: EventRecord, DIRECTORY, Viewer
Edited on June 21, 1984 2:40:18 pm PDT, by Binding
changes to: DIRECTORY, EventRecord, IconLabelType, EnterEventMinder, itIsNow, Save, AddEvent, EventRecord