MODULE ShowLine; (* The procedures is this module are like the procedures in the "Show" module of the same name, except that they move the current point down by the total height of the current font plus the current line skip value (maintained by the "LineSkip" module). All procedures in this module require that the current point is defined. *) IMPORT LineSkip, PS, Type; PRIVATE PROC h := NetFontHeight() IS VAR asc, dec IN asc, dec := PS.FontHeight(); h := asc + dec END END; /* Set "h" to the total height of the current font. */ PRIVATE PROC MoveDown(p) IS VAR d IN d := NetFontHeight() + LineSkip.Get(); PS.MoveTo((CAR(p), CDR(p) - d)) END END; /* Set the current point to the point a distance of the total current font height plus the current line skip below "p". */ PROC L(txt) IS VAR p IN p := PS.CurrentPoint(); PS.Type(p, txt); MoveDown(p) END END; UI TextTool(L); (* Types "txt" left-justified off the current point. *) PROC C(txt) IS VAR p IN p := PS.CurrentPoint(); Type.C(p, txt); MoveDown(p) END END; UI TextTool(C); (* Types "txt" centered about the current point. *) PROC R(txt) IS VAR p IN p := PS.CurrentPoint(); Type.R(p, txt); MoveDown(p) END END; UI TextTool(R); (* Types "txt" right-jusified off the current point. *)