home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a067 / 1.img / GRUMP501.EXE / BOXTITLE.PRG < prev    next >
Encoding:
Text File  |  1991-07-02  |  1.2 KB  |  44 lines

  1. /*
  2.    Program: BOX_TITLE()
  3.    System: GRUMPFISH LIBRARY
  4.    Author: Greg Lief
  5.    Copyright (c) 1988-90, Greg Lief
  6.    Clipper 5.x version
  7.    Compile instructions: clipper boxtitle /n/w/a
  8.  
  9.    Called by: EXBOX()
  10.               POPBOX()
  11.               DROPBOX()
  12.               SHADOWBOX()
  13.  
  14.    NOT FOR USE AS A STAND-ALONE FUNCTION!!!
  15.  
  16.    Draws box title with frame
  17. */
  18.  
  19. //───── begin preprocessor directives
  20.  
  21. #include "grump.ch"
  22.  
  23. //───── end preprocessor directives
  24.  
  25. function box_title(ntop, nleft, nright, ctitle, cboxstring, lcrossbar, ccolor)
  26. local nmidpoint := nleft + (int(nright - nleft + 1) / 2)
  27. default lcrossbar to .f.
  28. if lcrossbar
  29.    @ ntop + 1, nmidpoint - (int(len(ctitle) / 2)) ssay ctitle color ccolor
  30.    @ ntop + 2, nleft ssay substr(cboxstring, 12, 1) + ;
  31.                replicate(substr(cboxstring, 2, 1),  ;
  32.                (nright - nleft - 1)) + substr(cboxstring, 13, 1) color ccolor
  33. else
  34.    @ ntop, nmidpoint - (int(len(ctitle) / 2)) - 2 ssay ;
  35.                   substr(cboxstring, 10, 1) + ' ' + ctitle + ' ' + ;
  36.                   substr(cboxstring, 11, 1) color ccolor
  37. endif
  38. return NIL
  39.  
  40. * end function box_title()
  41. *--------------------------------------------------------------------*
  42.  
  43. * eof boxtitle.prg
  44.