%%HP: T(3)A(D)F(.);
@
@ dline : displays a line of text with a box around it, 
@         ala Windows 95 style.  7/14/97 Stan Lui
@ input : x - x-coordinate of upper left corner of box desired.
@             if x < 0, then the string is displayed centered horizontally
@         y - y-coordinate of upper left corner of box desired.
@             if y < 0, then the string is displayed centered vertically
@         tsec - time in seconds to display the text before exits.
@                tsec > 0 : number of seconds to wait.
@                tsec < 0 : specifies grob to display, and waits for user key.
@         s - string
@
@         extended parameter inputs:
@         if tsec = 100, then the input parameters to this routine is:
@         c rv   x y tsec s, where
@          c - if = 0, 'normal' operation, the underlying area is re-displayed
@              upon exit of this routine.
@              if = 1, the underlying area is NOT re-displayed upon exit, 
@              but the upper left corner point, and the underlying grob is returned.
@          rv - if = 0, 'normal' display mode - black text on white background.
@               if = 1, 'reverse' display mode- white text on black background.
@
@
@        h0 = horizontal gap from vertical line to beginning of text = 2 
@        v0 = vertical gap from horizontal line to top of text = 1
@
@        4/18/98 : If tsec = 100, it is reset to 1 in the routine.
\<< RCLF 0 0 0 0 0 0 2 1 0 0 \-> x y tsec s fs g sg dx dy b1 b2 h0 v0 h v \<<
  IF tsec 100 \=/ THEN 0 0 END \-> c rv \<<
  IF tsec 100 == THEN 1 'tsec' STO END
  s 1 \->GROB DUP IF SIZE DROP B\->R 125 > THEN {#0 #0} {#124d #4d} SUB END 
  'sg' STO sg SIZE B\->R 'dy' STO B\->R 'dx' STO
  IF x 0 < THEN 125 dx - 2 / IP 'x' STO END IF y 0 < THEN 27 'y' STO END
  h0 2 * 1 + 'h' STO v0 2 * 1 + 'v' STO
  dx h + x + 130 - IF DUP 0 > THEN x SWAP - 'x' STO ELSE DROP END
  
  x R\->B y R\->B 2 \->LIST 'b1' STO  
  dx h + x + R\->B y 5 + v + R\->B 2 \->LIST 'b2' STO 
  PICT b1 b2 SUB 'g' STO 
  PICT b1 dx h + 1 + R\->B dy v + R\->B BLANK REPL
  b1 b2 BOX 
  IF rv THEN 
    PICT x 1 + R\->B y 1 + R\->B 2 \->LIST 
GROB 131 7 FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF70FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF70FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF70FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF70FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF70FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF70FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF70
    {#0 #0} dx h + 1 - R\->B
    #6d 2 \->LIST SUB REPL
  END
 
  PICT x h0 + 1 + R\->B y v0 + 1 + R\->B 2 \->LIST sg 
  IF rv THEN GXOR ELSE GOR END

  IF c NOT THEN
   IF tsec 0 >  THEN 
    1 CF WHILE 1 FC? REPEAT
      tsec WAIT 
      IF KEY THEN DROP ELSE 1 SF END
    END
   ELSE
    1 HGLSS tsec HGLSS DO UNTIL KEY END DROP 3 HGLSS
   END

   PICT b1 g REPL
  ELSE 
   b1 g
  END

  \>>
  fs STOF \>>  
\>>



