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

  1. :h1 is window (,1.285,1.125,80,25,'Hypertext 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 ('  KnowledgePro supports both full screen and defined hypertext').
  6. button ('Return to the demo',return,35,21).
  7. use_font (system_font).
  8.  
  9. :h2 is window (,4,3,35,17,'Full Screen Hypertext',[childwindow,thickFrame,titleBar,visible],?h1).
  10. auto_hyper_on ().
  11. text ('
  12.   In this window any of the text 
  13.   can be selected as hypertext.
  14.  
  15.   To select a word, point and 
  16.   click.  To select a phrase, point 
  17.   and drag to highlight, then click.').
  18.  
  19. :h3 is window (,43,3,35,17,'Defined Hypertext',[childwindow,thickFrame,visible,titlebar],?h1 ).
  20. text ('
  21.   This window contains explicitly 
  22.   defined hypertext.  Point and
  23.   click on the #mhighlighted phrases#m
  24.   to select the hypertext.
  25.  
  26.   Select here for #msample code#m. ').
  27. show_window (?h1).
  28.  
  29. topic mark (item).
  30. r is ?item.
  31. x is string_to_list (?item,[number_to_char (10),number_to_char (13)] ).
  32.   window (,1,1,50,50,,[child,showchildren,siblings,visible],?h2).
  33.   text ('
  34.  You selected the hypertext #fred
  35.   ',#x3,?item,
  36.   '
  37. #d To turn on full text hypertext 
  38.  use the command:
  39.  
  40.   auto_hyper_on ().').
  41.   button (Continue,done,13,13).
  42.  
  43.   topic done.
  44.     close_window ().
  45.   end.
  46. end.
  47.  
  48. topic 'highlighted phrases'.
  49.    window (,1,1,50,50,'Explicitly Defined Hypertext',[child,showchildren,siblings,visible],?h3 ).
  50.    text ('The color and font of hypertext 
  51. can be changed. This uses blue
  52. hypertext on a color monitor:
  53.  
  54.  if last (system_info ()) >2
  55.     then hyper_display (blue).
  56.  
  57. Here we set italic hypertext:
  58.  italic is create_font ([12,8,400,
  59.    t,f,f,0,1,34,System]).
  60.  hyper_display (black, ,?italic).').
  61.  button ('Continue',done,13,13).
  62.  
  63.   topic done.
  64.     close_window ().
  65.   end.
  66.  
  67. end.
  68.  
  69. topic 'sample code'.
  70.   window (,1,1,50,50,'Explicitly Defined Hypertext',[child,showchildren,siblings,visible],?h3 ).
  71.   text ('text ('' Point and click on the 
  72. ##highlighted phrases##m to 
  73. select the hypertext. ...'').
  74.  
  75.  topic ''highlighted phrases''.
  76.   window ().
  77.   text ('' The color and font...'').
  78.   button (Continue,continue,13,13).
  79.   wait ().
  80.   close_window ().  
  81.  end. ').
  82.   button (Continue,done,13,13).
  83.  
  84.   topic done.
  85.     close_window ().  
  86.   end.
  87. end.
  88.  
  89. topic return.
  90.   close_window (?h1).
  91.   continue ().
  92. end.