-- EasyTool.mesa -- last edit June 21, 1984 6:38:43 pm PDT DIRECTORY IO USING[STREAM], Rope USING[ROPE]; EasyTool: DEFINITIONS = BEGIN ToolHandle: TYPE = REF ToolBody; ToolBody: TYPE; ItemHandle: TYPE = REF ItemBody; ItemBody: TYPE; DefineItemsProc: TYPE = PROCEDURE[ defineButton: PROCEDURE[ buttonName: Rope.ROPE, buttonProc: PROCEDURE[ REF ANY], data: REF ANY ← NIL -- supplied to buttonProc, if NIL then toolData is supplied to buttonProc ] RETURNS[ItemHandle], defineItem: PROCEDURE[ prefix, label, suffix: Rope.ROPE ← NIL, ref: REF ANY, forSize: Rope.ROPE ← NIL, editable: BOOLEAN ← FALSE ] RETURNS[ItemHandle], defineFiller: PROCEDURE[ width, height: CARDINAL ] RETURNS[ItemHandle], defineMatrix: PROCEDURE[ items: LIST OF LIST OF ItemHandle, rowLead: INTEGER ← 5, colSpacing: INTEGER ← 5 ] RETURNS[ItemHandle], defineRow: PROCEDURE[ items: LIST OF ItemHandle, spacing: INTEGER ← 5 ] RETURNS[ItemHandle], defineColumn: PROCEDURE[ items: LIST OF ItemHandle, lead: INTEGER ← 5 ] RETURNS[ItemHandle] ] RETURNS[ItemHandle]; -- return the outermost item handle DefineTool: PROCEDURE[ toolName: Rope.ROPE, toolData: REF ANY, obtainItems: DefineItemsProc] RETURNS[ToolHandle]; UpdateScreen: PROCEDURE[ToolHandle]; SaveValues: PROCEDURE[tool: ToolHandle, on: IO.STREAM]; RestoreValues: PROCEDURE[tool: ToolHandle, from: IO.STREAM]; UnimplimentedType: ERROR; -- raised by defineItem END.. -- September 3, 1982 12:06 pm: Sturgis, started EasyTool -- September 5, 1982 2:13 pm: Sturgis: add unsigneditem, signedItem, and booleanItem. -- September 6, 1982 10:27 am: Sturgis: simplify interface to use REF ANY and UpdataValues. Add SaveValues, RestoreValues. -- September 6, 1982 8:22 pm: add skipOver. -- September 18, 1982 12:13 pm: convert to new form using Matrices, Rows, and Columns. -- September 18, 1982 2:06 pm: add Filler. -- September 18, 1982 2:54 pm: add lead and space parameters to the matrix, row and column calls. -- October 6, 1982 3:17 pm: add a data field to defineButton. -- June 21, 1984 6:38:16 pm PDT: conversion to Cedar 5.2 (IO.Handle becomes IO.STREAM)