Constants
ColWidth: CARDINAL = 100; -- ViewerSpecs.openLeftWidth/6;
CharWidth: CARDINAL = 9; -- width allocated for one char
RowHeight: CARDINAL = ViewerSpecs.messageWindowHeight+2;
FormWidth: CARDINAL = 600; -- ViewerSpecs.openLeftWidth;
FormHeight: CARDINAL = 25*RowHeight;
Delta: CARDINAL = 10000; -- to move container around
Types
YearTable:
TYPE =
RECORD [
table: VTables.VTable,
rows, cols, height, width, xOff, yOff: CARDINAL,
buttons: ARRAY [ 1..6] OF Buttons.Button
];
MonthTable:
TYPE =
RECORD [
table: VTables.VTable,
rows, cols, height, width, xOff, yOff: CARDINAL,
buttons: ARRAY [ 1..12] OF Buttons.Button
];
DayTable:
TYPE =
RECORD [
table: VTables.VTable,
rows, cols, height, width, xOff, yOff: CARDINAL,
buttons: ARRAY [ 0..6) OF ARRAY [ 0..7) OF Buttons.Button
];
Row1:
TYPE =
RECORD [
height, width, xOff, yOff: CARDINAL,
yearTable: YearTable,
monthTable: MonthTable,
dayTable: DayTable
];
MenuTable:
TYPE =
RECORD [
rows, cols, width, height: CARDINAL,
table: VTables.VTable,
buttons: ARRAY [ 0..6) OF Buttons.Button
];
Row234:
TYPE =
RECORD [
table: VTables.VTable,
rows, cols, height, width, xOff, yOff: CARDINAL,
txtViewer: ViewerClasses.Viewer -- row: 0, col: 1
];
Row5:
TYPE =
RECORD [
table: VTables.VTable,
rows, cols, height, width, xOff, yOff: CARDINAL,
menuTable: MenuTable,
txtViewer: ViewerClasses.Viewer
];
Row6:
TYPE =
RECORD [
table: VTables.VTable,
rows, cols, height, width, xOff, yOff: CARDINAL,
menuTable: MenuTable,
txtViewer: ViewerClasses.Viewer,
groups: Hickory.GroupSet, -- all the groups currently known to Hickory
groupHead: REF RopeSets.RopeSetEl ← NIL -- pointing to first el. of "groups" that is visible
];
Row7:
TYPE =
RECORD [
table: VTables.VTable,
rows, cols, height, width, xOff, yOff: CARDINAL,
txtViewers: ARRAY [ 1..2] OF ViewerClasses.Viewer -- TextViewers in col 1, 3
];
Row8:
TYPE =
RECORD [
table: VTables.VTable,
rows, cols, height, width, xOff, yOff: CARDINAL
];
CalForm:
TYPE =
RECORD [
container: Containers.Container ← NIL,
width: CARDINAL ← FormWidth,
height: CARDINAL ← FormHeight,
row1: Row1,
row2, row3, row4: Row234,
row5: Row5,
row6: Row6,
row7: Row7,
row8: Row8
];
CurSelection:
TYPE = RECORD [
date: Calendar.Date,
groups: Hickory.GroupSet,
repetition: RepetitionDescriptor,
protection: Hickory.ProtectionType ← Private,
reminder: BOOLEAN ← TRUE
];
RepetitionDescriptor:
TYPE =
RECORD [
RepeatType: Hickory.RepetitionType,
RepeatTime: Rope.ROPE,
RepeatUntil: BasicTime.GMT
];
EventDescriptor:
TYPE =
RECORD [
EventTime: BasicTime.GMT ← BasicTime.nullGMT,
Duration: LONG CARDINAL ← 0
];
TranslateSelection:
PRIVATE
--INTERNAL--
PROCEDURE [ editedEv: REF Hickory.EventTuple ←
NIL]
RETURNS [ evList: Hickory.EventList, groups: Hickory.GroupSet];
-- to look at the form as it is on screen and all the current selections and build up the
-- a suitable list of events. 'Groups' reflects all the groups into which the event should
-- be inserted. If the selection can not be translated, ERROR SyntaxError is raised.
-- If editedEv non NIL, we use its Key field to signal hickory that only some attributes
-- of an existing event were edited.
HickoryChange:
PRIVATE
--INTERNAL--
PROCEDURE [ reason: Hickory.Reason, ev: Hickory.EventTuple, data: RopeSets.RopeSet];
having updated calStorage, we now update the viewers of the form...
evl is the list of all events that have somehow changed.