home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / lambda / soundpot / p / windoman.lbr / WINDOW.DZC / WINDOW.DOC
Encoding:
Text File  |  1993-10-25  |  76.8 KB  |  4,884 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.                Window Management Services
  18.  
  19.                    Version 1.0
  20.  
  21.  
  22.  
  23.                   User's Guide
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.       Window Management Services Version 1.0 User's    Guide
  81.  
  82.       (c) Copyright    1984 Timothy E.    Ide - All rights reserved
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.       Turbo    Pascal is a trademark of Borland International,    Inc.
  109.  
  110.       Kaypro II is a trademark of Kaypro Corporation.
  111.  
  112.       Perfect Writer is a trademark    of Perfect Software, Inc.
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.       Window Management Services               Version 1.0
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.                Table of Contents
  146.  
  147.  
  148.       Chapter 1 Introduction                 1
  149.  
  150.       Chapter 2 Windows                     2
  151.  
  152.          2.1 Definition                     2
  153.          2.2 Attributes                     2
  154.  
  155.         2.2.1 Number                     3
  156.         2.2.2 Origin                     3
  157.         2.2.3 Width                     3
  158.         2.2.4 Height                     3
  159.         2.2.5 Border                     4
  160.         2.2.6 Columns                     4
  161.         2.2.7 Rows                     4
  162.         2.2.8 Contents                     4
  163.  
  164.          2.3 Window    Control    Block                 5
  165.  
  166.       Chapter 3 Window Management                 6
  167.  
  168.          3.1 Creating and deleting windows             6
  169.  
  170.         3.1.1 Opening windows                 6
  171.         3.1.2 Closing windows                 6
  172.  
  173.          3.2 Modifying window position             7
  174.  
  175.         3.2.1 Setting position to Home             7
  176.         3.2.2 Setting position to column and row
  177.                                  7
  178.         3.2.3 Retrieving window    position         7
  179.  
  180.          3.3 Modifying the window origin             7
  181.  
  182.         3.3.1 Setting window origin             8
  183.         3.3.2 Retrieving window    origin             8
  184.  
  185.          3.4 Modifying window contents             8
  186.  
  187.         3.4.1 Clearing window contents             8
  188.         3.4.2 Inserting    window lines             8
  189.         3.4.3 Deleting window lines             9
  190.         3.4.4 Clearing to end of line             9
  191.         3.4.5 Changing the border             9
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.       Window Management Services               Version 1.0
  203.  
  204.  
  205.  
  206.  
  207.          3.5 Window    output                     9
  208.  
  209.         3.5.1 Storing character    strings             10
  210.         3.5.2 Writing character    strings             10
  211.         3.5.3 Displaying window    contents         11
  212.         3.5.4 Erasing window areas             11
  213.  
  214.          3.6 Window    input                     11
  215.  
  216.         3.6.1 Retrieving character strings         12
  217.         3.6.2 Reading character    strings             12
  218.  
  219.          3.7 Status    variables                 13
  220.  
  221.         3.7.1 wi_status    - service success status
  222.                                  13
  223.         3.7.2 wi_eoln -    end of line             14
  224.         3.7.3 wi_eow - end of window             14
  225.  
  226.       Chapter 4 Using the services                 15
  227.  
  228.          4.1 Including the services                 15
  229.          4.2 Naming    conventions                 15
  230.          4.3 Memory    requirements                 15
  231.          4.4 Demonstration program                 16
  232.  
  233.       Chapter 5 The    Services                 17
  234.  
  235.          5.1 User services                     17
  236.  
  237.         5.1.1 wi_open -    create window             19
  238.         5.1.2 wi_close - delete    window             21
  239.         5.1.3 wi_insln - insert    line             22
  240.         5.1.4 wi_delln - delete    line             23
  241.         5.1.5 wi_clreol    - clear    to end of line         24
  242.         5.1.6 wi_clear - clear window             25
  243.         5.1.7 wi_home -    set position to    home         26
  244.         5.1.8 wi_border    - set window border         27
  245.         5.1.9 wi_setpos    - set position             28
  246.         5.1.10 wi_getpos - get position             29
  247.         5.1.11 wi_setorg - set origin             30
  248.         5.1.12 wi_getorg - get origin             31
  249.         5.1.13 wi_put -    store character    string         32
  250.         5.1.14 wi_putln    - store    character string
  251.                                  34
  252.         5.1.15 wi_get -    retrieve character string
  253.                                  36
  254.         5.1.16 wi_getln    - retrieve character string
  255.                                  38
  256.         5.1.17 wi_write    - write    character string
  257.              through window                 40
  258.         5.1.18 wi_writeln - write character string
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.       Window Management Services               Version 1.0
  269.  
  270.  
  271.  
  272.  
  273.              through window                 42
  274.         5.1.19 wi_read - read character    string
  275.              through window                 44
  276.         5.1.20 wi_readln - read    character string
  277.              through window                 46
  278.         5.1.21 wi_show - display window    on screen
  279.                                  48
  280.         5.1.22 wi_erase    - erase    window area on
  281.              screen                     49
  282.  
  283.          5.2 Internal Services                 50
  284.  
  285.         5.2.1 _wi_find - find window control block
  286.                                  51
  287.         5.2.2 _wi_stb -    build a    character string
  288.                                  52
  289.         5.2.3 _wi_bord1    - store    window border         53
  290.         5.2.4 _wi_bord2    - store    border in window
  291.                                  55
  292.         5.2.5 _wi_out -    store string in    window;
  293.              optionally, write
  294.                to screen                 56
  295.         5.2.6 _wi_outln    - store    string in window;
  296.              optionally, write to screen,
  297.              advance position to next line         58
  298.         5.2.7 _wi_inp -    retrieve string    from window;
  299.              optionally, read string from
  300.              keyboard                 60
  301.         5.2.8 _wi_inpln    - retrieve string from
  302.              window; optionally, read string
  303.              from keyboard,    advance    position to
  304.              next line                 62
  305.         5.2.9 _wi_getst    - get string from keyboard
  306.                                  64
  307.         5.2.10 _wi_sher    - display on or    erase window
  308.              from screen                 66
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.       Window Management Services               Version 1.0
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.                     Chapter 1
  345.  
  346.                   Introduction
  347.  
  348.  
  349.  
  350.         Window Management  Services     are a group of    software tools
  351.       for terminal screen management developed for    use with Turbo
  352.       Pascal Version 2.0 on    a Kaypro II micro-computer system.
  353.  
  354.         The     Window     Management  Services  were  developed    as  an
  355.       experiment in    screen manipulation tool development and as  a
  356.       Turbo     Pascal     learning exercise.   (This  document  is  the
  357.       result of  an     experiment  into  the capabilities of Perfect
  358.       Writer).
  359.  
  360.         A  demonstration   program     is   provided    that  supports
  361.       interactive  experimentation     with    the   services.       The
  362.       demonstration    program    was used to verify  the    functioning of
  363.       each    of the services.  The potential    user  is  warned  that
  364.       problems  may     still    exist  and  that the prudent user will
  365.       verify that  each of the services that he or she may want to
  366.       use is suitable for the intended application.
  367.  
  368.         Although development was on     and  for  a  Kaypro  II,  the
  369.       services are coded to    use the     screen    manipulation functions
  370.       of Turbo  Pascal  and     may  be expected to run on any    system
  371.       that    supports Turbo Pascal screen manipulation  functions.
  372.       Since    the Kaypro II used for    development  does  not support
  373.       advanced  video  features   (e.g.   half-intensity,  inverse
  374.       video), neither do the Window    Management Services.
  375.  
  376.         Chapter 2 describes    the windows managed by the services.
  377.  
  378.         Chapter 3 discusses    the operations on windows supported by
  379.       the Window Management    Services.
  380.  
  381.         Chapter 4  provides     information on    using the services and
  382.       describes the    demonstration program.
  383.  
  384.         Chapter  5    documents  the    user  interface      to  and  the
  385.       operation of each of the services.
  386.  
  387.  
  388.  
  389.  
  390.  
  391.                       -    1 -
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.       Window Management Services               Version 1.0
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408.  
  409.  
  410.                     Chapter 2
  411.  
  412.                      Windows
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.  
  421.       2.1 Definition
  422.  
  423.  
  424.       Windows  managed  by    the  Window  Management     Services  are
  425.       probably best    defined    as virtual terminal  screens which may
  426.       be displayed    at  any     position  on  the  screen  of a video
  427.       display terminal.
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.       2.2 Attributes
  435.  
  436.  
  437.       A window is described    by several attributes:
  438.  
  439.         -  Number
  440.  
  441.         -  Origin
  442.  
  443.         -  Width
  444.  
  445.         -  Height
  446.  
  447.         -  Border
  448.  
  449.         -  Contents
  450.  
  451.         -  Columns
  452.  
  453.         -  Rows
  454.  
  455.  
  456.  
  457.                       -    2 -
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.       Window Management Services               Version 1.0
  466.  
  467.  
  468.  
  469.  
  470.  
  471.         Each of these attributes is    discussed below.
  472.  
  473.  
  474.  
  475.  
  476.       2.2.1    Number
  477.  
  478.       A  window  number  is    a user    assigned  value     (0-255)  that
  479.       uniquely  identifies    a  window  to  the  Window  Management
  480.       Services.  The window    number is a required input argument to
  481.       each service.
  482.  
  483.  
  484.  
  485.  
  486.       2.2.2    Origin
  487.  
  488.       The window origin is    the  screen  position  of the top-left
  489.       corner of the    window.      The  origin  is  expressed as    screen
  490.       column and row numbers.
  491.  
  492.         The    window origin  must  be     specified  when the window is
  493.       created.  Subsequently, the window origin may    be changed and
  494.       retrieved.
  495.  
  496.         Screen column and  row  numbers need not specify an    actual
  497.       screen position.  The    window may be positioned completely or
  498.       partially on or off the terminal display screen.  Of course,
  499.       if  a    window is positioned such that no  part     of  it     could
  500.       appear  on   the  screen,  the  window  contents  cannot  be
  501.       displayed.
  502.  
  503.  
  504.  
  505.  
  506.       2.2.3    Width
  507.  
  508.       The window width is the  horizontal  dimension  of  a    window
  509.       expressed in number of screen    columns    or line     length.   The
  510.       width     is  defined  when  a window is    created    and cannot  be
  511.       changed.
  512.  
  513.         The    Window    Management  Services  permit a window width in
  514.       the range 1 through 80.
  515.  
  516.  
  517.  
  518.  
  519.       2.2.4    Height
  520.  
  521.  
  522.  
  523.                       -    3 -
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.       Window Management Services               Version 1.0
  532.  
  533.  
  534.  
  535.  
  536.  
  537.       The  window height is    the vertical  dimension     of  a    window
  538.       expressed in number of rows or lines.     The height is defined
  539.       when a window    is created and cannot be changed.
  540.  
  541.         The    Window Management Services require window height to be
  542.       defined in the range 1 through 23.
  543.  
  544.  
  545.  
  546.  
  547.       2.2.5    Border
  548.  
  549.       The window border is optionally  specified  when a window is
  550.       created.
  551.  
  552.         A window border is    one character wide.  It    is selected by
  553.       specifying  a     1  to    4  character  string  that defines the
  554.       contents of the window border    when the window     is  created.
  555.       The border characters    (which may be spaces) fill the top and
  556.       bottom rows and the left and right columns of    the window.
  557.  
  558.         The     window    border characters may be changed.  However,  a
  559.       border cannot    be  added or removed from a window after it is
  560.       created.
  561.  
  562.  
  563.  
  564.  
  565.       2.2.6    Columns
  566.  
  567.       The  columns    attribute is the number    of accessible  columns
  568.       available for     character  storage.  When a window is created
  569.       without  a border, columns equals width.   If     a  window  is
  570.       created with a border, columns equals    width minus 2.
  571.  
  572.  
  573.  
  574.  
  575.       2.2.7    Rows
  576.  
  577.       The  rows  attribute    is   the  number  of  accessible  rows
  578.       available  for character storage.  When a window is  created
  579.       without  a  border,  rows equals height.   If     a  window  is
  580.       created with a border, rows equals height minus 2.
  581.  
  582.  
  583.  
  584.  
  585.       2.2.8    Contents
  586.  
  587.  
  588.  
  589.                       -    4 -
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.       Window Management Services               Version 1.0
  598.  
  599.  
  600.  
  601.  
  602.  
  603.       A content storage array  is maintained for each window.  The
  604.       array    contains window    height times window width characters.
  605.       The optional window border, when selected, is    stored in  the
  606.       content array.
  607.  
  608.         Although the window    border is stored  as  window contents,
  609.       the border is    transparent to the window content manipulation
  610.       services.  The only impact that the window border has    on the
  611.       window  content  is  the  reduction  of the user  accessible
  612.       window area.
  613.  
  614.         The    majority  of  the  Window  Management Services support
  615.       manipulation of window contents.
  616.  
  617.  
  618.  
  619.  
  620.  
  621.  
  622.       2.3 Window Control Block
  623.  
  624.  
  625.       For each  window,  the Window    Management Services create and
  626.       maintain a Window Control  Block  in    dynamic    memory.     Since
  627.       windows may  vary  in    size, the window control block is also
  628.       variable  length.   The  memory allocated to store a    window
  629.       control block    is de-allocated    when the window    is deleted.
  630.  
  631.         Each of the    window attributes described above is stored in
  632.       the  window  control    block.     In  addition,    other  control
  633.       information  required    by the Window Management  Services  is
  634.       also stored in the window control block.
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.                       -    5 -
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.       Window Management Services               Version 1.0
  664.  
  665.  
  666.  
  667.  
  668.  
  669.  
  670.  
  671.  
  672.  
  673.  
  674.                     Chapter 3
  675.  
  676.                 Window Management
  677.  
  678.  
  679.  
  680.  
  681.  
  682.  
  683.  
  684.  
  685.       3.1 Creating and deleting windows
  686.  
  687.  
  688.         The    first operation    that may be performed on  a  window is
  689.       window creation.  When a window is no    longer required    it may
  690.       be deleted.
  691.  
  692.  
  693.  
  694.  
  695.       3.1.1    Opening    windows
  696.  
  697.       The  open  service,  wi_open,    creates    a  window.   When  the
  698.       window  is   created     it   must   be      assigned  an    unique
  699.       identification number.  The window origin, height, and width
  700.       must be specified.  The window border    may  be     specified.  A
  701.       window  control block    is  allocated  for  the     window.   The
  702.       window position  is  set to window home: window column 1 and
  703.       row 1. The window contents are cleared to spaces.
  704.  
  705.  
  706.  
  707.  
  708.       3.1.2    Closing    windows
  709.  
  710.       The close service, wi_close,    deletes     a  previously    opened
  711.       window.  Memory allocated for     the window control block when
  712.       the  window  was opened is de-allocated.  The    window    number
  713.       may be re-used.
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.                       -    6 -
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.       Window Management Services               Version 1.0
  730.  
  731.  
  732.  
  733.  
  734.  
  735.  
  736.  
  737.  
  738.       3.2 Modifying    window position
  739.  
  740.  
  741.       For each window, a window position or    "cursor" is maintained
  742.       in the window    control    block.    The window position may    be set
  743.       and retrieved.
  744.  
  745.  
  746.  
  747.  
  748.       3.2.1    Setting    position to Home
  749.  
  750.       The  home window position service, wi_home, sets the    window
  751.       position to window column 1 and row 1.
  752.  
  753.  
  754.  
  755.  
  756.       3.2.2    Setting    position to column and row
  757.  
  758.       The set window position service, wi_setpos,  sets the    window
  759.       to a specified window    column and row.     The specified row and
  760.       column  may  not  exceed  the     accessible  window width  and
  761.       height, respectively.
  762.  
  763.  
  764.  
  765.  
  766.       3.2.3    Retrieving window position
  767.  
  768.       The get window  position  service,  wi_getpos, retrieves the
  769.       window position column and row.
  770.  
  771.  
  772.  
  773.  
  774.  
  775.  
  776.       3.3 Modifying    the window origin
  777.  
  778.  
  779.       A screen origin column and row is maintained in each    window
  780.       control block.  The window origin must be specified when the
  781.       window is created.  The  window  origin  may subsequently be
  782.       set and retrieved.
  783.  
  784.  
  785.  
  786.  
  787.                       -    7 -
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.       Window Management Services               Version 1.0
  796.  
  797.  
  798.  
  799.  
  800.  
  801.  
  802.  
  803.       3.3.1    Setting    window origin
  804.  
  805.       The set  window  origin  service, wi_setorg, sets the    window
  806.       screen origin    to a screen origin column and row.  The    screen
  807.       origin  value     may  be  set to values    outside    of the    actual
  808.       screen boundaries to move the    window partially or completely
  809.       off the screen.
  810.  
  811.  
  812.  
  813.  
  814.       3.3.2    Retrieving window origin
  815.  
  816.       The  get  window origin service,  wi_getorg,    retrieves  the
  817.       current window origin    display    screen column and row.
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.       3.4 Modifying    window contents
  825.  
  826.  
  827.       The  contents    of a  window  are  maintained  in  the    window
  828.       control block.  Window contents  are    set to spaces when the
  829.       window is opened.  Many services are available to manipulate
  830.       window contents.
  831.  
  832.  
  833.  
  834.  
  835.       3.4.1    Clearing window    contents
  836.  
  837.         The     clear    window service,    wi_clear,  clears  the    window
  838.       contents to spaces and sets the window position to home.
  839.  
  840.  
  841.  
  842.  
  843.       3.4.2    Inserting window lines
  844.  
  845.       The  insert  window line service, wi_insln, inserts a     blank
  846.       line at the  indicated  window  row.     The  contents    of the
  847.       indicated row    and following rows except  for    the  last  are
  848.       shifted down one line.  The last window row is deleted.
  849.  
  850.  
  851.  
  852.  
  853.                       -    8 -
  854.  
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861.       Window Management Services               Version 1.0
  862.  
  863.  
  864.  
  865.  
  866.         When the row indicated  for     insertion is greater than the
  867.       number of accessible rows in the window, all window rows are
  868.       shifted up 1 line.  The top row is deleted.  A blank line is
  869.       inserted  on    the  bottom accessible row of the window.  The
  870.       window  position is set to the  beginning  of     the  inserted
  871.       line.
  872.  
  873.  
  874.  
  875.  
  876.       3.4.3    Deleting window    lines
  877.  
  878.       The delete  window  line service, wi_delln, deletes a    window
  879.       line in the indicated    window row.   Lines  below the deleted
  880.       line are shifted up one row.     A  blank  line    is inserted in
  881.       the last row of  the    window.     The window position is    set to
  882.       the beginning    of the deleted row.
  883.  
  884.  
  885.  
  886.  
  887.       3.4.4    Clearing to end    of line
  888.  
  889.       The clear to end of window line service, wi_clreol, replaces
  890.       the contents of the current window  row with spaces from the
  891.       current window column    to  the     end  of  the row.  The    window
  892.       position is not modified.
  893.  
  894.  
  895.  
  896.  
  897.       3.4.5    Changing the border
  898.  
  899.       The set window border     service, wi_border, sets the contents
  900.       of  the  window  border.   The  contents  of    the window are
  901.       unchanged.   This  service  will  operate  only  on  windows
  902.       originally created with borders.
  903.  
  904.  
  905.  
  906.  
  907.  
  908.  
  909.       3.5 Window output
  910.  
  911.  
  912.       The following    output services     support  storing of character
  913.       strings  to windows, writing of  character  strings  through
  914.       windows, displaying window contents on the terminal  screen,
  915.       and erasing window areas from    the screen.
  916.  
  917.  
  918.  
  919.                       -    9 -
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.       Window Management Services               Version 1.0
  928.  
  929.  
  930.  
  931.  
  932.  
  933.  
  934.  
  935.  
  936.       3.5.1    Storing    character strings
  937.  
  938.       The two  put character string    services, wi_put and wi_putln,
  939.       store    character  strings  into  a  window  beginning    at the
  940.       current window position.  When end of    line is    reached    before
  941.       all characters of a string are stored, the remaining    string
  942.       characters are ignored.
  943.  
  944.         The     wi_put     and wi_putln services differ in  the  way  in
  945.       which    they modify window position.
  946.  
  947.         wi_put sets    the window  position  to  the  next  character
  948.       following the    stored string.    When the last character    of the
  949.       stored string    is the last column in the row, wi_put sets the
  950.       window position to the first column of the next row.
  951.  
  952.         wi_putln sets the window position to the  first  column of
  953.       the row following the    row containing the stored string.
  954.  
  955.         Window  position is    set to    end  of     window     after    wi_put
  956.       stores a character in    the last column    of the last window row
  957.       and  after  wi_putln    stores a character string in the  last
  958.       row.
  959.  
  960.         When window     position  is  at end of window    and either the
  961.       wi_put  or wi_putln services    are  invoked,  the  window  is
  962.       scrolled by deleting the first row of    the  window,  shifting
  963.       the remaining    lines up one row, and storing  blanks into the
  964.       bottom row of    the window, before  storing the    string in that
  965.       row.
  966.  
  967.  
  968.  
  969.  
  970.       3.5.2    Writing    character strings
  971.  
  972.       The  two  write  character  string  services,     wi_write  and
  973.       wi_writeln, store  character strings into a window beginning
  974.       at  the  current  window  position  and write    the  character
  975.       strings to the display screen.  The output position  of  the
  976.       character  string  on    the screen is the sum  of  the    window
  977.       origin and the window    position minus one on each dimension.
  978.       When a  computed  output  position  for  a  character     falls
  979.       outside the boundaries of the    display    screen,    the  character
  980.       is stored in the window, but not displayed.
  981.  
  982.  
  983.  
  984.  
  985.                      - 10 -
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.       Window Management Services               Version 1.0
  994.  
  995.  
  996.  
  997.  
  998.         The     wi_write  and wi_writeln services differ  in  way  in
  999.       which    they modify window position.
  1000.  
  1001.         wi_write  sets  the    window position    to the next  character
  1002.       following the    stored string.    When the last character    of the
  1003.       stored string    is the last column in the  row,     wi_write sets
  1004.       the window position to the first column of the next row.
  1005.  
  1006.         wi_writeln sets the    window position    to the first column of
  1007.       the row following the    row containing the stored string.
  1008.  
  1009.         Window  position  is set to    end of window  after  wi_write
  1010.       stores a character in    the last column    of the last window row
  1011.       and after  wi_writeln     stores    a character string in the last
  1012.       row.
  1013.  
  1014.         When window    position is at end of window  and  either  the
  1015.       wi_write  or    wi_writeln services is invoked,    the window  is
  1016.       scrolled by deleting the first row  of  the window, shifting
  1017.       the remaining    lines up on line,  and storing blanks into the
  1018.       bottom row of    the  window,  before the string    is stored into
  1019.       that row and written to the screen.
  1020.  
  1021.  
  1022.  
  1023.  
  1024.       3.5.3    Displaying window contents
  1025.  
  1026.       The  show  window  content  service,    wi_show,   writes  the
  1027.       contents of a    window to the  terminal     display screen.  Only
  1028.       that    portion     of the    window which falls within  the    screen
  1029.       boundaries is    displayed.
  1030.  
  1031.  
  1032.  
  1033.  
  1034.       3.5.4    Erasing    window areas
  1035.  
  1036.       The erase window area    service, wi_erase, erases that portion
  1037.       of  the  display  screen on which a given  window  could  be
  1038.       displayed.
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.  
  1045.       3.6 Window input
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.                      - 11 -
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.       Window Management Services               Version 1.0
  1060.  
  1061.  
  1062.  
  1063.  
  1064.       The following    input services support retrieving of character
  1065.       strings from    windows     and reading of    character strings from
  1066.       the keyboard through windows.
  1067.  
  1068.  
  1069.  
  1070.  
  1071.       3.6.1    Retrieving character strings
  1072.  
  1073.       The two get character     string     services, wi_get and wi_getln
  1074.       support  the retrieval of character strings  from  a    window
  1075.       beginning at the current window position.  When end of  line
  1076.       is reached before all     characters of a string    are retrieved,
  1077.       the remaining    string characters are ignored.
  1078.  
  1079.         The    wi_get and wi_getln services differ  in     way  in which
  1080.       they modify window position.
  1081.  
  1082.         wi_get sets    the window  position  to  the  next  character
  1083.       following the    stored string.    When the last character    of the
  1084.       stored string    is the last column in the row, wi_get sets the
  1085.       window position to the first column of the next row.
  1086.  
  1087.         wi_getln sets the window position to the first  column  of
  1088.       the row following the    row containing the retrieved string.
  1089.  
  1090.         Window position is    set  to     end  of  window  after    wi_get
  1091.       retrieves a character    in the last  column of the last    window
  1092.       row and after    wi_getln  retrieves  a character string    in the
  1093.       last row.
  1094.  
  1095.         When window    position is  at     end  of window    and either the
  1096.       wi_get  or wi_getln service is invoked, the retrieval    is not
  1097.       performed and    the services return a failure status.
  1098.  
  1099.  
  1100.  
  1101.  
  1102.       3.6.2    Reading    character strings
  1103.  
  1104.       The read character string services,  wi_read    and  wi_readln
  1105.       read a character string from the  keyboard,  store the input
  1106.       character  string  in    the window, and     retrieve  the    stored
  1107.       string.  The input position of the  character     string    on the
  1108.       screen  is  the  sum    of  the     window    origin and the    window
  1109.       position minus  one  for  each dimension.  These services do
  1110.       not perform any input    through    a window that  cannot be fully
  1111.       displayed on the terminal display screen as indicated    by its
  1112.       screen origin    and dimensions.
  1113.  
  1114.  
  1115.  
  1116.  
  1117.                      - 12 -
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.       Window Management Services               Version 1.0
  1126.  
  1127.  
  1128.  
  1129.  
  1130.         Character string  input  is     read  character  by character
  1131.       until    terminated by a     carriage  return.   The services will
  1132.       not accept input  past  end  of  line    or end of string.  The
  1133.       delete  and  backspace keys may be used to delete previously
  1134.       keyed    string characters.  It is not possible    to delete past
  1135.       beginning of string.
  1136.  
  1137.         The    wi_read    and wi_readln services differ in way  in which
  1138.       they modify window position.
  1139.  
  1140.         wi_read sets  the  window  position     to the    next character
  1141.       following the    stored string.    When the last character    of the
  1142.       stored string     is  the  last column in the row, wi_read sets
  1143.       the window position to the first column of the next row.
  1144.  
  1145.         wi_readln sets  the    window position    to the first column of
  1146.       the row following the    row containing the stored string.
  1147.  
  1148.         Window position is    set  to     end  of  window after wi_read
  1149.       reads    a  character  into  the    last column of the last    window
  1150.       row and after    wi_readln  reads  a  character string into the
  1151.       last row.
  1152.  
  1153.         When window     position  is  at end of window    and either the
  1154.       wi_read or wi_readln    services  is  invoked, the read    is not
  1155.       performed and    the services return a failure status.
  1156.  
  1157.  
  1158.  
  1159.  
  1160.  
  1161.  
  1162.       3.7 Status variables
  1163.  
  1164.  
  1165.       The  Window  Management  Services communicate    status to user
  1166.       programs through three boolean status    variables:
  1167.  
  1168.         -  wi_status
  1169.  
  1170.         -  wi_eoln
  1171.  
  1172.         -  wi_eow
  1173.  
  1174.  
  1175.  
  1176.  
  1177.       3.7.1    wi_status - service success status
  1178.  
  1179.       The wi_status    variable is set    by  each  of  the user service
  1180.  
  1181.  
  1182.  
  1183.                      - 13 -
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.       Window Management Services               Version 1.0
  1192.  
  1193.  
  1194.  
  1195.  
  1196.       procedures  to  indicate  the     success  or  failure  of  the
  1197.       service.   A true value indicates success.  False  indicates
  1198.       failure.
  1199.  
  1200.  
  1201.  
  1202.  
  1203.       3.7.2    wi_eoln    - end of line
  1204.  
  1205.       wi_eoln  is  set  to    true  when   end  of  window  line  is
  1206.       encountered during an    input  or  output service.  wi_eoln is
  1207.       set  or  reset  only    by  the     wi_put,  wi_putln,  wi_write,
  1208.       wi_writeln,  wi_get,     wi_getln,   wi_read,    and  wi_readln
  1209.       services.
  1210.  
  1211.  
  1212.  
  1213.  
  1214.       3.7.3    wi_eow - end of    window
  1215.  
  1216.       wi_eow  is  set  to  true when end of    window is  encountered
  1217.       during an  input  or    output    service.  When wi_eow is true,
  1218.       wi_eoln is also true.
  1219.  
  1220.         wi_eow is  set  or    reset  only  by     the wi_put, wi_putln,
  1221.       wi_write,  wi_writeln,  wi_get,   wi_getln,    wi_read,   and
  1222.       wi_readln services.
  1223.  
  1224.  
  1225.  
  1226.  
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235.  
  1236.  
  1237.  
  1238.  
  1239.  
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249.                      - 14 -
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.       Window Management Services               Version 1.0
  1258.  
  1259.  
  1260.  
  1261.  
  1262.  
  1263.  
  1264.  
  1265.  
  1266.  
  1267.  
  1268.                     Chapter 4
  1269.  
  1270.                    Using the services
  1271.  
  1272.  
  1273.  
  1274.  
  1275.  
  1276.  
  1277.  
  1278.  
  1279.       4.1 Including    the services
  1280.  
  1281.  
  1282.         The    file  WINDOW.PAS contains the Turbo Pascal Version 2.0
  1283.       source code for the Window Management    Services. Turbo    Pascal
  1284.       programs that    use the     services must include WINDOW.PAS. The
  1285.       Turbo     Pascal     compiler  directive  to  include  the    Window
  1286.       Management Services is {$I WINDOW.PAS}.
  1287.  
  1288.  
  1289.  
  1290.  
  1291.  
  1292.  
  1293.       4.2 Naming conventions
  1294.  
  1295.  
  1296.       To  avoid naming conflicts with the programs    that  use  the
  1297.       window  management services, global  procedure  names     begin
  1298.       "wi_"     for  user  services and "_wi" for internal  services;
  1299.       global  variable names begin "wi_" for  user    variables  and
  1300.       "_w"     for  global  variables     required  by    the   internal
  1301.       services.
  1302.  
  1303.  
  1304.  
  1305.  
  1306.  
  1307.  
  1308.       4.3 Memory requirements
  1309.  
  1310.  
  1311.       The Window Management    Services require a little less than 7K
  1312.  
  1313.  
  1314.  
  1315.                      - 15 -
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.       Window Management Services               Version 1.0
  1324.  
  1325.  
  1326.  
  1327.  
  1328.       bytes    of memory for code and static data structures.
  1329.  
  1330.         Dynamic memory  is    allocated  for    a window control block
  1331.       when a  window  is created and de-allocated when a window is
  1332.       closed.   Window  control  block  memory  requirements  vary
  1333.       depending on the size    of the window.    A window control block
  1334.       requires 80 bytes plus the product of    the window width times
  1335.       the window height.
  1336.  
  1337.         Memory requirements    may be    reduced     by  using  the     Turbo
  1338.       Pascal Version 2.0 overlay feature.  Several    services which
  1339.       may  be handled as overlays are  identified  with  commented
  1340.       overlay procedure definitions    in WINDOW.PAS.
  1341.  
  1342.         Memory requirements    can be    further     reduced  by  deleting
  1343.       source  code    for unused services from a copy    of  WINDOW.PAS
  1344.       and compiling    only those services that are actually used.
  1345.  
  1346.  
  1347.  
  1348.  
  1349.  
  1350.  
  1351.       4.4 Demonstration program
  1352.  
  1353.  
  1354.         The     files    DEMO.PAS,  DEMO1.PAS,  and  DEMO2.PAS  contain
  1355.       source  for  a  Window  Management  Services     demonstration
  1356.       program.
  1357.  
  1358.         The    demonstration is menu driven and supports execution of
  1359.       each of  the    user services.    Two additional options support
  1360.       clearing the screen and exiting from the program.
  1361.  
  1362.         The     demonstration    program     must  be  compiled  with  the
  1363.       "Com-file" compiler option.
  1364.  
  1365.         The    demonstration program  permits    a  user     to experiment
  1366.       with the services without having  to    write  programs    to try
  1367.       them out.  Since the    demonstration  program uses the    Window
  1368.       Management Services extensively to implement terminal    screen
  1369.       input    and output, the     Turbo Pascal source code in DEMO.PAS,
  1370.       DEMO1.PAS and    DEMO2.PAS also provides    programming examples.
  1371.  
  1372.  
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.                      - 16 -
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.       Window Management Services               Version 1.0
  1390.  
  1391.  
  1392.  
  1393.  
  1394.  
  1395.  
  1396.  
  1397.  
  1398.  
  1399.  
  1400.                     Chapter 5
  1401.  
  1402.                   The Services
  1403.  
  1404.  
  1405.  
  1406.         This chapter contains descriptions of each of the user and
  1407.       internal  Window  Management    Services.   Each   service  is
  1408.       described  by     its  procedure     or  function  header,     input
  1409.       arguments, output arguments, action, and status settings.
  1410.  
  1411.  
  1412.  
  1413.  
  1414.  
  1415.  
  1416.       5.1 User services
  1417.  
  1418.  
  1419.         The     following  sections  describe    the Window  Management
  1420.       Services   that  support  window  creation,  deletion,   and
  1421.       manipulation:
  1422.  
  1423.         -  wi_open - create    window
  1424.  
  1425.         -  wi_close    - delete window
  1426.  
  1427.         -  wi_insln    - insert line
  1428.  
  1429.         -  wi_delln    - delete line
  1430.  
  1431.         -  wi_clreol - clear to end    of line
  1432.  
  1433.         -  wi_clear    - clear    window
  1434.  
  1435.         -  wi_home - set position to home
  1436.  
  1437.         -  wi_border - set window border
  1438.  
  1439.         -  wi_setpos - set position
  1440.  
  1441.         -  wi_getpos - get position
  1442.  
  1443.         -  wi_setorg - set origin
  1444.  
  1445.  
  1446.  
  1447.                      - 17 -
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.       Window Management Services               Version 1.0
  1456.  
  1457.  
  1458.  
  1459.  
  1460.  
  1461.         -  wi_getorg - get origin
  1462.  
  1463.         -  wi_put -    store character    string
  1464.  
  1465.         -  wi_putln    - store    character string, advance position  to
  1466.            next line
  1467.  
  1468.         -  wi_get -    retrieve character string
  1469.  
  1470.         -  wi_getln     - retrieve character string, advance position
  1471.            to next line
  1472.  
  1473.         -  wi_write    - write    character string through window
  1474.  
  1475.         -    wi_writeln  - write character string  through  window,
  1476.            advance position    to next    line
  1477.  
  1478.         -  wi_read - read character    string through window
  1479.  
  1480.         -    wi_readln  -  read character  string  through  window,
  1481.            advance position    to next    line
  1482.  
  1483.         -  wi_show - display window    on screen
  1484.  
  1485.         -  wi_erase    - erase    window area on screen
  1486.  
  1487.  
  1488.  
  1489.  
  1490.  
  1491.  
  1492.  
  1493.  
  1494.  
  1495.  
  1496.  
  1497.  
  1498.  
  1499.  
  1500.  
  1501.  
  1502.  
  1503.  
  1504.  
  1505.  
  1506.  
  1507.  
  1508.  
  1509.  
  1510.  
  1511.  
  1512.  
  1513.                      - 18 -
  1514.  
  1515.  
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.       Window Management Services               Version 1.0
  1522.  
  1523.  
  1524.  
  1525.  
  1526.  
  1527.  
  1528.       5.1.1    wi_open    - create window
  1529.  
  1530.  
  1531.       procedure  wi_open (window_number,
  1532.                    origin_column,
  1533.                    origin_row,
  1534.                    window_width,
  1535.                    window_height : integer;
  1536.                    border_chars : string[4]);
  1537.  
  1538.  
  1539.  
  1540.       Input    arguments:
  1541.  
  1542.            window_number  -     User  assigned    window    identification
  1543.          number
  1544.  
  1545.            origin_column -    Display     screen    column to contain left
  1546.          column    of window
  1547.  
  1548.            origin_row - Display screen row to  contain  top    row of
  1549.          window
  1550.  
  1551.            window_width -  The window width    expressed as number of
  1552.          columns
  1553.  
  1554.            window_height - The window height  expressed  as    number
  1555.          of rows
  1556.  
  1557.            border_chars - Window border character string
  1558.  
  1559.  
  1560.  
  1561.       Output arguments:
  1562.  
  1563.            None
  1564.  
  1565.  
  1566.  
  1567.       Action:
  1568.  
  1569.            If window_width and window_height are within range and
  1570.            window_number is    unique,    the service attempts to
  1571.            allocate    dynamic    memory for a window control block.  If
  1572.            sufficient dynamic memory is not    available to allocate
  1573.            a window    control    block, a Turbo Pascal run-time error
  1574.            results.     The service initializes the window control
  1575.            block to    specified input    values.     Window    contents are
  1576.  
  1577.  
  1578.  
  1579.                      - 19 -
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.       Window Management Services               Version 1.0
  1588.  
  1589.  
  1590.  
  1591.  
  1592.            cleared.     The window border, if specified, is stored.
  1593.  
  1594.  
  1595.  
  1596.       Status:
  1597.  
  1598.            wi_status - True    if  operation  successful.   False  if
  1599.          window_width or window_height    out  of     range,     or if
  1600.          window    control     block    with  the  same     window_number
  1601.          exists.
  1602.  
  1603.  
  1604.  
  1605.  
  1606.  
  1607.  
  1608.  
  1609.  
  1610.  
  1611.  
  1612.  
  1613.  
  1614.  
  1615.  
  1616.  
  1617.  
  1618.  
  1619.  
  1620.  
  1621.  
  1622.  
  1623.  
  1624.  
  1625.  
  1626.  
  1627.  
  1628.  
  1629.  
  1630.  
  1631.  
  1632.  
  1633.  
  1634.  
  1635.  
  1636.  
  1637.  
  1638.  
  1639.  
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.                      - 20 -
  1646.  
  1647.  
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653.       Window Management Services               Version 1.0
  1654.  
  1655.  
  1656.  
  1657.  
  1658.  
  1659.  
  1660.       5.1.2    wi_close - delete window
  1661.  
  1662.  
  1663.       procedure  wi_close (window_number : integer);
  1664.  
  1665.  
  1666.  
  1667.       Input    arguments:
  1668.  
  1669.            window_number - Window identification number
  1670.  
  1671.  
  1672.  
  1673.       Output arguments:
  1674.  
  1675.            None
  1676.  
  1677.  
  1678.  
  1679.       Action:
  1680.  
  1681.            If the window is    open, the service de-allocates the
  1682.            dynamic memory required to store    the window control
  1683.            block.
  1684.  
  1685.  
  1686.  
  1687.       Status:
  1688.  
  1689.            wi_status - True     if  close  operation  is successful.
  1690.          False if window is not    open.
  1691.  
  1692.  
  1693.  
  1694.  
  1695.  
  1696.  
  1697.  
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.                      - 21 -
  1712.  
  1713.  
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.       Window Management Services               Version 1.0
  1720.  
  1721.  
  1722.  
  1723.  
  1724.  
  1725.  
  1726.       5.1.3    wi_insln - insert line
  1727.  
  1728.  
  1729.       procedure  wi_insln (window_number,
  1730.                 window_row : integer);
  1731.  
  1732.  
  1733.  
  1734.       Input    arguments:
  1735.  
  1736.            window_number - Window identification number
  1737.  
  1738.            window_row - Window row number for line insert
  1739.  
  1740.  
  1741.  
  1742.       Output arguments:
  1743.  
  1744.            None
  1745.  
  1746.  
  1747.  
  1748.       Action:
  1749.  
  1750.            If the window is    open and window_row is in range, the
  1751.            window line at window_row and following lines are
  1752.            shifted down one    row.  The last user accessible line in
  1753.            the window is deleted.  A blank line is inserted    into
  1754.            the window at window_row. Window    position is set    to the
  1755.            first column of window_row. The window border, if
  1756.            present,    is unchanged.  If the window is    open and
  1757.            window_row is greater than the number of    accessible
  1758.            rows, window lines are shifted up one row.  The top
  1759.            user accessible line in the window is deleted.  A blank
  1760.            line is inserted    into the window    on the last user
  1761.            accessible row.    Window position    is set to the first
  1762.            column of the inserted row.  The    window border, if
  1763.            present,    is unchanged.
  1764.  
  1765.  
  1766.  
  1767.       Status:
  1768.  
  1769.            wi_status - False if  window  is    not open or window_row
  1770.          is less than 1; otherwise, true.
  1771.  
  1772.  
  1773.  
  1774.  
  1775.  
  1776.  
  1777.                      - 22 -
  1778.  
  1779.  
  1780.  
  1781.  
  1782.  
  1783.  
  1784.  
  1785.       Window Management Services               Version 1.0
  1786.  
  1787.  
  1788.  
  1789.  
  1790.  
  1791.  
  1792.       5.1.4    wi_delln - delete line
  1793.  
  1794.  
  1795.       procedure  wi_delln (window_number,
  1796.                 window_row : integer);
  1797.  
  1798.  
  1799.  
  1800.       Input    arguments:
  1801.  
  1802.            window_number - Window identification number
  1803.  
  1804.            window_row - Window row number for line delete
  1805.  
  1806.  
  1807.  
  1808.       Output arguments:
  1809.  
  1810.            None
  1811.  
  1812.  
  1813.  
  1814.       Action:
  1815.  
  1816.            If the window is    open and window_row is within range,
  1817.            the window line at window_row is    deleted    and following
  1818.            rows are    shifted    up one row.  A blank line is inserted
  1819.            at the bottom of    the window.  Window position is    set to
  1820.            the beginning of    window_row. The    window border, if
  1821.            present,    is unchanged.
  1822.  
  1823.  
  1824.  
  1825.       Status:
  1826.  
  1827.            wi_status -  False  if window is    not open or window_row
  1828.          is out    of range; otherwise, true.
  1829.  
  1830.  
  1831.  
  1832.  
  1833.  
  1834.  
  1835.  
  1836.  
  1837.  
  1838.  
  1839.  
  1840.  
  1841.  
  1842.  
  1843.                      - 23 -
  1844.  
  1845.  
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.       Window Management Services               Version 1.0
  1852.  
  1853.  
  1854.  
  1855.  
  1856.  
  1857.  
  1858.       5.1.5    wi_clreol - clear to end of line
  1859.  
  1860.  
  1861.       procedure  wi_clreol (window_number :    integer);
  1862.  
  1863.  
  1864.  
  1865.       Input    arguments:
  1866.  
  1867.            window_number - Window identification number
  1868.  
  1869.  
  1870.  
  1871.       Output arguments:
  1872.  
  1873.            None
  1874.  
  1875.  
  1876.  
  1877.       Action:
  1878.  
  1879.            If the window is    open and window    position is not    at end
  1880.            of window, window content from current window position
  1881.            to end of row is    set to spaces.    Window position    is not
  1882.            modified.
  1883.  
  1884.  
  1885.  
  1886.       Status:
  1887.  
  1888.            wi_status - False if  window  is     not  open  of    window
  1889.          position is at    end of window when service is invoked;
  1890.          otherwise, true.
  1891.  
  1892.  
  1893.  
  1894.  
  1895.  
  1896.  
  1897.  
  1898.  
  1899.  
  1900.  
  1901.  
  1902.  
  1903.  
  1904.  
  1905.  
  1906.  
  1907.  
  1908.  
  1909.                      - 24 -
  1910.  
  1911.  
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917.       Window Management Services               Version 1.0
  1918.  
  1919.  
  1920.  
  1921.  
  1922.  
  1923.  
  1924.       5.1.6    wi_clear - clear window
  1925.  
  1926.  
  1927.       procedure  wi_clear (window_number : integer);
  1928.  
  1929.  
  1930.  
  1931.       Input    arguments:
  1932.  
  1933.            window_number - Window identification number
  1934.  
  1935.  
  1936.  
  1937.       Output arguments:
  1938.  
  1939.            None
  1940.  
  1941.  
  1942.  
  1943.       Action:
  1944.  
  1945.            If the window is    open, window contents are set to
  1946.            spaces.    The window border is restored.    Window
  1947.            position    is set to home:    window column 1, row 1.
  1948.  
  1949.  
  1950.  
  1951.       Status:
  1952.  
  1953.            wi_status - False if  window  is     not  open; otherwise,
  1954.          true.
  1955.  
  1956.  
  1957.  
  1958.  
  1959.  
  1960.  
  1961.  
  1962.  
  1963.  
  1964.  
  1965.  
  1966.  
  1967.  
  1968.  
  1969.  
  1970.  
  1971.  
  1972.  
  1973.  
  1974.  
  1975.                      - 25 -
  1976.  
  1977.  
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.       Window Management Services               Version 1.0
  1984.  
  1985.  
  1986.  
  1987.  
  1988.  
  1989.  
  1990.       5.1.7    wi_home    - set position to home
  1991.  
  1992.  
  1993.       procedure  wi_home (window_number : integer);
  1994.  
  1995.  
  1996.  
  1997.       Input    arguments:
  1998.  
  1999.            window_number - Window identification number
  2000.  
  2001.  
  2002.  
  2003.       Output arguments:
  2004.  
  2005.            None
  2006.  
  2007.  
  2008.  
  2009.       Action:
  2010.  
  2011.            Window position is set to home: window column 1,    row 1.
  2012.  
  2013.  
  2014.  
  2015.       Status:
  2016.  
  2017.            wi_status  - False if window is    not  open;  otherwise,
  2018.          true.
  2019.  
  2020.  
  2021.  
  2022.  
  2023.  
  2024.  
  2025.  
  2026.  
  2027.  
  2028.  
  2029.  
  2030.  
  2031.  
  2032.  
  2033.  
  2034.  
  2035.  
  2036.  
  2037.  
  2038.  
  2039.  
  2040.  
  2041.                      - 26 -
  2042.  
  2043.  
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.       Window Management Services               Version 1.0
  2050.  
  2051.  
  2052.  
  2053.  
  2054.  
  2055.  
  2056.       5.1.8    wi_border - set    window border
  2057.  
  2058.  
  2059.       procedure  wi_border (window_number :    integer,
  2060.                  border_chars :    string[4]);
  2061.  
  2062.  
  2063.  
  2064.       Input    arguments:
  2065.  
  2066.            window_number - Window identification number
  2067.  
  2068.            border_chars - Window border character string
  2069.  
  2070.  
  2071.  
  2072.       Output arguments:
  2073.  
  2074.            None
  2075.  
  2076.       Action:
  2077.  
  2078.            If window is open and a window border was selected when
  2079.            the window was created, the border_chars    window border
  2080.            is stored in the    window control block.
  2081.  
  2082.  
  2083.  
  2084.       Status:
  2085.  
  2086.            wi_status - False if window is  not  open  or  was  not
  2087.          opened    with window border selected; otherwise,    true.
  2088.  
  2089.  
  2090.  
  2091.  
  2092.  
  2093.  
  2094.  
  2095.  
  2096.  
  2097.  
  2098.  
  2099.  
  2100.  
  2101.  
  2102.  
  2103.  
  2104.  
  2105.  
  2106.  
  2107.                      - 27 -
  2108.  
  2109.  
  2110.  
  2111.  
  2112.  
  2113.  
  2114.  
  2115.       Window Management Services               Version 1.0
  2116.  
  2117.  
  2118.  
  2119.  
  2120.  
  2121.  
  2122.       5.1.9    wi_setpos - set    position
  2123.  
  2124.  
  2125.       procedure  wi_setpos (window_number,
  2126.                  window_column,
  2127.                  window_row : integer);
  2128.  
  2129.  
  2130.  
  2131.       Input    arguments:
  2132.  
  2133.            window_number - Window identification number
  2134.  
  2135.            window_column - Window column number
  2136.  
  2137.            window_row - Window row number
  2138.  
  2139.  
  2140.  
  2141.       Output arguments:
  2142.  
  2143.            None
  2144.  
  2145.  
  2146.  
  2147.       Action:
  2148.  
  2149.            If the window is    open and if window_column and
  2150.            window_row are in range,    window position    is set to
  2151.            window_column and window_row.
  2152.  
  2153.  
  2154.  
  2155.       Status:
  2156.  
  2157.            wi_status  - False if window is not open    or  window_row
  2158.          or window_column are out of range; otherwise, true.
  2159.  
  2160.  
  2161.  
  2162.  
  2163.  
  2164.  
  2165.  
  2166.  
  2167.  
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173.                      - 28 -
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.       Window Management Services               Version 1.0
  2182.  
  2183.  
  2184.  
  2185.  
  2186.  
  2187.  
  2188.       5.1.10 wi_getpos - get position
  2189.  
  2190.  
  2191.       procedure  wi_getpos (window_number,
  2192.                  var window_column,
  2193.                      window_row    : integer);
  2194.  
  2195.  
  2196.  
  2197.       Input    arguments:
  2198.  
  2199.            window_number - Window identification number
  2200.  
  2201.  
  2202.  
  2203.       Output arguments:
  2204.  
  2205.            window_column - Window column number
  2206.  
  2207.            window_row - Window row number
  2208.  
  2209.  
  2210.  
  2211.       Action:
  2212.  
  2213.            If the window is    open, the current window position
  2214.            column and row values are returned in window_column and
  2215.            window_row. Note    that window_column and window_row may
  2216.            point to    end of window: one row greater than the    last
  2217.            accessible window row.
  2218.  
  2219.  
  2220.  
  2221.       Status:
  2222.  
  2223.            wi_status - False if window is not  open     or window_row
  2224.          or window_column are out of range; otherwise, true.
  2225.  
  2226.  
  2227.  
  2228.  
  2229.  
  2230.  
  2231.  
  2232.  
  2233.  
  2234.  
  2235.  
  2236.  
  2237.  
  2238.  
  2239.                      - 29 -
  2240.  
  2241.  
  2242.  
  2243.  
  2244.  
  2245.  
  2246.  
  2247.       Window Management Services               Version 1.0
  2248.  
  2249.  
  2250.  
  2251.  
  2252.  
  2253.  
  2254.       5.1.11 wi_setorg - set origin
  2255.  
  2256.  
  2257.       procedure  wi_setorg (window_number,
  2258.                  screen_column,
  2259.                  screen_row : integer);
  2260.  
  2261.  
  2262.  
  2263.       Input    arguments:
  2264.  
  2265.            window_number - Window identification number
  2266.  
  2267.            screen_column - Screen column number
  2268.  
  2269.            screen_row - Screen row number
  2270.  
  2271.  
  2272.  
  2273.       Output arguments:
  2274.  
  2275.            None
  2276.  
  2277.  
  2278.  
  2279.       Action:
  2280.  
  2281.            If window is open and screen_column and screen_row are
  2282.            valid, the window origin    column and origin row are set
  2283.            to screen_column    and screen_row,    respectively.
  2284.  
  2285.  
  2286.  
  2287.       Status:
  2288.  
  2289.            wi_status - False if  window  is    not open or screen_row
  2290.          or screen_column are not in range; otherwise, true.
  2291.  
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298.  
  2299.  
  2300.  
  2301.  
  2302.  
  2303.  
  2304.  
  2305.                      - 30 -
  2306.  
  2307.  
  2308.  
  2309.  
  2310.  
  2311.  
  2312.  
  2313.       Window Management Services               Version 1.0
  2314.  
  2315.  
  2316.  
  2317.  
  2318.  
  2319.  
  2320.       5.1.12 wi_getorg - get origin
  2321.  
  2322.  
  2323.       procedure  wi_getorg (window_number,
  2324.                  var screen_column,
  2325.                      screen_row    : integer);
  2326.  
  2327.  
  2328.  
  2329.       Input    arguments:
  2330.  
  2331.            window_number - Window identification number
  2332.  
  2333.  
  2334.  
  2335.  
  2336.  
  2337.       Output arguments:
  2338.  
  2339.            screen_column - Screen column number
  2340.  
  2341.            screen_row - Screen row number
  2342.  
  2343.  
  2344.  
  2345.       Action:
  2346.  
  2347.            If the window is    open, the current window origin    column
  2348.            and origin row values are returned in screen_ column
  2349.            and screen_row, respectively.
  2350.  
  2351.  
  2352.  
  2353.       Status:
  2354.  
  2355.            wi_status  - False if window is    not  open;  otherwise,
  2356.          true.
  2357.  
  2358.  
  2359.  
  2360.  
  2361.  
  2362.  
  2363.  
  2364.  
  2365.  
  2366.  
  2367.  
  2368.  
  2369.  
  2370.  
  2371.                      - 31 -
  2372.  
  2373.  
  2374.  
  2375.  
  2376.  
  2377.  
  2378.  
  2379.       Window Management Services               Version 1.0
  2380.  
  2381.  
  2382.  
  2383.  
  2384.  
  2385.  
  2386.       5.1.13 wi_put    - store    character string
  2387.  
  2388.  
  2389.       procedure  wi_put (window_number : integer;
  2390.                   output_string : string[80]);
  2391.  
  2392.  
  2393.  
  2394.       Input    arguments:
  2395.  
  2396.            window_number - Window identification number
  2397.  
  2398.            output_string - Output character    string
  2399.  
  2400.  
  2401.  
  2402.       Output arguments:
  2403.  
  2404.            None
  2405.  
  2406.  
  2407.  
  2408.       Action:
  2409.  
  2410.            If the window is    open, output_string is stored in the
  2411.            window content array at the current window position.
  2412.            As many characters as fit on the    current    window row up
  2413.            to the length of    output_string are stored; remaining
  2414.            characters are ignored.    wi_eoln    is set to true
  2415.            whenever    window position    is advanced past end of    row.
  2416.            wi_eow is set to    true whenever window position is
  2417.            advanced    to end of window.
  2418.  
  2419.            If at entry, window position is at end of window, the
  2420.            window is scrolled by deleting the first    row, shifting
  2421.            the remaining rows up one row, and storing blanks into
  2422.            the bottom row.    Window position    is set to the first
  2423.            column of the bottom row.
  2424.  
  2425.            At exit,    window position    is set to the next character
  2426.            within the window following the last character of the
  2427.            output string.  When the    last character of the output
  2428.            string is the last column in the    row, window position
  2429.            is set to the first column of the next row and wi_eoln
  2430.            is set to true.    wi_eow is set to true when the next
  2431.            row is greater than the maximum number of accessible
  2432.            rows in the window.
  2433.  
  2434.  
  2435.  
  2436.  
  2437.                      - 32 -
  2438.  
  2439.  
  2440.  
  2441.  
  2442.  
  2443.  
  2444.  
  2445.       Window Management Services               Version 1.0
  2446.  
  2447.  
  2448.  
  2449.  
  2450.  
  2451.  
  2452.       Status:
  2453.  
  2454.            wi_status  -  False  if window is not open;  otherwise,
  2455.          true.
  2456.  
  2457.            wi_eoln    -  True     if  end  of row is encountered     while
  2458.          storing output_string;    otherwise, true.
  2459.  
  2460.            wi_eow -     True if window    position is advanced to    end of
  2461.          window; otherwise, false.
  2462.  
  2463.  
  2464.  
  2465.  
  2466.  
  2467.  
  2468.  
  2469.  
  2470.  
  2471.  
  2472.  
  2473.  
  2474.  
  2475.  
  2476.  
  2477.  
  2478.  
  2479.  
  2480.  
  2481.  
  2482.  
  2483.  
  2484.  
  2485.  
  2486.  
  2487.  
  2488.  
  2489.  
  2490.  
  2491.  
  2492.  
  2493.  
  2494.  
  2495.  
  2496.  
  2497.  
  2498.  
  2499.  
  2500.  
  2501.  
  2502.  
  2503.                      - 33 -
  2504.  
  2505.  
  2506.  
  2507.  
  2508.  
  2509.  
  2510.  
  2511.       Window Management Services               Version 1.0
  2512.  
  2513.  
  2514.  
  2515.  
  2516.  
  2517.  
  2518.       5.1.14 wi_putln - store character string
  2519.  
  2520.  
  2521.       procedure  wi_putln (window_number : integer;
  2522.                 output_string :    string[80]);
  2523.  
  2524.  
  2525.  
  2526.       Input    arguments:
  2527.  
  2528.            window_number - Window identification number
  2529.  
  2530.            output_string - Output character    string
  2531.  
  2532.  
  2533.  
  2534.       Output arguments:
  2535.  
  2536.            None
  2537.  
  2538.  
  2539.  
  2540.       Action:
  2541.  
  2542.            If the window is    open, output_string is stored in the
  2543.            window content array at the current window position.
  2544.            As many characters as fit on the    current    window row up
  2545.            to the length of    output_string are stored; remaining
  2546.            characters are ignored.
  2547.  
  2548.            If at entry, window position is at end of window, the
  2549.            window is scrolled by deleting the first    row, shifting
  2550.            the remaining rows up one row, and storing blanks into
  2551.            the bottom row.    Window position    is set to the first
  2552.            column of the bottom row.
  2553.  
  2554.            At exit,    window position    is set to the beginning    of the
  2555.            next window row.     wi_eoln is set    to true.  wi_eow is
  2556.            set to true if next row is beyond the last accessible
  2557.            row in the window.
  2558.  
  2559.  
  2560.  
  2561.       Status:
  2562.  
  2563.            wi_status -  False  if  window  is not open; otherwise,
  2564.          true.
  2565.  
  2566.  
  2567.  
  2568.  
  2569.                      - 34 -
  2570.  
  2571.  
  2572.  
  2573.  
  2574.  
  2575.  
  2576.  
  2577.       Window Management Services               Version 1.0
  2578.  
  2579.  
  2580.  
  2581.  
  2582.            wi_eoln - True
  2583.  
  2584.            wi_eow -    True if    window position     is advanced to    end of
  2585.          window; otherwise, false.
  2586.  
  2587.  
  2588.  
  2589.  
  2590.  
  2591.  
  2592.  
  2593.  
  2594.  
  2595.  
  2596.  
  2597.  
  2598.  
  2599.  
  2600.  
  2601.  
  2602.  
  2603.  
  2604.  
  2605.  
  2606.  
  2607.  
  2608.  
  2609.  
  2610.  
  2611.  
  2612.  
  2613.  
  2614.  
  2615.  
  2616.  
  2617.  
  2618.  
  2619.  
  2620.  
  2621.  
  2622.  
  2623.  
  2624.  
  2625.  
  2626.  
  2627.  
  2628.  
  2629.  
  2630.  
  2631.  
  2632.  
  2633.  
  2634.  
  2635.                      - 35 -
  2636.  
  2637.  
  2638.  
  2639.  
  2640.  
  2641.  
  2642.  
  2643.       Window Management Services               Version 1.0
  2644.  
  2645.  
  2646.  
  2647.  
  2648.  
  2649.  
  2650.       5.1.15 wi_get    - retrieve character string
  2651.  
  2652.  
  2653.       procedure  wi_get (window_number,
  2654.                   input_length : integer;
  2655.                   var input_string : string[80]);
  2656.  
  2657.  
  2658.  
  2659.       Input    arguments:
  2660.  
  2661.            window_number - Window identification number
  2662.  
  2663.            input_length - Input string maximum length
  2664.  
  2665.  
  2666.  
  2667.       Output arguments:
  2668.  
  2669.            input_string - Input character string
  2670.  
  2671.  
  2672.  
  2673.       Action:
  2674.  
  2675.            If the window is    open, an input_string of length
  2676.            input_length is retrieved from the window content array
  2677.            beginning at the    current    window position.  If end of
  2678.            row is encountered before retrieving input_length
  2679.            characters, input_string    is truncated.
  2680.  
  2681.            wi_eoln is set to true whenever window position is
  2682.            advanced    past end of row.  wi_eow is set    to true
  2683.            whenever    window position    is advanced to end of window.
  2684.  
  2685.            At exit,    window position    is set to the next character
  2686.            within the window following the last character of the
  2687.            output string.  When the    last character of the output
  2688.            string is the last column in the    row, window position
  2689.            is set to the first column of the next row and wi_eoln
  2690.            is set to true.    wi_eow is set to true when the next
  2691.            row is greater than the maximum number of accessible
  2692.            rows in the window.
  2693.  
  2694.  
  2695.  
  2696.       Status:
  2697.  
  2698.  
  2699.  
  2700.  
  2701.                      - 36 -
  2702.  
  2703.  
  2704.  
  2705.  
  2706.  
  2707.  
  2708.  
  2709.       Window Management Services               Version 1.0
  2710.  
  2711.  
  2712.  
  2713.  
  2714.            wi_status - False if  window is not open    or if at entry
  2715.          window     position  is  at  end of  window;  otherwise,
  2716.          true.
  2717.  
  2718.            wi_eoln -  True    if  end     of  row  is encountered while
  2719.          retrieving input_string; otherwise, false.
  2720.  
  2721.            wi_eow -    True if    window position     is advanced to    end of
  2722.          window; otherwise, false.
  2723.  
  2724.  
  2725.  
  2726.  
  2727.  
  2728.  
  2729.  
  2730.  
  2731.  
  2732.  
  2733.  
  2734.  
  2735.  
  2736.  
  2737.  
  2738.  
  2739.  
  2740.  
  2741.  
  2742.  
  2743.  
  2744.  
  2745.  
  2746.  
  2747.  
  2748.  
  2749.  
  2750.  
  2751.  
  2752.  
  2753.  
  2754.  
  2755.  
  2756.  
  2757.  
  2758.  
  2759.  
  2760.  
  2761.  
  2762.  
  2763.  
  2764.  
  2765.  
  2766.  
  2767.                      - 37 -
  2768.  
  2769.  
  2770.  
  2771.  
  2772.  
  2773.  
  2774.  
  2775.       Window Management Services               Version 1.0
  2776.  
  2777.  
  2778.  
  2779.  
  2780.  
  2781.  
  2782.       5.1.16 wi_getln - retrieve character string
  2783.  
  2784.  
  2785.       procedure  wi_getln (window_number,
  2786.                 input_length : integer;
  2787.                 var input_string : string[80]);
  2788.  
  2789.  
  2790.  
  2791.       Input    arguments:
  2792.  
  2793.            window_number - Window identification number
  2794.  
  2795.            input_length - Input string maximum length
  2796.  
  2797.  
  2798.  
  2799.       Output arguments:
  2800.  
  2801.            input_string - Input character string
  2802.  
  2803.  
  2804.  
  2805.       Action:
  2806.  
  2807.            This service is similar to wi_get, differing only in
  2808.            the manner of setting window position at    end of
  2809.            retrieval.
  2810.  
  2811.            If the window is    open, an input string of length
  2812.            input_length is retrieved from the window content array
  2813.            beginning at the    current    window position.  If end of
  2814.            row is encountered before retrieving input_length
  2815.            characters, input_string    is truncated.
  2816.  
  2817.            At exit,    window position    is set to the beginning    of the
  2818.            next window row.     wi_eoln is set    to true.  wi_eow is
  2819.            set to true when    next row is beyond the last accessible
  2820.            row in the window.
  2821.  
  2822.  
  2823.  
  2824.       Status:
  2825.  
  2826.            wi_status - False if window is not  open    or if at entry
  2827.          window     position  is  at  end of  window;  otherwise,
  2828.          true.
  2829.  
  2830.  
  2831.  
  2832.  
  2833.                      - 38 -
  2834.  
  2835.  
  2836.  
  2837.  
  2838.  
  2839.  
  2840.  
  2841.       Window Management Services               Version 1.0
  2842.  
  2843.  
  2844.  
  2845.  
  2846.            wi_eoln - True
  2847.  
  2848.            wi_eow -    True if    window position    is advanced to end  of
  2849.          window; otherwise, false.
  2850.  
  2851.  
  2852.  
  2853.  
  2854.  
  2855.  
  2856.  
  2857.  
  2858.  
  2859.  
  2860.  
  2861.  
  2862.  
  2863.  
  2864.  
  2865.  
  2866.  
  2867.  
  2868.  
  2869.  
  2870.  
  2871.  
  2872.  
  2873.  
  2874.  
  2875.  
  2876.  
  2877.  
  2878.  
  2879.  
  2880.  
  2881.  
  2882.  
  2883.  
  2884.  
  2885.  
  2886.  
  2887.  
  2888.  
  2889.  
  2890.  
  2891.  
  2892.  
  2893.  
  2894.  
  2895.  
  2896.  
  2897.  
  2898.  
  2899.                      - 39 -
  2900.  
  2901.  
  2902.  
  2903.  
  2904.  
  2905.  
  2906.  
  2907.       Window Management Services               Version 1.0
  2908.  
  2909.  
  2910.  
  2911.  
  2912.  
  2913.  
  2914.       5.1.17 wi_write - write character string through window
  2915.  
  2916.  
  2917.       procedure  wi_write (window_number : integer;
  2918.                 output_string :    string[80]);
  2919.  
  2920.  
  2921.  
  2922.       Input    arguments:
  2923.  
  2924.            window_number - Window identification number
  2925.  
  2926.            output_string - Output character    string
  2927.  
  2928.  
  2929.  
  2930.       Output arguments:
  2931.  
  2932.            None
  2933.  
  2934.  
  2935.  
  2936.       Action:
  2937.  
  2938.            If the window is    open, output_string is stored in the
  2939.            window content array at the current window position and
  2940.            written to the terminal display screen.
  2941.  
  2942.            As many characters as fit on the    current    window row up
  2943.            to the length of    output_length are stored; remaining
  2944.            characters are ignored.    The beginning position of
  2945.            output_string on    the terminal display screen is window
  2946.            position    plus screen origin minus one for each
  2947.            dimension.  When    the computed screen position for a
  2948.            character falls outside the boundaries of the display
  2949.            screen, the character is    not displayed.
  2950.  
  2951.            If at entry, window position is at end of window, the
  2952.            window is scrolled by deleting the first    row, shifting
  2953.            the remaining rows up one row, and storing blanks into
  2954.            the bottom row.    Window position    is set to the first
  2955.            column of the bottom row.
  2956.  
  2957.            At exit,    window position    is set to the next character
  2958.            within the window following the last character of the
  2959.            output string.  When the    last character of the output
  2960.            string is the last column in the    row, window position
  2961.            is set to the first column of the next row and wi_eoln
  2962.  
  2963.  
  2964.  
  2965.                      - 40 -
  2966.  
  2967.  
  2968.  
  2969.  
  2970.  
  2971.  
  2972.  
  2973.       Window Management Services               Version 1.0
  2974.  
  2975.  
  2976.  
  2977.  
  2978.            is set to true.    wi_eow is set to true when the next
  2979.            row is greater than the maximum number of accessible
  2980.            rows in the window.
  2981.  
  2982.  
  2983.  
  2984.       Status:
  2985.  
  2986.            wi_status - False if  window  is     not  open; otherwise,
  2987.          true.
  2988.  
  2989.            wi_eoln -  True    if  end     of  row  is encountered while
  2990.          storing output_string;    otherwise, false.
  2991.  
  2992.            wi_eow -    True if     window    position is advanced to    end of
  2993.          window; otherwise, false.
  2994.  
  2995.  
  2996.  
  2997.  
  2998.  
  2999.  
  3000.  
  3001.  
  3002.  
  3003.  
  3004.  
  3005.  
  3006.  
  3007.  
  3008.  
  3009.  
  3010.  
  3011.  
  3012.  
  3013.  
  3014.  
  3015.  
  3016.  
  3017.  
  3018.  
  3019.  
  3020.  
  3021.  
  3022.  
  3023.  
  3024.  
  3025.  
  3026.  
  3027.  
  3028.  
  3029.  
  3030.  
  3031.                      - 41 -
  3032.  
  3033.  
  3034.  
  3035.  
  3036.  
  3037.  
  3038.  
  3039.       Window Management Services               Version 1.0
  3040.  
  3041.  
  3042.  
  3043.  
  3044.  
  3045.  
  3046.       5.1.18 wi_writeln - write character string through window
  3047.  
  3048.  
  3049.       procedure  wi_writeln    (window_number : integer;
  3050.                   output_string    : string[80]);
  3051.  
  3052.  
  3053.  
  3054.       Input    arguments:
  3055.  
  3056.            window_number - Window identification number
  3057.  
  3058.            output_string - Output character    string
  3059.  
  3060.  
  3061.  
  3062.       Output arguments:
  3063.  
  3064.            None
  3065.  
  3066.  
  3067.  
  3068.       Action:
  3069.  
  3070.            This service is similar to wi_out, differing only in
  3071.            the manner of setting window position at    end of
  3072.            output.
  3073.  
  3074.            If the window is    open, output_string is stored in the
  3075.            window content array at the current window position and
  3076.            written to the terminal display screen.
  3077.  
  3078.            As many characters as fit on the    current    window row up
  3079.            to the length of    output_length are stored; remaining
  3080.            characters are ignored.    The beginning position of
  3081.            output_string on    the terminal display screen is window
  3082.            position    plus screen origin minus one for each
  3083.            dimension.  When    the computed screen position for a
  3084.            character falls outside the boundaries of the display
  3085.            screen, the character is    not displayed.
  3086.  
  3087.            If at entry, window position is at end of window, the
  3088.            window is scrolled by deleting the first    row, shifting
  3089.            the remaining rows up one row, and storing blanks into
  3090.            the bottom row.    Window position    is set to the first
  3091.            column of the bottom row.
  3092.  
  3093.            At exit,    window position    is set to the beginning    of the
  3094.  
  3095.  
  3096.  
  3097.                      - 42 -
  3098.  
  3099.  
  3100.  
  3101.  
  3102.  
  3103.  
  3104.  
  3105.       Window Management Services               Version 1.0
  3106.  
  3107.  
  3108.  
  3109.  
  3110.            next window row.     wi_eoln is set    to true.  wi_eow is
  3111.            set to true when    next row is beyond the last accessible
  3112.            row in the window.
  3113.  
  3114.  
  3115.  
  3116.       Status:
  3117.  
  3118.            wi_status -  False  if  window  is not open; otherwise,
  3119.          true.
  3120.  
  3121.            wi_eoln - True
  3122.  
  3123.            wi_eow -    True if     window    position is advanced to    end of
  3124.          window; otherwise, false.
  3125.  
  3126.  
  3127.  
  3128.  
  3129.  
  3130.  
  3131.  
  3132.  
  3133.  
  3134.  
  3135.  
  3136.  
  3137.  
  3138.  
  3139.  
  3140.  
  3141.  
  3142.  
  3143.  
  3144.  
  3145.  
  3146.  
  3147.  
  3148.  
  3149.  
  3150.  
  3151.  
  3152.  
  3153.  
  3154.  
  3155.  
  3156.  
  3157.  
  3158.  
  3159.  
  3160.  
  3161.  
  3162.  
  3163.                      - 43 -
  3164.  
  3165.  
  3166.  
  3167.  
  3168.  
  3169.  
  3170.  
  3171.       Window Management Services               Version 1.0
  3172.  
  3173.  
  3174.  
  3175.  
  3176.  
  3177.  
  3178.       5.1.19 wi_read - read    character string through window
  3179.  
  3180.  
  3181.       procedure  wi_read (window_number,
  3182.                    input_length : integer;
  3183.                    var input_string    : string[80]);
  3184.  
  3185.  
  3186.  
  3187.       Input    arguments:
  3188.  
  3189.            window_number - Window identification number
  3190.  
  3191.            input_length - Input string maximum length
  3192.  
  3193.  
  3194.  
  3195.       Output arguments:
  3196.  
  3197.            input_string - Input character string
  3198.  
  3199.  
  3200.  
  3201.       Action:
  3202.  
  3203.            If the window is    open, window position is not at    end of
  3204.            window, and the window origin values permit the window
  3205.            to be displayed on the terminal screen, a character
  3206.            string of input_length characters is read from the
  3207.            keyboard, stored    in the window content array, and
  3208.            returned    in input_string.
  3209.  
  3210.            Character string    input is read character    by character
  3211.            until terminated    by a carriage return.  The service
  3212.            will not    accept input, other than a return, past    end of
  3213.            line or end of string.  The delete and backspace    keys
  3214.            may be used to delete previously    keyed string
  3215.            characters.  It is not possible to delete past
  3216.            beginning of string.
  3217.  
  3218.            At exit,    window position    is set to the next character
  3219.            within the window following the last character of the
  3220.            input string.  When the last character of the input
  3221.            string is the last column in the    row, window position
  3222.            is set to the first column of the next row and wi_eoln
  3223.            is set to true.    wi_eow is set to true when the next
  3224.            row is greater than the maximum number of accessible
  3225.            rows in the window.
  3226.  
  3227.  
  3228.  
  3229.                      - 44 -
  3230.  
  3231.  
  3232.  
  3233.  
  3234.  
  3235.  
  3236.  
  3237.       Window Management Services               Version 1.0
  3238.  
  3239.  
  3240.  
  3241.  
  3242.  
  3243.  
  3244.  
  3245.       Status:
  3246.  
  3247.            wi_status - False  if window is not open    or if at entry
  3248.          window     position  is at  end  of  window;  otherwise,
  3249.          true.
  3250.  
  3251.            wi_eoln - True if  end  of  row    is  encountered     while
  3252.          storing input_string; otherwise, false.
  3253.  
  3254.            wi_eow -    True if    window position    is advanced to end  of
  3255.          window; otherwise, false.
  3256.  
  3257.  
  3258.  
  3259.  
  3260.  
  3261.  
  3262.  
  3263.  
  3264.  
  3265.  
  3266.  
  3267.  
  3268.  
  3269.  
  3270.  
  3271.  
  3272.  
  3273.  
  3274.  
  3275.  
  3276.  
  3277.  
  3278.  
  3279.  
  3280.  
  3281.  
  3282.  
  3283.  
  3284.  
  3285.  
  3286.  
  3287.  
  3288.  
  3289.  
  3290.  
  3291.  
  3292.  
  3293.  
  3294.  
  3295.                      - 45 -
  3296.  
  3297.  
  3298.  
  3299.  
  3300.  
  3301.  
  3302.  
  3303.       Window Management Services               Version 1.0
  3304.  
  3305.  
  3306.  
  3307.  
  3308.  
  3309.  
  3310.       5.1.20 wi_readln - read character string through window
  3311.  
  3312.  
  3313.       procedure  wi_readln (window_number,
  3314.                  input_length :    integer;
  3315.                  var input_string : string[80]);
  3316.  
  3317.  
  3318.  
  3319.       Input    arguments:
  3320.  
  3321.            window_number - Window identification number
  3322.  
  3323.            input_length - Input string maximum length
  3324.  
  3325.  
  3326.  
  3327.       Output arguments:
  3328.  
  3329.            input_string - Input character string
  3330.  
  3331.  
  3332.  
  3333.       Action:
  3334.  
  3335.            This service is similar to wi_read, differing only in
  3336.            the manner of setting window position at    end of read.
  3337.  
  3338.            If the window is    open, window position is not at    end of
  3339.            window, and the window origin values permit the window
  3340.            to be displayed on the terminal screen, a character
  3341.            string of input_length characters is read from the
  3342.            keyboard, stored    in the window content array, and
  3343.            returned    in input_string.
  3344.  
  3345.            Character string    input is read character    by character
  3346.            until terminated    by a carriage return.  The service
  3347.            will not    accept input, other than a return, past    end of
  3348.            line or end of string.  The delete and backspace    keys
  3349.            may be used to delete previously    keyed string
  3350.            characters.  It is not possible to delete past
  3351.            beginning of string.
  3352.  
  3353.            At exit,    window position    is set to the first character
  3354.            of the row following the    row containing the input
  3355.            string.    wi_eoln    is set to true.     wi_eow    is set to true
  3356.            when the    next row is greater than the maximum number of
  3357.            accessible rows in the window.
  3358.  
  3359.  
  3360.  
  3361.                      - 46 -
  3362.  
  3363.  
  3364.  
  3365.  
  3366.  
  3367.  
  3368.  
  3369.       Window Management Services               Version 1.0
  3370.  
  3371.  
  3372.  
  3373.  
  3374.  
  3375.  
  3376.  
  3377.       Status:
  3378.  
  3379.            wi_status - False if window is not open    or if at entry
  3380.          window     position  is  at  end    of window;  otherwise,
  3381.          true.
  3382.  
  3383.            wi_eoln -  True    if  end     of  row  is encountered while
  3384.          storing input_string; otherwise, false.
  3385.  
  3386.            wi_eow  - True if window    position is advance to end  of
  3387.          window; otherwise, false.
  3388.  
  3389.  
  3390.  
  3391.  
  3392.  
  3393.  
  3394.  
  3395.  
  3396.  
  3397.  
  3398.  
  3399.  
  3400.  
  3401.  
  3402.  
  3403.  
  3404.  
  3405.  
  3406.  
  3407.  
  3408.  
  3409.  
  3410.  
  3411.  
  3412.  
  3413.  
  3414.  
  3415.  
  3416.  
  3417.  
  3418.  
  3419.  
  3420.  
  3421.  
  3422.  
  3423.  
  3424.  
  3425.  
  3426.  
  3427.                      - 47 -
  3428.  
  3429.  
  3430.  
  3431.  
  3432.  
  3433.  
  3434.  
  3435.       Window Management Services               Version 1.0
  3436.  
  3437.  
  3438.  
  3439.  
  3440.  
  3441.  
  3442.       5.1.21 wi_show - display window on screen
  3443.  
  3444.  
  3445.       procedure  wi_show (window_number : integer);
  3446.  
  3447.  
  3448.  
  3449.       Input    arguments:
  3450.  
  3451.            window_number - Window identification number
  3452.  
  3453.  
  3454.  
  3455.       Output arguments:
  3456.  
  3457.            None
  3458.  
  3459.  
  3460.  
  3461.       Action:
  3462.  
  3463.            If the window is    open, the service attempts to display
  3464.            the window contents on the terminal screen.  However,
  3465.            since it    is possible to set the window origin column
  3466.            and row such that the window is completely outside of
  3467.            the terminal display screen boundaries, this service
  3468.            may have    no visible effect.
  3469.  
  3470.  
  3471.  
  3472.       Status:
  3473.  
  3474.            wi_status - False if  window  is     not  open; otherwise,
  3475.          true.
  3476.  
  3477.  
  3478.  
  3479.  
  3480.  
  3481.  
  3482.  
  3483.  
  3484.  
  3485.  
  3486.  
  3487.  
  3488.  
  3489.  
  3490.  
  3491.  
  3492.  
  3493.                      - 48 -
  3494.  
  3495.  
  3496.  
  3497.  
  3498.  
  3499.  
  3500.  
  3501.       Window Management Services               Version 1.0
  3502.  
  3503.  
  3504.  
  3505.  
  3506.  
  3507.  
  3508.       5.1.22 wi_erase - erase window area on screen
  3509.  
  3510.  
  3511.       procedure  wi_erase (window_number : integer);
  3512.  
  3513.  
  3514.  
  3515.       Input    arguments:
  3516.  
  3517.            window_number - Window identification number
  3518.  
  3519.  
  3520.  
  3521.       Output arguments:
  3522.  
  3523.            None
  3524.  
  3525.  
  3526.  
  3527.       Action:
  3528.  
  3529.            If the window is    open, that portion of the terminal
  3530.            screen onto which the window maps is set    to spaces.
  3531.            Since it    is possible to set the window origin row and
  3532.            column such that    the window is completely outside of
  3533.            the terminal display screen boundaries, this service
  3534.            may have    no visible effect.
  3535.  
  3536.  
  3537.  
  3538.       Status:
  3539.  
  3540.            wi_status -  False  if  window  is not open; otherwise,
  3541.          true.
  3542.  
  3543.  
  3544.  
  3545.  
  3546.  
  3547.  
  3548.  
  3549.  
  3550.  
  3551.  
  3552.  
  3553.  
  3554.  
  3555.  
  3556.  
  3557.  
  3558.  
  3559.                      - 49 -
  3560.  
  3561.  
  3562.  
  3563.  
  3564.  
  3565.  
  3566.  
  3567.       Window Management Services               Version 1.0
  3568.  
  3569.  
  3570.  
  3571.  
  3572.  
  3573.  
  3574.  
  3575.  
  3576.       5.2 Internal Services
  3577.  
  3578.  
  3579.       The  following  sections  describe  the  Window   Management
  3580.       Services internal  services  which  support many of the user
  3581.       services described in    the previous sections:
  3582.  
  3583.         -  _wi_find    - find window control block
  3584.  
  3585.         -  _wi_stb - build a character string
  3586.  
  3587.         -  _wi_bord1 - store window    border
  3588.  
  3589.         -  _wi_bord2 - store border    in window
  3590.  
  3591.         -  _wi_out - store string in window; optionally, write  to
  3592.            screen
  3593.  
  3594.         -    _wi_outln - store string in window; optionally,     write
  3595.            to screen; advance position to next line
  3596.  
  3597.         -  _wi_inp - retrieve string from window; optionally, read
  3598.            string from keyboard
  3599.  
  3600.         -    _wi_inpln - retrieve string from  window;  optionally,
  3601.            read  string  from  keyboard; advance position to  next
  3602.            line
  3603.  
  3604.         -  _wi_getst - get string from keyboard
  3605.  
  3606.         -  _wi_sher    - display on or    erase window from screen
  3607.  
  3608.  
  3609.  
  3610.  
  3611.  
  3612.  
  3613.  
  3614.  
  3615.  
  3616.  
  3617.  
  3618.  
  3619.  
  3620.  
  3621.  
  3622.  
  3623.  
  3624.  
  3625.                      - 50 -
  3626.  
  3627.  
  3628.  
  3629.  
  3630.  
  3631.  
  3632.  
  3633.       Window Management Services               Version 1.0
  3634.  
  3635.  
  3636.  
  3637.  
  3638.  
  3639.  
  3640.       5.2.1    _wi_find - find    window control block
  3641.  
  3642.  
  3643.       function _wi_find (window_number : integer) :    boolean;
  3644.  
  3645.  
  3646.  
  3647.       Input    arguments:
  3648.  
  3649.            window_number - Window identification number
  3650.  
  3651.  
  3652.  
  3653.       Output arguments:
  3654.  
  3655.            None
  3656.  
  3657.  
  3658.  
  3659.       Action:
  3660.  
  3661.            This service searches through the list of window
  3662.            control blocks for the control block for    the specified
  3663.            window_number.
  3664.  
  3665.  
  3666.  
  3667.       Status:
  3668.  
  3669.            wi_status  -  False  if window is not open;  otherwise,
  3670.          true.
  3671.  
  3672.  
  3673.  
  3674.  
  3675.  
  3676.  
  3677.  
  3678.  
  3679.  
  3680.  
  3681.  
  3682.  
  3683.  
  3684.  
  3685.  
  3686.  
  3687.  
  3688.  
  3689.  
  3690.  
  3691.                      - 51 -
  3692.  
  3693.  
  3694.  
  3695.  
  3696.  
  3697.  
  3698.  
  3699.       Window Management Services               Version 1.0
  3700.  
  3701.  
  3702.  
  3703.  
  3704.  
  3705.  
  3706.       5.2.2    _wi_stb    - build    a character string
  3707.  
  3708.  
  3709.       procedure  _wi_stb (var first_char;
  3710.                    length :    integer;
  3711.                    var char_string[80]);
  3712.  
  3713.  
  3714.  
  3715.       Input    arguments:
  3716.  
  3717.            first_char - the    first position of  a contiguous    string
  3718.          of characters
  3719.  
  3720.            length -    the length of the required string
  3721.  
  3722.  
  3723.  
  3724.       Output arguments:
  3725.  
  3726.            char_string - Output character string built by service
  3727.  
  3728.  
  3729.  
  3730.       Action:
  3731.  
  3732.            This internal service formats an    output character
  3733.            string of length    bytes containing the string of
  3734.            characters beginning at location    first_char.
  3735.  
  3736.  
  3737.  
  3738.       Status:
  3739.  
  3740.            None
  3741.  
  3742.  
  3743.  
  3744.  
  3745.  
  3746.  
  3747.  
  3748.  
  3749.  
  3750.  
  3751.  
  3752.  
  3753.  
  3754.  
  3755.  
  3756.  
  3757.                      - 52 -
  3758.  
  3759.  
  3760.  
  3761.  
  3762.  
  3763.  
  3764.  
  3765.       Window Management Services               Version 1.0
  3766.  
  3767.  
  3768.  
  3769.  
  3770.  
  3771.  
  3772.       5.2.3    _wi_bord1 - store window border
  3773.  
  3774.  
  3775.       procedure  _wi_bord1 (var border_chars : string[4]);
  3776.  
  3777.  
  3778.  
  3779.       Input    arguments:
  3780.  
  3781.            border_chars - border character string
  3782.  
  3783.  
  3784.  
  3785.       Output arguments:
  3786.  
  3787.            None
  3788.  
  3789.  
  3790.  
  3791.       Action:
  3792.  
  3793.            This internal service formats and stores    a four byte
  3794.            border character    string in the current window control
  3795.            block.  When border_chars length    is 4 bytes,
  3796.            border_chars is stored unchanged.
  3797.  
  3798.            If border_chars is less than 4 bytes, the service
  3799.            stores the following strings in the window control
  3800.            block:
  3801.  
  3802.          -   When  the length of border_chars is 0,  a    border
  3803.             string of all spaces is stored.
  3804.  
  3805.          -  When the border_chars  length  is 1    byte, a    border
  3806.             string of all border_chars[1] is stored.
  3807.  
  3808.          -  When  border_chars    length is 2 bytes, a string of
  3809.             border_chars[1..2]+border_chars[1..2] is stored.
  3810.  
  3811.          -   When  the    length of border_chars is 3  bytes,  a
  3812.             string  of    border_chars[1..3]+border_chars[2]  is
  3813.             stored.
  3814.  
  3815.  
  3816.  
  3817.       Status:
  3818.  
  3819.            None
  3820.  
  3821.  
  3822.  
  3823.                      - 53 -
  3824.  
  3825.  
  3826.  
  3827.  
  3828.  
  3829.  
  3830.  
  3831.       Window Management Services               Version 1.0
  3832.  
  3833.  
  3834.  
  3835.  
  3836.  
  3837.  
  3838.  
  3839.  
  3840.  
  3841.  
  3842.  
  3843.  
  3844.  
  3845.  
  3846.  
  3847.  
  3848.  
  3849.  
  3850.  
  3851.  
  3852.  
  3853.  
  3854.  
  3855.  
  3856.  
  3857.  
  3858.  
  3859.  
  3860.  
  3861.  
  3862.  
  3863.  
  3864.  
  3865.  
  3866.  
  3867.  
  3868.  
  3869.  
  3870.  
  3871.  
  3872.  
  3873.  
  3874.  
  3875.  
  3876.  
  3877.  
  3878.  
  3879.  
  3880.  
  3881.  
  3882.  
  3883.  
  3884.  
  3885.  
  3886.  
  3887.  
  3888.  
  3889.                      - 54 -
  3890.  
  3891.  
  3892.  
  3893.  
  3894.  
  3895.  
  3896.  
  3897.       Window Management Services               Version 1.0
  3898.  
  3899.  
  3900.  
  3901.  
  3902.  
  3903.  
  3904.       5.2.4    _wi_bord2 - store border in window
  3905.  
  3906.  
  3907.       procedure  _wi_bord2;
  3908.  
  3909.  
  3910.  
  3911.       Input    arguments:
  3912.  
  3913.            None
  3914.  
  3915.  
  3916.  
  3917.       Output arguments:
  3918.  
  3919.            None
  3920.  
  3921.  
  3922.  
  3923.       Action:
  3924.  
  3925.            This internal service stores the    window border in the
  3926.            window content array of the current window control
  3927.            block.  The border lines    are stored in the following
  3928.            sequence: left column, right column, top    row, followed
  3929.            by bottom row.
  3930.  
  3931.  
  3932.  
  3933.       Status:
  3934.  
  3935.            None
  3936.  
  3937.  
  3938.  
  3939.  
  3940.  
  3941.  
  3942.  
  3943.  
  3944.  
  3945.  
  3946.  
  3947.  
  3948.  
  3949.  
  3950.  
  3951.  
  3952.  
  3953.  
  3954.  
  3955.                      - 55 -
  3956.  
  3957.  
  3958.  
  3959.  
  3960.  
  3961.  
  3962.  
  3963.       Window Management Services               Version 1.0
  3964.  
  3965.  
  3966.  
  3967.  
  3968.  
  3969.  
  3970.       5.2.5    _wi_out    - store    string in window; optionally, write
  3971.         to screen
  3972.  
  3973.  
  3974.       procedure  _wi_out (var window_number    : integer;
  3975.                    var output_string : string[80];
  3976.                    output_flag : boolean);
  3977.  
  3978.  
  3979.  
  3980.       Input    arguments:
  3981.  
  3982.            window_number - Window identification number
  3983.  
  3984.  
  3985.  
  3986.       Output arguments:
  3987.  
  3988.            None
  3989.  
  3990.  
  3991.  
  3992.       Action:
  3993.  
  3994.            If the window is    open, this internal service stores
  3995.            output_string into the window content array at the
  3996.            current window position.     As many characters as fit on
  3997.            the current window row up to the    length of
  3998.            output_length are stored; remaining characters are
  3999.            ignored.
  4000.  
  4001.            When output_flag    is true, the stored output_string
  4002.            characters are also written to the terminal display
  4003.            screen at a screen position beginning at    window
  4004.            position    plus screen origin minus one for each
  4005.            dimension.  When    the computed screen position for a
  4006.            character falls outside the boundaries of the display
  4007.            screen, the character is    not displayed.
  4008.  
  4009.            If at entry, window position is at end of window, the
  4010.            window is scrolled by deleting the first    row, shifting
  4011.            the remaining rows up one row, and storing blanks into
  4012.            the bottom row.    Window position    is set to the first
  4013.            column of the bottom row.
  4014.  
  4015.            At exit,    window position    is set to the next character
  4016.            within the window following the last character of the
  4017.            output string.  When the    last character of the output
  4018.  
  4019.  
  4020.  
  4021.                      - 56 -
  4022.  
  4023.  
  4024.  
  4025.  
  4026.  
  4027.  
  4028.  
  4029.       Window Management Services               Version 1.0
  4030.  
  4031.  
  4032.  
  4033.  
  4034.            string is the last column in the    row, window position
  4035.            is set to the first column of the next row and wi_eoln
  4036.            is set to true.    wi_eow is set to true when the next
  4037.            row is greater than the maximum number of accessible
  4038.            rows in the window.
  4039.  
  4040.  
  4041.  
  4042.       Status:
  4043.  
  4044.            wi_status -  False  if  window  is not open; otherwise,
  4045.          true.
  4046.  
  4047.            wi_eoln - True if  end  of  row    is  encountered     while
  4048.          storing output_string;    otherwise, false.
  4049.  
  4050.            wi_eow -    True if    window position    is advanced to end  of
  4051.          window; otherwise, false.
  4052.  
  4053.  
  4054.  
  4055.  
  4056.  
  4057.  
  4058.  
  4059.  
  4060.  
  4061.  
  4062.  
  4063.  
  4064.  
  4065.  
  4066.  
  4067.  
  4068.  
  4069.  
  4070.  
  4071.  
  4072.  
  4073.  
  4074.  
  4075.  
  4076.  
  4077.  
  4078.  
  4079.  
  4080.  
  4081.  
  4082.  
  4083.  
  4084.  
  4085.  
  4086.  
  4087.                      - 57 -
  4088.  
  4089.  
  4090.  
  4091.  
  4092.  
  4093.  
  4094.  
  4095.       Window Management Services               Version 1.0
  4096.  
  4097.  
  4098.  
  4099.  
  4100.  
  4101.  
  4102.       5.2.6    _wi_outln - store string in window; optionally,    write
  4103.       to screen, advance position to next line
  4104.  
  4105.  
  4106.       procedure  _wi_outln (var window_number;
  4107.                  var output_string : string[80];
  4108.                      output_flag : boolean);
  4109.  
  4110.  
  4111.  
  4112.       Input    arguments:
  4113.  
  4114.            window_number - Window identification number
  4115.  
  4116.            output_flag - Output select flag
  4117.  
  4118.  
  4119.  
  4120.       Output arguments:
  4121.  
  4122.            output_string - Output character    string
  4123.  
  4124.  
  4125.  
  4126.       Action:
  4127.  
  4128.            This service is similar to wi_out, differing only in
  4129.            the manner of setting window position at    end of
  4130.            output.
  4131.  
  4132.            If the window is    open, this internal service stores
  4133.            output_string into the window content array at the
  4134.            current window position.     As many characters as fit on
  4135.            the current window row up to the    length of
  4136.            output_length are stored; remaining characters are
  4137.            ignored.
  4138.  
  4139.            When output_flag    is true, the stored output_string
  4140.            characters are also written to the terminal display
  4141.            screen at a screen position beginning at    window
  4142.            position    plus screen origin minus one for each
  4143.            dimension.  When    the computed screen position for a
  4144.            character falls outside the boundaries of the display
  4145.            screen, the character is    not displayed.
  4146.  
  4147.            If at entry, window position is at end of window, the
  4148.            window is scrolled by deleting the first    row, shifting
  4149.            the remaining rows up one row, and storing blanks into
  4150.  
  4151.  
  4152.  
  4153.                      - 58 -
  4154.  
  4155.  
  4156.  
  4157.  
  4158.  
  4159.  
  4160.  
  4161.       Window Management Services               Version 1.0
  4162.  
  4163.  
  4164.  
  4165.  
  4166.            the bottom row.    Window position    is set to the first
  4167.            column of the bottom row.
  4168.  
  4169.            At exit,    window position    is set to the beginning    of the
  4170.            next window row.     wi_eoln is set    to true.  wi_eow is
  4171.            also set    to true    when next row is beyond    the last
  4172.            accessible row in the window.
  4173.  
  4174.  
  4175.  
  4176.       Status:
  4177.  
  4178.            wi_status -  False  if  window  is not open; otherwise,
  4179.          true.
  4180.  
  4181.            wi_eoln - True
  4182.  
  4183.            wi_eow -    True if    window position    is advanced  to    end of
  4184.          window; otherwise, false.
  4185.  
  4186.  
  4187.  
  4188.  
  4189.  
  4190.  
  4191.  
  4192.  
  4193.  
  4194.  
  4195.  
  4196.  
  4197.  
  4198.  
  4199.  
  4200.  
  4201.  
  4202.  
  4203.  
  4204.  
  4205.  
  4206.  
  4207.  
  4208.  
  4209.  
  4210.  
  4211.  
  4212.  
  4213.  
  4214.  
  4215.  
  4216.  
  4217.  
  4218.  
  4219.                      - 59 -
  4220.  
  4221.  
  4222.  
  4223.  
  4224.  
  4225.  
  4226.  
  4227.       Window Management Services               Version 1.0
  4228.  
  4229.  
  4230.  
  4231.  
  4232.  
  4233.  
  4234.       5.2.7    _wi_inp    - retrieve string from window; optionally,
  4235.       read string from keyboard
  4236.  
  4237.  
  4238.       procedure  _wi_inp (var window_number,
  4239.                    input_length : integer;
  4240.                    var input_string    : string[80];
  4241.                    input_flag : boolean);
  4242.  
  4243.  
  4244.  
  4245.       Input    arguments:
  4246.  
  4247.            window_number - Window identification number
  4248.  
  4249.            input_length - Input string maximum length
  4250.  
  4251.            input_flag - Input source flag
  4252.  
  4253.  
  4254.  
  4255.       Output arguments:
  4256.  
  4257.            input_string - Character    string retrieved from window
  4258.  
  4259.  
  4260.  
  4261.       Action:
  4262.  
  4263.            If the window is    open, this internal service, when
  4264.            input_flag is true, reads an input string of
  4265.            input_length characters from the    keyboard, stores the
  4266.            input string in the window, and returns the string in
  4267.            input_string; or    when input_flag    is false, retrieves a
  4268.            string of input_length characters from the window.
  4269.  
  4270.            This service does not attempt to    read from the keyboard
  4271.            when any    portion    of the window maps to a    position,
  4272.            based on    the current values of window origin and
  4273.            position, which falls outside the video display
  4274.            terminal    screen.
  4275.  
  4276.            Character string    input is read character    by character
  4277.            until terminated    by a carriage return.  The service
  4278.            will not    accept input, other than a return, past    end of
  4279.            line or end of string.  The delete and backspace    keys
  4280.            may be used to delete previously    keyed string
  4281.            characters.  It is not possible to delete past
  4282.  
  4283.  
  4284.  
  4285.                      - 60 -
  4286.  
  4287.  
  4288.  
  4289.  
  4290.  
  4291.  
  4292.  
  4293.       Window Management Services               Version 1.0
  4294.  
  4295.  
  4296.  
  4297.  
  4298.            beginning of string.
  4299.  
  4300.            If at entry, window position is set to end of window,
  4301.            input is    not attempted and wi_status is set to false.
  4302.  
  4303.            At exit,    window position    is set to the next character
  4304.            within the window following the last character of the
  4305.            input string.  When the last character of the input
  4306.            string is the last column in the    row, window position
  4307.            is set to the first column of the next row and sets
  4308.            wi_eoln to true and also    set wi_eow to true when    the
  4309.            next row    is greater than    the maximum number of
  4310.            accessible rows in the window.
  4311.  
  4312.  
  4313.  
  4314.       Status:
  4315.  
  4316.            wi_status - False if  window is not open    or if at entry
  4317.          window     position  is  at  end    of  window; otherwise,
  4318.          true.
  4319.  
  4320.            wi_eoln - True if  end  of  row    is  encountered     while
  4321.          storing input_string; otherwise, false.
  4322.  
  4323.            wi_eow -    True if    window position     is advanced to    end of
  4324.          window; otherwise, false.
  4325.  
  4326.  
  4327.  
  4328.  
  4329.  
  4330.  
  4331.  
  4332.  
  4333.  
  4334.  
  4335.  
  4336.  
  4337.  
  4338.  
  4339.  
  4340.  
  4341.  
  4342.  
  4343.  
  4344.  
  4345.  
  4346.  
  4347.  
  4348.  
  4349.  
  4350.  
  4351.                      - 61 -
  4352.  
  4353.  
  4354.  
  4355.  
  4356.  
  4357.  
  4358.  
  4359.       Window Management Services               Version 1.0
  4360.  
  4361.  
  4362.  
  4363.  
  4364.  
  4365.  
  4366.  
  4367.  
  4368.       5.2.8    _wi_inpln - retrieve string from window; optionally,
  4369.       read string from keyboard, advance position to next line
  4370.  
  4371.  
  4372.       procedure  _wi_inpln (var window_number,
  4373.                    input_length : integer;
  4374.                    var input_string    : string[80];
  4375.                    input_flag : boolean);
  4376.  
  4377.  
  4378.  
  4379.       Input    arguments:
  4380.  
  4381.            window_number - Window identification number
  4382.  
  4383.            input_length - Input string maximum length
  4384.  
  4385.            input_flag - Input source flag
  4386.  
  4387.  
  4388.  
  4389.       Output arguments:
  4390.  
  4391.            input_string - Character    string retrieved from window
  4392.  
  4393.  
  4394.  
  4395.       Action:
  4396.  
  4397.            This internal service is    similar    to _wi_inp differing
  4398.            only in the manner of setting window position at    end of
  4399.            input.
  4400.  
  4401.            If the window is    open, this internal service, when
  4402.            input_flag is true, reads an input string of
  4403.            input_length characters from the    keyboard, stores the
  4404.            input string in the window, and returns the string in
  4405.            input_string; or    when input_flag    is false, retrieves a
  4406.            string of input_length characters from the window.
  4407.  
  4408.            This service does not attempt to    read from the keyboard
  4409.            when any    portion    of the window maps to a    position,
  4410.            based on    the current values of window origin and
  4411.            position, which falls outside the video display
  4412.            terminal    screen.
  4413.  
  4414.  
  4415.  
  4416.  
  4417.                      - 62 -
  4418.  
  4419.  
  4420.  
  4421.  
  4422.  
  4423.  
  4424.  
  4425.       Window Management Services               Version 1.0
  4426.  
  4427.  
  4428.  
  4429.  
  4430.            Character string    input is read character    by character
  4431.            until terminated    by a carriage return.  The service
  4432.            will not    accept input, other than a return, past    end of
  4433.            line or end of string.  The delete and backspace    keys
  4434.            may be used to delete previously    keyed characters.  It
  4435.            is not possible to delete past beginning    of string.
  4436.  
  4437.            At exit,    window position    is set to the first character
  4438.            of the row following the    row containing the input
  4439.            string.    wi_eoln    is set to true.     wi_eow    is also    set to
  4440.            true when the next row is greater than the maximum
  4441.            number of accessible rows in the    window.
  4442.  
  4443.  
  4444.  
  4445.       Status:
  4446.  
  4447.            wi_status - False if window is  not open    or if at entry
  4448.          window     position  is  at  end of  window;  otherwise,
  4449.          true.
  4450.  
  4451.            wi_eoln - True  if  end    of  row     is  encountered while
  4452.          storing input_string; otherwise, false.
  4453.  
  4454.            wi_eow -    True if     window    position is advanced to    end of
  4455.          window; otherwise, false.
  4456.  
  4457.  
  4458.  
  4459.  
  4460.  
  4461.  
  4462.  
  4463.  
  4464.  
  4465.  
  4466.  
  4467.  
  4468.  
  4469.  
  4470.  
  4471.  
  4472.  
  4473.  
  4474.  
  4475.  
  4476.  
  4477.  
  4478.  
  4479.  
  4480.  
  4481.  
  4482.  
  4483.                      - 63 -
  4484.  
  4485.  
  4486.  
  4487.  
  4488.  
  4489.  
  4490.  
  4491.       Window Management Services               Version 1.0
  4492.  
  4493.  
  4494.  
  4495.  
  4496.  
  4497.  
  4498.       5.2.9    _wi_getst - get    string from keyboard
  4499.  
  4500.  
  4501.       procedure  _wi_getst (input_length,
  4502.                  screen_column,
  4503.                  screen_row : integer;
  4504.                  var input_string : string[80]);
  4505.  
  4506.  
  4507.  
  4508.       Input    arguments:
  4509.  
  4510.            input_length - Input string maximum length
  4511.  
  4512.            screen_column - Screen cursor horizontal    position
  4513.  
  4514.            screen_row - Screen cursor vertical position
  4515.  
  4516.  
  4517.  
  4518.       Output arguments:
  4519.  
  4520.            input_string - Character    string read from keyboard
  4521.  
  4522.  
  4523.  
  4524.       Action:
  4525.  
  4526.            This internal service reads an input string of length
  4527.            input_length printable characters from the keyboard.
  4528.            Input from the keyboard is character by character.  If
  4529.            the character read from the keyboard is 20 hex through
  4530.            7E hex, the character is    stored into input_string and
  4531.            echoed to the terminal display screen.  The terminal
  4532.            display begins at the screen position indicated by
  4533.            screen_column and screen_row.
  4534.  
  4535.            If the character    read from the keyboard is a delete (7F
  4536.            hex) or backspace (08 hex), the previously entered
  4537.            character is deleted from input_string and erased from
  4538.            the display screen.  Character input from the keyboard
  4539.            is terminated by    the return key (13 hex).
  4540.  
  4541.            The service writes the bell (07 hex) character to the
  4542.            terminal    whenever a delete or backspace is entered as
  4543.            the first character of the input    string or when
  4544.            input_length characters have been read or when end of
  4545.            row is reached and the character    read from the keyboard
  4546.  
  4547.  
  4548.  
  4549.                      - 64 -
  4550.  
  4551.  
  4552.  
  4553.  
  4554.  
  4555.  
  4556.  
  4557.       Window Management Services               Version 1.0
  4558.  
  4559.  
  4560.  
  4561.  
  4562.            is not a    return (13 hex).
  4563.  
  4564.  
  4565.  
  4566.       Status:
  4567.  
  4568.            None
  4569.  
  4570.  
  4571.  
  4572.  
  4573.  
  4574.  
  4575.  
  4576.  
  4577.  
  4578.  
  4579.  
  4580.  
  4581.  
  4582.  
  4583.  
  4584.  
  4585.  
  4586.  
  4587.  
  4588.  
  4589.  
  4590.  
  4591.  
  4592.  
  4593.  
  4594.  
  4595.  
  4596.  
  4597.  
  4598.  
  4599.  
  4600.  
  4601.  
  4602.  
  4603.  
  4604.  
  4605.  
  4606.  
  4607.  
  4608.  
  4609.  
  4610.  
  4611.  
  4612.  
  4613.  
  4614.  
  4615.                      - 65 -
  4616.  
  4617.  
  4618.  
  4619.  
  4620.  
  4621.  
  4622.  
  4623.       Window Management Services               Version 1.0
  4624.  
  4625.  
  4626.  
  4627.  
  4628.  
  4629.  
  4630.       5.2.10 _wi_sher - display on or erase    window from screen
  4631.  
  4632.  
  4633.       procedure  _wi_sher (var window_number : integer;
  4634.                 show_erase_flag    : boolean);
  4635.  
  4636.  
  4637.  
  4638.       Input    arguments:
  4639.  
  4640.            window_number - Window identification number
  4641.  
  4642.            show_erase_flag - Show or erase function    selector
  4643.  
  4644.  
  4645.  
  4646.       Output arguments:
  4647.  
  4648.            None
  4649.  
  4650.  
  4651.  
  4652.       Action:
  4653.  
  4654.       When the window is  open  and     show_erase_flag is true, this
  4655.       internal service  attempts to    display    the window contents on
  4656.       the  terminal     screen     at  a    position   determined  by  the
  4657.       currently set     values     of  window origin and position.  Only
  4658.       those    window    contents  which    map to terminal    display    screen
  4659.       locations are    displayed.
  4660.  
  4661.         When the  window is    open and show_erase_flag is false, the
  4662.       service attempts to erase, set to spaces, the     positions  on
  4663.       the terminal    display     screen     that could contain the    window
  4664.       contents.  The positions are computed    from the currently set
  4665.       values of  window origin and position.  Only those positions
  4666.       which    map to terminal    display    screen locations are cleared.
  4667.  
  4668.         Since window origin    column    and row    values may be set such
  4669.       that    no portion of the window contents will    map  unto  the
  4670.       terminal display  screen,  this  service may have no visible
  4671.       effect.
  4672.  
  4673.       Status:
  4674.  
  4675.            wi_status - False if  window  is     not  open; otherwise,
  4676.          true.
  4677.  
  4678.  
  4679.  
  4680.  
  4681.                      - 66 -
  4682.  
  4683.  
  4684.  
  4685.  
  4686.  
  4687.  
  4688.  
  4689.       Window Management Services               Version 1.0
  4690.  
  4691.  
  4692.  
  4693.  
  4694.  
  4695.  
  4696.  
  4697.  
  4698.  
  4699.  
  4700.  
  4701.  
  4702.  
  4703.  
  4704.  
  4705.  
  4706.  
  4707.  
  4708.  
  4709.  
  4710.  
  4711.  
  4712.  
  4713.  
  4714.  
  4715.  
  4716.  
  4717.  
  4718.  
  4719.  
  4720.  
  4721.  
  4722.  
  4723.  
  4724.  
  4725.  
  4726.  
  4727.  
  4728.  
  4729.  
  4730.  
  4731.  
  4732.  
  4733.  
  4734.  
  4735.  
  4736.  
  4737.  
  4738.  
  4739.  
  4740.  
  4741.  
  4742.  
  4743.  
  4744.  
  4745.  
  4746.  
  4747.  
  4748.  
  4749.  
  4750.  
  4751.  
  4752.  
  4753.  
  4754.  
  4755.       Window Management Services               Version 1.0
  4756.  
  4757.  
  4758.  
  4759.  
  4760.  
  4761.  
  4762.  
  4763.  
  4764.                       Index
  4765.  
  4766.  
  4767.       accessible columns  4
  4768.       accessible rows  4
  4769.       accessible window area  5
  4770.       changing the window border  9
  4771.       clearing to end of line  9
  4772.       clearing window contents  8
  4773.       closing windows  6
  4774.       content array     5
  4775.       creating windows  6
  4776.       deleting window lines     9
  4777.       deleting windows  6
  4778.       DEMO.PAS  16
  4779.       DEMO1.PAS  16
  4780.       DEMO2.PAS  16
  4781.       demonstration    program     16
  4782.       displaying window contents  11
  4783.       erasing window areas    11
  4784.       including WINDOW.PAS    15
  4785.       inserting window lines  8
  4786.       internal services  50
  4787.       memory allocation  16
  4788.       memory de-allocation    16
  4789.       memory requirements  15
  4790.       modifying window contents  8
  4791.       naming conventions  15
  4792.       opening windows  6
  4793.       overlays  16
  4794.       reading strings  12
  4795.       retrieving strings  12
  4796.       retrieving window origin  8
  4797.       retrieving window position  7
  4798.       setting window origin     7, 8
  4799.       setting window position  7, 7
  4800.       storing strings  10
  4801.       user services     17
  4802.       window "cursor"  7
  4803.       window attributes  2
  4804.       window border     4
  4805.       window columns  4
  4806.       window contents  5
  4807.       window control block    5
  4808.       window definition  2
  4809.       window height     4
  4810.       window home  7
  4811.       window input    11, 12,    12
  4812.  
  4813.  
  4814.  
  4815.  
  4816.  
  4817.  
  4818.  
  4819.  
  4820.  
  4821.       Window Management Services               Version 1.0
  4822.  
  4823.  
  4824.  
  4825.  
  4826.       window number     3
  4827.       window origin     3
  4828.       window output     9, 10,    10, 11,    11
  4829.       window position  7
  4830.       window rows  4
  4831.       window status     13
  4832.       window width    3
  4833.       WINDOW.PAS  15
  4834.       wi_border  9,    27
  4835.       wi_clear  8, 25
  4836.       wi_close  6, 21
  4837.       wi_clreol  9,    24
  4838.       wi_delln  9, 23
  4839.       wi_eoln  14
  4840.       wi_eow  14
  4841.       wi_erase  11,    49
  4842.       wi_get  12, 36
  4843.       wi_getln  12,    38
  4844.       wi_getorg  8,    31
  4845.       wi_getpos  7,    29
  4846.       wi_home  7, 26
  4847.       wi_insln  8, 22
  4848.       wi_open  6, 19
  4849.       wi_put  10, 32
  4850.       wi_putln  10,    34
  4851.       wi_read  12, 44
  4852.       wi_readln  12, 46
  4853.       wi_setorg  8,    30
  4854.       wi_setpos  7,    28
  4855.       wi_show  48
  4856.       wi_status  13
  4857.       wi_write  10,    40
  4858.       wi_writeln  10, 42
  4859.       writing strings  10
  4860.       _wi_bord1  53
  4861.       _wi_bord2  55
  4862.       _wi_find  51
  4863.       _wi_getst  64
  4864.       _wi_inp  60
  4865.       _wi_inpln  62
  4866.       _wi_out  56
  4867.       _wi_outln  58
  4868.       _wi_sher  66
  4869.       _wi_stb  52
  4870.  
  4871.  
  4872.  
  4873.  
  4874.  
  4875.  
  4876.  
  4877.  
  4878.  
  4879.  
  4880.  
  4881.  
  4882.  
  4883.  
  4884.