home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / windows / kpwdemo.zip / PALETTED.SRC < prev    next >
Text File  |  1990-06-28  |  6KB  |  160 lines

  1. temp is window (,25,6,33.57,9.375,,[popup,showChildren,Siblings,visible,DialogFrame]).
  2. if last ( system_info () ) > 2 then hyper_display (blue).
  3. set_text (, '
  4.  
  5. #x5One moment while the 
  6.  
  7. #x5color palette loads...
  8.  ').
  9. use_font (oem_fixed_font).
  10. tc is '#bwhite #x4#y2'.               
  11. wmain is window (,5,3,73,23,'Window and Text Colors',[popupwindow,titlebar]).
  12. m1 is menu ([ [&Text, '&Show Colors'], &Quit,&Help],select).
  13. showColor is no.
  14. plain is '                               
  15.  
  16.  1] black          10] green2           19] green
  17.  2] darkBlue       11] darkBlue         20] blueGreen
  18.  3] blue           12] blue2            21] cyan
  19.  4] brown          13] mossGreen        22] brightGreen       
  20.  5] darkPurple     14] gray             23] lightGreen
  21.  6] purple         15] purple2          24] lightBlue
  22.  7] red            16] orange           25] yellow
  23.  8] pink           17] pink2            26] lightYellow
  24.  9] magenta        18] magenta2         27] white'.
  25.  
  26. colored is '                               
  27.  
  28.  1] black          #fgreen2 10] green2           #fgreen 19] green
  29.  #fdarkblue 2] darkBlue       #fdarkblue2 11] darkBlue2        #fbluegreen 20] blueGreen
  30.  #fblue 3] blue           #fblue2 12] blue2            #fcyan 21] cyan
  31.  #fbrown 4] brown          #fmossgreen 13] mossGreen        #fbrightgreen 22] brightGreen       
  32.  #fdarkpurple 5] darkPurple     #fgray 14] gray             #flightgreen 23] lightGreen
  33.  #fpurple 6] purple         #fpurple2 15] purple2          #flightblue 24] lightBlue
  34.  #fred 7] red            #forange 16] orange           #fyellow 25] yellow
  35.  #fpink 8] pink           #fpink2 17] pink2            #flightyellow 26] lightYellow
  36.  #fmagenta 9] magenta        #fmagenta2 18] magenta2         #fwhite #bblack 27] white'.
  37. text (?plain).
  38. window (,1,11,8,3,,[childwindow,visible],?wmain,,black).
  39. text (?tc,1).
  40. window (,9,11,8,3,,[childwindow,visible],?wmain,,darkblue).
  41. text (?tc,2).
  42. window (,17,11,8,3,,[childwindow,visible],?wmain,,blue).
  43. text (?tc,3).
  44. window (,25,11,8,3,,[childwindow,visible],?wmain,,brown).
  45. text (?tc,4).
  46. window (,33,11,8,3,,[childwindow,visible],?wmain,,darkpurple).
  47. text (?tc,5).
  48. window (,41,11,8,3,,[childwindow,visible],?wmain,,purple).
  49. text (?tc,6).
  50. window (,49,11,8,3,,[childwindow,visible],?wmain,,red).
  51. text (?tc,7).
  52. window (,57,11,8,3,,[childwindow,visible],?wmain,,pink).
  53. text (?tc,8).
  54. window (,65,11,8,3,,[childwindow,visible],?wmain,,magenta).
  55. text (?tc,9).
  56.  
  57. window (,1,14,8,3,,[childwindow,visible],?wmain,,green2).
  58. text (?tc,10).
  59. window (,9,14,8,3,,[childwindow,visible],?wmain,,darkblue2).
  60. text (?tc,11).
  61. window (,17,14,8,3,,[childwindow,visible],?wmain,,blue2).
  62. text (?tc,12).
  63. window (,25,14,8,3,,[childwindow,visible],?wmain,,mossgreen).
  64. text (?tc,13).
  65. window (,33,14,8,3,,[childwindow,visible],?wmain,,gray).
  66. text (?tc,14).
  67. window (,41,14,8,3,,[childwindow,visible],?wmain,,purple2).
  68. text (?tc,15).
  69. window (,49,14,8,3,,[childwindow,visible],?wmain,,orange).
  70. text (?tc,16).
  71. window (,57,14,8,3,,[childwindow,visible],?wmain,,pink2).
  72. text (?tc,17).
  73. window (,65,14,8,3,,[childwindow,visible],?wmain,,magenta2).
  74. text (?tc,18).
  75.  
  76. window (,1,17,8,3,,[childwindow,visible],?wmain,,green).
  77. text (?tc,19).
  78. window (,9,17,8,3,,[childwindow,visible],?wmain,,bluegreen).
  79. text (?tc,20).
  80. window (,17,17,8,3,,[childwindow,visible],?wmain,,cyan).
  81. text (?tc,21).
  82. window (,25,17,8,3,,[childwindow,visible],?wmain,,brightgreen).
  83. text (?tc,22).
  84. window (,33,17,8,3,,[childwindow,visible],?wmain,,lightgreen).
  85. text (?tc,23).
  86. window (,41,17,8,3,,[childwindow,visible],?wmain,,lightblue).
  87. text (?tc,24).
  88. window (,49,17,8,3,,[childwindow,visible],?wmain,,yellow).
  89. text (?tc,25).
  90. window (,57,17,8,3,,[childwindow,visible],?wmain,,lightyellow).
  91. text (?tc,26).
  92. window (,65,17,8,3,,[childwindow,visible],?wmain,,white).
  93. text (?tc,27).
  94. set_display_window (?wmain).
  95. show_window ( ?wmain ).
  96. close_window (?temp).
  97.  
  98. topic select (item).
  99.  do (?item).
  100.  
  101.   topic '&Show Colors'.
  102.     if ?showColor is no
  103.        then set_text (,?colored) and
  104.                check_menu_item (?m1,'&Show Colors') and
  105.                showColor is yes
  106.        else set_text (,?plain) and
  107.                uncheck_menu_item (?m1,'&Show Colors') and
  108.                showColor is no.
  109.   end.
  110.  
  111.   topic &help.
  112.     wh is window (,7,5,68,19,,[Dialogwindow,visible]).
  113.     use_font (system_font).
  114.     make_modal (?wh).
  115.     text ( ' 
  116.  WINDOW BACKGROUNDS: The colored windows show the window 
  117.   background colors. These are defined in the WINDOW command.
  118.        WINDOW (ET,C,R,W,H,T,S,P,TEXTCOLOR,BACKCOLOR,E).
  119.   #mCustom colors#m are defined using RBG values of the color.
  120.  
  121.  TEXT: To view the text colors select Text/Show Colors.
  122.   These are the colors that will be displayed in the foreground
  123.   or background for text. Text color is set in WINDOW or,
  124.   using ##F for foreground or ##B for background in the command
  125.   that defines the text to be displayed.
  126.  
  127.   Depending on your monitor, duplicate colors may be displayed.
  128.   Colors displayed as white will not appear on the display.').
  129.     b2 is button (Continue,continue,30,16).
  130.     set_focus (?b2).
  131.     wait ().
  132.     use_font (oem_fixed_font).
  133.     close_window ().
  134.  
  135.     topic 'Custom colors'.
  136.       wh2 is window (,9,7,64,16,,[Dialogwindow,visible]).
  137.       make_modal (?wh2).
  138.       text ('
  139.  
  140.   Custom colors are defined by entering the number of
  141.   the RBG value in the WINDOW command. The RBG value is:
  142.  
  143.      COLOR = (?BLUE * 65536) + (?GREEN * 256) + ?RED
  144.  
  145.   The knowledge base COLOR.KB helps you define new colors.
  146.   The code shows how RBG values are used.').
  147.       b1 is button (Continue,continue,28,13).
  148.       set_focus (?b1).
  149.       wait ().
  150.       close_window ().
  151.     end.    
  152.   end.
  153.  
  154.   topic &quit.
  155.     close_window ().
  156.     new_kb ('demo.ckb').    
  157.   end.
  158.  
  159. end. (* select *)
  160.