home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a066 / 1.img / WIN.CH < prev    next >
Encoding:
Text File  |  1992-03-20  |  4.8 KB  |  123 lines

  1. /*
  2.     win.ch
  3.  
  4.     Copyright (c) 1991 Anton van Straaten
  5. */
  6.  
  7. /*
  8.     the following can be passed to the 'new' message for the window
  9.     class to specify the type of border desired.  They differ from
  10.     the definitions in Nantucket's BOX.CH by having a trailing blank,
  11.     which causes the interior of the window to be filled.
  12. */
  13.  
  14. #define     NOBORDER    ""
  15. #define     SNGLBORD    "┌─┐│┘─└│ "
  16. #define     DUBLBORD    "╔═╗║╝═╚║ "
  17.  
  18.  
  19. /*
  20.     the following are constants used as parameters to the 'title' message,
  21.     to position window titles as desired.
  22. */
  23.  
  24. #translate  wTL =>  -1      // top left
  25. #translate  wTC =>  -2      // top centre
  26. #translate  wTR =>  -3      // top right
  27. #translate  wBL =>  -4      // bottom left
  28. #translate  wBC =>  -5      // bottom centre
  29. #translate  wBR =>  -6      // bottom right
  30.  
  31. #translate  row()       =>  winrow()
  32. #translate  col()       =>  wincol()
  33. #translate  maxrow()    =>  winmaxrow()
  34. #translate  maxcol()    =>  winmaxcol()
  35.  
  36. /*
  37.     The following #command definitions have been adapted from the
  38.     Clipper 5.01 STD.CH header file (copyright Nantucket Corp.)
  39. */
  40.  
  41. #command @ <row>, <col>                          ;
  42.       => Scroll( <row> + wintop(), <col> + winleft(), <row> + wintop() ) ;
  43.        ; SetPos( <row> + wintop(), <col> + winleft())
  44.  
  45. #command @ <top>, <left> CLEAR                                          ;
  46.       => Scroll( <top> + wintop(), <left> + winleft() )                 ;
  47.        ; SetPos( <top> + wintop(), <left> + winleft() )
  48.  
  49. #command @ <top>, <left> CLEAR TO <bottom>, <right>                     ;
  50.       => Scroll( <top> + wintop(), <left> + winleft(), <bottom> + wintop(), <right> + winleft() ) ;
  51.        ; SetPos( <top> + wintop(), <left> + winleft() )
  52.  
  53.  
  54. ***
  55. *  @..BOX
  56. *
  57.  
  58. #command @ <top>, <left>, <bottom>, <right> BOX <string>                ;
  59.                                             [COLOR <color>]             ;
  60.       => DispBox(                                                       ;
  61.           <top> + wintop(), <left> + winleft(), <bottom> + wintop(), <right> + winleft(), <string>    ;
  62.                   [, <color> ]                                          ;
  63.                 )
  64.  
  65.  
  66. #command @ <top>, <left> TO <bottom>, <right> [DOUBLE]                  ;
  67.                                               [COLOR <color>]           ;
  68.       => DispBox(                                                       ;
  69.           <top> + wintop(), <left> + winleft(), <bottom> + wintop(), <right> + winleft(), 2   ;
  70.                   [, <color> ]                                          ;
  71.                 )
  72.  
  73.  
  74. #command @ <top>, <left> TO <bottom>, <right> [COLOR <color>]           ;
  75.                                                                         ;
  76.       => DispBox(                                                       ;
  77.           <top> + wintop(), <left> + winleft(), <bottom> + wintop(), <right> + winleft(), 1   ;
  78.                   [, <color> ]                                          ;
  79.                 )
  80.  
  81. ***
  82. *  @..SAY
  83. *
  84.  
  85. #command @ <row>, <col> SAY <xpr>                                       ;
  86.                         [PICTURE <pic>]                                 ;
  87.                         [COLOR <color>]                                 ;
  88.                                                                         ;
  89.       => DevPos( <row> + wintop(), <col> + winleft() )                  ;
  90.        ; DevOut( _wintrunc( transform( <xpr>, <pic> ), <col> ) [, <color>] )
  91.  
  92.  
  93. #command @ <row>, <col> SAY <xpr>                                       ;
  94.                         [COLOR <color>]                                 ;
  95.                                                                         ;
  96.       => DevPos( <row> + wintop(), <col> + winleft() )                  ;
  97.        ; DevOut( _wintrunc( transform( <xpr>, '' ), <col> ) [, <color>] )
  98.  
  99.  
  100. ***
  101. *  @..GET
  102. *
  103.  
  104. #command @ <row>, <col> GET <var>                                       ;
  105.                         [PICTURE <pic>]                                 ;
  106.                         [VALID <valid>]                                 ;
  107.                         [WHEN <when>]                                   ;
  108.                         [SEND <msg>]                                    ;
  109.                                                                         ;
  110.       => SetPos( <row> + wintop(), <col> + winleft() )                  ;
  111.        ; AAdd(                                                          ;
  112.                GetList,                                                 ;
  113.                _GET_( <var>, <(var)>, <pic>, <{valid}>, <{when}> )      ;
  114.              )                                                          ;
  115.       [; ATail(GetList):<msg>]
  116.  
  117.  
  118. #command @ <row>, <col> PROMPT <prompt> [MESSAGE <msg>]         ;
  119.       => __AtPrompt( <row> + wintop(), <col> + winleft(), _wintrunc( <prompt>, <col> ), <msg> )
  120.  
  121.  
  122. // eof win.ch
  123.