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

  1. :h1 is window (,1.285,1.125,85,25,'Graphics in KnowledgePro',[popup,thickFrame,titleBar,showChildren,siblings]).
  2. :font is create_font (?bigFont).
  3. :font2 is create_font (?smallFont).
  4. use_font (?font).
  5. text ('
  6.   KnowledgePro makes it easy to display images and define hyper-regions.').
  7. button ('Return to the demo',return,35,21).
  8. use_font (system_font).
  9. if ?version is 3
  10.    then bitmapFile is 'spaceman.bmp'
  11.    else bitmapFile is 'spaceman.bm4'.
  12. :h2 is window (,45,5,35,15,ICONS,[childwindow,thickFrame,visible,titlebar],?h1 ).
  13. :h3 is window (,4,5,35,15,BITMAPS,[childwindow,thickFrame,titleBar,visible],?h1).
  14. :image is load_bitmap (?bitmapFile).
  15. bitmap (?image,1,1).
  16. :b1 is button ('See Code',code,23,2).
  17.  
  18. set_display_window (?h2).
  19. text ('
  20.  
  21. #x15Point and click 
  22. #x18 to select an 
  23. #x25icon.').
  24. if ?version is 3
  25.    then :i1 is load_icon ('kpwin.ico') and
  26.         icon (?i1,8,10)
  27.    else :i1 is [].
  28.  
  29. :i2 is load_icon (exclamation_icon).
  30. :i3 is load_icon (hand_icon) .
  31. :i4 is load_icon (question_icon).
  32. :i5 is load_icon (asterisk_icon).
  33. :iconList is [?i1,?i2,?i3,?i4,?i5].
  34. :nameList is [KnowledgePro,Exclamation,Stop,Question,Information].
  35. icon (?i2,3,2).
  36. icon (?i3,11,5).
  37. icon (?i4,19,8).
  38. icon (?i5,27,11).
  39. hyper_region (KnowledgePro,8,10,7,3).
  40. hyper_region (Exclamation,3,2,7,3).
  41. hyper_region (Stop,11,5,7,3).
  42. hyper_region (Question,19,8,7,3).
  43. hyper_region (Information,27,11,7,3).
  44. button ('Continue',continue,18,18,).
  45.  
  46. show_window (?h1).
  47.  
  48. topic code.
  49.   use_font (?font2).
  50.   set_display_window (?h2).
  51.   hide_window (?b1).
  52.   window (,1,1,50,50,,[child,showchildren,siblings,visible],?h3).
  53.   text ('
  54.  window (,6,5,35,15,BITMAPS,
  55.    [popupWindow,thickFrame,
  56.     titleBar,visible]).
  57.  image is load_bitmap (''sample.bmp'').
  58.  bitmap (?image,1,1).
  59.  button (''See Code'',code,23,2).
  60.  
  61.  Image captured using ImagePrep by
  62.  Computer Presentations Inc.').
  63.   button (Continue,done,12,11.5).
  64.   use_font (system_font).
  65.  
  66.   topic done.
  67.     close_window ().
  68.     show_window (?b1).
  69.   end.
  70.  
  71. end.
  72.  
  73. topic mark (item).
  74.   window (,1,1,50,50,,[child,showChildren,visible],?h2).
  75.   text ('
  76.   Each icon is overlaid with a 
  77.   hyper-region. Here is the icon
  78.   which you selected.').
  79.   handle is element ( ?iconList, where (?nameList,?item) ).
  80.   icon (?handle,15,7). 
  81.   button (Continue,done,13,11).
  82.  
  83.   topic done.
  84.     close_window ().
  85.   end.
  86.  
  87. end.
  88.  
  89. topic return.
  90.   delete_font ([?font,?font2]). 
  91.   delete_bitmap (?image).
  92.   delete_icon ([ ?i1,?i2,?i3,?i4,?i5]).
  93.   close_window (?h1).
  94.   continue ().
  95. end.