home *** CD-ROM | disk | FTP | other *** search
/ POINT Software Programming / PPROG1.ISO / clipper / sup35s / s3colors.prg < prev    next >
Text File  |  1992-08-18  |  2KB  |  78 lines

  1. proc main
  2. local cMainScreen := savescreen(0,0,24,79)
  3. local cSuper, cInScreen
  4. local nChoice := 1
  5. local aOptions,aSelect
  6.  
  7. slsf_color("S3COLOR")
  8. initsup(.F.)
  9. if iscolor()
  10.   setblink(.f.)
  11. endif
  12. SETCOLOR(SLS_NORMCOL())
  13. SET WRAP ON
  14.  
  15. DOSCREEN()
  16.  
  17. aOptions := {;
  18.             {"Full Interactive setting  - SETCOLORS() ",{||setcolors()} },;
  19.             {"Pick from predefined list - COLPIK()) ",{||COLPIK()} },;
  20.             {"Select from stored sets in S3COLORS.DBF - SATTPICK()",{||sattpick()} },;
  21.             {"Save current set as DEFAULT in S3COLORS.DBF - SATTPUT()",{||sattput()} },;
  22.             {"Browse current settings",{||showset()} },;
  23.             {"Quit",nil};
  24.             }
  25. aSelect  := a2tosing(aOptions,1)
  26.  
  27. do while .t.
  28.  
  29.     nChoice := MCHOICE(aSelect)
  30.  
  31.     if nChoice = len(aOptions) .or. nChoice == 0
  32.          exit
  33.     else
  34.          eval(aOptions[nChoice,2])
  35.          doscreen()
  36.     endif
  37. enddo
  38. ss_implode(0,0,24,79,cMainScreen)
  39.  
  40.  
  41. //-----------------------------------------------------------------
  42. static proc showset
  43. local aSet := {;
  44.               {"SLS_NORMCOL() ", "Normal screen output", left(sls_normcol(),30)},;
  45.               {"SLS_NORMMENU()","Normal MENU color"   ,  left(sls_normmenu(),30)},;
  46.               {"SLS_POPCOL()",  "Popup screen output" ,  left(sls_popcol(),30)},;
  47.               {"SLS_POPMENU()", "Popup MENU color"    ,  left(sls_popmenu(),30)},;
  48.               {"SLS_FRAME()"  , "Box frames"          ,  left(sls_frame(),9)},;
  49.               {"SLS_SHADATT()", "Shadow attribute"    , str(sls_shadatt())},;
  50.               {"SLS_SHADPOS()", "Shadow position"     , str(sls_shadpos())},;
  51.               {"SLS_XPLODE()",  "Explode/implode"     , iif(sls_xplode(),"ON","OFF")};
  52.               }
  53.  
  54. browse2d(5,2,20,78,aSet,{"Function/Setting","Description","Current Value "},,"Current Settings")
  55. return
  56.  
  57.  
  58.  
  59. //-----------------------------------------------------------------
  60. STATIC PROC DOSCREEN
  61. local cStd,cEnh,cSuper
  62. setcolor(sls_normcol())
  63. DISPBEGIN()
  64.  
  65. cStd := alltrim(chr(standard()))
  66. cEnh := alltrim(chr(enhanced()))
  67. cSuper  := "S"+cEnh+"u"+cEnh+"p"+cEnh+"e"+cEnh+"r"+cEnh+"L"+cEnh+"i"+cEnh+"b"+cEnh+"!"+cEnh
  68. cSuper  := left(repl(cSuper,223),4000)
  69. restscreen(0,0,24,79,cSuper)
  70.  
  71. cSuper  := "C"+cStd+"o"+cStd+"l"+cStd+"o"+cStd+"r"+cStd+"s"+cStd+" "+cStd
  72. cSuper  := left(repl(cSuper,180),2112)
  73. dispbox(3,3,22,72,space(9))
  74. restscreen(5,5,20,70,cSuper)
  75. dispend()
  76.  
  77.  
  78.