JunoButtonsImpl.mesa
Created April 6, 1984 3:35:27 am PST by J. Stolfi (from pieces of JunoTop)
Last Edited by: Jorge Stolfi June 7, 1984 4:59:03 pm PDT
Exports button procedures for use of VieweRec. Now obsolete; this module has been folded into JunoUserEventsImpl.
DIRECTORY
JunoUserEvents USING [AppendEvents, Event],
JunoButtons,
Rope USING [ROPE];
=
BEGIN
OPEN
JunoButtons,
Evs: JunoUserEvents,
Rope;
AppendCmd:
PROC [button:
ATOM, arg1, arg2, arg3: Evs.Event ← [type: Null]] =
{Evs.AppendEvents
[[type: Button, value: button], arg1, arg2, arg3, [type: End, value: $None]]};
Hardcopy:
PUBLIC
PROC [filename: Rope.
ROPE] =
{AppendCmd[$Hardcopy, [type: Rope, value: filename]]};
Redraw:
PUBLIC
PROC =
{AppendCmd[$Redraw]};
Solve:
PUBLIC
PROC =
{AppendCmd[$Solve]};
StartOver:
PUBLIC
PROC =
{AppendCmd[$StartOver]};
SetFont:
PUBLIC
PROC [fontName:
ROPE] =
{AppendCmd[$SetFont, [type: Rope, value: fontName]]};
SetFontSize:
PUBLIC
PROC [pointSize:
INT] =
{AppendCmd [$SetFontSize, [type: Real, value: NEW[REAL ← pointSize]]]};
SetFontFace:
PUBLIC
PROC [face: Face] =
{AppendCmd [$SetFontFace,
[type: Atom, value: SELECT face FROM
plain => $plain,
italic => $italic,
bold => $bold,
boldItalic => $boldItalic,
ENDCASE => ERROR]]};
SetJustification:
PUBLIC
PROC [justification: Justification] =
{AppendCmd [$SetJustification,
[type: Atom, value: SELECT justification FROM
left => $left,
center => $center,
right => $right,
ENDCASE => ERROR]]};
END.
- - - - The following should go on the menu of the proc viewer
NewProc:
PUBLIC
PROC =
{PWin.AddText [PEtc.junoA, " CommandName(Args)", ": Body\n"]};
Parse:
PUBLIC
PROC =
{Evs.Append [$Button, $Parse, $End]};
SetProcFile:
PUBLIC
PROC[fileName: Rope.
ROPE] =
{Evs.Append [$Button, $SetProcFile, fileName, $End]};
Changed by Stolfi March 7, 1984 2:18:23 am PST:
Removed xhot, yhot (as globals and as fields of CursorArray)
Changed interface names (OldJunoSolver -> JunoOldSolver, etc)