home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / educatio / tw31.zip / TWTUT6.CHP < prev    next >
Text File  |  1993-05-25  |  8KB  |  340 lines

  1. %
  2. #EF
  3. #TGETTING FANCY
  4. #C2,R6
  5. In this ~HChapter~N we'll look at some of the more complex ~H~bTutorialWriter~N
  6.  
  7. Commands. These are the ones that let you do some really fancy stuff
  8.  
  9. in your ~M~Itutorial~N.
  10.  
  11.  
  12. Here's what we'll cover :
  13.  
  14. ~H#BO,x1,y1,x2,y1,Boxtype,Grow,Center,Lines,Fore,Back~N   An Overlay Box
  15. ~H#BN,x1,y1,x2,y1,Boxtype,Grow,Center,Lines,Fore,Back~N   A Normal Box
  16. ~H#SK~N                                                   Screen Saving
  17. ~H#SS,Direction,x1,y1,x2,y2,n~N                           Screen Scrolling
  18. ~H%~N                                                     Paging Back
  19.  
  20.  
  21. And we'll start with the most complex of all, the ~HBox Commands~N.
  22. #W
  23. %
  24. #EF
  25. #T
  26. #C2,R5
  27. The box ~HCommands~N are the most complex of all ~H~bTutorialWriter~H Commands~N. There
  28.  
  29. are two types of boxes - an ~HOverlay~N box which disappears after 60 seconds
  30.  
  31. or when a key is pressed, leaving the underlying text intact and a ~HNormal~N
  32.  
  33. box which stays on screen until the screen is cleared. Here is the full ~HCommand~N
  34.  
  35. for an ~HOverlay~N box :. ~H#BO,25,16,70,22,7,1,1,5,14,4~N
  36. #W
  37. #EL,25
  38. #BO,40,17,80,20,0,1,0,2,1,3
  39. We start with the Command for
  40. an Overlay Box.
  41.  
  42. #C2,R16
  43. ~G~I#BO
  44. #W
  45. #BO,40,16,80,21,0,1,0,4,1,3
  46. Now we need to position the box
  47. on the screen. The first number
  48. gives the first Column and the
  49. second number, the top Row.
  50. #C5,R16
  51. ~H~F,25,16~N
  52. #BO,40,16,80,20,0,1,0,3,1,3
  53. It starts at Column 25 in Row 16.
  54. The next two numbers give the
  55. last Column and bottom Row.
  56. #C5,R16
  57. ~G~I,25,16~H~F,70,22~N
  58. #BO,40,16,80,22,0,1,0,5,1,3
  59. The next number is the box type.
  60. The Quick Reference print-out
  61. or the Help system shows the codes
  62. available.  7 is a double border
  63. box with a dropped shadow.
  64. #C5,R16
  65. ~G~I,25,16,70,22~H,7~N
  66. #BO,40,16,80,20,0,1,0,3,1,3
  67. The box will appear fully drawn
  68. if the next number is 0, or will
  69. ''explode'' if it is 1.
  70. #C5,R16
  71. ~G~I,25,16,70,22,7~H,1~N
  72. #BO,40,16,80,20,0,1,0,3,1,3
  73. The next number says Center
  74. the Text if it is 1, or don't
  75. if it is 0.
  76. #C5,R16
  77. ~G~I,25,16,70,22,7,1~H,1~N
  78. #BO,40,16,80,19,0,1,0,2,1,3
  79. Now a number to tell how many lines
  80. of text to read into the box.
  81. #C5,R16
  82. ~G~I,25,16,70,22,7,1,1~H,5~N
  83. #BO,40,16,80,20,0,1,0,3,1,3
  84. And finally two numbers to define the
  85. Text and the Background colors - Text
  86. color first.
  87. #C5,R16
  88. ~G~I,25,16,70,22,7,1,1,5~H,14,4~N
  89. #BO,40,16,80,19,0,1,0,2,1,3
  90. Now put the five lines of text
  91. immediately after the command.
  92. #C5,R16
  93. ~G~I,25,16,70,22,7,1,1,5,14,4~N
  94. #C1,R17
  95.  Overlay box, col 25 row 16 to
  96.  col 70 row 22, doubleborder/dropshadow,
  97.  exploding, -  center 5 lines of
  98.  text written in yellow on red.
  99.  Does not erase underlying text.
  100. #W
  101. #BO,25,16,70,22,7,1,1,5,14,4
  102. Overlay box, col 25 row 16 to
  103. col 70 row 22, doubleborder/dropshadow,
  104. exploding, -  center 5 lines of
  105. text written in yellow on red.
  106. Does not erase underlying text.
  107. #EL,25
  108. #WP
  109. %
  110. #EF
  111. #T
  112. #C2,R5
  113. The good news is that the ~HCommand~N for a ~HNormal~N box is almost identical
  114.  
  115. to that for an ~HOverlay~N box. Change ~C~I#BO~N to ~C~I#BN~N and it is a ~HNormal~N box.
  116.  
  117. The only other change to be made is the number for the ~C~IBoxtype~N. ~HNormal~N
  118.  
  119. boxes do not have dropped shadows, so there is a different set of ~C~IBoxtype~N
  120.  
  121. codes. They are explained in the ~HQuick Reference~N print-out and the ~c~ZHelp~N
  122.  
  123. system within the ~H~bTutorialWriter~H Editor~N.
  124.  
  125.  
  126. ~H#BN,25,16,70,22,2,0,0,5,0,3
  127. Normal box, col 25 row 16 to
  128. col 70 67 row 22, doubleborder
  129. and not exploding, - no centering.
  130. 5 lines of text black on cyan.
  131. Does not disappear after a delay.
  132. #W
  133. #BN,25,16,70,22,2,0,0,5,0,3
  134. Normal box, col 25 row 16 to
  135. col 70 67 row 22, doubleborder
  136. and not exploding, - no centering.
  137. 5 lines of text black on cyan.
  138. Does not disappear after a delay.
  139. #EL,25
  140. #WP
  141. #B
  142. #SK
  143.  
  144. %
  145. #EF
  146. #T
  147. #C2,R5
  148. Now we'll take a look at the ~HScreen Saving Commands~N.
  149.  
  150.  
  151. The ~HCommand~N which saves a complete screen is ~C~I#SK,S,n~N  ( ~C~In~N is the number used
  152.  
  153. to identify that screen ).  Theoretically, up to 10 separate screens can
  154.  
  155. be saved, but since each one requires ~H5000 bytes of memory~N , the number
  156.  
  157. that you will be able to save will depend on the amount of memory available
  158.  
  159. in the computer on which your ~M~ITutorials~N will be run.
  160.  
  161.  
  162.  
  163. When a screen has been saved, it remains in computer memory until it is
  164.  
  165. disposed of by using the ~HCommand~C~I #SK,D,n~N.
  166. #WP
  167. %
  168. #EF
  169. #T
  170. #C2,R5
  171. The ~HCommand~N to restore a saved screen is ~C~I#SK,R,Direction,n~N. The values
  172.  
  173. for ~C~IDirection~N are ~C~IU~N for Up,  ~C~ID~N for Down,  ~C~IL~N for Left and  ~C~IR~N for Right.
  174.  
  175. When these values are used, the ~HScreen ~C~In~H will be restored by sliding towards
  176.  
  177. the ~C~IDirection~H specified~N. To restore a screen without sliding, the value ~C~IN~N
  178.  
  179. ( for i~C~IN~Nstantly ) is used for ~C~IDirection~N.
  180.  
  181. I'll create a screen with ~C~I#HF~N and save it ~C~I#SK,S,1~N. Then I'll restore it with
  182.  
  183. each of the ~C~IDirection~N values :
  184. #SK,S,2
  185. #WN
  186. #HF,1,4,80,24,5,0,7
  187. #D2
  188. #SK,S,1
  189. #SK,R,N,2
  190. #C2,R20
  191. ~K~H#SK,R,L,1~N~k
  192. #EL,25
  193. #WN
  194. #SK,S,2
  195. #SK,R,L,1
  196. #EL,25
  197. #WN
  198. #SK,R,N,2
  199. #C2,R21
  200. ~K~H#SK,R,R,1~k~N
  201. #SK,D,2
  202. #SK,S,2
  203. #EL,25
  204. #WN
  205. #SK,R,R,1
  206. #EL,25
  207. #WN
  208. #SK,R,N,2
  209. #C2,R22
  210. ~K~H#SK,R,D,1~k~N
  211. #SK,D,2
  212. #SK,S,2
  213. #EL,25
  214. #WN
  215. #SK,R,D,1
  216. #EL,25
  217. #WN
  218. #SK,R,N,2
  219. #C2,R23
  220. ~K~H#SK,R,U,1~k~N
  221. #SK,D,2
  222. #SK,S,2
  223. #EL,25
  224. #WN
  225. #SK,R,U,1
  226. #EL,25
  227. #WN
  228. #SK,R,N,2
  229. #C2,R24
  230. ~K~H#SK,R,N,1~k~N
  231. #SK,D,2
  232. #SK,S,2
  233. #EL,25
  234. #WN
  235. #SK,R,N,1
  236. #EL,25
  237. #WN
  238. #SK,R,D,2
  239. #SK,D,2
  240. #SK,D,1
  241. #EL,25
  242. #WP
  243. %
  244. #EF
  245. #T
  246. #C2,R5
  247. ~H#SS,Direction,x1,y1,x2,y2,n~N                           Screen Scrolling
  248.  
  249. The ~HCommand~N to scroll the screen is ~C~I#SS,Direction,x1,y1,x2,y2,n~N. ~C~IDirection~N
  250.  
  251. has four possible values - ~C~IU~N, ~C~ID~N, ~C~IL~N, ~C~IR~N.  The section of the screen to be
  252.  
  253. scrolled is defined by ~C~Ix1,y1,x2,y2~N. And ~C~In~N tells how many rows ( if ~C~IU~N or ~C~ID~N )
  254.  
  255. or columns ( if ~C~IL~N or ~C~IR~N ) the section is to be scrolled.
  256.  
  257. Using this screen as an example, we'll scroll the second line (line ~H7~N) to the
  258.  
  259. ~C~IR~Night, from the word 'scroll' (Col ~H17~N) to the end of the word 'screen' (Col ~H34~N)
  260.  
  261. by ~H7~N columns :
  262.  
  263. ~H#SS,R,17,7,34,7,7~N
  264. #SK,S,1
  265. #W
  266. #SS,R,17,7,34,7,7
  267. #W
  268. #SK,R,N,1
  269. #C2,R23
  270. ~KNow do it to the left for lines 7 to 9!!
  271. ~H#SS,L,17,7,34,9,7~N~k
  272. #SK,S,1
  273. #W
  274. #SS,L,17,7,34,9,7
  275. #W
  276. #SK,R,N,1
  277. #W
  278. #C45,R19
  279. ~KScroll lines 7 to 11 down two rows.
  280. ~H#SS,D,17,7,34,11,2~N~k
  281. #SK,S,1
  282. #W
  283. #SS,D,17,7,34,11,2
  284. #W
  285. #SK,R,N,1
  286. #W
  287. #C45,R22
  288. ~KScroll lines 7 to 11 up two rows.
  289. ~H#SS,U,17,7,34,11,2~N~k
  290. #SK,S,1
  291. #W
  292. #SS,U,17,7,34,11,2
  293. #EL,25
  294. #SK,D,1
  295. #WP
  296. %
  297. #EF
  298. #T
  299. #C2,R6
  300. Now let's look at ~HPaging Back~N in a ~M~Itutorial~N.
  301.  
  302.  
  303. To use ~w~Z PAGEBACK ~N you must mark the 'pages' in your ~HCHAPTER~N by placing a ~C~I%~N
  304. in the first position in a Row. It should be used between ~C~I#W~N which halts
  305. the display, and ~C~I#EF~N which clears the screen.  Then it will be invisible to
  306. the reader.
  307.  
  308.  
  309. The arithmetic of ~HPaging Back~N is simple. ~G~ITWTEACH~N counts the number of ~C~I%~N signs
  310. it has read. When you ~Z~w PAGEBACK ~N, it deducts one from this number, and goes to
  311. that ~HMarker~N. This means there must always be at least two ~C~I%~N signs used. So to
  312. activate the ~HPage Marker~N on an ~G~Iearlier screen~N, the screen you are viewing must
  313. also have a ~HMarker~N. This is important on the ~HLAST~N screen of your ~M~Itutorial~N.
  314. Even though it will not be paged back to, the ~C~I%~N is needed to activate any
  315. previous ~HMarker~N.
  316. #WP
  317. %
  318. #EF
  319. #T
  320. #C2,R6
  321. It is best to mark 'pages' which are completely self-contained. If you have a
  322.  
  323. sequence of pages where a point is being built screen by screen, mark the
  324.  
  325. 'page' at the start of the sequence with ~C~I%~N, but not the following screens.
  326.  
  327. Then when ~w~Z PAGEBACK ~N is used, it will jump back to the start of the build-up.
  328.  
  329. You do not have to mark every 'page'.  You decide which 'page' the student will
  330.  
  331. jump to when the ~w~Z PAGEBACK ~N is selected.
  332.  
  333.  
  334.  
  335. And to activate the ~w~Z PAGEBACK ~N button, add ~C~IP~N to the ~C~I#W~H Command~N. But watch those
  336.  
  337. ~HCommas~N!!  ~G~I#WN,H,P~N or ~G~I#WP~N or ~G~I#WH,P~N etc.
  338. #WP
  339. #X
  340.