TableSelection.Mesa
Created by Rick Beach, September 23, 1984 8:47:49 pm PDT
DIRECTORY
Graphics, IO, Real, Rope, TableBase, TSOutput, TSTypes;
TableSelection: CEDAR DEFINITIONS = {
OPEN TableBase;
KindOfSelection: TYPE = {box, row, column, table};
BeforeOrAfter: TYPE = {before, after};
Selection: TYPE = REF SelectionRec;
SelectionRec: TYPE = RECORD [
table: RefTable ← NIL,
kind: KindOfSelection ← box,
list: LIST OF SelectedThing ← NIL,
insertion: BeforeOrAfter ← before
];
SelectedThing: TYPE ~ REF SelectedThingRec;
SelectedThingRec: TYPE ~ RECORD [
box: RefTableBox ← NIL,
grid1, grid2: GridNumber ← 0
];
NewSelection: PROCEDURE [table: TableBase.RefTable]
RETURNS [sel: Selection];
AnEmptySelection: PROCEDURE [sel: Selection] RETURNS [BOOLEAN];
ASingleSelection: PROCEDURE [sel: Selection] RETURNS [BOOLEAN];
ResolveToBox: PROCEDURE [table: RefTable, x, y: TSTypes.Dimn] RETURNS [box: RefTableBox];
x, y must be within the bounding box of table and relative to its coordinate system
SelectBox: PROCEDURE [table: RefTable, box: RefTableBox, kind: KindOfSelection] RETURNS [sel: Selection];
GrowSelection: PROCEDURE [sel: Selection, which: RowOrColumn];
}.