home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 19 / CD_ASCQ_19_010295.iso / dos / prg / bas / asilib11 / multiwin.doc < prev    next >
Text File  |  1994-10-22  |  24KB  |  718 lines

  1. ************************  MULTI-WINDOW SUBSYSTEM  ****************************
  2.  
  3. ASILIB Multi-Window text mode video subroutines
  4. Copyright (C) 1994 Douglas Herr ■ All rights reserved
  5.  
  6. ASILIB's multi-window system allows several pop-up windows to be stored
  7. at any given time, and permits any one window or any group of overlapping
  8. or non-overlapping windows to be displayed on the screen in any position
  9. and in any order.  Pop-up windows may be created, printed to, cleared or
  10. moved whether displayed or hidden.  Up to 10 pop-up windows may be open at
  11. any time.
  12.  
  13. IN GENERAL: to use ASILIB's multi-window subroutines, you need to:
  14.  
  15. 1) Initialize the system with MWINIT.  This sets up screen buffers and
  16.    saves the base screen which the windows will be displayed on top of.
  17.    You may re-initialize at any time with MWINIT when you want to change
  18.    the base screen.
  19.  
  20. 2) Determine the default status of newly-opened windows.  See MWDEFAULT.
  21.    If ASILIB's defaults are OK with you, you don't need to change them.
  22.  
  23. 3) Open your windows with MWOPEN.  You will need to tell MWOPEN the window
  24.    dimensions.  For each window, MWOPEN returns a handle you will need to
  25.    use when referring to the window.
  26.  
  27. 4) Fill in your window.  You can clear, fill with a character, add borders,
  28.    titles and other text to the window.
  29.  
  30. 5) Unhide selected or all windows with MWUNHIDE or MWUNHIDEALL.  If your
  31.    default status includes "not hidden" then you can skip this step.
  32.  
  33. 6) Show them on the screen with MWDISPLAY.  You won't see anything if your
  34.    program doesn't call MWDISPLAY.  MWDISPLAY makes a working copy of the
  35.    base screen, adds the windows to it, then pop the whole thing onto your
  36.    screen.  You can make any changes you want to any open windows, but you
  37.    won't see the changes until you call MWDISPLAY.
  38.  
  39. Other ASILIB subroutines allow you to enable or disable the "shadow" effect
  40. for one or all open windows, hide or unhide one or all windows, and
  41. re-arrange the order in which they appear.
  42.  
  43. When you are done with a window, you may release the memory buffers it
  44. occupies with MWCLOSE.
  45.  
  46.  
  47. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  48.  
  49. MWBORDER:     Puts single- or double-lined border, or character border,
  50.               around an open window; sets window's border flag.  The
  51.               Multi-Window border flag prevents MWClear, MWFill, MWPrint
  52.               and MWCenter from over-writing the border for the selected
  53.               window.
  54.  
  55. Parameters:   Windowhandle, windowcharacter, colorattribute.
  56.  
  57.               Windowhandle is any valid handle returned by MWOpen which
  58.               has not been closed by MWClose or MWCloseAll.
  59.  
  60.               Windowcharacter is an ASCII character to be used to create
  61.               the border.  Special cases: if windowcharacter = 0, a single-
  62.               line border is used.  If windowcharacter = -1, a double-lined
  63.               border is used.
  64.  
  65.               Colorattribute specifies the color attribute to be used to
  66.               print the border.  See ColorAtt.
  67.  
  68. Restrictions: Requires valid window handle; no error code is returned for
  69.               invalid handle.  Window border will overwrite anything within
  70.               one character of the edge of the window.
  71.  
  72. Example:
  73.  
  74. REM initialize Multi-window system and open the first window.
  75. REM for this window I want a single-line bright red border
  76. REM with a black background
  77.  
  78.         call sub "mwinit",mwseg
  79.         row0 = 5
  80.         col0 = 15
  81.         row1 = 20
  82.         col1 = 45
  83.         call sub "mwopen", row0, col0, row1, col1, handle0
  84.         call sub "mwborder", handle0, 0, 12
  85.  
  86.  
  87. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  88.  
  89. MWCENTER:    centers a string in selected window
  90.  
  91. Parameters:  windowhandle, textstring, windowrow, colorattribute
  92.  
  93.              Windowhandle is a valid handle returned by MWOpen which
  94.              has not been closed by MWClose or MWCloseAll.
  95.  
  96.              Textstring is string data that you want centered horizontally
  97.              in the pop-up window.
  98.  
  99.              Windowrow is the row in the window where you want the string
  100.              to be printed.  Window_row is the vertical position in the
  101.              window; for example, if windowrow = 1, the string will be
  102.              centerd on the first row of the window (note that if the
  103.              window has a border, the first row of the window is the first
  104.              row inside the border).
  105.  
  106.              Color attribute specifies the color attribute to be used to
  107.              print the border.  See ColorAtt.
  108.  
  109. Restrictions:
  110.              Requires valid window handle; no error code is returned for
  111.              invalid handle.
  112.  
  113. Example:
  114.  
  115. REM initialize Multi-window system and open the first window.
  116. REM for this window I want a single-line bright red border
  117. REM with a black background and a heading on the 2nd row
  118. REM inside the border.
  119.  
  120.         call sub "mwinit",mwseg
  121.         row0 = 5
  122.         col0 = 15
  123.         row1 = 20
  124.         col1 = 45
  125.         call sub "mwopen", row0, col0, row1, col1, handle0
  126.         bordercolor = 12
  127.         call sub "mwborder", handle0, 0, bordercolor
  128.         textcolor = 14
  129.         windowheading = "My First Pop-up Window"
  130.         call sub "mwcenter", handle0, windowheading, 2, textcolor
  131.  
  132.  
  133.  
  134. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  135.  
  136. MWCLEAR:     clears a window managed by the MultiWindow system.
  137.  
  138. Parameters:  windowhandle, colorattribute
  139.  
  140.              Windowhandle is a valid handle returned by MWOpen which
  141.              has not been closed by MWClose or MWCloseAll.
  142.  
  143.              Colorattribute specifies the color attribute to be used to
  144.              clear the window.  If a border has been specified, the border
  145.              will not be cleared.  See ColorAtt.
  146.  
  147. Restrictions:
  148.              Requires valid window handle; no error code is returned for
  149.              invalid handle.
  150.  
  151. Example:
  152.  
  153. REM initialize Multi-window system and open the first window.
  154. REM for this window I want a single-line bright red border
  155. REM with a black background and the remainder of the window should
  156. REM be black.
  157.  
  158.         call sub "mwinit",mwseg
  159.         row0 = 5
  160.         col0 = 15
  161.         row1 = 20
  162.         col1 = 45
  163.         call sub "mwopen", row0, col0, row1, col1, handle0
  164.         bordercolor = 12
  165.         call sub "mwborder", handle0, 0, bordercolor
  166.         clearcolor = 0
  167.         call sub "mwclear", handle0, clearcolor
  168.  
  169.  
  170.  
  171.  
  172. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  173.  
  174. MWCLOSE:     releases a window's memory buffer to DOS
  175.  
  176. Parameters:  windowhandle
  177.  
  178.              Windowhandle is a valid handle returned by MWOpen which
  179.              has not previously been closed by MWClose or MWCloseAll.
  180.  
  181.              After calling MWClose with a valid handle, that window is
  182.              no longer available, the handle is no longer valid and the
  183.              memory buffer used by the window has been returned to DOS.
  184.  
  185. Restrictions:
  186.              Requires valid window handle; no error code is returned for
  187.              invalid handle.
  188.  
  189. Example:
  190.  
  191. REM  I'm done with the window associated with handle0
  192.         call sub "MWClose", handle0
  193.  
  194.  
  195.  
  196. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  197.  
  198. MWCLOSEALL:  close all open windows, releasing buffers
  199.  
  200. Parameters:  None.
  201.  
  202.              Closes all windows, releasing all memory buffers associated
  203.              with the windows.  Does not release buffers initialized with
  204.              MWInit.
  205.  
  206. Restrictions:
  207.              None; after calling MWCloseAll, all window handles will no
  208.              longer be valid.
  209.  
  210. Example:
  211.  
  212. REM  I'm going to call the ASILIB subroutine "SYSTEM".
  213. REM  I don't need the open windows any more, so I want to make as much
  214. REM  RAM available as possible.
  215.  
  216.         call sub "MWCloseAll"
  217.  
  218.  
  219.  
  220. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  221.  
  222. MWDEFAULT:   change default status of opened windows.
  223.  
  224. Parameters:  statusbits
  225.  
  226.              Statusbits tell MWOpen what defaults to use when opening
  227.              a new window; does not affect previously-opened windows.
  228.  
  229.               bit 0  if zero, hide windows
  230.                      if one, display window
  231.               bit 2  if zero, no shadow
  232.                      if one, shadow enabled
  233.  
  234.              Windows may be either hidden or displayed; if hidden, the
  235.              window will not appear on the screen when MWDisplay is
  236.              called.  Displayed windows will been shown on the screen
  237.              when MWDisplay is called.
  238.  
  239.              Each window may have a "shadow" appearing below it and on the
  240.              right side to give a "3-D" appearance.  Status bit 2 determines
  241.              whether each window is opened with or without the shadow.
  242.  
  243. Restrictions:
  244.              Affects default status of windows opend AFTER MWDefault
  245.              is called; does not affect status of previously-opened
  246.              windows.
  247.  
  248. Example:
  249.  
  250. REM  I want all opened windows to have a shadow, but not displayed
  251. REM  until I call each one individually.
  252. REM  To do this I need to set bit 2 and clear bit 0.
  253.  
  254.         statusbits = &bin100
  255.         call sub "mwdefault", statusbits
  256.  
  257.  
  258.  
  259. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  260.  
  261. MWDISPLAY:   display open windows on the screen
  262.  
  263. Parameters:  None.
  264.  
  265.              MWDisplay updates the screen by displaying all unhidden
  266.              open windows.  No windows will ever show up on the screen
  267.              if you don't call MWDisplay.
  268.  
  269. Restrictions:
  270.              You must call MWInit before using MWDisplay.  If MWDisplay
  271.              is called before initializing the Multi-window system,
  272.              MWDisplay will take no action and return to the calling program.
  273.              Text mode only.
  274.  
  275. Example:
  276.  
  277. REM  I have initialized the Multi-window system and created some windows.
  278. REM  Now I want to display the windows on the screen.
  279.  
  280.        call sub "mwdisplay"
  281.  
  282.  
  283.  
  284. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  285.  
  286. MWFILL:       Fills a window managed by the MultiWindow system.
  287.  
  288. Parameters:   Window handle, color attribute, fill character
  289.  
  290.               Windowhandle is a valid handle returned by MWOpen which
  291.               has not been closed by MWClose or MWCloseAll.
  292.  
  293.               Colorattribute specifies the color attribute to be used to
  294.               fill the window.  If a border has been specified, the border
  295.               will not be overwritten.  See ColorAtt.
  296.  
  297.               Fill character is the ASCII code for the character you want
  298.               to fill the window with.
  299.  
  300. Restrictions: Requires valid window handle; no error code is returned for
  301.               invalid handle.
  302.  
  303. Example:
  304.  
  305. REM initialize Multi-window system and open the first window.
  306. REM for this window I want a single-line bright red border
  307. REM with a black background and the remainder of the window should
  308. REM filled with red "?".
  309.  
  310.         call sub "mwinit",mwseg
  311.         row0 = 5
  312.         col0 = 15
  313.         row1 = 20
  314.         col1 = 45
  315.         call sub "mwopen", row0, col0, row1, col1, handle0
  316.         bordercolor = 12
  317.         call sub "mwborder", handle0, 0, bordercolor
  318.         fillcolor = 4
  319.         fillchar = ASC("?")
  320.         call sub "mwfill", handle0, fillcolor, fillchar
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  328.  
  329. MWHIDE:       hide selected window
  330.  
  331. Parameters:   Window handle
  332.  
  333.               Windowhandle is a valid handle returned by MWOpen which
  334.               has not been closed by MWClose or MWCloseAll.
  335.  
  336.               After calling MWHide with a valid handle, that window is
  337.               ignored by MWDisplay.  The window may be unhidden with
  338.               MWUnHide.
  339.  
  340.  
  341. Restrictions: Requires valid window handle; no error code is returned for
  342.               invalid handle.
  343.  
  344. Example:
  345.  
  346. REM initialize Multi-window system and open the first window.
  347. REM for this window I want a single-line bright red border
  348. REM with a black background and the remainder of the window should
  349. REM filled with red "?".  I'll keep this window hidden for now.
  350.  
  351.         call sub "mwinit",mwseg
  352.         row0 = 5
  353.         col0 = 15
  354.         row1 = 20
  355.         col1 = 45
  356.         call sub "mwopen", row0, col0, row1, col1, handle0
  357.         bordercolor = 12
  358.         call sub "mwborder", handle0, 0, bordercolor
  359.         fillcolor = 4
  360.         fillchar = ASC("?")
  361.         call sub "mwfill", handle0, fillcolor, fillchar
  362.         call sub "mwhide", handle0
  363.  
  364.  
  365.  
  366. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  367.  
  368. MWHIDEALL:   hide all open windows
  369.  
  370. Parameters:  None.
  371.  
  372. Example:
  373.  
  374.         call sub "mwinit", mwseg
  375.  
  376. REM  program opens several windows
  377.         .
  378.         .
  379.         .
  380.  
  381. REM  make all open windows disappear
  382.         call    mwhideall
  383.         call sub "mwdisplay"
  384.  
  385.  
  386.  
  387. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  388.  
  389. MWINIT:       initializes multi-window system.  Several pop-up windows may
  390.               be popped onto or removed from a base screen in any order.
  391.               You must re-initialize the multi-window system each time the
  392.               base screen changes.  MWInit does not affect any open windows.
  393.  
  394. Parameters:   Mwseg
  395.  
  396.               MWINIT allocates screen buffers and save a copy of the current
  397.               screen as its "base screen".  When the pop-up windows are
  398.               displayed, they are displayed on top of the base screen.  You
  399.               may change the base screen at any time whether pop-up windows
  400.               are open or not by calling MWINIT again.  MWINIT returns the
  401.               segment address of the screen buffers as mwseg.  When you are
  402.               done with pop-up windows, you may release the screen buffer
  403.               with ASILIB's FREEDOS subroutine.  If mwseg = 0, then
  404.               insufficient DOS memory is available.
  405.  
  406. Restrictions: Text mode only; all screen dimensions supported by ASILIB
  407.               are OK.
  408.  
  409. Example:
  410.  
  411. REM  initialize multi-window system
  412.         call sub "mwinit", mwseg
  413.  
  414.  
  415. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  416.  
  417. MWNOBORDER:   clears the border flag for the associated window
  418.  
  419. Parameters:   Windowhandle.
  420.  
  421.               Pop-up windows managed by ASILIB's multi-window display system
  422.               may have borders which are protected from window clearing and
  423.               writing operations; this subroutine clears the "border flag"
  424.               for the specified window so that the border may be cleared or
  425.               overwritten.  See also MWOPEN and MWBORDER.
  426.  
  427. Restrictions: Requires valid window handle; no error code returned for
  428.               invalid handle.
  429.  
  430. Example:
  431.  
  432. REM initialize Multi-window system and open the first window.
  433. REM for this window I want a single-line bright red border
  434. REM with a black background
  435.  
  436.         call sub "mwinit",mwseg
  437.         row0 = 5
  438.         col0 = 15
  439.         row1 = 20
  440.         col1 = 45
  441.         call sub "mwopen", row0, col0, row1, col1, handle0
  442.         call sub "mwborder", handle0, 0, 12
  443.  
  444.         .
  445.         .
  446.         .
  447. REM  some time later I want to clear the entire window,
  448. REM  including the border
  449.  
  450.         call sub "mwnoborder", handle0
  451.         colorattribute = &hex0107
  452.         call sub "mwclear", handle0, colorattribute
  453.  
  454.  
  455. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  456.  
  457. MWNOSHADOW:   Disables "shadow" effect for selected window.
  458.  
  459. Parameters:   Window handle
  460.  
  461.               Pop-up windows managed by ASILIB's multiwindow system may
  462.               be opened with a "shadow" enabled.  MWNOSHADOW disables the
  463.               "shadow" effect for the selected window.  See also MWOPEN,
  464.               MWSHADOW and MWDEFAULT.
  465.  
  466. Restrictions: Requires valid window handle; no error code returned for
  467.               invalid handle.
  468.  
  469. Example:
  470.  
  471.         .
  472.         .
  473. REM  Initialize Multi-window system open a window and disable the "shadow"
  474. REM  effect for this window.
  475.  
  476.         call sub "mwinit", mwseg
  477.         row0 = 5
  478.         col0 = 15
  479.         row1 = 20
  480.         col1 = 45
  481.         call sub "mwopen", row0, col0, row1, col1, handle0
  482.         call sub "mwnoshadow", handle0
  483.  
  484.  
  485.  
  486. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  487.  
  488. MWOPEN:       Opens a pop-up window.
  489.  
  490. Parameters:   row0, col0, row1, col1, handle
  491.  
  492.               (row0, col0) are the screen coordinates of the upper-left
  493.               corner of the requested window; (row1, col1) are the lower-
  494.               right screen coordinates of the window.  Handle is returned
  495.               by MWOPEN so that you may refer to this window when using
  496.               other Multi-window subroutines.  If Handle is returned = 0,
  497.               the window could not be opened.
  498.  
  499.               Up to 10 windows may be open at any time; if you need more,
  500.               you will need to change MWINDOW_COUNT in multiwin.asm and
  501.               re-assemble.  If two or more windows overlap on the screen,
  502.               the one opened last will be displayed on top of the other(s).
  503.               The window appearing on top may be changed with MWTOP.
  504.  
  505.               Note the default status of all opened windows:
  506.                hidden
  507.                no shadow
  508.                no border
  509.  
  510.               You may change the status of any open window with MWUNHIDE,
  511.               MWHIDE, MWSHADOW, MWNOSHADOW, MWBORDER AND MWNOBORDER;
  512.  
  513.               All open windows may be hidden or un-hidden with
  514.               MWHIDEALL OR MWUNHIDEALL;
  515.  
  516.               The default status of newly-opened windows may be changed
  517.               with MWDEFAULT.
  518.  
  519. Restrictions: MWOPEN assumes that the window is smaller than the screen
  520.               dimensions and that (row0, col0) and (row1, col1) are within
  521.               the screen boundaries.  Minimum values for row0 and col0 are
  522.               1; on a 25-row, 80-column screen maxumum row1 = 25, maximum
  523.               col1 = 80.  Text mode only.
  524.  
  525. Example:
  526.  
  527.         call sub "mwinit", mwseg
  528.         row0 = 5
  529.         col0 = 15
  530.         row1 = 20
  531.         col1 = 45
  532.         call sub "mwopen", row0, col0, row1, col1, handle0
  533.  
  534.  
  535. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  536.  
  537. MWPRINT:      print an ASCIIZ string in an open window
  538.  
  539. Parameters:   handle, st$, wrow, wcolumn, colorattribute
  540.  
  541.               Handle is a window handle returned my MWOPEN; st$ is the
  542.               text you want printed; (wrow, wcol) are the coordinates
  543.               within the window where you want the string printed, and
  544.               colorattribute is an ordinary text-mode color attribute.
  545.               Note that the coordinates are relative to the WINDOW, not
  546.               relative to the SCREEN.  Note also that if a border is
  547.               enabled, the coordinates are relative to the window area
  548.               within the border.  The upper left corner of any window
  549.               is located at (1, 1).
  550.  
  551. Restrictions: Text mode only; handle must be a valid handle returned by
  552.               MWOPEN; if the string is too long to fit within the window
  553.               it will be truncated.
  554.  
  555. Example:
  556.  
  557. REM  I want to print some text on the 2nd row of a window, flush with
  558. REM  the left side.  I'll use bright red on black.
  559.  
  560.  
  561.         wrow=2
  562.         wcolumn=1
  563.         wcolor=12
  564.         wstring$="Print this in the window"
  565.         call sub "mwprint", handle, wstring$, wrow, wcolumn, wcolor
  566.  
  567.  
  568.  
  569. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  570.  
  571. MWPRINTCE:    Prints a string in selected window & clears to right edge
  572.               of window; clears to border if the window's border is enabled.
  573.  
  574. Parameters:   Same as MWPRINT.
  575.  
  576. Example:      See MWPRINT.
  577.  
  578.  
  579.  
  580. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  581.  
  582. MWSELECT:     Determines which window is visible at screen coordinate.
  583.  
  584. Parameters:   screen row, screen column, handle
  585.  
  586.               Given screen row and screen column, MWSELECT returns the
  587.               handle of the window visible at these coordinates.  If no
  588.               window is visivle at these coordinates, handle is returned = 0.
  589.  
  590. Example:
  591.  
  592. REM  I want to determine the handle of the window visible at (5,15)
  593.  
  594.         wrow=5
  595.         wcolumn=15
  596.         call sub "mwselect", wrow, wcolumn, handle
  597.         if handle=0 then
  598.          REM no window at these coordinates.
  599.         else
  600.          .
  601.          .
  602.          .
  603.  
  604.  
  605.  
  606.  
  607. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  608.  
  609. MWSHADOW:     Enables "shadow" effect for selected window.
  610.  
  611. Parameters:   window handle
  612.  
  613.               A "shadow" effect can be turned on by calling this subroutine
  614.               with a valid window handle.  This enables the "shadow" for
  615.               only the selected window - no other windows are affected.
  616.               See also MWOPEN, MWDEFAULT and MWNOSHADOW.
  617.  
  618. Example:
  619.  
  620. REM  I want a "shadow" effect visible for the window associated with
  621. REM  handle3.
  622.  
  623.         call sub "mwshadow", handle3
  624.  
  625.  
  626. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  627.  
  628. MWTITLE:      Center a string at the top of an open window.
  629.  
  630. Parameters:   window handle, title$, colorattribute
  631.  
  632.               Given a window handle and string to print, MWTITLE prints
  633.               the string centered at the top of an open window,
  634.               overwriting part of the border if nessesary.  This is
  635.               unlike all other MWxxx subroutines which leave the border
  636.               intact.  The title is printed using the color colorattribute.
  637.  
  638. Example:
  639.  
  640. REM  print a title at the top of window "window3"
  641.  
  642.         colorattribute=12
  643.         title$="How I spent my Summer Vacation"
  644.         call sub "mwtitle", window3, title$, colorattribute
  645.  
  646. REM  now show my window title on the screen
  647.         call sub "mwdisplay"
  648.  
  649.  
  650.  
  651. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  652.  
  653. MWTOP:        displays selected window on top of all others
  654.  
  655. Parameters:   windowhandle
  656.  
  657.               Windowhandle is the handle returned by MWOPEN when the window
  658.               is created.  After calling MWTOP, the window associated with
  659.               windowhandle will be displayed "on top" of all others the
  660.               next time MWDISPLAY is called.
  661.  
  662. Restrictions: Text mode only; windowhandle must be a valid window handle.
  663.  
  664. Example:
  665.  
  666. REM  open a mWindow, jumping to windowerror: if there's a problem.
  667. REM  later in the program I want to dislplay this window on top
  668. REM  of all others
  669.         call sub "mwopen", row0, col0, row1, col1, handle
  670.         if handle = 0 then windowerror:
  671.  
  672.         .
  673.         .
  674.         .
  675.         call sub "mwtop", handle
  676.  
  677.  
  678. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  679.  
  680. MWUNHIDE:     Allow selected window to be displayed
  681.  
  682. Parameters:   window handle
  683.  
  684.               By default, all windows are opened with "hidden" status.
  685.               MWUNHIDE allows MWDISPLAY to show the window on the screen.
  686.               MWUNHIDE affects only the window associated with 1 handle.
  687.               To change the default status of all newly-opened windows to
  688.               "not hidden", use MWDEFAULT.
  689.  
  690. Example:
  691.  
  692. REM  I want to show window7 on the screen
  693.  
  694.         call sub "mwunhide", window7
  695.         call sub "mwdisplay"
  696.  
  697.  
  698. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  699.  
  700. MWUNHIDEALL:  unhide all open windows
  701.  
  702. Parameters:   None.
  703.  
  704. Example:
  705.  
  706.         call sub "mwinit", mwseg
  707.  
  708. REM  program opens several windows
  709.         .
  710.         .
  711.         .
  712.  
  713. REM  make all open windows visible
  714.         call sub "mwunhideall"
  715.         call sub "mwdisplay"
  716.  
  717.  
  718.