home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 14 / CDACTUAL.iso / cdactual / demobin / share / program / Basic / QWINDO.ZIP / QWDEMOB.BAS (.txt) < prev    next >
Encoding:
QuickBASIC Tokenized Source  |  1990-01-01  |  16.6 KB  |  303 lines

  1. swattr
  2. WPRINT
  3. WLOCATEO
  4. WATTR
  5. delayk
  6. swbuttonget
  7. swcattr
  8. WCATTR
  9. swclear-
  10. WCLEARm
  11. swclose"
  12. WOPEN
  13. WCLOSE
  14. swcloseall
  15. swcls
  16. WCSRON
  17. WCLS7
  18. swcolor
  19. WCOLORD
  20. @    swcopystr`
  21. prompt
  22. savescrn}
  23. WSETCSR0
  24. WWRAP7
  25. stpos
  26.     WCOPYSTR1
  27. WCOPYSTR]
  28. function
  29.     WCOPYSTR2
  30. restorescrn
  31. swcsroff
  32. WCSROFF
  33. swcsron
  34. swcsrpos
  35. WCSRPOS1
  36. WCSRPOS
  37. WCSRPOS2C
  38. swdelrow
  39. WDELROWZ
  40. swhint
  41. WHINT
  42. swinsrow
  43. WINSROW
  44. swlint
  45. WLINTy
  46. swlocate%
  47. swmouse
  48. mouse
  49. mouse.status
  50. WMOUSE1
  51. WMOUSE
  52. MSHOW
  53. swopent
  54. swprint
  55. swrattrP
  56. WRATTR
  57. swrev
  58. @    swrevline
  59.     WREVLINE1
  60. WREVLINE
  61.     WREVLINE2
  62. offset
  63.     WREVLINE3
  64. swselect
  65. default
  66. WSELECT
  67. swsetcsr
  68. @    swvscroll
  69. swwrap
  70. accept
  71. edits
  72. cattr
  73. swclear
  74. !- WCLEAR 
  75.   WCLEAR (window_id,x1,y1,x2,y2)`
  76.   WCLEAR~~  Clears an area within a~  specified window.  Attribute`
  77. ~  of cleared area is the current~  attribute of window.  Use WCOLOR`
  78. ~  to change window attribute.`
  79.  The WCLEAR function clears part of~ this window filled with asterisks.~`
  80. swcattr
  81. !- WCATTR 
  82.   WCATTR (window_id,x,attribute)`
  83.   WCATTR~~  Changes attribute of a column~  within specified window.`
  84.  This window contains some possible~~ colors which affect each column"`
  85. ~~ of text.  This paragraph was~~ displayed before executing WCATTR.`
  86. swbuttonget
  87. !- WBUTTONGET 
  88.   WBUTTONGET (window_id,starting_focus,starting_button,num_buttons,result)`
  89.   WBUTTONGET~~  Allows selection of pre-defined~  input buttons.`
  90.   The input buttons at the bottom~  of this screen are done by the`
  91. ~  WBUTTONSET/WBUTTONGET functions.~~  See WBUTTONSET or 'Proceed'`
  92. ~  for a full demonstration.`
  93. swattr
  94. - WATTR 
  95.   WATTR (window_id,attribute)"`
  96.   WATTR~~  Changes attribute of the~  entire window screen."`
  97. Notice the different attributes.`
  98. swdelrow
  99. !- WDELROW 
  100.   WDELROW (window_id,row)"`
  101.   WDELROW~~  Deletes a row of characters~  within specified window and`
  102. ~  moves other rows beneath - up."`
  103. ~~  Handy for editor functions."`
  104.   In this example, the third row~  down will be deleted and all"`
  105. ~  the other rows will move up.~  Press ENTER to delete row...`
  106. Row 3 deleted.`
  107. swcsrpos
  108. !- WCSRPOS 
  109.   WCSRPOS (window_id,col,row)"`
  110.   WCSRPOS~~  Returns relative cursor position~  for specified window."`
  111.   Use arrow keys to move cursor.~  Press ESC to quit this screen."`
  112. Sets the physical cursor position.  This was necessary for this
  113.  demo because no writing is being done to the output window.
  114.  Any WPRINT (or WINPUT) automatically sets the physicaln
  115.  cursor to within the WPRINT'd window (if window cursor is on).h
  116. Current Col:
  117.   Row:)
  118. swcsron
  119. !- WCSRON 
  120.   WCSRON (window_id)`
  121.   WCSRON~~  Turns on visible cursor for~  specified window."`
  122.  Press ANY key to turn~ on the cursor...`
  123. ~ The cursor has been turned on.`
  124. swcsroff
  125. !- WCSROFF 
  126.   WCSROFF (window_id)"`
  127.   WCSROFF~~  Turns off visible cursor for~  specified window."`
  128.  Press ANY key to turn~ off this flashing cursor..."`
  129. ~ The cursor has been turned off."`
  130. swcopystr
  131. !- WCOPYSTR 
  132.   WCOPYSTR (window_id,string_start,num_elements,array$(),array_start)"`
  133.   WCOPYSTR~~  Copies a string array into a~  window.  Can specify starting`
  134. ~  position within the string.~  Very Fast!"`
  135. FUNCTION LIST"
  136.  Use arrow keys~ to move around~ text window."`
  137. ~~ PgUp/PgDn=page~~ ESC to Exit"`
  138. swcolor
  139. !- WCOLOR 
  140.   WCOLOR (window_id,attribute)`
  141.   WCOLOR~~  Sets current window attribute~  for subsequent WPRINT or`
  142. ~  WCOPYSTR functions.`
  143.  This is the attribute used when~ the window was opened. "`
  144.  This~ red-on-cyan color was just~ set with WCOLOR."`
  145. swcls
  146. !- WCLS 
  147.   WCLS (window_id)`
  148.   WCLS~~  Clears the entire window and~  homes the window cursor to"`
  149. ~  to (0,0) relative to inside~  of the window."`
  150.   Notice this cursor.  Press~  any key to clear window."`
  151.   This window was cleared.`
  152. swcloseall
  153. !- WCLOSEALL 
  154.   WCLOSEALL `
  155.  WCLOSEALL~~ Resets internal window pointers."`
  156. ~ Doesn't physically close any`
  157. ~ opened windows on the screen."`
  158. ~ Best to use this function at~ the beginning of your program.`
  159. swclose
  160. !- WCLOSE 
  161.   WCLOSE (window_id)`
  162.   WCLOSE~~  Closes a specified window and~  restores the screen under the"`
  163. ~  window.  If windows overlap,~  windows must be closed in"`
  164. ~  reverse order they were opened.`
  165. ANY WINDOW
  166.  This window was opened on top of~ the other windows."`
  167. ~~ Press any key to close this~ window and restore the screen~ underneath.`
  168. swhint
  169. !- WHINT 
  170.   WHINT (window_id,row)"`
  171.   WHINT~~  Makes a row of characters~  within specified window`
  172. ~  high-intensity, regardless of~  color combinations in the row."`
  173.   Blue  `
  174. Red  "`
  175. Magenta  "`
  176. White  "`
  177. ~~  Press any key to highlight~  above row..."`
  178. ~~  Row 0 highlighted.`
  179. swsetcsr
  180. !- WSETCSR 
  181.   A monochrome display has 14 lines available for the cursor
  182.  (starts at 0, ends at 13)
  183.   A color display has 8 lines available for the cursor
  184.  (starts at 0, ends at 7)e
  185.   In this demonstration, the lines for the smaller cursor are starting fromi
  186.   5 and ending at 7.  (bottom 3 lines of a color display) 
  187.   WSETCSR (window_id,start,end)"`
  188.   WSETCSR~~  Sets the size of the cursor~  within specified window`
  189.  Press ENTER to make cursor small.`
  190. notice lines 5-7 are defined for the cursor for window 2
  191. ~~ This cursor is smaller.`
  192. ~~ Press any key to continue..."`
  193. swselect
  194. !- WSELECT 
  195.   WSELECT (window_id)"`
  196.   WSELECT~~  Selects a default window"`
  197.   When a window_id is 0, ~  any window operations will be"`
  198. ~  done using the default window.~~  This window was treated as the"`
  199. ~  default window for WPRINT'ing~  this text."`
  200. swrevline
  201. !- WREVLINE 
  202.   WREVLINE (window_id,row)`
  203.   WREVLINE~~  Reverses foreground/background~  attributes of specified row in"`
  204. ~  window.  Can be used in~  highlighting a menu option, etc."`
  205. ~  Press up/down arrows to move~  reverse bar up or down."`
  206. ~  Press ESC to quit WREVLINE demo."`
  207. down arrow pressed
  208. up arrow pressed
  209. swrev
  210. !- WREV 
  211.   WREV (window_id,mode)"`
  212.   WREV~~  Reverses foreground/background~  attributes of specified window.`
  213. ~  Mode=1 to reverse inside window.~  Mode=0 to reverse window`
  214. ~  including window borders.`
  215. ~  This is mode 1 - reverse window only.`
  216. restore reversed window to normal
  217. ~ And now mode 0 - reverse entire window including borders."`
  218. swrattr
  219. !- WRATTR 
  220.   WRATTR (window_id,y,attribute)`
  221.   WRATTR~~  Changes attribute of a row~  within specified window."`
  222. ~ This window contains some possible~ colors which affect each row`
  223. ~ of text.  This paragraph was~ displayed before executing WRATTR.`
  224. swprint
  225. !- WPRINT 
  226.   WPRINT (window_id,output$)`
  227.   WPRINT~~  Outputs a string to a specified~  window."`
  228.   Three windows will appear on~  the screen and a count will`
  229. ~  be done in them.  Demonstrates~  WPRINT and the fact that`
  230. ~  each window has its own~  cursor.`
  231. WINDOW ONE
  232. WINDOW TWO
  233. WINDOW THREE
  234. Count in one position: "
  235. swopen
  236. !- WOPEN 
  237.   WOPEN (x1,y1,x2,y2,style,attribute,title$,array(),window_id)`
  238.   WOPEN~~  Opens a new window and saves~  portion of the screen under"`
  239. ~  window into array().  Up to 32~  windows may be opened at~  one time.`
  240.   Proceed to next demo (WPRINT)~  to see an example of WOPEN."`
  241. swlocate
  242. !- WLOCATE 
  243.   WLOCATE (window_id,col,row)"`
  244.   WLOCATE~~  Sets virtual cursor location~  within specified window.`
  245. ~  All subsequent WPRINT and WINPUT~  functions start output at"`
  246. ~  the new cursor location."`
  247. ~~ Notice different WLOCATE values."`
  248. swlint
  249. !- WLINT 
  250.   WLINT (window_id,row)"`
  251.   WLINT~~  Makes a row of characters~  within specified window`
  252. ~  low-intensity, regardless of~  color combinations in the row.`
  253.   Blue  `
  254. Red  "`
  255. Magenta  "`
  256. White  "`
  257. ~~  Press any key to make above~  row low-intensity...`
  258. ~~  Row 0 low-intensity.`
  259. swinsrow
  260. !- WINSROW 
  261.   WINSROW (window_id,row)"`
  262.   WINSROW~~  Inserts a row of characters~  within specified window and`
  263. ~  moves other rows down."`
  264. ~~  Handy for editor functions."`
  265.   In this example, the second row~  and all other rows beneath it"`
  266. ~  will be moved down.~  Press ENTER to insert at row 2"`
  267. ---- A row was inserted here ----"`
  268. swvscroll
  269. !- WVSCROLL 
  270.   WVSCROLL (window_id,times,direction)`
  271.   WVSCROLL~~  Scroll specified window"`
  272. ~  vertically for specified number~  of times up or down`
  273.   Works the same as VSCROLL, but~  for a currently opened window."`
  274. ~~  See VSCROLL for an example."`
  275. swmouse
  276. !- WMOUSE 
  277.   WMOUSE (window_id,button_status,column,row,flag)`
  278.   WMOUSE~~  Returns the current position~  of the mouse cursor`
  279.  relative~  to specified window"`
  280.  As you move the mouse cursor~ relative to this window the values"`
  281. ~ below will change.~      Press ESC to exit demo"`
  282. keeps cursor on while mouse is not movingu
  283. because WPRINT turns off the mouse cursorr
  284.  row="
  285.   column=")
  286.   button=")
  287.    ")
  288. ~ On border     `
  289. ~ Within window `
  290. ~ Outside window "`
  291. swwrap
  292. !- WWRAP 
  293.   WWRAP (window_id,mode)`
  294.   WWRAP~~  Selects the mode for outputting~  to specified window`
  295.   If mode=0, all text sent to the~  window will be wrapped around"`
  296. ~  to the next line.`
  297. ~~  If mode=1, the text will be lost~  when it exceeds boundaries of the`
  298. ~  window, unless a C/R is sent.`
  299. WWRAP"
  300. ~  The next line shows mode 0, wrap around."`
  301. ~~  QuickWindows is a library chock-full of functions to aid the BASIC programmer in designing windows."
  302. ~~~~  The next line contains the same phrase, but with mode 1.`
  303.