home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 2 / ctrom_ii_b.zip / ctrom_ii_b / PROGRAM / C / EV_201 / DOCS / USERDOC.TXT < prev   
Text File  |  1993-07-08  |  264KB  |  6,435 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.        ----------------------------------------------------------------------
  8.                         TNG SOFT enterprises proudly presents
  9.        ----------------------------------------------------------------------
  10.  
  11.        EEEEEE   AAAAAA   SSSSSS   YY  YY                 222222        000000
  12.        EE       AA  AA   SS       YY  YY                     22        00  00
  13.        EEEE     AAAAAA   SSSSSS   YYYYYY                 222222        00  00
  14.        EE       AA  AA       SS     YY                   22       ..   00  00
  15.        EEEEEE   AA  AA   SSSSSS     YY                   222222   ..   000000
  16.  
  17.        VV  VV   II   SSSSSS   II   OOOOOO   NNNNNN       --- User's guide ---
  18.        VV  VV   II   SS       II   OO  OO   NN  NN
  19.        VV  VV   II   SSSSSS   II   OO  OO   NN  NN
  20.         VVVV    II       SS   II   OO  OO   NN  NN
  21.          VV     II   SSSSSS   II   OOOOOO   NN  NN
  22.  
  23.        ----------------------------------------------------------------------
  24.                           A text mode based user interface
  25.        ----------------------------------------------------------------------
  26.  
  27.  
  28.  
  29.        The easy to use, reliable and powerful C and C++ library of functions,
  30.                               for the DOS environment.
  31.  
  32.  
  33.              This manual may be freely distributed in its original form.
  34.                       Modifications of any kind are prohibited.
  35.  
  36.  
  37.            This manual and software are made available without warranties.
  38.         TNG SOFT nor the author shall be held liable to the user or any other
  39.          person or entity regarding any liability, loss, or damage caused or
  40.             alleged to be caused directly or indirectly by this manual or
  41.                                       software.
  42.  
  43.  
  44.                  This software is shareware, and must be registered.
  45.  
  46.  
  47.                      This library is the property of the author.
  48.                        You are granted the rights to use only.
  49.  
  50.  
  51.                   EasyVision is a registered trademark of TNG SOFT.
  52.  
  53.  
  54.                        TNG SOFT : The Next Generation Software
  55.  
  56.  
  57.        ----------------------------------------------------------------------
  58.        TABLE OF CONTENT                                            Page 2/111
  59.        ----------------------------------------------------------------------
  60.  
  61.        C H A P T E R   1 : Overview ........................................7
  62.             Why EasyVision? ................................................7
  63.             What is EasyVision? ............................................8
  64.             Current Version ................................................9
  65.             A word about registration ......................................9
  66.             What's Next? ..................................................10
  67.             About the Author ..............................................11
  68.             User support ..................................................11
  69.  
  70.  
  71.        C H A P T E R   2 : Getting started ................................12
  72.             Library specifics .............................................12
  73.             Installation ..................................................13
  74.             How to use this library .......................................13
  75.             How to use this document ......................................14
  76.  
  77.  
  78.        C H A P T E R   3 : Using EasyVision's templates ...................15
  79.             MAIN.C ........................................................15
  80.             MAIN.CPP ......................................................16
  81.             MODULE.C ......................................................16
  82.             MODULE.CPP ....................................................16
  83.             MODULE.H ......................................................16
  84.             MODULE.HPP ....................................................16
  85.             STDMACRO.H ....................................................16
  86.             PRJMACRO.H ....................................................17
  87.             STDTYPE.H .....................................................17
  88.             PRJTYPE.H .....................................................17
  89.             PRJMSGS.C .....................................................17
  90.             PRJMSGS.H .....................................................18
  91.             HEADTEST.C ....................................................18
  92.             Examples ......................................................18
  93.  
  94.  
  95.        C H A P T E R   4 : Using EasyVision's functions ...................19
  96.  
  97.  
  98.        C H A P T E R   5 : EasyVision's standard functions ................21
  99.             ASSERT ........................................................21
  100.             ARG_EXIST .....................................................22
  101.             ARG_IEXIST ....................................................23
  102.             HEAPALLOC .....................................................23
  103.             HEAPFREE ......................................................24
  104.             TO_UPPER ......................................................24
  105.             TO_LOWER ......................................................25
  106.  
  107.  
  108.        C H A P T E R   6 : EasyVision's keyboard functions ................26
  109.             GETKEY ........................................................26
  110.  
  111.  
  112.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  113.  
  114.  
  115.        ----------------------------------------------------------------------
  116.        TABLE OF CONTENT                                            Page 3/111
  117.        ----------------------------------------------------------------------
  118.  
  119.             EXTTOASCII ....................................................27
  120.  
  121.  
  122.        C H A P T E R   7 : EasyVision's file functions ....................28
  123.             FNEWLINE ......................................................28
  124.             FSIZE .........................................................28
  125.             FCOPY .........................................................29
  126.  
  127.  
  128.        C H A P T E R   8 : EasyVision's screen functions ..................30
  129.             SCR_TEXTATTR ..................................................30
  130.             SCR_VSAVE .....................................................31
  131.             SCR_VRESTORE ..................................................31
  132.             SCR_CSAVE .....................................................32
  133.             SCR_CRESTORE ..................................................33
  134.  
  135.  
  136.        C H A P T E R   9 : EasyVision's string functions ..................34
  137.             STR_LEN .......................................................34
  138.             STR_CPY .......................................................34
  139.             STR_CMP .......................................................35
  140.             STR_ICMP ......................................................35
  141.             STR_TOUPPER ...................................................36
  142.             STR_TOLOWER ...................................................37
  143.             STR_PASTOC ....................................................37
  144.             STR_CTOPAS ....................................................38
  145.             STR_TRIM ......................................................38
  146.             STR_INVNAMES ..................................................39
  147.             STR_CENTER ....................................................39
  148.  
  149.  
  150.        C H A P T E R   10 : EasyVision's time functions ...................41
  151.             TICKTIMER_INSTALL .............................................41
  152.             TICKTIMER_RESET ...............................................41
  153.             TICKTIMER_READ ................................................42
  154.             DIFFDATE ......................................................42
  155.  
  156.  
  157.        C H A P T E R   11 : EasyVision's miscellaneous functions ..........44
  158.             ANSICOLOR .....................................................44
  159.  
  160.  
  161.        C H A P T E R   11 : Using EasyVision's classes ....................45
  162.  
  163.  
  164.        C H A P T E R   12 : EasyVision's tdesktop class ...................47
  165.             TDESKTOP::SETTEXTMODE .........................................47
  166.             TDESKTOP::GETSIZE .............................................48
  167.             TDESKTOP::SETDESKCOLORS .......................................49
  168.  
  169.  
  170.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  171.  
  172.  
  173.        ----------------------------------------------------------------------
  174.        TABLE OF CONTENT                                            Page 4/111
  175.        ----------------------------------------------------------------------
  176.  
  177.             TDESKTOP::SETTEXTURE ..........................................50
  178.             TDESKTOP::SETTITLE ............................................50
  179.             TDESKTOP::OPEN ................................................51
  180.             TDESKTOP::CLOSE ...............................................51
  181.             TDESKTOP::REFRESH .............................................52
  182.  
  183.  
  184.        C H A P T E R   13 : EasyVision's tstatusline class ................53
  185.             TSTATUSLINE::SETCOLORS ........................................53
  186.             TSTATUSLINE::DISPLAY ..........................................54
  187.             TSTATUSLINE::GETMSG ...........................................54
  188.             TSTATUSLINE::REFRESH ..........................................55
  189.  
  190.  
  191.        C H A P T E R   14 : EasyVision's tinput class .....................56
  192.             TINPUT::MOUSE_INIT ............................................56
  193.             TINPUT::MOUSE_STATUS ..........................................57
  194.             TINPUT::MOUSE_SHOW ............................................57
  195.             TINPUT::MOUSE_HIDE ............................................58
  196.             TINPUT::MOUSE_LB_DOWN .........................................58
  197.             TINPUT::MOUSE_POS .............................................58
  198.             TINPUT::GET ...................................................59
  199.  
  200.  
  201.        C H A P T E R   15 : EasyVision's tmenubar class ...................62
  202.             TMENUBAR::SETCOLORS ...........................................62
  203.             TMENUBAR::SETHLPCTX ...........................................63
  204.             TMENUBAR::ADDMENU .............................................64
  205.             TMENUBAR::ADDITEM .............................................65
  206.             TMENUBAR::ITEMSETAVAIL ........................................66
  207.             TMENUBAR::THROUGH .............................................66
  208.             TMENUBAR::REFRESH .............................................67
  209.  
  210.  
  211.        C H A P T E R   16 : EasyVision's twindow class ....................68
  212.             TWINDOW::WINSETPOS ............................................69
  213.             TWINDOW::WINGETROW ............................................69
  214.             TWINDOW::WINGETCOL ............................................70
  215.             TWINDOW::WINSETSIZE ...........................................70
  216.             TWINDOW::WINGETHEIGHT .........................................71
  217.             TWINDOW::WINGETWIDTH ..........................................71
  218.             TWINDOW::WINSETCOLORS .........................................71
  219.             TWINDOW::WINSETTITLE ..........................................72
  220.             TWINDOW::WINSETHLPCTX .........................................73
  221.             TWINDOW::WINOPEN ..............................................73
  222.             TWINDOW::WINCLOSE .............................................74
  223.             TWINDOW::WINCLEAR .............................................74
  224.             TWINDOW::WINWRITE .............................................75
  225.             TWINDOW::WINTEXT ..............................................77
  226.  
  227.  
  228.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  229.  
  230.  
  231.        ----------------------------------------------------------------------
  232.        TABLE OF CONTENT                                            Page 5/111
  233.        ----------------------------------------------------------------------
  234.  
  235.             TWINDOW::WINTEXTFILE ..........................................78
  236.             TWINDOW::WINMOVE ..............................................79
  237.             TWINDOW::WINSCROLL ............................................79
  238.             TWINDOW::WINONEDGES ...........................................80
  239.             TWINDOW::WININSIDE ............................................81
  240.             TWINDOW::WININPUT .............................................81
  241.             TWINDOW::FIELDSETCOLORS .......................................82
  242.             TWINDOW::FIELDCREATE ..........................................83
  243.             TWINDOW::FIELDSETASW ..........................................85
  244.             TWINDOW::FIELDGETASW ..........................................85
  245.             TWINDOW::FIELDINPUT ...........................................86
  246.             TWINDOW::BUTTONSETCOLORS ......................................87
  247.             TWINDOW::BUTTONCREATE .........................................87
  248.             TWINDOW::BUTTONSETAVAIL .......................................89
  249.             TWINDOW::BUTTONINPUT ..........................................90
  250.  
  251.  
  252.        A P P E N D I X   A : Keycodes macros ..............................91
  253.  
  254.  
  255.        A P P E N D I X   B : Color codes and symbolic constants ...........95
  256.  
  257.  
  258.        A P P E N D I X   C : Context sensitive help system ................96
  259.             What is a context .............................................96
  260.             Context numbering .............................................97
  261.             Writing the ASCII help file ...................................97
  262.             ASCII help file format ........................................98
  263.             The help compiler .............................................99
  264.             The "*.HLP" and "*.HDX" help files ............................99
  265.  
  266.  
  267.        A P P E N D I X   D : EasyVision's language system variables ......100
  268.             Language system variables ....................................100
  269.                  ev_helpwindowtitle ......................................100
  270.                  ev_helpwindownohelp .....................................101
  271.                  ev_helpwindowfileerror ..................................101
  272.                  ev_wintextdownbutton ....................................101
  273.                  ev_wintextdown ..........................................101
  274.                  ev_wintextquitbutton ....................................102
  275.                  ev_wintextquit ..........................................102
  276.                  ev_filenotfoundtext .....................................102
  277.                  ev_filetobig ............................................102
  278.                  ev_windowmove ...........................................103
  279.                  ev_statuslinehelp .......................................103
  280.             english() and french() functions .............................103
  281.  
  282.  
  283.  
  284.  
  285.  
  286.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  287.  
  288.  
  289.        ----------------------------------------------------------------------
  290.        TABLE OF CONTENT                                            Page 6/111
  291.        ----------------------------------------------------------------------
  292.  
  293.        A P P E N D I X   E : EasyVision's demo program ...................104
  294.             Things to remember ...........................................104
  295.  
  296.  
  297.        A P P E N D I X   F : How to reach the author .....................106
  298.  
  299.  
  300.        A P P E N D I X   G : Trademarks ..................................107
  301.  
  302.  
  303.        I N D E X .........................................................108
  304.  
  305.  
  306.  
  307.  
  308.  
  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.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  345.  
  346.  
  347.        ----------------------------------------------------------------------
  348.        CHAPTER 1 : Overview                                        Page 7/111
  349.        ----------------------------------------------------------------------
  350.  
  351.        ----------------------------------------------------------------------
  352.        ----------------------------------------------------------------------
  353.        C H A P T E R   1 : Overview
  354.        ----------------------------------------------------------------------
  355.  
  356.                       Welcome to EasyVision!
  357.  
  358.                       This C and C++ library is  a collection of routines for
  359.                       the DOS environment that  were developed while  working
  360.                       on different projects.
  361.  
  362.                       Because I am  big on modularity,  I always  try to  put
  363.                       general purpose code together  in a separate  function.
  364.                       Therefore, after developing an application, I am  often
  365.                       left with many useful functions.  Those can be recycled
  366.                       easily   and   reduce   development   time   of   other
  367.                       applications.
  368.  
  369.                       This package comes in two sections:
  370.  
  371.                       1.   Day-to-day utility functions, written in C.   They
  372.                            can be used in any program.
  373.  
  374.                       2.   Object-oriented C++ classes, providing an easy  to
  375.                            use, reliable and  powerful text  mode based  user
  376.                            interface.
  377.  
  378.                       I've decided to  make this code  available to  everyone
  379.                       through this library.  All those functions were  tested
  380.                       thoroughly, and put to work in actual applications.
  381.  
  382.  
  383.        Why EasyVision?
  384.        ----------------------------------------------------------------------
  385.  
  386.                 DOS?  Even if the times are  to WINDOWS programming, you  may
  387.                       be obliged to go  with a text  mode application if  the
  388.                       computers on which  they're supposed to  run are  small
  389.                       machines.    However,  that  doesn't  mean  that   your
  390.                       implementation can't have a professional look!
  391.  
  392.                       Why reinvent the wheel when someone before you  created
  393.                       one that works quite well?
  394.  
  395.                       One reason would be that professional programmers  like
  396.                       to  write  all  of  their  general  purpose   functions
  397.                       themselves.   They want  to know  what's inside.    But
  398.                       sometimes, you just don't  have the time  to do it,  or
  399.                       simply the need for it.
  400.  
  401.  
  402.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  403.  
  404.  
  405.        ----------------------------------------------------------------------
  406.        CHAPTER 1 : Overview                                        Page 8/111
  407.        ----------------------------------------------------------------------
  408.  
  409.                       This library will  give you access  to useful  routines
  410.                       that will shorten your  development time and make  your
  411.                       code more reliable.  It will effectively free you  from
  412.                       having to  write  many  of the  common  functions  your
  413.                       programs might need.
  414.  
  415.                       EasyVision was first created as a need for a text  mode
  416.                       based user interface.  After looking at some  shareware
  417.                       and commercial  user  interface packages,  and  reading
  418.                       comments about them from many C and C++ programmers, it
  419.                       was clear that something was missing.
  420.  
  421.        Turbo Vision?  When people talked about TURBO  VISION from BORLAND, it
  422.                       was their opinion that it was too difficult to use.  In
  423.                       my own opinion, I think that TURBO VISION is one of the
  424.                       greatest work of  software engineering around.   It  is
  425.                       the most  powerful  and  professional  text  mode  user
  426.                       interface in existence.  It is so well implemented  and
  427.                       thought out  that  it  is the  standard  in  text  mode
  428.                       interfaces  that  everyone   is  following,   including
  429.                       EasyVision!  (Hope they don't sue me...)  But, it is so
  430.                       big that it is  a language in  itself, and that's  what
  431.                       makes people afraid of using it!
  432.  
  433.                       On the other hand, there are those shareware libraries.
  434.                       Some of  them are  extraordinarily well  done, but  are
  435.                       still much too big.  I'm thinking about CXL  right now.
  436.                       Others are  too small  and  too unreliable  to  develop
  437.                       serious software.
  438.  
  439.                       So, what's a C++ programmer's to do?  Maybe just what I
  440.                       did, and write all of his interface himself.  But  what
  441.                       a waste if I'm the only one using it!  Why not make  it
  442.                       available to everyone?  Well, that's what EasyVision is
  443.                       all about!
  444.  
  445.  
  446.        What is EasyVision?
  447.        ----------------------------------------------------------------------
  448.  
  449.                       EasyVision  is  a  collection  of  short  C  functions,
  450.                       dealing with the  screen, the  keyboard, text  strings,
  451.                       etc.
  452.  
  453.                       It is also a text mode based, windowed user  interface.
  454.                       It  provides  a  DESKTOP,  a  STATUSLINE,  a   MENUBAR,
  455.                       WINDOWS, CONTEXT SENSITIVE ON-LINE HELP, MOUSE  SUPPORT
  456.                       and much much more...
  457.  
  458.  
  459.  
  460.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  461.  
  462.  
  463.        ----------------------------------------------------------------------
  464.        CHAPTER 1 : Overview                                        Page 9/111
  465.        ----------------------------------------------------------------------
  466.  
  467.                       EasyVision was created with 2 important priorities:
  468.  
  469.                       1.   It should  be  EASY  to learn  and  EASY  to  use.
  470.                            Provide only the big,  important functions to  the
  471.                            user.  Make sure  that those functions are  REALLY
  472.                            powerful and produce professional looking results!
  473.  
  474.                            This library hasn't been written to provide  every
  475.                            function needed  to  develop  full  featured  word
  476.                            processors or the likes.  It is there to give  you
  477.                            a strong  and  reliable  skeleton  to  build  your
  478.                            programs on.  It is up to you to come up with  the
  479.                            'meat'.
  480.  
  481.                       2.   Those functions  should be  totally bug  free  and
  482.                            crash  proof.    EasyVision  should  validate  all
  483.                            parameters to make sure nothing wrong can  happen.
  484.                            Don't rely on the programmer's good will to  check
  485.                            out its code for  out of range or  non-initialised
  486.                            parameters.
  487.  
  488.        Demo programs  That was what  EasyVision was  supposed to  be.   Well,
  489.                       EasyVision is still better than  that!  At this  point,
  490.                       if you  haven't already  done so,  you should  run  the
  491.                       demonstration  programs  that   are  in  the   archives
  492.                       "DEMO1.ZIP" and "HANOI.ZIP", to see the results of  not
  493.                       so many lines  of C++  codes that  uses the  EasyVision
  494.                       library...
  495.  
  496.                       If you find the results interesting, it's up to you  to
  497.                       go on.  All functions and classes are FULLY  documented
  498.                       in the  following  pages.   The  source  codes  of  the
  499.                       demonstration   programs   are   also   included   (and
  500.                       commented) in the archive.  It provides you with 'real'
  501.                       examples of how to use this library.
  502.  
  503.  
  504.        Current Version
  505.        ----------------------------------------------------------------------
  506.  
  507.                       The complete history of EasyVision can be found in the
  508.                       "HISTORY.TXT" file, included in the archive.
  509.  
  510.  
  511.        A word about registration
  512.        ----------------------------------------------------------------------
  513.  
  514.                       EasyVision may  be freely  distributed, without  charge
  515.                       except for the media cost.
  516.  
  517.  
  518.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  519.  
  520.  
  521.        ----------------------------------------------------------------------
  522.        CHAPTER 1 : Overview                                       Page 10/111
  523.        ----------------------------------------------------------------------
  524.  
  525.                       EasyVision  is  made  available  under  the   shareware
  526.                       concept.  This means that after an evaluation period of
  527.                       30 days,  you should  register this  software with  its
  528.                       author.   Furthermore,  if  you use  this  software  to
  529.                       create your own shareware  software, YOU MUST  REGISTER
  530.                       EasyVision.
  531.  
  532.                       Registration grants you a life-time license to use this
  533.                       software, and all following versions or updates.
  534.  
  535.                       EasyVision is  NOT  crippled  in any  way.    There  is
  536.                       absolutely no  difference  between  the  registered  or
  537.                       unregistered versions.
  538.  
  539.                       To register this software, complete the  "REGISTER.TXT"
  540.                       registration   form    included   in    the    archive.
  541.                       Registration is $25 CANADIAN.  You will receive through
  542.                       'snail mail'  an official  registered user  certificate
  543.                       with your  registration  number.    For  35$  CANADIAN,
  544.                       you'll also  receive a  bonded true  type copy  of the
  545.                       latest version of the manual.
  546.  
  547.                       EasyVision  and  TNG SOFT  ENTERPRISES  are  registered
  548.                       trade marks.
  549.  
  550.  
  551.        What's Next?
  552.        ----------------------------------------------------------------------
  553.  
  554.                       Every time  I write  a  general purpose  function,  and
  555.                       think it could be used in other project, I will include
  556.                       it in the EasyVision  package.  Every  now and then,  a
  557.                       new version of this library will be made public.
  558.  
  559.                       I will  try to  improve  the functions  already  there.
  560.                       There won't  be many  new  commands.   EasyVision  will
  561.                       always remain EASY to use,  to leave the programmer  at
  562.                       more  important  tasks.     However,  I  welcome   your
  563.                       suggestions to  what you  think  is missing  from  this
  564.                       package.
  565.  
  566.                       I will not accept special demands.  The purpose of this
  567.                       library is  to  distribute  code  that  I  have  in  my
  568.                       personal library.
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  577.  
  578.  
  579.        ----------------------------------------------------------------------
  580.        CHAPTER 1 : Overview                                       Page 11/111
  581.        ----------------------------------------------------------------------
  582.  
  583.        About the Author
  584.        ----------------------------------------------------------------------
  585.  
  586.                       My name  is  Remy Gendron .   I  live in  Quebec  city,
  587.                       Canada.  I'm studying  at Laval University in  computer
  588.                       sciences  (Informatique   de   genie).      I've   been
  589.                       programming since I was 14 years  old.  I started on  a
  590.                       Texas Instrument's TI-57 programmable calculator!
  591.  
  592.                       I then graduated to a Commodore 64.  This machine was a
  593.                       breakthrough in  computer  power, ahead  of  its  time.
  594.                       I've done  some  BASIC  on it,  but  mostly  assembler.
  595.                       Great machine to learn on.   The C64 did cost me  about
  596.                       as much as you  would spend today on  a 486!  Those  of
  597.                       you who really  did work  with this  machine know  what
  598.                       could be done with only 64K of memory, when one did put
  599.                       his mind on it (Remember GEOS?).  I find it  incredible
  600.                       that with the  computer power we  have today, we  don't
  601.                       manage to do something better...
  602.  
  603.                       I was then away from computers  for a couple of  years.
  604.                       I returned with a real IBM (AT), then another Commodore
  605.                       (386sx-20), and finally  a pieced together  (386dx-40).
  606.                       I'm looking forward to a 486dx3-99 or maybe a Pentium?
  607.  
  608.  
  609.        User support
  610.        ----------------------------------------------------------------------
  611.  
  612.                       All of EasyVision's functions and classes have  already
  613.                       been tested in real  applications.  They should  behave
  614.                       as indicated.  Please take  time to carefully read  the
  615.                       documentation.  The answers to your questions should be
  616.                       in there.  The demo programs should also provide a good
  617.                       introduction.
  618.  
  619.                       I will gladly answer any questions you may have.   I'll
  620.                       also welcome any  comments or  suggestions.   I can  be
  621.                       reach by netmail/email on FIDONET or INTERNET:
  622.  
  623.              FIDONET  REMY GENDRON 1:240/1
  624.             INTERNET  REMY_GENDRON@f1.n240.z1.fidonet.org
  625.  
  626.                       So, that's about it for now!  Have fun and enjoy!
  627.  
  628.                       Remy Gendron
  629.                       author of EasyVision
  630.  
  631.  
  632.  
  633.  
  634.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  635.  
  636.  
  637.        ----------------------------------------------------------------------
  638.        CHAPTER 2 : Getting started                                Page 12/111
  639.        ----------------------------------------------------------------------
  640.  
  641.        ----------------------------------------------------------------------
  642.        ----------------------------------------------------------------------
  643.        C H A P T E R   2 : Getting started
  644.        ----------------------------------------------------------------------
  645.  
  646.                       Installing and  using the  EasyVision library  is  very
  647.                       simple.
  648.  
  649.  
  650.        Library specifics
  651.        ----------------------------------------------------------------------
  652.  
  653.                       EasyVision's functions  are  for the  DOS  environment.
  654.                       They try, but do not always follow the ANSI standard.
  655.  
  656.                       This software was developed under BORLAND C++ 3.1.
  657.  
  658.                  -->  TURBO VISION's application  framework was  NOT used  in
  659.                       any way to create EasyVision,  nor any other 3rd  party
  660.                       libraries.  It was built from scratch over a period  of
  661.                       two years.
  662.  
  663.         Memory model  The code was compiled  under the 'large' memory  model.
  664.                       All prototypes were declared as 'far' functions and all
  665.                       pointers were explicitly  declared 'huge'.   This  will
  666.                       provide full compatibility when linking to most  memory
  667.                       model  sizes.    You   should  consult  your   compiler
  668.                       documentation about interfacing  with different  memory
  669.                       models.
  670.  
  671.                       If you should require that the library be compiled in a
  672.                       different memory  model, just  get  in touch  with  me.
  673.                       We'll arrange something, if you're a registered user of
  674.                       course!
  675.  
  676.             Pointers  Unless you REALLY know what  you are doing, you  should
  677.                       always use 'huge' pointers.   'far' pointers can  cause
  678.                       wrap around and comparison problems because they're not
  679.                       normalized.  All of  EasyVision's functions use  'huge'
  680.                       pointers.
  681.  
  682.                Video  The video output is done through direct screen  writes.
  683.                       This makes for incredibly fast outputs.  Going  through
  684.                       the BIOS is just to slow.  However, under  multitaskers
  685.                       like DESKview , who  often work  in  text mode,  screen
  686.                       bleeds can occur if the  application is running in  the
  687.                       background.  Use the virtualising options when  running
  688.                       under DESKview.
  689.  
  690.  
  691.  
  692.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  693.  
  694.  
  695.        ----------------------------------------------------------------------
  696.        CHAPTER 2 : Getting started                                Page 13/111
  697.        ----------------------------------------------------------------------
  698.  
  699.         Header files  All header files use conditional compilation to prevent
  700.                       redeclaration errors at compile  time.  So,  if you're
  701.                       not sure if a header was previously included  (possibly
  702.                       by another header file), feel free to include it again.
  703.  
  704.                  -->  They  also  provide  for   C++  compilation,  using   a
  705.                       conditional 'extern "C"' keyword.
  706.  
  707.  
  708.        Installation
  709.        ----------------------------------------------------------------------
  710.  
  711.                       Unpack the archive  in a temporary  directory.  If  you
  712.                       haven't done so, you should really print all the USER'S
  713.                       GUIDE for  easier reading.   It  as been  formatted  to
  714.                       print at 60 lines per pages.   And why not take a  look
  715.                       at the header files.
  716.  
  717.                       Put all header files "*.H" and "*.HPP" into an  INCLUDE
  718.                       directory.    Just  to  be  sure  you  won't  overwrite
  719.                       existing header  files,  you  should  make  a  separate
  720.                       include directory, then include it in the INCLUDE  path
  721.                       of your compilator.
  722.  
  723.                       Then put the EasyVision library "EVISION.LIB" into  one
  724.                       of your LIBRARY directories.
  725.  
  726.  
  727.        How to use this library
  728.        ----------------------------------------------------------------------
  729.  
  730.                       To use a  library function or  class, just include  its
  731.                       header file in your source code.  YOU MUST NOT write  a
  732.                       prototype yourself based on  the prototypes written  in
  733.                       this manual.  The  real prototypes may have  additional
  734.                       information in them.  So, for example:
  735.  
  736.                       #include <stdio.h>         /* A standard header file */
  737.                       #include "stdfcts.h"    /* An EasyVision header file */
  738.  
  739.                       void main (void)
  740.                       {
  741.                          ...
  742.                                  /* Here you can use the desired functions */
  743.                          ...
  744.                          return ;
  745.                       }
  746.  
  747.  
  748.  
  749.  
  750.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  751.  
  752.  
  753.        ----------------------------------------------------------------------
  754.        CHAPTER 2 : Getting started                                Page 14/111
  755.        ----------------------------------------------------------------------
  756.  
  757.                       You then have to link  all your modules, including  the
  758.                       "EVISION.LIB"  library.    You  do  that  by  including
  759.                       "EVISION.LIB" in your project.  That's all there is  to
  760.                       it!
  761.  
  762.                  -->  If you get errors, that's probably because you compiled
  763.                       your sources in  C and included  C++ modules.   Another
  764.                       source of  errors  would  be if  you  tried  to  linked
  765.                       different memory models.   Remember the EasyVision  was
  766.                       compiled under the 'large' memory model.
  767.  
  768.           Validation  All arguments  to functions  are FULLY  validated.   An
  769.                       EasyVision function will never let  you get away if  it
  770.                       is called  incorrectly.   If  something is  wrong,  the
  771.                       program is stopped  and a plain  English error  message
  772.                       tells you  what went  wrong, where  and  why!   In  the
  773.                       function descriptions, when it says that you SHOULD NOT
  774.                       or CANNOT do  something, it means  that if  you do  it,
  775.                       you'll get an  error message.   Your  program will  not
  776.                       crash!
  777.  
  778.  
  779.        How to use this document
  780.        ----------------------------------------------------------------------
  781.  
  782.                       The following conventions are used in this document:
  783.  
  784.                  -->  All of EasyVision's functions and methods were declared
  785.                       of type 'far'.
  786.  
  787.                       The following symbols are used in the text:
  788.  
  789.                       ''   Regular C and C++ keywords
  790.  
  791.                       {}   EasyVision's keywords
  792.  
  793.                       <>   Arguments to functions
  794.  
  795.                       -->  Important remarks (that you MUST read)
  796.  
  797.                       ""   Filenames
  798.  
  799.                       CAPS Keyboard keys
  800.  
  801.                       Related functions  are  grouped together  in  the  same
  802.                       module.  A chapter is devoted to each module.
  803.  
  804.                       At the  end,  reference  information can  be  found  in
  805.                       appendixes.
  806.  
  807.  
  808.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  809.  
  810.  
  811.        ----------------------------------------------------------------------
  812.        CHAPTER 3 : Using EasyVision's templates                   Page 15/111
  813.        ----------------------------------------------------------------------
  814.  
  815.        ----------------------------------------------------------------------
  816.        ----------------------------------------------------------------------
  817.        C H A P T E R   3 : Using EasyVision's templates
  818.        ----------------------------------------------------------------------
  819.  
  820.                       EasyVision provides  you with  some starting  templates
  821.                       for your programs.  Templates are important facilities.
  822.                       They  bring  consistency   and  productivity   in  your
  823.                       programming style.
  824.  
  825.                       If you already have your own style and templates, stick
  826.                       with  them.    The  included  templates  are  for   new
  827.                       programmers, or those  of you who  are still  searching
  828.                       for a better way.
  829.  
  830.                       Of course, those are  just suggestions.  For  instance,
  831.                       the  usage  and  placement  of  parenthesis,  currently
  832.                       generate many  hot  debates.    Some  will  follow  the
  833.                       'professional' style and open a block this way:
  834.  
  835.                       while (condition) {
  836.                          statements ;
  837.                          statements ;
  838.                       }
  839.  
  840.                       While others (and I), do it this way:
  841.  
  842.                       while (condition)
  843.                       {
  844.                          statement ;
  845.                          statement ;
  846.                       }
  847.  
  848.                       Choose  your  own  style!    The  following  files  are
  849.                       therefore included for your convenience.
  850.  
  851.  
  852.        MAIN.C
  853.        ----------------------------------------------------------------------
  854.  
  855.                       Template for your main source file.   This is the  only
  856.                       file with  a  'main'  function  declaration.    I'd  go
  857.                       further by suggesting that ONLY the 'main' function  be
  858.                       included.   As a  rule, your  'main' should  only  call
  859.                       other functions in your other modules.  It should be as
  860.                       short and as well documented as possible.
  861.  
  862.  
  863.  
  864.  
  865.  
  866.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  867.  
  868.  
  869.        ----------------------------------------------------------------------
  870.        CHAPTER 3 : Using EasyVision's templates                   Page 16/111
  871.        ----------------------------------------------------------------------
  872.  
  873.        MAIN.CPP
  874.        ----------------------------------------------------------------------
  875.  
  876.                       C++ version of MAIN.C.
  877.  
  878.  
  879.        MODULE.C
  880.        ----------------------------------------------------------------------
  881.  
  882.                       Template for your secondary  modules' code files.   You
  883.                       could, for example, put all video related functions  in
  884.                       a "VIDEO.C" file.
  885.  
  886.  
  887.        MODULE.CPP
  888.        ----------------------------------------------------------------------
  889.  
  890.                       C++ version of MODULE.C.
  891.  
  892.  
  893.        MODULE.H
  894.        ----------------------------------------------------------------------
  895.  
  896.                       Template for your secondary modules' header files.
  897.  
  898.  
  899.        MODULE.HPP
  900.        ----------------------------------------------------------------------
  901.  
  902.                       C++ version of MODULE.H.
  903.  
  904.  
  905.        STDMACRO.H
  906.        ----------------------------------------------------------------------
  907.  
  908.                       Template for your standard  macro definitions.  Put  in
  909.                       this file your  standard macros that  can be used  with
  910.                       many different projects.
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  925.  
  926.  
  927.        ----------------------------------------------------------------------
  928.        CHAPTER 3 : Using EasyVision's templates                   Page 17/111
  929.        ----------------------------------------------------------------------
  930.  
  931.                  -->  This file contains declarations for {TRUE}  and {FALSE}
  932.                       and for all the keyboard keys (II_* macros).
  933.  
  934.  
  935.        PRJMACRO.H
  936.        ----------------------------------------------------------------------
  937.  
  938.                       Template for macros particular to your current project.
  939.                       Put in this file,  macros that will  be needed by  many
  940.                       modules.  You should place macros specific to a  module
  941.                       in the module's macro declarations section.
  942.  
  943.  
  944.        STDTYPE.H
  945.        ----------------------------------------------------------------------
  946.  
  947.                       Template for your  standard type definitions.   Put  in
  948.                       this file your standard typedefs that can be used  with
  949.                       many different projects.
  950.  
  951.                  -->  This file contains declarations for the {bool}, {byte},
  952.                       {word} and {dword} types.
  953.  
  954.  
  955.        PRJTYPE.H
  956.        ----------------------------------------------------------------------
  957.  
  958.                       Template  for  typedefs  particular  to  your   current
  959.                       project.   Put  in this  file,  typedefs that  will  be
  960.                       needed by  many modules.    You should  place  typedefs
  961.                       specific  to   a  module   in  the   module's   typedef
  962.                       declarations section.
  963.  
  964.  
  965.        PRJMSGS.C
  966.        ----------------------------------------------------------------------
  967.  
  968.                       Template for your  global output messages .  When  your
  969.                       program outputs something to the user, put it here as a
  970.                       global  variable.     Then,  reference  this   variable
  971.                       everywhere in your program when you want to output this
  972.                       message.   This  will  allow easy  conversion  of  your
  973.                       program from one language to another.
  974.  
  975.                       I suggest that all global message variables begin  with
  976.                       'msg_'.  For example, msg_fileselect.
  977.  
  978.  
  979.  
  980.  
  981.  
  982.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  983.  
  984.  
  985.        ----------------------------------------------------------------------
  986.        CHAPTER 3 : Using EasyVision's templates                   Page 18/111
  987.        ----------------------------------------------------------------------
  988.  
  989.        PRJMSGS.H
  990.        ----------------------------------------------------------------------
  991.  
  992.                       Template to  put  'extern' references  to  your  global
  993.                       message variables.  For example:
  994.  
  995.                       extern char huge *msg_fileselect.
  996.  
  997.  
  998.        HEADTEST.C
  999.        ----------------------------------------------------------------------
  1000.  
  1001.                       Template to test  your header files . Often, they  will
  1002.                       compile  correctly  because   some  other  files   were
  1003.                       included before your header.  This could cause problems
  1004.                       if you intend  to use  this header  file elsewhere,  or
  1005.                       make them available to other programmers.  Your  header
  1006.                       files should always compile alone by themselves.   Test
  1007.                       them with this file.
  1008.  
  1009.  
  1010.        Examples
  1011.        ----------------------------------------------------------------------
  1012.  
  1013.                       Templates promote consistency and free you from tedious
  1014.                       tasks.  Also, having something to start with, you won't
  1015.                       as often be afflicted by the 'blank page' syndrome!
  1016.  
  1017.                       Take a  look at  the demo  programs to  get a  feel  at
  1018.                       project management.
  1019.  
  1020.  
  1021.  
  1022.  
  1023.  
  1024.  
  1025.  
  1026.  
  1027.  
  1028.  
  1029.  
  1030.  
  1031.  
  1032.  
  1033.  
  1034.  
  1035.  
  1036.  
  1037.  
  1038.  
  1039.  
  1040.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  1041.  
  1042.  
  1043.        ----------------------------------------------------------------------
  1044.        CHAPTER 4 : Using EasyVision's functions                   Page 19/111
  1045.        ----------------------------------------------------------------------
  1046.  
  1047.        ----------------------------------------------------------------------
  1048.        ----------------------------------------------------------------------
  1049.        C H A P T E R   4 : Using EasyVision's functions
  1050.        ----------------------------------------------------------------------
  1051.  
  1052.                       There are  two types  of  functions in  the  EasyVision
  1053.                       library.     Functions   available  in   the   standard
  1054.                       libraries, and new functions.
  1055.  
  1056.                       Because I like to compile in the 'large' memory  model,
  1057.                       all functions have  been written to  be of type  'far'.
  1058.                       They will also accept 'huge' pointers without the  need
  1059.                       for  a  typecast.    Those  functions  don't  call  the
  1060.                       standard  run-time   library.     They  were   entirely
  1061.                       rewritten.  There  is no  overhead and they  are fully
  1062.                       optimized.
  1063.  
  1064.                       New functions have  been written  because they  weren't
  1065.                       available in the standard libraries.
  1066.  
  1067.                  -->  Some conventions  have  been adopted  for the  function
  1068.                       names.   Related  functions  will have  the  same  name
  1069.                       prefix.  For instance, all string functions will  begin
  1070.                       by {str_}.
  1071.  
  1072.                  -->  Function  declarations  can  use  types  like   {bool},
  1073.                       {byte}, {word} and {dword}.  See the file STDTYPE.H for
  1074.                       a description of those types.
  1075.  
  1076.                       A function's description uses the following format:
  1077.  
  1078.              Summary  Short description of this function's behavior.
  1079.  
  1080.               Syntax  #include "header.h"
  1081.  
  1082.                       ReturnType FonctionName
  1083.                       (
  1084.                          <param>,
  1085.                          <param>
  1086.                       ) ;
  1087.  
  1088.                  -->  YOU  MUST  NEVER  WRITE  A  PROTOTYPE  FOR  A  FUNCTION
  1089.                       YOURSELF.  ALWAYS  USE THE PROPER  HEADER FILES.   THEY
  1090.                       HAVE ADDITIONAL INFORMATION IN THEM!
  1091.  
  1092.              Remarks  Parameters and usage are described here when needed.
  1093.  
  1094.               Return  The returned value of the function is explained here.
  1095.  
  1096.  
  1097.  
  1098.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  1099.  
  1100.  
  1101.        ----------------------------------------------------------------------
  1102.        CHAPTER 4 : Using EasyVision's functions                   Page 20/111
  1103.        ----------------------------------------------------------------------
  1104.  
  1105.              Example  Examples of various calls to this function.
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128.  
  1129.  
  1130.  
  1131.  
  1132.  
  1133.  
  1134.  
  1135.  
  1136.  
  1137.  
  1138.  
  1139.  
  1140.  
  1141.  
  1142.  
  1143.  
  1144.  
  1145.  
  1146.  
  1147.  
  1148.  
  1149.  
  1150.  
  1151.  
  1152.  
  1153.  
  1154.  
  1155.  
  1156.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  1157.  
  1158.  
  1159.        ----------------------------------------------------------------------
  1160.        CHAPTER 5 : EasyVision's standard functions                Page 21/111
  1161.        ----------------------------------------------------------------------
  1162.  
  1163.        ----------------------------------------------------------------------
  1164.        ----------------------------------------------------------------------
  1165.        C H A P T E R   5 : EasyVision's standard functions
  1166.        ----------------------------------------------------------------------
  1167.  
  1168.                       The declarations  for EasyVision's  standard  functions
  1169.                       are contained in the "STDFCTS.H" header file.
  1170.  
  1171.                       Those are the  truly general and  often used  functions
  1172.                       that will be required by most of your modules.
  1173.  
  1174.  
  1175.        ASSERT
  1176.        ----------------------------------------------------------------------
  1177.  
  1178.              Summary  This function  will  ASSERTain that  a  <condition>  is
  1179.                       {TRUE}.  If it is, it  will return immediately with  no
  1180.                       effect, and minimum overhead.
  1181.  
  1182.                       If the  condition  is  {FALSE},  the  program  will  be
  1183.                       terminated in an orderly fashion.  {assert} will  clear
  1184.                       the screen, display an error message for at least  five
  1185.                       seconds, and  terminate  the  program with  a  call  to
  1186.                       'exit'.   This  closes  all open  files,  releases  any
  1187.                       memory allocated on the heap and exits to DOS.
  1188.  
  1189.               Syntax  #include "stdfcts.h"
  1190.  
  1191.                       void far assert            /* Validates an assertion */
  1192.                       (
  1193.                          bool             condition,   /* FALSE=terminates */
  1194.                          char       huge *fctname,     /* Current function */
  1195.                          const char huge *errortext,      /* Error message */
  1196.                          int              exitcode           /* Errorlevel */
  1197.                       ) ;
  1198.  
  1199.              Remarks  If <condition> evaluates to  {FALSE}, the program  will
  1200.                       be terminated  and <fctname>  will be  displayed.   You
  1201.                       should  set  <fctname>   to  the  currently   executing
  1202.                       function.   This will  help find  the location  of  the
  1203.                       error.
  1204.  
  1205.  
  1206.  
  1207.  
  1208.  
  1209.  
  1210.  
  1211.  
  1212.  
  1213.  
  1214.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  1215.  
  1216.  
  1217.        ----------------------------------------------------------------------
  1218.        CHAPTER 5 : EasyVision's standard functions                Page 22/111
  1219.        ----------------------------------------------------------------------
  1220.  
  1221.                       The error message <errortext> will be displayed.   This
  1222.                       can be  a string  literal, or  you can  use  predefined
  1223.                       error messages.   These are available  from the  global
  1224.                       variable msg_stderr[].  This is  an array of pointers,
  1225.                       and here are the messages:
  1226.  
  1227.                       1.   "Not enough  memory  to  create an  array  on  the
  1228.                       heap."
  1229.                       2.   "Not enough  memory  to  create a  struct  on  the
  1230.                       heap."
  1231.                       3.   "Not  enough  memory  to  allocate  the  requested
  1232.                       amount of bytes."
  1233.                       4.   "Out of memory."
  1234.                       5.   "File not found."
  1235.                       6.   "Path not found."
  1236.                       7.   "File access denied."
  1237.                       8.   "Input/Output error."
  1238.                       9.   "Unrecoverable fatal error."
  1239.  
  1240.                       {assert} will then return to DOS with an errorlevel  of
  1241.                       <exitcode>.
  1242.  
  1243.                  -->  Before calling  'exit', {assert}  will set  the  global
  1244.                       variable {assert_err } to  {TRUE}.    This  will  allow
  1245.                       classes' destructors to know  the state of the  program
  1246.                       when they were called.  At any other time, {assert_err}
  1247.                       is {FALSE}.
  1248.  
  1249.               Return  None.
  1250.  
  1251.              Example
  1252.                       assert (nbrecord>0,"datasearch","No data",1);
  1253.                       assert (ptr != NULL,"dataprocess",msg_stderr[3],1) ;
  1254.  
  1255.  
  1256.        ARG_EXIST
  1257.        ----------------------------------------------------------------------
  1258.  
  1259.              Summary  This function will check if  an argument is present  on
  1260.                       the command line.  Check is case sensitive.
  1261.  
  1262.               Syntax  #include "stdfcts.h"
  1263.  
  1264.                       int far arg_exist             /* Checks for argument */
  1265.                       (
  1266.                          char huge *string       /* Argument to search for */
  1267.                       ) ;
  1268.  
  1269.              Remarks  The search for the argument is case sensitive.
  1270.  
  1271.  
  1272.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  1273.  
  1274.  
  1275.        ----------------------------------------------------------------------
  1276.        CHAPTER 5 : EasyVision's standard functions                Page 23/111
  1277.        ----------------------------------------------------------------------
  1278.  
  1279.               Return  If the command line argument <string> exists, its index
  1280.                       in the command  line argument array  will be  returned.
  1281.                       If the  argument  does  not exist,  the  function  will
  1282.                       return 0.  See the '_argv' keyword of your compiler for
  1283.                       details on accessing command line arguments.
  1284.  
  1285.              Example
  1286.                       if (arg_exist ("q")) sound = FALSE ;
  1287.  
  1288.  
  1289.        ARG_IEXIST
  1290.        ----------------------------------------------------------------------
  1291.  
  1292.              Summary  This function will check if  an argument is present  on
  1293.                       the command line.  Check is case insensitive.
  1294.  
  1295.               Syntax  #include "stdfcts.h"
  1296.  
  1297.                       int far arg_iexist                /* Checks argument */
  1298.                       (
  1299.                          char huge *string       /* Argument to search for */
  1300.                       ) ;
  1301.  
  1302.              Remarks  The search for the argument is case insensitive.
  1303.  
  1304.               Return  If the command line argument <string> exists, its index
  1305.                       in the command  line argument array  will be  returned.
  1306.                       If the  argument  does  not exist,  the  function  will
  1307.                       return 0.  See the '_argv' keyword of your compiler for
  1308.                       details on accessing command line arguments.
  1309.  
  1310.              Example
  1311.                       if (arg_iexist ("bios")) directvideo = FALSE ;
  1312.  
  1313.  
  1314.        HEAPALLOC
  1315.        ----------------------------------------------------------------------
  1316.  
  1317.              Summary  {heapalloc} replaces 'farmalloc'.
  1318.  
  1319.               Syntax  #include "stdfcts.h"
  1320.  
  1321.                       void huge * far heapalloc      /* Allocates far heap */
  1322.                       (
  1323.                          dword nbytes    /* Asks for a block <nbytes> long */
  1324.                       ) ;
  1325.  
  1326.              Remarks  Allocates <nbytes> bytes on the  far heap.  {dword}  is
  1327.                       an 'unsigned long int' and is declared in "STDTYPE.H".
  1328.  
  1329.  
  1330.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  1331.  
  1332.  
  1333.        ----------------------------------------------------------------------
  1334.        CHAPTER 5 : EasyVision's standard functions                Page 24/111
  1335.        ----------------------------------------------------------------------
  1336.  
  1337.               Return  This function returns  a 'huge' pointer.   Be sure  the
  1338.                       pointer variable, who will  receive the pointer to  the
  1339.                       allocated memory,  is of type 'huge' also.
  1340.  
  1341.              Example
  1342.                       char huge *ptr ;
  1343.                       ptr = heapalloc (sizeof (object)) ;
  1344.  
  1345.  
  1346.        HEAPFREE
  1347.        ----------------------------------------------------------------------
  1348.  
  1349.              Summary  {heapfree} replaces 'farfree'.
  1350.  
  1351.               Syntax  #include "stdfcts.h"
  1352.  
  1353.                       void far heapfree                /* Deallocates heap */
  1354.                       (
  1355.                          void huge *block          /* Ptr to block to free */
  1356.                       ) ;
  1357.  
  1358.              Remarks  The  only  difference  from  'farfree'  is  that   this
  1359.                       function offers the convenience  of accepting a  'huge'
  1360.                       pointer as an argument.
  1361.  
  1362.               Return  None.
  1363.  
  1364.              Example
  1365.                       char huge *ptr ;
  1366.                       ptr = heapalloc (sizeof (object)) ; // Allocates memory
  1367.                       heapfree (ptr) ;                        // Frees memory
  1368.                       ptr = NULL ;                      // Always a good idea
  1369.  
  1370.  
  1371.        TO_UPPER
  1372.        ----------------------------------------------------------------------
  1373.  
  1374.              Summary  {to_upper} replaces 'toupper'.
  1375.  
  1376.               Syntax  #include "stdfcts.h"
  1377.  
  1378.                       int far to_upper            /* Converts to uppercase */
  1379.                       (
  1380.                          int ch               /* Character to be converted */
  1381.                       ) ;
  1382.  
  1383.              Remarks  The standard library 'toupper'  function has a  problem
  1384.                       when you pass an  'int' to it.   It considers only  the
  1385.                       LSB and could wrongly make the conversion.
  1386.  
  1387.  
  1388.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  1389.  
  1390.  
  1391.        ----------------------------------------------------------------------
  1392.        CHAPTER 5 : EasyVision's standard functions                Page 25/111
  1393.        ----------------------------------------------------------------------
  1394.  
  1395.               Return  An 'int'.  The converted letter if it was necessary.
  1396.  
  1397.              Example
  1398.                       command = to_upper (command) ;
  1399.  
  1400.  
  1401.        TO_LOWER
  1402.        ----------------------------------------------------------------------
  1403.  
  1404.              Summary  {to_lower} replaces 'tolower'.
  1405.  
  1406.               Syntax  #include "stdfcts.h"
  1407.  
  1408.                       int far to_lower            /* Converts to lowercase */
  1409.                       (
  1410.                          int ch               /* Character to be converted */
  1411.                       ) ;
  1412.  
  1413.              Remarks  The standard library 'tolower'  function has a  problem
  1414.                       when you pass an  'int' to it.   It considers only  the
  1415.                       LSB and could wrongly make the conversion.
  1416.  
  1417.               Return  An 'int'.  The converted letter if it was necessary.
  1418.  
  1419.              Example
  1420.  
  1421.                       command = to_lower (command) ;
  1422.  
  1423.  
  1424.  
  1425.  
  1426.  
  1427.  
  1428.  
  1429.  
  1430.  
  1431.  
  1432.  
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  1447.  
  1448.  
  1449.        ----------------------------------------------------------------------
  1450.        CHAPTER 6 : EasyVision's keyboard functions                Page 26/111
  1451.        ----------------------------------------------------------------------
  1452.  
  1453.        ----------------------------------------------------------------------
  1454.        ----------------------------------------------------------------------
  1455.        C H A P T E R   6 : EasyVision's keyboard functions
  1456.        ----------------------------------------------------------------------
  1457.  
  1458.                       The declarations  for EasyVision's  keyboard  functions
  1459.                       are contained in the "KEYBFCTS.H" header file.
  1460.  
  1461.  
  1462.        GETKEY
  1463.        ----------------------------------------------------------------------
  1464.  
  1465.              Summary  This  is  a  replacement   for  the  familiar   'getch'
  1466.                       function.
  1467.  
  1468.               Syntax  #include "keybfcts.h"
  1469.  
  1470.                       int far getkey          /* Reads a key from keyboard */
  1471.                       (
  1472.                          int  filter,             /* Filter (0 = all keys) */
  1473.                          bool buffer        /* TRUE: Read from keyb buffer */
  1474.                       ) ;
  1475.  
  1476.              Remarks  One of 'getch' weakness is  its inability to deal  with
  1477.                       the  way  extended  keys  are  internally  represented.
  1478.                       Those are  the  keys  that don't  have  an  ASCII  code
  1479.                       associated with them.  For example, the function, arrow
  1480.                       and editing keys all return an extended keycode.
  1481.  
  1482.                       This  new  {getkey}  function  will  deal  with   these
  1483.                       extended keys by  adding 256 to  the extended  keycode.
  1484.                       Appendix A lists  all the  extended keycodes  currently
  1485.                       available on an extended keyboard.
  1486.  
  1487.                       You MUST specify a <filter> to be used by the  {getkey}
  1488.                       function.  A filter of 0 will allow any key to be  read
  1489.                       and returned by the function.  You can also provide the
  1490.                       ASCII or extended keycode (remember  to add 256 to  the
  1491.                       real code) of the  only key allowed  to be returned  by
  1492.                       the function.  This provides an easy way to WAIT FOR  a
  1493.                       specific key.  The function will then return with  that
  1494.                       keycode, only when that key has been pressed.
  1495.  
  1496.                  -->  If you set <buffer> to {FALSE}, {getkey} will flush the
  1497.                       keyboard buffer before  reading a key.   Otherwise,  it
  1498.                       will read from the buffer if keys have been  previously
  1499.                       pressed.
  1500.  
  1501.  
  1502.  
  1503.  
  1504.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  1505.  
  1506.  
  1507.        ----------------------------------------------------------------------
  1508.        CHAPTER 6 : EasyVision's keyboard functions                Page 27/111
  1509.        ----------------------------------------------------------------------
  1510.  
  1511.                  -->  Beware of NEVER setting  <filter> to an impossible  key
  1512.                       entry, or you will be trapped by the {getkey} function!
  1513.  
  1514.               Return  If a normal key was pressed,  the returned value is  an
  1515.                       'int' representing the ASCII code of that key.  (1-255)
  1516.  
  1517.                       If an extended key was  pressed, the returned value  is
  1518.                       an 'int' representing  the extended  keycode plus  256.
  1519.                       (256-396)
  1520.  
  1521.              Example
  1522.                       getkey (0) ;
  1523.                       getkey (13) ;              /* Wait for the ENTER key */
  1524.  
  1525.  
  1526.        EXTTOASCII
  1527.        ----------------------------------------------------------------------
  1528.  
  1529.              Summary  Converts an ALT-(letter  or digit)  key combination  to
  1530.                       its equivalent, single letter or digit.
  1531.  
  1532.               Syntax  #include "keybfcts.h"
  1533.  
  1534.                       int far exttoascii    /* Converts 'ALT-letter|digit' */
  1535.                       (
  1536.                          int code                  /* Code to be converted */
  1537.                       ) ;
  1538.  
  1539.              Remarks  <code>  is  the  value  as  returned  by  the  {getkey}
  1540.                       function.  For example, {II_A_A} (Alt-A) is returned by
  1541.                       {getkey} as  286.   Given 286,  {exttoascii} will  then
  1542.                       return 65, the ASCII code for the letter 'A'.
  1543.  
  1544.               Return  The ASCII code of  the letter or  digit in the  ALT-key
  1545.                       combination.  If <code> is not an ALT-(letter or digit)
  1546.                       combination, <code> is returned unchanged.
  1547.  
  1548.                  -->  If the value returned by this function is of a  letter,
  1549.                       the letter will always be promoted to uppercase.
  1550.  
  1551.              Example
  1552.                       in = getkey (0,FALSE) ;
  1553.                       in = exttoascii (in) ;   /* Checks for Alt-key combi */
  1554.  
  1555.  
  1556.  
  1557.  
  1558.  
  1559.  
  1560.  
  1561.  
  1562.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  1563.  
  1564.  
  1565.        ----------------------------------------------------------------------
  1566.        CHAPTER 7 : EasyVision's file functions                    Page 28/111
  1567.        ----------------------------------------------------------------------
  1568.  
  1569.        ----------------------------------------------------------------------
  1570.        ----------------------------------------------------------------------
  1571.        C H A P T E R   7 : EasyVision's file functions
  1572.        ----------------------------------------------------------------------
  1573.  
  1574.                       The declarations  for EasyVision's  file functions  are
  1575.                       contained in the "FILEFCTS.H" header file.
  1576.  
  1577.  
  1578.        FNEWLINE
  1579.        ----------------------------------------------------------------------
  1580.  
  1581.              Summary  Goes to start of next line in a text file.
  1582.  
  1583.               Syntax  #include "filefcts.h"
  1584.  
  1585.                       int far fnewline                /* Goes to next line */
  1586.                       (
  1587.                          FILE *f                   /* Ptr to opened stream */
  1588.                       ) ;
  1589.  
  1590.              Remarks  The end of a text line is marked by the character '\n'.
  1591.  
  1592.               Return  If the start of a new line was found, '\n' is returned.
  1593.                       If 'EOF' (end  of file) was  reach before  a new  line,
  1594.                       'EOF' is returned.
  1595.  
  1596.              Example
  1597.                       error = fnewline (text) ;
  1598.  
  1599.  
  1600.        FSIZE
  1601.        ----------------------------------------------------------------------
  1602.  
  1603.              Summary  Returns size of a  file in bytes,  as displayed from  a
  1604.                       directory listing.
  1605.  
  1606.               Syntax  #include "filefcts.h"
  1607.  
  1608.                       dword far fsize        /* Returns file size in bytes */
  1609.                       (
  1610.                          FILE *f                   /* Ptr to opened stream */
  1611.                       ) ;
  1612.  
  1613.              Remarks  In a text file, the new  line character is in fact two
  1614.                       bytes long.  DOS stores '\n'  as a combination of  '\n'
  1615.                       and '\r'.  So, the length of a text file will not match
  1616.                       the number of characters read with 'fgetc'.
  1617.  
  1618.  
  1619.  
  1620.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  1621.  
  1622.  
  1623.        ----------------------------------------------------------------------
  1624.        CHAPTER 7 : EasyVision's file functions                    Page 29/111
  1625.        ----------------------------------------------------------------------
  1626.  
  1627.               Return  {fsize} returns  the size  of the  file in  bytes as  a
  1628.                       {dword}.   {dword}  is  defined in  "STDTYPE.H"  as  an
  1629.                       'unsigned long int'.
  1630.  
  1631.              Example
  1632.                       size = fsize (text) ;
  1633.  
  1634.  
  1635.        FCOPY
  1636.        ----------------------------------------------------------------------
  1637.  
  1638.              Summary  Copies a file.
  1639.  
  1640.               Syntax  #include "filefcts.h"
  1641.  
  1642.                       int far fcopy                  /* Copies a disk file */
  1643.                       (
  1644.                          char huge *srcpath,        /* Path to source file */
  1645.                          char huge *destpath,  /* Path to destination file */
  1646.                          bool      verify               /* TRUE: Verify ON */
  1647.                       ) ;
  1648.  
  1649.              Remarks  <srcpath> is copied to <destpath>.  Paths are expressed
  1650.                       in the form [d:][path]filename.ext.
  1651.  
  1652.                  -->  No wildcards are allowed.
  1653.  
  1654.                       If <verify> is set to {TRUE},  the two files will  then
  1655.                       be reread and compared.   This is different from  DOS's
  1656.                       'verify',  who  doesn't  reread   the  files,  and   is
  1657.                       therefore a little slower.
  1658.  
  1659.               Return  If the  copy was  successful  and error  free,  {fcopy}
  1660.                       returns 0.  On error, 1 is returned.
  1661.  
  1662.              Example
  1663.                       error =fcopy ("autoexec.bat","autoexec.bak",TRUE) ;
  1664.  
  1665.  
  1666.  
  1667.  
  1668.  
  1669.  
  1670.  
  1671.  
  1672.  
  1673.  
  1674.  
  1675.  
  1676.  
  1677.  
  1678.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  1679.  
  1680.  
  1681.        ----------------------------------------------------------------------
  1682.        CHAPTER 8 : EasyVision's screen functions                  Page 30/111
  1683.        ----------------------------------------------------------------------
  1684.  
  1685.        ----------------------------------------------------------------------
  1686.        ----------------------------------------------------------------------
  1687.        C H A P T E R   8 : EasyVision's screen functions
  1688.        ----------------------------------------------------------------------
  1689.  
  1690.                       The declarations for EasyVision's screen functions  are
  1691.                       contained in the "SCRFCTS.H" header file.
  1692.  
  1693.  
  1694.        SCR_TEXTATTR
  1695.        ----------------------------------------------------------------------
  1696.  
  1697.              Summary  This function will  set the  background and  foreground
  1698.                       colors used for video outputs by the "CONIO.H"  module.
  1699.                       It will support bright background colors.
  1700.  
  1701.               Syntax  #include "scrfcts.h"
  1702.  
  1703.                       void far scr_textattr      /* Sets colors of outputs */
  1704.                       (
  1705.                          int back,                     /* Background color */
  1706.                          int fore                      /* Foreground color */
  1707.                       ) ;
  1708.  
  1709.              Remarks  The normal  'textbackground'  function does  not  allow
  1710.                       bright background colors.  {scr_textattr} will do so.
  1711.  
  1712.                  -->  {tdesktop::settextmode]  allows  you  to  turn  on  the
  1713.                       ability to use bright background colors.  When this  is
  1714.                       so, all sixteen  possible colors can  be used when  you
  1715.                       have  to  specify  a   background  color  anywhere   in
  1716.                       EasyVision.  Therefore, all changes of colors should be
  1717.                       done with calls to {scr_textattr}.
  1718.  
  1719.                       You will now be able to have 'BLACK' text on a (really)
  1720.                       'WHITE' background.
  1721.  
  1722.               Return  None.
  1723.  
  1724.              Example
  1725.                       scr_textattr (WHITE,BLACK) ;
  1726.  
  1727.  
  1728.  
  1729.  
  1730.  
  1731.  
  1732.  
  1733.  
  1734.  
  1735.  
  1736.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  1737.  
  1738.  
  1739.        ----------------------------------------------------------------------
  1740.        CHAPTER 8 : EasyVision's screen functions                  Page 31/111
  1741.        ----------------------------------------------------------------------
  1742.  
  1743.        SCR_VSAVE
  1744.        ----------------------------------------------------------------------
  1745.  
  1746.              Summary  This function will  save the current  screen and  video
  1747.                       attributes in a 'text_info' structure.  It has exactly
  1748.                       the same  effects  as a  call  to 'gettextinfo '.   The
  1749.                       difference is that it can  also save the actual  screen
  1750.                       content.
  1751.  
  1752.               Syntax  #include "scrfcts.h"
  1753.  
  1754.                       void far scr_vsave   /* Saves all video informations */
  1755.                       (
  1756.                          struct text_info huge *ti,    /* Ptr to text_info */
  1757.                          char huge*huge *savedscr            /* Ptr to ptr */
  1758.                       ) ;
  1759.  
  1760.              Remarks  All members  of  the  'text_info'  structure  <ti>  are
  1761.                       filled with  this  function.    <savedscr>  is  a  huge
  1762.                       pointer to a huge  char pointer.   If this argument  is
  1763.                       provided, the screen  content will also  be saved to  a
  1764.                       buffer in the heap, and the  huge pointer to char  will
  1765.                       be set to point to this  buffer.  If you don't want  to
  1766.                       save the screen area, set <savedscr> to 'NULL'.
  1767.  
  1768.                  -->  The cursor's  attributes are  saved,  but will  not  be
  1769.                       restored  by  {scr_vrestore}.     You   must  use   the
  1770.                       {scr_csave} and {scr_crestore}.
  1771.  
  1772.               Return  None.
  1773.  
  1774.              Example
  1775.                       struct text_info ti ;
  1776.                       char huge *scrbfr ;
  1777.                       scr_vsave (&ti,&scrbfr) ;
  1778.  
  1779.  
  1780.        SCR_VRESTORE
  1781.        ----------------------------------------------------------------------
  1782.  
  1783.              Summary  This function will  restore the screen  video mode  and
  1784.                       the text window size from a 'text_info' structure.   It
  1785.                       can also restore the screen content if it was saved  by
  1786.                       a previous call to {scr_vsave}.
  1787.  
  1788.  
  1789.  
  1790.  
  1791.  
  1792.  
  1793.  
  1794.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  1795.  
  1796.  
  1797.        ----------------------------------------------------------------------
  1798.        CHAPTER 8 : EasyVision's screen functions                  Page 32/111
  1799.        ----------------------------------------------------------------------
  1800.  
  1801.               Syntax  #include "scrfcts.h"
  1802.  
  1803.                       void far scr_vrestore         /* Restores video info */
  1804.                       (
  1805.                          struct text_info huge *ti,    /* Ptr to text_info */
  1806.                          char huge*huge *savedscr            /* Ptr to ptr */
  1807.                       ) ;
  1808.  
  1809.              Remarks  The 'text_info'  structure  must have  been  previously
  1810.                       filled with  {scr_vsave}.   The same  is true  for  the
  1811.                       previous screen content.
  1812.  
  1813.                  -->  If the  screen  area  was  not  previously  saved,  set
  1814.                       <savedscr> to 'NULL'.
  1815.  
  1816.                       The memory will be deallocated when the screen  content
  1817.                       is restored, so you can't restore it more than once.
  1818.  
  1819.               Return  None.
  1820.  
  1821.              Example
  1822.                       scr_vrestore (&ti,&scrbfr) ;
  1823.  
  1824.  
  1825.        SCR_CSAVE
  1826.        ----------------------------------------------------------------------
  1827.  
  1828.              Summary  This  function   will  save   all  cursor   attributes,
  1829.                       INCLUDING THE  CURSOR  TYPE (shape),  in  a  {cur_info}
  1830.                       structure.  Those attributes are:  colors, x pos, y pos
  1831.                       and cursor shape.
  1832.  
  1833.               Syntax  #include "scrfcts.h"
  1834.  
  1835.                       void far scr_csave    /* Saves all cursor attributes */
  1836.                       (
  1837.                          struct cur_info huge *ci       /* Ptr to cur_info */
  1838.                       ) ;
  1839.  
  1840.              Remarks  The {cur_info} structure is as follows, and is  defined
  1841.                       in "SCRFCTS.H".
  1842.  
  1843.                       struct cur_info
  1844.                       {
  1845.                          byte attribute ;                 /* Cursor colors */
  1846.                          byte curx ;                  /* Cursor X position */
  1847.                          byte cury ;                  /* Cursor Y position */
  1848.                          word curtype ;                     /* Cursor type */
  1849.                       } ;
  1850.  
  1851.  
  1852.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  1853.  
  1854.  
  1855.        ----------------------------------------------------------------------
  1856.        CHAPTER 8 : EasyVision's screen functions                  Page 33/111
  1857.        ----------------------------------------------------------------------
  1858.  
  1859.               Return  None.
  1860.  
  1861.              Example
  1862.                       struct cur_info ci ;
  1863.                       scr_csave (&ci) ;
  1864.  
  1865.  
  1866.        SCR_CRESTORE
  1867.        ----------------------------------------------------------------------
  1868.  
  1869.              Summary  This  function  will  restore  all  cursor  attributes,
  1870.                       INCLUDING THE CURSOR  TYPE (shape),  from a  {cur_info}
  1871.                       structure.
  1872.  
  1873.               Syntax  #include "scrfcts.h"
  1874.  
  1875.                       void far scr_crestore  /* Restores cursor attributes */
  1876.                       (
  1877.                          struct cur_info huge *ci       /* Ptr to cur_info */
  1878.                       ) ;
  1879.  
  1880.              Remarks  The cursor's attributes must have been previously saved
  1881.                       with {scr_csave}.
  1882.  
  1883.               Return  None.
  1884.  
  1885.              Example
  1886.                       struct cur_info ci ;
  1887.                       scr_csave (&ci) ;
  1888.                       scr_crestore (&ci) ;
  1889.  
  1890.  
  1891.  
  1892.  
  1893.  
  1894.  
  1895.  
  1896.  
  1897.  
  1898.  
  1899.  
  1900.  
  1901.  
  1902.  
  1903.  
  1904.  
  1905.  
  1906.  
  1907.  
  1908.  
  1909.  
  1910.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  1911.  
  1912.  
  1913.        ----------------------------------------------------------------------
  1914.        CHAPTER 9 : EasyVision's string functions                  Page 34/111
  1915.        ----------------------------------------------------------------------
  1916.  
  1917.        ----------------------------------------------------------------------
  1918.        ----------------------------------------------------------------------
  1919.        C H A P T E R   9 : EasyVision's string functions
  1920.        ----------------------------------------------------------------------
  1921.  
  1922.                       The declarations for EasyVision's string functions  are
  1923.                       contained in the "STRFCTS.H" header file.
  1924.  
  1925.  
  1926.        STR_LEN
  1927.        ----------------------------------------------------------------------
  1928.  
  1929.              Summary  This is a 'huge' version of  'strlen'.  It returns  the
  1930.                       length of a string.
  1931.  
  1932.               Syntax  #include "strfcts.h"
  1933.  
  1934.                       size_t far str_len /* Returns the length of a string */
  1935.                       (
  1936.                          char huge *string         /* Huge ptr to a string */
  1937.                       ) ;
  1938.  
  1939.              Remarks  The only difference with 'strlen' is that this function
  1940.                       offers the convenience of accepting a 'huge' pointer as
  1941.                       argument.
  1942.  
  1943.               Return  The length of the string.  The type 'size_t' is defined
  1944.                       in "STDIO.H" as an 'unsigned int'.
  1945.  
  1946.              Example
  1947.                       length = str_len (text) ;
  1948.  
  1949.  
  1950.        STR_CPY
  1951.        ----------------------------------------------------------------------
  1952.  
  1953.              Summary  This is  a 'huge'  version of  'strcpy'.   It copies  a
  1954.                       string into  another,  including the  terminating  '\0'
  1955.                       character.
  1956.  
  1957.               Syntax  #include "strfcts.h"
  1958.  
  1959.                       char huge * far str_cpy           /* Copies a string */
  1960.                       (
  1961.                          char huge *dest,             /* Destination array */
  1962.                          char huge *src                   /* Source string */
  1963.                       ) ;
  1964.  
  1965.  
  1966.  
  1967.  
  1968.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  1969.  
  1970.  
  1971.        ----------------------------------------------------------------------
  1972.        CHAPTER 9 : EasyVision's string functions                  Page 35/111
  1973.        ----------------------------------------------------------------------
  1974.  
  1975.              Remarks  The only difference from 'strcpy' is that this function
  1976.                       offers the convenience of accepting 'huge' pointers  as
  1977.                       arguments.
  1978.  
  1979.               Return  A 'huge' pointer to the destination string.
  1980.  
  1981.              Example
  1982.                       char huge *string ;
  1983.                       string = heapalloc (20) ;
  1984.                       str_cpy (string,"Hello there !") ;
  1985.  
  1986.  
  1987.        STR_CMP
  1988.        ----------------------------------------------------------------------
  1989.  
  1990.              Summary  This is a 'huge' version of 'strcmp '.  It compares one
  1991.                       string to another.
  1992.  
  1993.               Syntax  #include "strfcts.h"
  1994.  
  1995.                       int far str_cmp    /* Compares one string to another */
  1996.                       (
  1997.                          char huge *string1,               /* First string */
  1998.                          char huge *string2               /* Second string */
  1999.                       ) ;
  2000.  
  2001.              Remarks  The only difference from 'strcmp' is that this function
  2002.                       offers the convenience of accepting 'huge' pointers  as
  2003.                       arguments.
  2004.  
  2005.               Return  {str_cmp} returns a value that is :
  2006.  
  2007.                       < 0, if <string1> is less than <string2>
  2008.                       = 0, if <string1> is the same as <string2>
  2009.                       > 0, if <string1> is greater than <string2>
  2010.  
  2011.              Example
  2012.                       if (str_cmp (name[i],name[i+1]) > 0)
  2013.                       {
  2014.                          /* Invert string (bubble sort) */
  2015.                       }
  2016.  
  2017.  
  2018.        STR_ICMP
  2019.        ----------------------------------------------------------------------
  2020.  
  2021.              Summary  This is a 'huge' version of 'stricmp'.  It compares one
  2022.                       string to another, without case sensitivity.
  2023.  
  2024.  
  2025.  
  2026.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  2027.  
  2028.  
  2029.        ----------------------------------------------------------------------
  2030.        CHAPTER 9 : EasyVision's string functions                  Page 36/111
  2031.        ----------------------------------------------------------------------
  2032.  
  2033.               Syntax  #include "strfcts.h"
  2034.  
  2035.                       int far str_icmp        /* Case insensitive compares */
  2036.                       (
  2037.                          char huge *string1,               /* First string */
  2038.                          char huge *string2               /* Second string */
  2039.                       ) ;
  2040.  
  2041.  
  2042.              Remarks  The  only  difference  from  'stricmp'  is  that   this
  2043.                       function offers  the  convenience of  accepting  'huge'
  2044.                       pointers as arguments.
  2045.  
  2046.               Return  {str_icmp} returns a value that is :
  2047.  
  2048.                       < 0, if <string1> is less than <string2>
  2049.                       = 0, if <string1> is the same as <string2>
  2050.                       > 0, if <string1> is greater than <string2>
  2051.  
  2052.              Example
  2053.                       if (str_icmp (name[i],name[i+1]) > 0)
  2054.                       {
  2055.                          /* Invert string (bubble sort) */
  2056.                       }
  2057.  
  2058.  
  2059.        STR_TOUPPER
  2060.        ----------------------------------------------------------------------
  2061.  
  2062.              Summary  This function transposes a string to uppercase.
  2063.  
  2064.               Syntax  #include "strfcts.h"
  2065.  
  2066.                       void far str_toupper    /* Sets string to upper case */
  2067.                       (
  2068.                          char huge *string         /* Huge ptr to a string */
  2069.                       ) ;
  2070.  
  2071.              Remarks  None.
  2072.  
  2073.               Return  None.
  2074.  
  2075.              Example
  2076.                       str_toupper (name) ;
  2077.  
  2078.  
  2079.  
  2080.  
  2081.  
  2082.  
  2083.  
  2084.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  2085.  
  2086.  
  2087.        ----------------------------------------------------------------------
  2088.        CHAPTER 9 : EasyVision's string functions                  Page 37/111
  2089.        ----------------------------------------------------------------------
  2090.  
  2091.        STR_TOLOWER
  2092.        ----------------------------------------------------------------------
  2093.  
  2094.              Summary  This function transposes a string to lowercase.
  2095.  
  2096.               Syntax  #include "strfcts.h"
  2097.  
  2098.                       void far str_tolower    /* Sets string to lower case */
  2099.                       (
  2100.                          char huge *string         /* Huge ptr to a string */
  2101.                       ) ;
  2102.  
  2103.              Remarks  None.
  2104.  
  2105.               Return  None.
  2106.  
  2107.              Example
  2108.                       str_tolower (name) ;
  2109.  
  2110.  
  2111.        STR_PASTOC
  2112.        ----------------------------------------------------------------------
  2113.  
  2114.              Summary  This function translates a string from PASCAL's to  C's
  2115.                       internal format.
  2116.  
  2117.               Syntax  #include "strfcts.h"
  2118.  
  2119.                       void far str_pastoc        /* Converts a string to c */
  2120.                       (
  2121.                          char huge *string                /* Ptr to string */
  2122.                       ) ;
  2123.  
  2124.              Remarks  All characters in  the string  will be  shifted left  1
  2125.                       space and a  '\0' will be  appended at the  end of  the
  2126.                       string.
  2127.  
  2128.                       This is  useful is  you're reading  records written  in
  2129.                       PASCAL format.
  2130.  
  2131.               Return  None.
  2132.  
  2133.              Example
  2134.                       str_pastoc (name) ;
  2135.  
  2136.  
  2137.  
  2138.  
  2139.  
  2140.  
  2141.  
  2142.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  2143.  
  2144.  
  2145.        ----------------------------------------------------------------------
  2146.        CHAPTER 9 : EasyVision's string functions                  Page 38/111
  2147.        ----------------------------------------------------------------------
  2148.  
  2149.        STR_CTOPAS
  2150.        ----------------------------------------------------------------------
  2151.  
  2152.              Summary  This function translates a string from C's to  PASCAL's
  2153.                       internal format.
  2154.  
  2155.               Syntax  #include "strfcts.h"
  2156.  
  2157.                       void far str_ctopas   /* Converts a string to pascal */
  2158.                       (
  2159.                          char huge *string                /* Ptr to string */
  2160.                       ) ;
  2161.  
  2162.              Remarks  All characters in  the string will  be shifted right  1
  2163.                       space, overwriting the terminating '\0'.  The length of
  2164.                       the string will then  be put in the  first byte of  the
  2165.                       array.
  2166.  
  2167.                  -->  The string MUST be 255 or fewer characters long.
  2168.  
  2169.                       This is  useful is  you're reading  records written  in
  2170.                       PASCAL'S   format,   converted   them   to   C'S   with
  2171.                       {str_pastoc},  then  reconverting  to  PASCAL's  before
  2172.                       writing to disk.
  2173.  
  2174.               Return  None.
  2175.  
  2176.              Example
  2177.                       str_ctopas (name) ;
  2178.  
  2179.  
  2180.        STR_TRIM
  2181.        ----------------------------------------------------------------------
  2182.  
  2183.              Summary  This function removes leading and trailing spaces  from
  2184.                       a string.
  2185.  
  2186.               Syntax  #include "strfcts.h"
  2187.  
  2188.                       void far str_trim               /* Normalises string */
  2189.                       (
  2190.                          char huge *string                /* Ptr to string */
  2191.                       ) ;
  2192.  
  2193.              Remarks  Useful when normalising an input.
  2194.  
  2195.               Return  None.
  2196.  
  2197.  
  2198.  
  2199.  
  2200.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  2201.  
  2202.  
  2203.        ----------------------------------------------------------------------
  2204.        CHAPTER 9 : EasyVision's string functions                  Page 39/111
  2205.        ----------------------------------------------------------------------
  2206.  
  2207.              Example
  2208.                       str_trim (name) ;
  2209.  
  2210.  
  2211.        STR_INVNAMES
  2212.        ----------------------------------------------------------------------
  2213.  
  2214.              Summary  This function inverts  first and last  names in a  name
  2215.                       string.
  2216.  
  2217.               Syntax  #include "strfcts.h"
  2218.  
  2219.                       void far str_invnames              /* Inverts string */
  2220.                       (
  2221.                          char huge *string                /* Ptr to string */
  2222.                       ) ;
  2223.  
  2224.              Remarks  A name  string is  composed of  1 or  more clusters  of
  2225.                       characters.  Clusters are  packets separated from  each
  2226.                       other by 1 or more spaces.
  2227.  
  2228.                       {str_invnames} will take the first cluster and move  it
  2229.                       to the end of the string.
  2230.  
  2231.                       This could be  useful if you're  doing a  sort by  last
  2232.                       names then first  names, but your  name strings are  in
  2233.                       the form first then last.
  2234.  
  2235.               Return  None.
  2236.  
  2237.              Example
  2238.                       str_invnames (name) ;
  2239.                       "Remy"                becomes "Remy"
  2240.                       "Remy Gendron"        becomes "Gendron Remy"
  2241.                       "Remy J. Gendron"     becomes "J. Gendron Remy"
  2242.                       "This is some string" becomes "is some string This"
  2243.  
  2244.  
  2245.        STR_CENTER
  2246.        ----------------------------------------------------------------------
  2247.  
  2248.              Summary  This function centers a string within a given area.
  2249.  
  2250.  
  2251.  
  2252.  
  2253.  
  2254.  
  2255.  
  2256.  
  2257.  
  2258.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  2259.  
  2260.  
  2261.        ----------------------------------------------------------------------
  2262.        CHAPTER 9 : EasyVision's string functions                  Page 40/111
  2263.        ----------------------------------------------------------------------
  2264.  
  2265.               Syntax  #include "strfcts.h"
  2266.  
  2267.                       char huge * far str_center       /* Centers a string */
  2268.                       (
  2269.                          char huge *string,               /* Ptr to string */
  2270.                          int       area_length           /* Length of area */
  2271.                       ) ;
  2272.  
  2273.              Remarks  The original <string> is not modified.  The new  string
  2274.                       will  be  padded  with  blanks,  if  necessary,  to  be
  2275.                       centered in <area_length>.
  2276.  
  2277.                       The function will discard the  part of the string  that
  2278.                       is longer than 255 characters.
  2279.  
  2280.               Return  This function will  create a new  string, and return  a
  2281.                       ptr to a static string defined in the string module.
  2282.  
  2283.                  -->  You MUST not try to free this string.
  2284.  
  2285.              Example
  2286.                       printf (str_center ("Center of the screen",80)) ;
  2287.  
  2288.  
  2289.  
  2290.  
  2291.  
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298.  
  2299.  
  2300.  
  2301.  
  2302.  
  2303.  
  2304.  
  2305.  
  2306.  
  2307.  
  2308.  
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314.  
  2315.  
  2316.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  2317.  
  2318.  
  2319.        ----------------------------------------------------------------------
  2320.        CHAPTER 10 : EasyVision's time functions                   Page 41/111
  2321.        ----------------------------------------------------------------------
  2322.  
  2323.        ----------------------------------------------------------------------
  2324.        ----------------------------------------------------------------------
  2325.        C H A P T E R   10 : EasyVision's time functions
  2326.        ----------------------------------------------------------------------
  2327.  
  2328.                       The declarations  for EasyVision's  time functions  are
  2329.                       contained in the "TIMEFCTS.H" header file.
  2330.  
  2331.  
  2332.        TICKTIMER_INSTALL
  2333.        ----------------------------------------------------------------------
  2334.  
  2335.              Summary  This function installs or removes a tick counter.
  2336.  
  2337.               Syntax  #include "timefcts.h"
  2338.  
  2339.                       void far ticktimer_install (void) ;/* Installs timer */
  2340.  
  2341.              Remarks  Ticks are PC's clock units.  They are 1/18 second long.
  2342.                       The ticktimer routines  will allow you  to count  those
  2343.                       ticks.
  2344.  
  2345.                       The first call to  {ticktimer_install} will install  an
  2346.                       interrupt, whose purpose is to  count ticks.  A  second
  2347.                       call  to  the   {ticktimer_install}  will  remove   the
  2348.                       interrupt.
  2349.  
  2350.               Return  None.
  2351.  
  2352.              Example
  2353.                       ticktimer_install () ;
  2354.  
  2355.  
  2356.        TICKTIMER_RESET
  2357.        ----------------------------------------------------------------------
  2358.  
  2359.              Summary  This function resets the tick count to zero.
  2360.  
  2361.               Syntax  #include "timefcts.h"
  2362.  
  2363.                       void far ticktimer_reset (void) ;  /* Resets counter */
  2364.  
  2365.              Remarks  After installation of the interrupt, the tick count  is
  2366.                       undefined.  You must reset  the count before using  the
  2367.                       {ticktimer_read} function.   Also,  you can  reset  the
  2368.                       count to zero anytime you like.
  2369.  
  2370.  
  2371.  
  2372.  
  2373.  
  2374.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  2375.  
  2376.  
  2377.        ----------------------------------------------------------------------
  2378.        CHAPTER 10 : EasyVision's time functions                   Page 42/111
  2379.        ----------------------------------------------------------------------
  2380.  
  2381.                  -->  Using this function will introduce a random delay of up
  2382.                       to 1/18  second.    The  function  will  wait  for  the
  2383.                       beginning of the next tick before returning.  This will
  2384.                       warranty that tick #1 will really be 1 tick long.
  2385.  
  2386.               Return  None.
  2387.  
  2388.              Example
  2389.                       ticktimer_reset () ;
  2390.  
  2391.  
  2392.        TICKTIMER_READ
  2393.        ----------------------------------------------------------------------
  2394.  
  2395.              Summary  This function returns the current tick count.
  2396.  
  2397.               Syntax  #include "timefcts.h"
  2398.  
  2399.                       dword far ticktimer_read (void) ;   /* Returns count */
  2400.  
  2401.              Remarks  After installation of the interrupt, the tick count  is
  2402.                       undefined.  You must reset  the count before using  the
  2403.                       {ticktimer_read} function.   Using  this function  does
  2404.                       not reset the counter.
  2405.  
  2406.               Return  The number of  ticks since  {ticktimer_reset} was  last
  2407.                       used.  {ticktimer_read} returns a {dword}.  {dword}  is
  2408.                       defined in "STDTYPE.H" as an 'unsigned long int'.
  2409.  
  2410.              Example
  2411.                       dword count ;
  2412.                       ticktimer_install () ;             /* Installs timer */
  2413.                       ticktimer_reset () ;            /* Resets timer to 0 */
  2414.                       function (argument) ;         /* Calls your function */
  2415.                       count = ticktimer_read () ;       /* Gets tick count */
  2416.                       ticktimer_install () ;          /* De-installs timer */
  2417.  
  2418.  
  2419.        DIFFDATE
  2420.        ----------------------------------------------------------------------
  2421.  
  2422.              Summary  Calculates absolute number of days between two dates.
  2423.  
  2424.  
  2425.  
  2426.  
  2427.  
  2428.  
  2429.  
  2430.  
  2431.  
  2432.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  2433.  
  2434.  
  2435.        ----------------------------------------------------------------------
  2436.        CHAPTER 10 : EasyVision's time functions                   Page 43/111
  2437.        ----------------------------------------------------------------------
  2438.  
  2439.               Syntax  #include "timefcts.h"
  2440.  
  2441.                       dword far diffdate   /* Number of days between dates */
  2442.                       (
  2443.                          int day1,                /* 1st date: day  (1-31) */
  2444.                          int month1,             /* 1st date: month (1-12) */
  2445.                          int year1,               /* 1st date: year (xxxx) */
  2446.                          int day2,                /* 2nd date: day  (1-31) */
  2447.                          int month2,             /* 2nd date: month (1-12) */
  2448.                          int year2                /* 2nd date: year (xxxx) */
  2449.                       ) ;
  2450.  
  2451.              Remarks  day1/day2     : Days of date 1 and 2. (1-31)
  2452.                       month1/month2 : Months of date 1 and 2. (1-12)
  2453.                       year1/year2   : Years of date 1 and 2. (1583 and after)
  2454.  
  2455.               Return  The absolute  number  of  days  between  the  2  dates.
  2456.                       {diffdate} returns a  {dword}.  {dword}  is defined  in
  2457.                       "STDTYPE.H" as an 'unsigned long int'.
  2458.  
  2459.              Example
  2460.                       dword count ;
  2461.                       count = diffdate (userday, usermonth, useryear,
  2462.                                         todayday, todaymonth, todayyear) ;
  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.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  2491.  
  2492.  
  2493.        ----------------------------------------------------------------------
  2494.        CHAPTER 11 : EasyVision's miscellaneous functions          Page 44/111
  2495.        ----------------------------------------------------------------------
  2496.  
  2497.        ----------------------------------------------------------------------
  2498.        ----------------------------------------------------------------------
  2499.        C H A P T E R   11 : EasyVision's miscellaneous functions
  2500.        ----------------------------------------------------------------------
  2501.  
  2502.                       The   declarations   for   EasyVision's   miscellaneous
  2503.                       functions are  contained  in  the  "MISCFCTS.H"  header
  2504.                       file.
  2505.  
  2506.  
  2507.        ANSICOLOR
  2508.        ----------------------------------------------------------------------
  2509.  
  2510.              Summary  Converts normal background  and foreground color  codes
  2511.                       to color codes for ANSI escape sequences.
  2512.  
  2513.               Syntax  #include "miscfcts.h"
  2514.  
  2515.                       void far ansicolor   /* Converts color codes to ANSI */
  2516.                       (
  2517.                          int      fore,            /* Fore and back colors */
  2518.                          int      back,
  2519.                          int huge *ansbold,                /* ESC sequence */
  2520.                          int huge *ansfore,
  2521.                          int huge *ansback
  2522.                       ) ;
  2523.  
  2524.              Remarks  fore, back : Standard screen colors.
  2525.                       *ansbold   : Ptr to int to return bold value.
  2526.                       *ansfore   : Ptr to int to return fore value.
  2527.                       *ansback   : Ptr to int to return back value.
  2528.  
  2529.                       To interpret ANSI escape sequences, the ANSI.SYS driver
  2530.                       (or its equivalent) must be loaded.
  2531.  
  2532.               Return  None.
  2533.  
  2534.              Example
  2535.                       int bold, fore, back ;
  2536.                       ansicolor (LIGHTGREEN,BLACK,&bold,&fore,&back) ;
  2537.                       printf ("\x1b[%d;%d;%dm",bold,fore,back) ;
  2538.  
  2539.  
  2540.  
  2541.  
  2542.  
  2543.  
  2544.  
  2545.  
  2546.  
  2547.  
  2548.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  2549.  
  2550.  
  2551.        ----------------------------------------------------------------------
  2552.        CHAPTER 11 : Using EasyVision's classes                    Page 45/111
  2553.        ----------------------------------------------------------------------
  2554.  
  2555.        ----------------------------------------------------------------------
  2556.        ----------------------------------------------------------------------
  2557.        C H A P T E R   11 : Using EasyVision's classes
  2558.        ----------------------------------------------------------------------
  2559.  
  2560.                       The EasyVision library has five classes .  They provide
  2561.                       a desktop,  a  statusline,  a  menubar,  windows,  user
  2562.                       inputs and  mouse support.    Those classes  are  fully
  2563.                       described in the following pages.
  2564.  
  2565.                  -->  All classes interact  with one another.   Don't try  to
  2566.                       use only one of them.  You must work with EasyVision as
  2567.                       it was meant to be used.
  2568.  
  2569.                       Every method is  declared as 'far'  and when they  take
  2570.                       pointers as  parameters,  those pointers  are  of  type
  2571.                       'huge'.
  2572.  
  2573.                       Conventions have been adopted  for the methods'  names.
  2574.                       Related methods will  have the same  name prefix.   For
  2575.                       example, all window related functions begin by {win_}.
  2576.  
  2577.                  -->  Methods declarations can use types like {bool}, {byte},
  2578.                       {word} and {dword}.   See  the file  "STDTYPE.H" for  a
  2579.                       description of those types.
  2580.  
  2581.                  -->  Parameters to C++  functions can  have default  values.
  2582.                       If you don't supply a value, the default value will  be
  2583.                       used.  However,  rules apply to  this usage of  default
  2584.                       parameters.  Refer  to your C++  documentations for  an
  2585.                       explanation of those rules.
  2586.  
  2587.                       A classe's description uses the following format:
  2588.  
  2589.                       First,  the  description  of  the  class  itself,   its
  2590.                       behavior, how it  is related to  the other classes  and
  2591.                       the interface.  Then, each member function of the class
  2592.                       is presented as in the following:
  2593.  
  2594.              Summary  Short description of this function's behavior.
  2595.  
  2596.               Syntax  #include "header.h"
  2597.  
  2598.                       ReturnType FunctionName
  2599.                       (
  2600.                          <param>,
  2601.                          <param>
  2602.                       ) ;
  2603.  
  2604.  
  2605.  
  2606.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  2607.  
  2608.  
  2609.        ----------------------------------------------------------------------
  2610.        CHAPTER 11 : Using EasyVision's classes                    Page 46/111
  2611.        ----------------------------------------------------------------------
  2612.  
  2613.                  -->  YOU  MUST  NEVER  WRITE  YOURSELF  A  PROTOTYPE  FOR  A
  2614.                       FUNCTION.  ALWAYS  USE THE PROPER  HEADER FILES.   THEY
  2615.                       HAVE ADDITIONAL INFORMATION IN THEM!
  2616.  
  2617.                  -->  C++ functions' header  provide for optional  arguments.
  2618.                       IF YOU  WANT  TO  INCLUDE AN  OPTIONAL  PARAMETER,  ALL
  2619.                       PARAMETERS BEFORE THAT  ONE MUST BE  INCLUDED AS  WELL.
  2620.                       Refer to your compiler's documentation.
  2621.  
  2622.              Remarks  Parameters and usage are described here when needed.
  2623.  
  2624.               Return  The returned value of the method is explained here.
  2625.  
  2626.              Example  Examples of various calls to this method.
  2627.  
  2628.                       Using classes is quite easy!
  2629.  
  2630.              Windows  For the {twindow} class,  you firsts declare a  pointer
  2631.                       to this class.  Then you instantiate (create) an object
  2632.                       of this type with the operator 'new'.  Now you can call
  2633.                       the classe's member functions  with the '->'  operator.
  2634.                       When you're finished, you free the memory taken by this
  2635.                       class instance with 'delete'.
  2636.  
  2637.           The others  For  the  other  classes,  {tdesktop},   {tstatusline},
  2638.                       {tmenubar} and {tinput}, you can only have one instance
  2639.                       of each.    To  make it  easier,  they  all  have  been
  2640.                       instantiated.  You don't need to create them.  You just
  2641.                       use them right away.  You access their member functions
  2642.                       with the '.' operator.
  2643.  
  2644.                       Many examples are available in the source codes of  the
  2645.                       EasyVision's demo programs.
  2646.  
  2647.  
  2648.  
  2649.  
  2650.  
  2651.  
  2652.  
  2653.  
  2654.  
  2655.  
  2656.  
  2657.  
  2658.  
  2659.  
  2660.  
  2661.  
  2662.  
  2663.  
  2664.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  2665.  
  2666.  
  2667.        ----------------------------------------------------------------------
  2668.        CHAPTER 12 : EasyVision's tdesktop class                   Page 47/111
  2669.        ----------------------------------------------------------------------
  2670.  
  2671.        ----------------------------------------------------------------------
  2672.        ----------------------------------------------------------------------
  2673.        C H A P T E R   12 : EasyVision's tdesktop class
  2674.        ----------------------------------------------------------------------
  2675.  
  2676.                       The {tdesktop} class is the first one  to be used in a
  2677.                       program that uses the EasyVision user interface.   This
  2678.                       class is responsible  for the background  on which  the
  2679.                       statusline, the menubar and windows will be displayed.
  2680.  
  2681.                       This class  will save  the  screen content  before  the
  2682.                       program was executed,  initialise the  video screen  to
  2683.                       the video mode of your choice, and display the desktop.
  2684.                       You will  also  call this  class  at the  end  of  your
  2685.                       program to restore the previous video mode, restore the
  2686.                       previous screen  and reset  default colors  and  cursor
  2687.                       position.
  2688.  
  2689.                  -->  An instance has already  been globally declared and  is
  2690.                       called desktop.  Only one instance of {tdesktop} can be
  2691.                       used in a program.  As a result, you will never declare
  2692.                       and create another instance.
  2693.  
  2694.                  -->  The  desktop  allows  your   programs  to  use   bright
  2695.                       background colors.
  2696.  
  2697.                       The desktop has built in default values.  Only one call
  2698.                       is required to do the work.  The desktop will  autosize
  2699.                       itself to the screen.   However, if  you would like  to
  2700.                       change those  default  behaviors, other  functions  are
  2701.                       provided to do so.
  2702.  
  2703.                       On the  following  pages, you  will  find each  of  its
  2704.                       member functions.
  2705.  
  2706.                       Examples of using the desktop  object are given in  the
  2707.                       source codes of the EasyVision's demo programs.
  2708.  
  2709.  
  2710.        TDESKTOP::SETTEXTMODE
  2711.        ----------------------------------------------------------------------
  2712.  
  2713.              Summary  Sets  the  textmode  in  which  {open}  will  draw  the
  2714.                       desktop.    Also  sets   the  availability  of   bright
  2715.                       background colors.
  2716.  
  2717.  
  2718.  
  2719.  
  2720.  
  2721.  
  2722.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  2723.  
  2724.  
  2725.        ----------------------------------------------------------------------
  2726.        CHAPTER 12 : EasyVision's tdesktop class                   Page 48/111
  2727.        ----------------------------------------------------------------------
  2728.  
  2729.               Syntax  #include "tdesktop.hpp"
  2730.  
  2731.                       void far tdesktop::settextmode         // Sets textmode
  2732.                       (
  2733.                          int  mode=C80,               // Textmode code number
  2734.                          bool brightbackground=FALSE  // True = bright colors
  2735.                       ) ;
  2736.  
  2737.              Remarks  This has no effect  on the current  textmode.  It  will
  2738.                       only take effect when {open} is  called.  This call  is
  2739.                       optional.  If it is not  made before a call to  {open},
  2740.                       textmode C80  (3,  color  80 columns)  is  assumed  and
  2741.                       bright background colors will not be used.
  2742.  
  2743.                       Symbolic       Value          Text mode
  2744.  
  2745.                       LASTMODE       -1             Previous text mode
  2746.                       BW40           0              Black and white, 40 cols
  2747.                       C40            1              Color, 40 columns
  2748.                       BW80           2              Black and white, 80 cols
  2749.                       C80            3              Color, 80 columns
  2750.                       MONO           7              Monochrome, 80 columns
  2751.                       C4350          64             EGA 43-line, VGA 50-line
  2752.  
  2753.                       To  use  the  symbolic  constants,  "CONIO.H"  must  be
  2754.                       included.
  2755.  
  2756.                  -->  By setting <brightbackground> to {TRUE}, you will  then
  2757.                       be able to use all 16 colors for the background.  As  a
  2758.                       drawback, blinking characters won't be available.
  2759.  
  2760.               Return  None.
  2761.  
  2762.              Example
  2763.                       desktop.settextmode (C4350,TRUE) ;
  2764.  
  2765.  
  2766.        TDESKTOP::GETSIZE
  2767.        ----------------------------------------------------------------------
  2768.  
  2769.              Summary  Returns desktop's current size.
  2770.  
  2771.               Syntax  #include "tdesktop.hpp"
  2772.  
  2773.                       void far tdesktop::getsize    // Returns desktop's size
  2774.                       (
  2775.                          int huge *height,     // Ptrs to ints to return size
  2776.                          int huge *width
  2777.                       ) ;
  2778.  
  2779.  
  2780.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  2781.  
  2782.  
  2783.        ----------------------------------------------------------------------
  2784.        CHAPTER 12 : EasyVision's tdesktop class                   Page 49/111
  2785.        ----------------------------------------------------------------------
  2786.  
  2787.              Remarks  The size returned in <height> and <width> is the ACTUAL
  2788.                       desktop's size.   If you  changed the  video mode  with
  2789.                       {settextmode}, but haven't called  {open} yet, the  new
  2790.                       size won't be returned.
  2791.  
  2792.                  -->  When other  parts  of your  program  need to  know  the
  2793.                       actual desktop's size , they should  use this  function
  2794.                       instead of 'gettextinfo'.
  2795.  
  2796.               Return  None.
  2797.  
  2798.              Example
  2799.                       int screenheight ;
  2800.                       int screenwidth ;
  2801.                       desktop.getsize (&screenheight,&screenwidth) ;
  2802.  
  2803.  
  2804.        TDESKTOP::SETDESKCOLORS
  2805.        ----------------------------------------------------------------------
  2806.  
  2807.              Summary  Sets the colors in which {open} or {refresh} will  draw
  2808.                       the desktop.  Also selects the clock's colors.
  2809.  
  2810.               Syntax  #include "tdesktop.hpp"
  2811.  
  2812.                       void far tdesktop::setdeskcolors    // Desktop's colors
  2813.                       (
  2814.                          int back=LIGHTGRAY,    // Desktop's background color
  2815.                          int fore=BLUE,         // Desktop's foreground color
  2816.                          int clockback=RED,                  // Clock's color
  2817.                          int clockfore=WHITE
  2818.                       ) ;
  2819.  
  2820.              Remarks  This has no effect on the current colors.  It will only
  2821.                       be used when {open} or {refresh} will be called.   This
  2822.                       call is  optional.   If {setdeskcolors}  is not  called
  2823.                       before a  call  to  {open}, 'BLUE'  on  'LIGHTGRAY'  is
  2824.                       assumed for the  desktop and 'WHITE'  on 'RED' for  the
  2825.                       clock.  See appendix B for a list of available  colors,
  2826.                       color codes and symbolic constants.
  2827.  
  2828.                  -->  The desktop displays an  interrupt driven clock in  the
  2829.                       upper right corner.
  2830.  
  2831.               Return  None.
  2832.  
  2833.              Example
  2834.                       desktop.setdeskcolors (BLACK,LIGHTGRAY,BLUE,WHITE) ;
  2835.  
  2836.  
  2837.  
  2838.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  2839.  
  2840.  
  2841.        ----------------------------------------------------------------------
  2842.        CHAPTER 12 : EasyVision's tdesktop class                   Page 50/111
  2843.        ----------------------------------------------------------------------
  2844.  
  2845.        TDESKTOP::SETTEXTURE
  2846.        ----------------------------------------------------------------------
  2847.  
  2848.              Summary  Sets the character with which {open} or {refresh}  will
  2849.                       draw the desktop.
  2850.  
  2851.               Syntax  #include "tdesktop.hpp"
  2852.  
  2853.                       void far tdesktop::settexture  // Set's desktop texture
  2854.                       (
  2855.                          char asciicode=#176             // ASCII code to use
  2856.                       ) ;
  2857.  
  2858.              Remarks  You  must  provide  the  character  used  to  draw  the
  2859.                       desktop, in the  form of its  ASCII code.   Only  ASCII
  2860.                       codes greater or equal to 32 are accepted.  This has no
  2861.                       effect on the  current screen.   It will  only be  used
  2862.                       when {open} or {refresh} will be called.  This call  is
  2863.                       optional.  If {settexture} is not called before a  call
  2864.                       to {open}, ASCII code 176 is assumed.
  2865.  
  2866.               Return  None.
  2867.  
  2868.              Example
  2869.                       desktop.settexture (' ') ;             // Plain desktop
  2870.  
  2871.  
  2872.        TDESKTOP::SETTITLE
  2873.        ----------------------------------------------------------------------
  2874.  
  2875.              Summary  Sets the title, and title colors displayed at the very
  2876.                       top line of the desktop.
  2877.  
  2878.               Syntax  #include "tdesktop.hpp"
  2879.  
  2880.                       void far tdesktop::settitle     // Sets desktop's title
  2881.                       (
  2882.                          char huge *text=NULL,             // Desktop's title
  2883.                          int  back=EV_DEF,        // Title's background color
  2884.                          int  fore=EV_DEF         // Title's foreground color
  2885.                       ) ;
  2886.  
  2887.              Remarks  The title's  colors  are optional.    If they  are  not
  2888.                       provided, the desktop's colors will  be used.  This  is
  2889.                       used only if you do not intend to have a menubar, or if
  2890.                       you will have something displayed before the menubar is
  2891.                       created.  This  has no effect  on the current  desktop.
  2892.                       It will only be used when  {open} or {refresh} will  be
  2893.                       called.
  2894.  
  2895.  
  2896.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  2897.  
  2898.  
  2899.        ----------------------------------------------------------------------
  2900.        CHAPTER 12 : EasyVision's tdesktop class                   Page 51/111
  2901.        ----------------------------------------------------------------------
  2902.  
  2903.                       This call is  optional.   If {settitle}  is not  called
  2904.                       before a call  to {open}, no  title will be  displayed.
  2905.                       To reset  a previously  defined  title, don't  use  any
  2906.                       argument.  You can give a <text> pointer argument  that
  2907.                       points to a text  of any length, but  only the part  of
  2908.                       the title  that  will  fit  on  the  titlebar  will  be
  2909.                       displayed.  So  don't worry  about the  length of  your
  2910.                       title...
  2911.  
  2912.               Return  None.
  2913.  
  2914.              Example
  2915.                       desktop.settitle ("EasyVision 2.0",RED,BLACK) ;
  2916.  
  2917.  
  2918.        TDESKTOP::OPEN
  2919.        ----------------------------------------------------------------------
  2920.  
  2921.              Summary  Opens the desktop.
  2922.  
  2923.               Syntax  #include "tdesktop.hpp"
  2924.  
  2925.                       void far tdesktop::open () ;           // Opens desktop
  2926.  
  2927.              Remarks  This will  save  the  screen  before  the  program  was
  2928.                       started, initialise the video  screen and then  display
  2929.                       the desktop according to  the default values, or  those
  2930.                       set by  the  previous  functions.   This  call  is  NOT
  2931.                       optional.
  2932.  
  2933.                  -->  You cannot reopen an already opened desktop.  You  must
  2934.                       use the {refresh}  function for that  action, or  first
  2935.                       close it.
  2936.  
  2937.                       If the  desktop as  been closed,  it  can then  be  re-
  2938.                       opened.  This could be done for instance if you were to
  2939.                       shell to DOS or to another program.
  2940.  
  2941.               Return  None.
  2942.  
  2943.              Example
  2944.                       desktop.open () ;
  2945.  
  2946.  
  2947.        TDESKTOP::CLOSE
  2948.        ----------------------------------------------------------------------
  2949.  
  2950.              Summary  Closes the desktop.
  2951.  
  2952.  
  2953.  
  2954.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  2955.  
  2956.  
  2957.        ----------------------------------------------------------------------
  2958.        CHAPTER 12 : EasyVision's tdesktop class                   Page 52/111
  2959.        ----------------------------------------------------------------------
  2960.  
  2961.               Syntax  #include "tdesktop.hpp"
  2962.  
  2963.                       void far tdesktop::close () ;        // Restores screen
  2964.  
  2965.              Remarks  This will restore the video screen as it was before the
  2966.                       desktop was opened.   This call is  NOT optional.   You
  2967.                       must first {close}  the desktop with  this function  if
  2968.                       you want to re-open it.
  2969.  
  2970.                  -->  {close} does  not reset  any of  the desktop  settings.
  2971.                       You can  easily re-open  it after  a shell  to DOS  for
  2972.                       example.
  2973.  
  2974.               Return  None.
  2975.  
  2976.              Example
  2977.                       desktop.close () ;
  2978.  
  2979.  
  2980.        TDESKTOP::REFRESH
  2981.        ----------------------------------------------------------------------
  2982.  
  2983.              Summary  The desktop has a  {refresh} function that will  redraw
  2984.                       the screen.  Using this function can be DANGEROUS...
  2985.  
  2986.               Syntax  #include "tdesktop.hpp"
  2987.  
  2988.                       void far tdesktop::refresh () ;      // Redraws desktop
  2989.  
  2990.              Remarks  The refresh function  will use the  current values  for
  2991.                       colors, texture, etc...   not  the values  when it  was
  2992.                       opened.  This  means that  you can  change the  desktop
  2993.                       colors for instance, and then {refresh} it.
  2994.  
  2995.                  -->  IN EASYVISION, WINDOWS CANNOT  BE REFRESHED.  YOU  MUST
  2996.                       MAKE ABSOLUTELY CERTAIN THAT  THIS FUNCTION IS NOT  AND
  2997.                       CANNOT BE CALLED WHEN WINDOWS  ARE OPENED, OR YOU  WILL
  2998.                       BE IN BIG TROUBLE.
  2999.  
  3000.               Return  None.
  3001.  
  3002.              Example
  3003.                       desktop.refresh () ;
  3004.  
  3005.  
  3006.  
  3007.  
  3008.  
  3009.  
  3010.  
  3011.  
  3012.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  3013.  
  3014.  
  3015.        ----------------------------------------------------------------------
  3016.        CHAPTER 13 : EasyVision's tstatusline class                Page 53/111
  3017.        ----------------------------------------------------------------------
  3018.  
  3019.        ----------------------------------------------------------------------
  3020.        ----------------------------------------------------------------------
  3021.        C H A P T E R   13 : EasyVision's tstatusline class
  3022.        ----------------------------------------------------------------------
  3023.  
  3024.                       The {tstatusline} class allows your  program to easily
  3025.                       display information on the last line of the screen.
  3026.  
  3027.                  -->  An instance has already  been globally declared and  is
  3028.                       called statusline.  Only one instance of {tstatusline}
  3029.                       can be used in a program.  As a result, you will  never
  3030.                       declare and create another instance.
  3031.  
  3032.                       The statusline has built in  default values.  Only  one
  3033.                       call is required to do the  work.  The statusline  will
  3034.                       autosize itself to the screen.   However, if you  would
  3035.                       like to change those default behaviors, other functions
  3036.                       are provided to do so.
  3037.  
  3038.                       You can  manually use  the  statusline by  calling  its
  3039.                       {display} member function.   Most of the time  however,
  3040.                       you  won't.    Each  time  you  create  an  object   in
  3041.                       EasyVision, let it be  a window, a  button or an  input
  3042.                       field, you assign a short text to it.  When this object
  3043.                       is selected, this text will be automatically  displayed
  3044.                       on the statusline.
  3045.  
  3046.                       On the  following  pages, you  will  find each  of  its
  3047.                       member functions.
  3048.  
  3049.                       Examples of using  the statusline object  are given  in
  3050.                       the source codes of the EasyVision's demo programs.
  3051.  
  3052.  
  3053.        TSTATUSLINE::SETCOLORS
  3054.        ----------------------------------------------------------------------
  3055.  
  3056.              Summary  Sets the  background, foreground  and highlight  colors
  3057.                       used by the {display} member function, when writing  to
  3058.                       the statusline.
  3059.  
  3060.               Syntax  #include "tstatusline.hpp"
  3061.  
  3062.                       void far tstatusline::setcolors          // Sets colors
  3063.                       (
  3064.                          int back=LIGHTGRAY,              // Background color
  3065.                          int fore=BLACK,                  // Foreground color
  3066.                          int high=RED                      // Highlight color
  3067.                       ) ;
  3068.  
  3069.  
  3070.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  3071.  
  3072.  
  3073.        ----------------------------------------------------------------------
  3074.        CHAPTER 13 : EasyVision's tstatusline class                Page 54/111
  3075.        ----------------------------------------------------------------------
  3076.  
  3077.              Remarks  All arguments are optional.  If they are not  provided,
  3078.                       <back> defaults to 'LIGHTGRAY',  <fore> to 'BLACK'  and
  3079.                       <high> to 'RED'.  You can use color macros if "CONIO.H"
  3080.                       is  included.    Appendix  B  gives  a  description  of
  3081.                       available color codes and macros.
  3082.  
  3083.                       The statusline  is  not  modified by  a  call  to  this
  3084.                       function.  The changes  to the colors  will be made  at
  3085.                       the next call to {display}.
  3086.  
  3087.               Return  None.
  3088.  
  3089.              Example
  3090.                       statusline.setcolors (RED,BLACK,YELLOW) ;
  3091.  
  3092.  
  3093.        TSTATUSLINE::DISPLAY
  3094.        ----------------------------------------------------------------------
  3095.  
  3096.              Summary  Displays a message on the statusline.
  3097.  
  3098.               Syntax  #include "tstatusline.hpp"
  3099.  
  3100.                       void far tstatusline::display       // Displays message
  3101.                       (
  3102.                          char huge *text=NULL         // Text to be displayed
  3103.                       ) ;
  3104.  
  3105.              Remarks  The <text>  argument  can point  to  a message  of  any
  3106.                       length, including the '~' characters.  The message will
  3107.                       be truncated to fit on  the message area, which  length
  3108.                       is 68  characters.   There  is  no need  to  clear  the
  3109.                       statusline before using this function.  You can  toggle
  3110.                       between normal  foreground  statusline  color  and  the
  3111.                       highlight color with the special character '~' (tilde).
  3112.                       To clear  the statusline,  call this  function with  no
  3113.                       argument.
  3114.  
  3115.               Return  None.
  3116.  
  3117.              Example
  3118.                       statusline.display ("Welcome to ~EasyVision~") ;
  3119.                       statusline.display () ;            // Clears statusline
  3120.  
  3121.  
  3122.        TSTATUSLINE::GETMSG
  3123.        ----------------------------------------------------------------------
  3124.  
  3125.              Summary  Returns last displayed message.
  3126.  
  3127.  
  3128.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  3129.  
  3130.  
  3131.        ----------------------------------------------------------------------
  3132.        CHAPTER 13 : EasyVision's tstatusline class                Page 55/111
  3133.        ----------------------------------------------------------------------
  3134.  
  3135.               Syntax  #include "tstatusline.hpp"
  3136.  
  3137.                       char huge* far tstatusline::getmsg () ; // Last message
  3138.  
  3139.              Remarks  Lets say  you  have a  function  that will  modify  the
  3140.                       statusline.  You could save its current content  before
  3141.                       modifying it, then restore it at the function's end.
  3142.  
  3143.               Return  None.
  3144.  
  3145.              Example
  3146.                       char lastmsg ;
  3147.                       lastmsg = statusline.getmsg () ;
  3148.  
  3149.  
  3150.        TSTATUSLINE::REFRESH
  3151.        ----------------------------------------------------------------------
  3152.  
  3153.              Summary  The statusline  object has  a {refresh}  function  that
  3154.                       will redraw it on the screen.
  3155.  
  3156.               Syntax  #include "tstatusline.hpp"
  3157.  
  3158.                       void far tstatusline::refresh () ;           // Redraws
  3159.  
  3160.              Remarks  {refresh} will redisplay the last message.
  3161.  
  3162.                  -->  The refresh function will use the current color values.
  3163.                       This means that you can change the statusline's  colors
  3164.                       and then, {refresh} it with the new colors.
  3165.  
  3166.               Return  None.
  3167.  
  3168.              Example
  3169.                       statusline.refresh () ;
  3170.  
  3171.  
  3172.  
  3173.  
  3174.  
  3175.  
  3176.  
  3177.  
  3178.  
  3179.  
  3180.  
  3181.  
  3182.  
  3183.  
  3184.  
  3185.  
  3186.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  3187.  
  3188.  
  3189.        ----------------------------------------------------------------------
  3190.        CHAPTER 14 : EasyVision's tinput class                     Page 56/111
  3191.        ----------------------------------------------------------------------
  3192.  
  3193.        ----------------------------------------------------------------------
  3194.        ----------------------------------------------------------------------
  3195.        C H A P T E R   14 : EasyVision's tinput class
  3196.        ----------------------------------------------------------------------
  3197.  
  3198.                       The  {tinput}  class  is  designed  to  process  input
  3199.                       information.  It provides mouse support and gives  your
  3200.                       programs context sensitive help.
  3201.  
  3202.                  -->  An instance has already  been globally declared and  is
  3203.                       called input.  Only  one instance  of {tinput}  can be
  3204.                       used in a program.  As a result, you will never declare
  3205.                       and create another instance.
  3206.  
  3207.                       The  {tinput}  class  has  built  in  default   values.
  3208.                       However, if  you would  like  to change  those  default
  3209.                       behaviors, you can easily do so.
  3210.  
  3211.                       On  the  following  pages,   you  will  find  each   of
  3212.                       {tinput}'s member functions.
  3213.  
  3214.                       Examples of using  the input  object are  given in  the
  3215.                       source codes of the EasyVision's demo programs.
  3216.  
  3217.  
  3218.        TINPUT::MOUSE_INIT
  3219.        ----------------------------------------------------------------------
  3220.  
  3221.              Summary  This  function  will  look  for  a  mouse  driver   and
  3222.                       initialise it.  Initially, the mouse will be hidden.
  3223.  
  3224.               Syntax  #include "tinput.hpp" ;
  3225.  
  3226.                       void far tinput::mouse_init () ;   // Initialises mouse
  3227.  
  3228.              Remarks  This function is called  as part of the  initialisation
  3229.                       routines, before your program starts.  You should never
  3230.                       have to call it yourself.
  3231.  
  3232.                  -->  Remember that the mouse's  cursor should ALWAYS be  off
  3233.                       when you make changes to the screen.  Many older driver
  3234.                       would leave garbage  on the screen  if you did  updates
  3235.                       while the  cursor is  ON.   Anyway, the  only time  the
  3236.                       mouse's cursor should be on is when you do user inputs.
  3237.                       The {get} function will  take care of  all this and  if
  3238.                       you're doing things right,  your only inputs will  come
  3239.                       from {get}.
  3240.  
  3241.  
  3242.  
  3243.  
  3244.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  3245.  
  3246.  
  3247.        ----------------------------------------------------------------------
  3248.        CHAPTER 14 : EasyVision's tinput class                     Page 57/111
  3249.        ----------------------------------------------------------------------
  3250.  
  3251.                       If no mouse is found, calling the other mouse functions
  3252.                       won't produce any result.
  3253.  
  3254.               Return  None.
  3255.  
  3256.              Example
  3257.                       input.mouse_init () ;
  3258.  
  3259.  
  3260.        TINPUT::MOUSE_STATUS
  3261.        ----------------------------------------------------------------------
  3262.  
  3263.              Summary  Returns current mouse's state.
  3264.  
  3265.               Syntax  #include "tinput.hpp" ;
  3266.  
  3267.                       int far tinput::mouse_status () ;     // Mouse's status
  3268.  
  3269.              Remarks  None.
  3270.  
  3271.               Return  Tree values can be returned:
  3272.                       0: No mouse's driver or mouse was found.
  3273.                       1: A mouse is present and the cursor is on the screen.
  3274.                       2: A mouse is present and the cursor is hidden.
  3275.  
  3276.              Example
  3277.                       if (input.mouse_status () == 0)
  3278.                          printf ("A mouse is necessary for this program") ;
  3279.  
  3280.  
  3281.        TINPUT::MOUSE_SHOW
  3282.        ----------------------------------------------------------------------
  3283.  
  3284.              Summary  Turns the mouse's cursor on.
  3285.  
  3286.               Syntax  #include "tinput.hpp" ;
  3287.  
  3288.                       void far tinput::mouse_show () ;        // Shows cursor
  3289.  
  3290.              Remarks  If a mouse wasn't found, this function doesn't have any
  3291.                       effect.
  3292.  
  3293.               Return  None.
  3294.  
  3295.              Example
  3296.                       input.mouse_show () ;
  3297.  
  3298.  
  3299.  
  3300.  
  3301.  
  3302.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  3303.  
  3304.  
  3305.        ----------------------------------------------------------------------
  3306.        CHAPTER 14 : EasyVision's tinput class                     Page 58/111
  3307.        ----------------------------------------------------------------------
  3308.  
  3309.        TINPUT::MOUSE_HIDE
  3310.        ----------------------------------------------------------------------
  3311.  
  3312.              Summary  Turns the mouse's cursor off.
  3313.  
  3314.               Syntax  #include "tinput.hpp"
  3315.  
  3316.                       void far tinput::mouse_hide () ;        // Hides cursor
  3317.  
  3318.              Remarks  If a mouse wasn't found, this function doesn't have any
  3319.                       effect.
  3320.  
  3321.               Return  None.
  3322.  
  3323.              Example
  3324.                       input.mouse_hide () ;
  3325.  
  3326.  
  3327.        TINPUT::MOUSE_LB_DOWN
  3328.        ----------------------------------------------------------------------
  3329.  
  3330.              Summary  Tells if mouse's left button is currently pressed.
  3331.  
  3332.               Syntax  #include "tinput.hpp" ;
  3333.  
  3334.                       bool far tinput::mouse_lb_down () ;    // Tells if down
  3335.  
  3336.              Remarks  None.
  3337.  
  3338.               Return  {TRUE}  if  mouse's  left  button  is  currently  down.
  3339.                       {FALSE} otherwise.
  3340.  
  3341.              Example
  3342.                       if (input.mouse_lb_down ())
  3343.                          do_something () ;
  3344.  
  3345.  
  3346.        TINPUT::MOUSE_POS
  3347.        ----------------------------------------------------------------------
  3348.  
  3349.              Summary  Returns mouse's screen position.
  3350.  
  3351.               Syntax  #include "tinput.hpp" ;
  3352.  
  3353.                       void far tinput::mouse_pos     // Gets mouse's position
  3354.                       (
  3355.                          int huge *row,             // To return row position
  3356.                          int huge *col              // To return col position
  3357.                       ) ;
  3358.  
  3359.  
  3360.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  3361.  
  3362.  
  3363.        ----------------------------------------------------------------------
  3364.        CHAPTER 14 : EasyVision's tinput class                     Page 59/111
  3365.        ----------------------------------------------------------------------
  3366.  
  3367.              Remarks  If a mouse  wasn't found, the  returned values are  not
  3368.                       changed.
  3369.  
  3370.               Return  <row> returns the  cursor's row position,  1 being  the
  3371.                       top row.  <col> returns the cursor's column position, 1
  3372.                       being the leftmost column.
  3373.  
  3374.              Example
  3375.                       int row, col ;
  3376.                       input.mouse_pos (&row,&col) ;
  3377.  
  3378.  
  3379.        TINPUT::GET
  3380.        ----------------------------------------------------------------------
  3381.  
  3382.              Summary  Gets a user input, be it  a keyboard or a mouse  event.
  3383.                       Provides automatic  context  sensitive help  and  mouse
  3384.                       support during input.
  3385.  
  3386.               Syntax  #include "tinput.hpp" ;
  3387.  
  3388.                       int far tinput::get       // Gets a keyb or mouse input
  3389.                       (
  3390.                          input_info huge *ii=NULL,       // Ptr to input_info
  3391.                          int             filter=0,         // Valid key codes
  3392.                          int             hlpctx=EV_NOHLPCTX,       // Context
  3393.                          bool            buffer=FALSE          // Use buffer?
  3394.                       ) ;
  3395.  
  3396.              Remarks  This function  is at  the heart  of EasyVision's  input
  3397.                       facilities.
  3398.  
  3399.                  -->  One important concept is that an EasyVision's input  is
  3400.                       ALWAYS stored  in  an  {input_info} structure .   This
  3401.                       structure is as follows:
  3402.  
  3403.                       struct input_info
  3404.                       {
  3405.                          int  key_code ;      // ASCII code of last character
  3406.                          bool key_lshift ;  // TRUE if left shift key pressed
  3407.                          bool key_rshift ; // TRUE if right shift key pressed
  3408.                          bool key_lctrl ;    // TRUE if left ctrl key pressed
  3409.                          bool key_rctrl ;   // TRUE if right ctrl key pressed
  3410.                          bool key_lalt ;      // TRUE if left alt key pressed
  3411.                          bool key_ralt ;     // TRUE if right alt key pressed
  3412.                          int  mouse_row ;   // Row position of mouse's cursor
  3413.                          int  mouse_col ;   // Col position of mouse's cursor
  3414.                       }
  3415.  
  3416.  
  3417.  
  3418.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  3419.  
  3420.  
  3421.        ----------------------------------------------------------------------
  3422.        CHAPTER 14 : EasyVision's tinput class                     Page 60/111
  3423.        ----------------------------------------------------------------------
  3424.  
  3425.                       One of 'getch' weaknesses is its inability to deal with
  3426.                       the  way  extended  keys  are  internally  represented.
  3427.                       Those are  the  keys  that don't  have  an  ASCII  code
  3428.                       associated with them.  For example, the function, arrow
  3429.                       and editing keys all return an extended keycode.
  3430.  
  3431.                       {tinput::get} will  deal with  these extended  keys  by
  3432.                       adding 256 to the extended  keycode.  Appendix A  lists
  3433.                       all the  extended keycodes  currently available  on  an
  3434.                       extended keyboard and their associated macros.   Always
  3435.                       use the macros instead of the real code.
  3436.  
  3437.                       The  first   parameter  <ii>   is  a   pointer  to   an
  3438.                       {input_info} structure.    Information is  returned  in
  3439.                       this structure.  You can set <ii> to a NULL pointer  or
  3440.                       call {tinput::get} without any parameter.
  3441.  
  3442.                       You  then   specify   a   <filter>  to   be   used   by
  3443.                       {tinput::get}.  A <filter> of 0  will allow any key  to
  3444.                       be read and  returned by the  function.   You can  also
  3445.                       provide the ASCII or extended keycode (remember to  add
  3446.                       256 to the real  extended code or  better yet, use  the
  3447.                       {II_*} macro) of the only key allowed to be returned by
  3448.                       the function.  This provides an easy way to WAIT FOR  a
  3449.                       specific key.  The function will then return with  that
  3450.                       keycode, only when that key has been pressed.
  3451.  
  3452.                  -->  Beware of NEVER setting  <filter> to an impossible  key
  3453.                       entry, or you will be trapped by the {get} function!
  3454.  
  3455.                       Next, you give the current context number  <hlpctx> for
  3456.                       this input.  If the user presses F1 , the right mouse's
  3457.                       button or  the on  screen HELP  button, the  associated
  3458.                       help screen for this context will be displayed.  If you
  3459.                       don't want to use the help system or if there isn't any
  3460.                       help  for  the   current  context,   set  <hlpctx>   to
  3461.                       {EV_NOHLPCTX}.
  3462.  
  3463.                       See appendix C to learn how  to build an help file  and
  3464.                       activate the help facilities.
  3465.  
  3466.                  -->  If you  set  <buffer> to  {FALSE},  {tinput::get}  will
  3467.                       flush the keyboard buffer before reading a key.  If set
  3468.                       to {TRUE}, it  will read  from the  keyboard and  mouse
  3469.                       buffers if  keys  have  been previously  pressed.    By
  3470.                       default, <buffer> is set to {FALSE}.
  3471.  
  3472.               Return  If a normal key was pressed,  the returned value is  an
  3473.                       'int' representing the ASCII code of that key (1-255).
  3474.  
  3475.  
  3476.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  3477.  
  3478.  
  3479.        ----------------------------------------------------------------------
  3480.        CHAPTER 14 : EasyVision's tinput class                     Page 61/111
  3481.        ----------------------------------------------------------------------
  3482.  
  3483.                       If an extended key was  pressed, the returned value  is
  3484.                       an 'int'  representing the  extended keycode  plus  256
  3485.                       (256-396).  See appendix A for  a list of keyboard  key
  3486.                       macros.
  3487.  
  3488.                       If the  mouse  was  pressed, the  macro  {EV_MOUSE} is
  3489.                       returned.
  3490.  
  3491.                       The returned value is identical to the {key_code} field
  3492.                       in the {input_info} structure.
  3493.  
  3494.                       {input_info}'s fields {mouse_row} and {mouse_col}  will
  3495.                       hold the cursor's  coordinates at the  moment the  left
  3496.                       button was pressed.   They are  undefined if the  input
  3497.                       wasn't a mouse event.
  3498.  
  3499.                       The other fields of the {input_info} structure hold the
  3500.                       states of the shift, control and  alt keys at the  time
  3501.                       of the input.
  3502.  
  3503.              Example
  3504.                       input_info ii ;
  3505.                       if (input.get (&ii) == EV_MOUSE)
  3506.                       {
  3507.                          // Process mouse input
  3508.                       }
  3509.                       else
  3510.                       {
  3511.                          // Process keyboard input
  3512.                       }
  3513.  
  3514.  
  3515.  
  3516.  
  3517.  
  3518.  
  3519.  
  3520.  
  3521.  
  3522.  
  3523.  
  3524.  
  3525.  
  3526.  
  3527.  
  3528.  
  3529.  
  3530.  
  3531.  
  3532.  
  3533.  
  3534.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  3535.  
  3536.  
  3537.        ----------------------------------------------------------------------
  3538.        CHAPTER 15 : EasyVision's tmenubar class                   Page 62/111
  3539.        ----------------------------------------------------------------------
  3540.  
  3541.        ----------------------------------------------------------------------
  3542.        ----------------------------------------------------------------------
  3543.        C H A P T E R   15 : EasyVision's tmenubar class
  3544.        ----------------------------------------------------------------------
  3545.  
  3546.                       The {tmenubar} class provides  a menubar  on the  first
  3547.                       line of the screen, with pull down menus  and selection
  3548.                       cursor.
  3549.  
  3550.                       A menubar acts as a filter.   You make the user  inputs
  3551.                       go {through} the menubar.  If the input is the keyboard
  3552.                       event {II_F10} (F10), or an ALT-key corresponding to a
  3553.                       menu hotkey, the menubar is activated.  Otherwise, the
  3554.                       input returns unchanged.
  3555.  
  3556.                       Items created in the menus are assigned return  values.
  3557.                       When the user selects an item, his input is changed  to
  3558.                       this return value and returned from the menubar.
  3559.  
  3560.                  -->  Keep in  mind  that  all  inputs  going  {through}  and
  3561.                       returned from the menubar are {input_info } structures.
  3562.                       Refer to the chapter on the {tinput} class.
  3563.  
  3564.                  -->  An instance has already  been globally declared and  is
  3565.                       called menubar.  Only one instance of {tmenubar} can be
  3566.                       used in a program.  As a result, you will never declare
  3567.                       and create another instance.
  3568.  
  3569.                       The {tmenubar}  class  has  built  in  default  values.
  3570.                       However, if  you would  like  to change  those  default
  3571.                       behaviors, you can easily do so.
  3572.  
  3573.                       On  the  following  pages,   you  will  find  each   of
  3574.                       {tmenubar}'s member functions.
  3575.  
  3576.                       Examples of using the menubar  object are given in  the
  3577.                       source codes of the EasyVision's demo programs.
  3578.  
  3579.  
  3580.        TMENUBAR::SETCOLORS
  3581.        ----------------------------------------------------------------------
  3582.  
  3583.              Summary  Sets the background,  foreground, highlight and  cursor
  3584.                       colors used by the menubar.
  3585.  
  3586.  
  3587.  
  3588.  
  3589.  
  3590.  
  3591.  
  3592.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  3593.  
  3594.  
  3595.        ----------------------------------------------------------------------
  3596.        CHAPTER 15 : EasyVision's tmenubar class                   Page 63/111
  3597.        ----------------------------------------------------------------------
  3598.  
  3599.               Syntax  #include "tmenubar.hpp"
  3600.  
  3601.                       void far tmenubar::setcolors     // Sets menubar colors
  3602.                       (
  3603.                          int back=LIGHTGRAY,              // Background color
  3604.                          int fore=BLACK,                  // Foreground color
  3605.                          int high=RED,                     // Highlight color
  3606.                          int cursor=GREEN                     // Cursor color
  3607.                       ) ;
  3608.  
  3609.              Remarks  You can  use color  macros  if "CONIO.H"  is  included.
  3610.                       Appendix B gives a description of available color codes
  3611.                       and macros.
  3612.  
  3613.                       If  you  don't  make  a  call  to  this  function,  the
  3614.                       previously mentioned default values are assumed.
  3615.  
  3616.                  -->  When a menu has been created, it is thereafter  illegal
  3617.                       to change the  already selected  colors.   Furthermore,
  3618.                       the color 'DARKGRAY'  is unavailable.   It is  reserved
  3619.                       for offline menu items.
  3620.  
  3621.               Return  None.
  3622.  
  3623.              Example
  3624.                       menubar.setcolors (BLUE,WHITE,RED,MAGENTA) ;
  3625.  
  3626.  
  3627.        TMENUBAR::SETHLPCTX
  3628.        ----------------------------------------------------------------------
  3629.  
  3630.              Summary  Sets the menubar's default help context number.
  3631.  
  3632.               Syntax  #include "tmenubar.hpp"
  3633.  
  3634.                       void far tmenubar::sethlpctx    // Sets default context
  3635.                       (
  3636.                          int hlpctx=EV_NOHLPCTX        // Help context number
  3637.                       ) ;
  3638.  
  3639.              Remarks  When created, each menu on the menubar and each item in
  3640.                       a menu is given its own context number.  If, however, a
  3641.                       menu or  an item  is not  given a  number and  help  is
  3642.                       requested while this menu  or item is highlighted,  the
  3643.                       menubar default context  number will be  passed to  the
  3644.                       help routines.
  3645.  
  3646.               Return  None.
  3647.  
  3648.  
  3649.  
  3650.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  3651.  
  3652.  
  3653.        ----------------------------------------------------------------------
  3654.        CHAPTER 15 : EasyVision's tmenubar class                   Page 64/111
  3655.        ----------------------------------------------------------------------
  3656.  
  3657.              Example
  3658.                       menubar.sethlpctx (1000) ;
  3659.  
  3660.  
  3661.        TMENUBAR::ADDMENU
  3662.        ----------------------------------------------------------------------
  3663.  
  3664.              Summary  Adds a menu to the menubar.
  3665.  
  3666.               Syntax  #include "tmenubar.hpp"
  3667.  
  3668.                       void far tmenubar::addmenu        // Creates a new menu
  3669.                       (
  3670.                          char huge *name,                      // Menu's name
  3671.                          int       hotkey,                   // Menu's hotkey
  3672.                          char huge *sltext=NULL,           // Statusline text
  3673.                          int       hlpctx=EV_NOHLPCTX  // Help context number
  3674.                       ) ;
  3675.  
  3676.              Remarks  <name> is the name of the  menu created.  It can be  of
  3677.                       any length, but must fit on the menubar.  The first two
  3678.                       characters of the menubar are left blank, and the  last
  3679.                       10 are  reserved for  the clock.   Two  spaces will  be
  3680.                       inserted between each menu.
  3681.  
  3682.                       There can be as many menus on the menubar as will  fit.
  3683.                       Just don't make the names too long.
  3684.  
  3685.                       The <hotkey> is the  key that will  activate the menu.
  3686.                       It must  be  a letter  (A-Z)  or a  digit  (0-9),  case
  3687.                       insensitive.   If the  letter is  present in  the  menu
  3688.                       name, it will  be highlighted.   Two menus cannot  have
  3689.                       the same hotkey.
  3690.  
  3691.                       <sltext> is a short help text that will be displayed on
  3692.                       the statusline when this menu is  selected.  It can  be
  3693.                       of any length.
  3694.  
  3695.                       <hlpctx> is the  context number  corresponding to  this
  3696.                       menu.   The text  associated to  this context  will  be
  3697.                       displayed if the user asks for  help.  If you set  this
  3698.                       argument to {EV_NOHLPCTX}, this menu won't have a help
  3699.                       context of  its  own.   Instead,  the  default  menubar
  3700.                       context will  be use  (see tmenubar::sethlpctx).    See
  3701.                       appendix 3 to learn about the help facilities.
  3702.  
  3703.               Return  None.
  3704.  
  3705.  
  3706.  
  3707.  
  3708.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  3709.  
  3710.  
  3711.        ----------------------------------------------------------------------
  3712.        CHAPTER 15 : EasyVision's tmenubar class                   Page 65/111
  3713.        ----------------------------------------------------------------------
  3714.  
  3715.              Example
  3716.                       menubar.addmenu ("Files",'F',"Opens a new file",100) ;
  3717.  
  3718.  
  3719.        TMENUBAR::ADDITEM
  3720.        ----------------------------------------------------------------------
  3721.  
  3722.              Summary  Adds an item to the last created menu.
  3723.  
  3724.               Syntax  #include "tmenubar.hpp"
  3725.  
  3726.                       void far tmenubar::additem              // Adds an item
  3727.                       (
  3728.                          char huge *text=NULL,                 // Item's text
  3729.                          int        hotkey=II_NUL,           // Item's hotkey
  3730.                          int        returnval=II_NUL,         // Return value
  3731.                          char huge *sltext=NULL,           // Statusline text
  3732.                          int        hlpctx=EV_NOHLPCTX // Help context number
  3733.                       ) ;
  3734.  
  3735.              Remarks  <text> is the text displayed for  this menu entry.   It
  3736.                       can be of any length.  The menu will autosize itself to
  3737.                       accommodate the widest item.
  3738.  
  3739.                       There can be as many items in a menu as there is  space
  3740.                       on the screen.  That is  always 4 fewer than the  total
  3741.                       number of screen rows.
  3742.  
  3743.                       The <hotkey> is  the key that  will activate the  item.
  3744.                       It must  be  a letter  (A-Z)  or a  digit  (0-9),  case
  3745.                       insensitive.  If  the hotkey is  present in the  item's
  3746.                       text, it will  be highlighted.   Two items cannot  have
  3747.                       the same hotkey.
  3748.  
  3749.                       If this item is selected, the user input will be change
  3750.                       to <returnval> while  in the {through}  function.   For
  3751.                       example, if  {II_A_X} (ALT-X)  exits the  program,  you
  3752.                       would set the QUIT item in the FILE menu to return  the
  3753.                       value {II_A_X} (Alt-X).   It's a  good idea to  display
  3754.                       those shortcuts in the item's text.
  3755.  
  3756.                  -->  This return value must be greater than 255.  It  cannot
  3757.                       be {II_F10}  (F10)  or  any  of  the  arrows'  keycodes
  3758.                       (II_ARROW_*).
  3759.  
  3760.                       <sltext> is a short help text that will be displayed on
  3761.                       the statusline when this item is  selected.  It can  be
  3762.                       of any length.
  3763.  
  3764.  
  3765.  
  3766.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  3767.  
  3768.  
  3769.        ----------------------------------------------------------------------
  3770.        CHAPTER 15 : EasyVision's tmenubar class                   Page 66/111
  3771.        ----------------------------------------------------------------------
  3772.  
  3773.                       <hlpctx> is the  context number  corresponding to  this
  3774.                       item.   The text  associated to  this context  will  be
  3775.                       displayed if the user asks for  help.  If you set  this
  3776.                       argument to {EV_NOHLPCTX}, this menu won't have a  help
  3777.                       context of  its  own.   Instead,  the  default  menubar
  3778.                       context will  be use  (see tmenubar::sethlpctx).    See
  3779.                       appendix 3 to learn about the help facilities.
  3780.  
  3781.                  -->  If {additem}  is  called  with no  arguments,  it  will
  3782.                       insert a separator in the menu.
  3783.  
  3784.               Return  None.
  3785.  
  3786.              Example
  3787.                       menubar.additem ("Open F3",'O',II_F3,"Open file",103) ;
  3788.  
  3789.  
  3790.        TMENUBAR::ITEMSETAVAIL
  3791.        ----------------------------------------------------------------------
  3792.  
  3793.              Summary  Sets availability of a menu item to {TRUE} or {FALSE}.
  3794.  
  3795.               Syntax  #include "tmenubar.hpp"
  3796.  
  3797.                       void far tmenubar::itemsetavail    // Sets availability
  3798.                       (
  3799.                          int  menuhotkey,                   // Hotkey of menu
  3800.                          int  itemhotkey,              // Hotkey of menu item
  3801.                          bool state            // TRUE: available  FALSE: Not
  3802.                       ) ;
  3803.  
  3804.              Remarks  You must provide the <menuhotkey> of the menu in  which
  3805.                       the item  exists,  and  the <itemhotkey>  of  the  item
  3806.                       itself.  Setting  a menu item  to {TRUE}  will make  it
  3807.                       available, to {FALSE} not available.
  3808.  
  3809.                  -->  When a  menu  item  is  created,  it  is  available  by
  3810.                       default.
  3811.  
  3812.               Return  None.
  3813.  
  3814.              Example
  3815.                       menubar.itemsetavail ('F','O',FALSE) ;
  3816.  
  3817.  
  3818.        TMENUBAR::THROUGH
  3819.                                                                                   --
  3820.  
  3821.              Summary  Makes an input go through the menubar.
  3822.  
  3823.  
  3824.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  3825.  
  3826.  
  3827.        ----------------------------------------------------------------------
  3828.        CHAPTER 15 : EasyVision's tmenubar class                   Page 67/111
  3829.        ----------------------------------------------------------------------
  3830.  
  3831.               Syntax  #include "tmenubar.hpp"
  3832.  
  3833.                       input_info far tmenubar::through   // Activates menubar
  3834.                       (
  3835.                          input_info ii                 // Input to go through
  3836.                       ) ;
  3837.  
  3838.              Remarks  If <ii> contains the keyboard event {II_F10} (F10), the
  3839.                       menubar is activated, but no menus are opened.  If <ii>
  3840.                       is a menu hotkey, this menu is opened.
  3841.  
  3842.               Return  If <ii> is  not {II_F10}  or a  menu hotkey,  {through}
  3843.                       returns <ii> unchanged.   If the menubar is  activated,
  3844.                       then if  the  user  enters  {II_ESC}  (Esc),  {through}
  3845.                       returns with {II_NUL}  in the {key_code}  field of  the
  3846.                       {input_info} structure.  Otherwise it returns with  the
  3847.                       return value of the menu item selected.
  3848.  
  3849.              Example
  3850.                       input_info command ;
  3851.                       command = menubar.through (input.get (&command)) ;
  3852.  
  3853.  
  3854.        TMENUBAR::REFRESH
  3855.        ----------------------------------------------------------------------
  3856.  
  3857.              Summary  The menubar object has  a {refresh} function that  will
  3858.                       redraw it on the screen.
  3859.  
  3860.               Syntax  #include "tmenubar.hpp"
  3861.  
  3862.                       void far tmenubar::refresh () ;  // Redraws the menubar
  3863.  
  3864.              Remarks  You will most  likely never  call this  function.   You
  3865.                       should call the desktop's  own {refresh} function,  who
  3866.                       will then call this one.
  3867.  
  3868.               Return  None.
  3869.  
  3870.              Example  menubar.refresh () ;
  3871.  
  3872.  
  3873.  
  3874.  
  3875.  
  3876.  
  3877.  
  3878.  
  3879.  
  3880.  
  3881.  
  3882.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  3883.  
  3884.  
  3885.        ----------------------------------------------------------------------
  3886.        CHAPTER 16 : EasyVision's twindow class                    Page 68/111
  3887.        ----------------------------------------------------------------------
  3888.  
  3889.        ----------------------------------------------------------------------
  3890.        ----------------------------------------------------------------------
  3891.        C H A P T E R   16 : EasyVision's twindow class
  3892.        ----------------------------------------------------------------------
  3893.  
  3894.                       The {twindow} class provides to  your program powerful
  3895.                       window  facilities.    Windows   are  where  all   your
  3896.                       program's screen inputs and outputs will take place.
  3897.  
  3898.                       The {twindow} class comes  with many member  functions.
  3899.                       They allow for manipulating  the window position,  size
  3900.                       and attributes.   Text  can be  easily written  to  the
  3901.                       window.   Input  fields  will give  you  formatted  and
  3902.                       secured user inputs.  Push buttons will provide options
  3903.                       selection.  All these and many more features.
  3904.  
  3905.                       The  {twindow}  class  has  built  in  default  values.
  3906.                       However, if  you would  like  to change  those  default
  3907.                       behaviors, you can easily do so.
  3908.  
  3909.                  -->  Contrary  to  the  other  classes,  instances  of   the
  3910.                       {twindow} class have NOT been declare.  You can use  as
  3911.                       many instances of {twindow} as you like.  As a  result,
  3912.                       you will have to declare and create your own instances.
  3913.                       First, you  declare  a  pointer  to  a  twindow  object
  3914.                       (twindow huge *win).  Then you allocated memory for  it
  3915.                       (win = new twindow).   The object has been  initialised
  3916.                       with default values and is now ready to be used.
  3917.  
  3918.                  -->  You can  open simultaneously  as  many windows  as  you
  3919.                       like.  When  you open a  window, what was  under it  is
  3920.                       saved to be restored when you'll close it.
  3921.  
  3922.                  -->  EasyVision  doesn't  keep  track  of  the  way  windows
  3923.                       overlap.  It doesn't know if a window is over or  under
  3924.                       another one. Therefore, a window should NEVER be closed
  3925.                       if another window covers part of it.  Always close  the
  3926.                       ones that are in the foreground first.
  3927.  
  3928.                  -->  You CANNOT work with  a window if  it is under  another
  3929.                       one.  If you do, the  integrity of the desktop will  be
  3930.                       compromised.
  3931.  
  3932.                       On  the  following  pages,   you  will  find  each   of
  3933.                       {twindow}'s member functions.
  3934.  
  3935.                       Examples of  using  window  objects are  given  in  the
  3936.                       source codes of the EasyVision's demo programs.
  3937.  
  3938.  
  3939.  
  3940.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  3941.  
  3942.  
  3943.        ----------------------------------------------------------------------
  3944.        CHAPTER 16 : EasyVision's twindow class                    Page 69/111
  3945.        ----------------------------------------------------------------------
  3946.  
  3947.        TWINDOW::WINSETPOS
  3948.        ----------------------------------------------------------------------
  3949.  
  3950.              Summary  Sets position of the next window to be opened.
  3951.  
  3952.               Syntax  #include "twindow.hpp"
  3953.  
  3954.                       void far twindow::winsetpos   // Sets window's position
  3955.                       (
  3956.                          int  row,                   // Top left corner's row
  3957.                          int  col,                   // Top left corner's col
  3958.                          bool movable=EV_MAYBE          // TRUE: Can be moved
  3959.                       ) ;
  3960.  
  3961.              Remarks  <row> and  <col> are  the topleft  corner of  the  next
  3962.                       window TO BE OPENED.  The  first and last lines of  the
  3963.                       desktop are reserved  for the  menubar and  statusline.
  3964.                       You can't  have  part of  the  window off  the  screen.
  3965.                       Therefore, this function will validate all  coordinates
  3966.                       and change them to get a valid window position.
  3967.  
  3968.                  -->  If you set the  size of the  window before setting  its
  3969.                       position, this  size  will  be taken  into  account  to
  3970.                       calculate the  valid  range  of  the  <row>  and  <col>
  3971.                       arguments.
  3972.  
  3973.                  -->  You CANNOT use this function  once the window has  been
  3974.                       opened.  Use the {winmove} function instead.
  3975.  
  3976.               Return  None.
  3977.  
  3978.              Example
  3979.                       win->winsetpos (10,12) ;     // Topleft corner at 10,12
  3980.  
  3981.  
  3982.        TWINDOW::WINGETROW
  3983.        ----------------------------------------------------------------------
  3984.  
  3985.              Summary  Returns row position of its topleft corner.
  3986.  
  3987.               Syntax  #include "twindow.hpp"
  3988.  
  3989.                       int far twindow::wingetrow () ;      // Returns row pos
  3990.  
  3991.              Remarks  The top left corner  of the screen is  (1,1).  But  row
  3992.                       one is unavailable because it is taken by the menubar.
  3993.  
  3994.               Return  Row position of window.
  3995.  
  3996.  
  3997.  
  3998.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  3999.  
  4000.  
  4001.        ----------------------------------------------------------------------
  4002.        CHAPTER 16 : EasyVision's twindow class                    Page 70/111
  4003.        ----------------------------------------------------------------------
  4004.  
  4005.              Example
  4006.                       row = win->wingetrow () ;
  4007.  
  4008.  
  4009.        TWINDOW::WINGETCOL
  4010.        ----------------------------------------------------------------------
  4011.  
  4012.              Summary  Returns window's column position of its topleft corner.
  4013.  
  4014.               Syntax  #include "twindow.hpp"
  4015.  
  4016.                       int far twindow::wingetcol () ;      // Returns col pos
  4017.  
  4018.              Remarks  The top left corner of the screen is (1,1).
  4019.  
  4020.               Return  Column position of window.
  4021.  
  4022.              Example
  4023.                       col = win->wingetcol () ;
  4024.  
  4025.  
  4026.        TWINDOW::WINSETSIZE
  4027.        ----------------------------------------------------------------------
  4028.  
  4029.              Summary  Sets size of next window to be opened.
  4030.  
  4031.               Syntax  #include "twindow.hpp"
  4032.  
  4033.                       void far twindow::winsetsize      // Sets window's size
  4034.                       (
  4035.                          int height=MAXINT,// Window's height including frames
  4036.                          int width=MAXINT  // Window's width including frames
  4037.                       ) ;
  4038.  
  4039.              Remarks  <height> and <width> represent the size of the  window,
  4040.                       frames included.    The first  and  last lines  of  the
  4041.                       desktop are reserved  for the  menubar and  statusline.
  4042.                       Also, you can't have part of the window off the screen.
  4043.  
  4044.                  -->  This function will validate  the asked size and  change
  4045.                       it to get a valid window  size.  The position that  was
  4046.                       set with {winsetpos} will be taken into account.
  4047.  
  4048.                  -->  You CANNOT change the size of a window once it has been
  4049.                       opened.
  4050.  
  4051.               Return  None.
  4052.  
  4053.  
  4054.  
  4055.  
  4056.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  4057.  
  4058.  
  4059.        ----------------------------------------------------------------------
  4060.        CHAPTER 16 : EasyVision's twindow class                    Page 71/111
  4061.        ----------------------------------------------------------------------
  4062.  
  4063.              Example
  4064.                       win->winsetsize (10,60) ;         // 10 rows by 60 cols
  4065.  
  4066.  
  4067.        TWINDOW::WINGETHEIGHT
  4068.        ----------------------------------------------------------------------
  4069.  
  4070.              Summary  Returns window's height in lines.
  4071.  
  4072.               Syntax  #include "twindow.hpp"
  4073.  
  4074.                       int far twindow::wingetheight () ;    // Returns height
  4075.  
  4076.              Remarks  The top and bottom frames are included in the height.
  4077.  
  4078.               Return  The height of the window.
  4079.  
  4080.              Example
  4081.                       heigth = win->wingetheight () ;
  4082.  
  4083.  
  4084.        TWINDOW::WINGETWIDTH
  4085.        ----------------------------------------------------------------------
  4086.  
  4087.              Summary  Returns window's width in columns.
  4088.  
  4089.               Syntax  #include "twindow.hpp"
  4090.  
  4091.                       int far twindow::wingetwidth () ;      // Returns width
  4092.  
  4093.              Remarks  The left and right frames are included in the width.
  4094.  
  4095.               Return  The width of the window.
  4096.  
  4097.              Example
  4098.                       width = win->wingetwidth () ;
  4099.  
  4100.  
  4101.        TWINDOW::WINSETCOLORS
  4102.        ----------------------------------------------------------------------
  4103.  
  4104.              Summary  Sets the background and foreground colors of a window.
  4105.  
  4106.  
  4107.  
  4108.  
  4109.  
  4110.  
  4111.  
  4112.  
  4113.  
  4114.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  4115.  
  4116.  
  4117.        ----------------------------------------------------------------------
  4118.        CHAPTER 16 : EasyVision's twindow class                    Page 72/111
  4119.        ----------------------------------------------------------------------
  4120.  
  4121.               Syntax  #include "twindow.hpp"
  4122.  
  4123.                       void far twindow::winsetcolors  // Sets window's colors
  4124.                       (
  4125.                          int back=LIGHTGRAY,     // Window's background color
  4126.                          int fore=WHITE          // Window's foreground color
  4127.                       ) ;
  4128.  
  4129.              Remarks  These are the colors  used to draw  the window.   Those
  4130.                       colors will be used by  other functions when the  color
  4131.                       arguments  are  optional.     <back>  and  <fore>   are
  4132.                       optional, and will default  to 'LIGHTGRAY' and  'WHITE'
  4133.                       respectively.
  4134.  
  4135.                  -->  You CANNOT change the default  colors of a window  once
  4136.                       it has been opened.
  4137.  
  4138.                  -->  Bright background colors are available.  See tdesktop's
  4139.                       {settextmode}.
  4140.  
  4141.               Return  None.
  4142.  
  4143.              Example
  4144.                       win->winsetcolors (BLUE,WHITE) ;
  4145.  
  4146.  
  4147.        TWINDOW::WINSETTITLE
  4148.        ----------------------------------------------------------------------
  4149.  
  4150.              Summary  Sets the title displayed on the top frame of a window.
  4151.  
  4152.               Syntax  #include "twindow.hpp"
  4153.  
  4154.                       void far twindow::winsettitle    // Sets window's title
  4155.                       (
  4156.                          char huge *title            // Ptr to window's title
  4157.                       ) ;
  4158.  
  4159.              Remarks  <title> can point to  a title of  any length, and  only
  4160.                       the portion  that will  fit on  the top  frame will  be
  4161.                       displayed.  If you don't give a title before opening  a
  4162.                       window, no title will be displayed.
  4163.  
  4164.                  -->  You CAN'T set a title after a window has been opened.
  4165.  
  4166.               Return  None.
  4167.  
  4168.              Example
  4169.                       win->winsettitle ("Open file") ;
  4170.  
  4171.  
  4172.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  4173.  
  4174.  
  4175.        ----------------------------------------------------------------------
  4176.        CHAPTER 16 : EasyVision's twindow class                    Page 73/111
  4177.        ----------------------------------------------------------------------
  4178.  
  4179.        TWINDOW::WINSETHLPCTX
  4180.        ----------------------------------------------------------------------
  4181.  
  4182.              Summary  Sets the  default help  context for  this window .   If
  4183.                       input fields or  push buttons don't  have a context  of
  4184.                       their own, they'll use this default.
  4185.  
  4186.               Syntax  #include "twindow.hpp"
  4187.  
  4188.                       void far twindow::winsethlpctx // Sets context's number
  4189.                       (
  4190.                          int hlpctx=EV_NOHLPCTX      // Help context's number
  4191.                       ) ;
  4192.  
  4193.              Remarks  See appendix 3 for a description of the help system.
  4194.  
  4195.               Return  None.
  4196.  
  4197.              Example
  4198.                       win->winsethlpctx (100) ;
  4199.  
  4200.  
  4201.        TWINDOW::WINOPEN
  4202.        ----------------------------------------------------------------------
  4203.  
  4204.              Summary  Opens a window.
  4205.  
  4206.               Syntax  #include "twindow.hpp"
  4207.  
  4208.                       void far twindow::winopen () ;          // Opens window
  4209.  
  4210.              Remarks  The window is  opened with default  attributes, or  the
  4211.                       ones set by the previous functions.  You CANNOT open an
  4212.                       already opened window.
  4213.  
  4214.                       Default attributes for a window are:
  4215.  
  4216.                       Position is (row=2, col=1).
  4217.                       Size is (height=3, width=6).
  4218.                       Colors are 'WHITE' on 'LIGHTGRAY'.
  4219.                       The cursor is on line 1.
  4220.  
  4221.               Return  None.
  4222.  
  4223.              Example
  4224.                       win->winopen () ;
  4225.  
  4226.  
  4227.  
  4228.  
  4229.  
  4230.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  4231.  
  4232.  
  4233.        ----------------------------------------------------------------------
  4234.        CHAPTER 16 : EasyVision's twindow class                    Page 74/111
  4235.        ----------------------------------------------------------------------
  4236.  
  4237.        TWINDOW::WINCLOSE
  4238.        ----------------------------------------------------------------------
  4239.  
  4240.              Summary  Closes a window.
  4241.  
  4242.               Syntax  #include "twindow.hpp"
  4243.  
  4244.                       void far twindow::winclose () ;        // Closes window
  4245.  
  4246.              Remarks  You CANNOT close  an already closed  window.  When  you
  4247.                       close a window, all its  attributes are reset to  their
  4248.                       default values as if you had just declared this object.
  4249.                       Your previous settings like  size and colors aren't  in
  4250.                       effect anymore.
  4251.  
  4252.                       All memory taken by the window  is released.  What  was
  4253.                       under this window when it was opened is restored.
  4254.  
  4255.                  -->  You should NEVER close a window that has part of itself
  4256.                       hidden under another window.  Always close the ones  in
  4257.                       the foreground  first.   This is  your  responsibility!
  4258.                       EasyVision doesn't  know your  window's layer  position
  4259.                       and won't tell you if something goes wrong.
  4260.  
  4261.               Return  None.
  4262.  
  4263.              Example
  4264.                       win->winclose () ;
  4265.  
  4266.  
  4267.        TWINDOW::WINCLEAR
  4268.        ----------------------------------------------------------------------
  4269.  
  4270.              Summary  Clears part or all the window content.
  4271.  
  4272.               Syntax  #include "twindow.hpp"
  4273.  
  4274.                       void far twindow::winclear  // Clears an area in window
  4275.                       (
  4276.                          int left=1,                       // Top left corner
  4277.                          int top=1,
  4278.                          int right=MAXINT              // Bottom right corner
  4279.                          int bottom=MAXINT
  4280.                       ) ;
  4281.  
  4282.              Remarks  The window must be opened to  call this function.   All
  4283.                       arguments are validated  and if  incorrect, changed  to
  4284.                       fall within valid window coordinates.
  4285.  
  4286.  
  4287.  
  4288.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  4289.  
  4290.  
  4291.        ----------------------------------------------------------------------
  4292.        CHAPTER 16 : EasyVision's twindow class                    Page 75/111
  4293.        ----------------------------------------------------------------------
  4294.  
  4295.                       All arguments are optional.  Calling this function with
  4296.                       no arguments will clear the entire window.
  4297.  
  4298.                  -->  Beware that this function  will also clear buttons  and
  4299.                       input fields, BUT NOT REMOVE THEM.  This will make them
  4300.                       invisible, until  you  use  them again.    It  is  your
  4301.                       responsibility to make sure  you don't erase  something
  4302.                       important!
  4303.  
  4304.               Return  None.
  4305.  
  4306.              Example
  4307.                       win->winclear (1,1,999,3) ;     // Erases first 3 lines
  4308.  
  4309.  
  4310.        TWINDOW::WINWRITE
  4311.        ----------------------------------------------------------------------
  4312.  
  4313.              Summary  Writes text to  the window .  Many  format options  are
  4314.                       available.
  4315.  
  4316.               Syntax  #include "twindow.hpp"
  4317.  
  4318.                       void far twindow::winwrite     // Writes text to window
  4319.                       (
  4320.                          char huge *text,        // Ptr to text to be written
  4321.                          int  row=EV_DEF,        // Text's position in window
  4322.                          int  col=1,
  4323.                          int  format=0,                      // Justification
  4324.                          int  fore=EV_DEF,                    // Text's color
  4325.                          int  back=EV_DEF
  4326.                       ) ;
  4327.  
  4328.              Remarks  The window must  be opened.   The  <text> argument  can
  4329.                       point to  a text  string of  any length,  but only  the
  4330.                       first 132 characters will be considered.
  4331.  
  4332.                  -->  This function will only print on 1 line of the  window.
  4333.                       If the string is longer than an entire line, only  what
  4334.                       will fit will be printed.  NO LINE WRAPPING WILL  OCCUR
  4335.                       with this function!
  4336.  
  4337.                       All arguments are optional, except for <text>.
  4338.  
  4339.                       <text> : Pointer to the text to be printed.
  4340.  
  4341.                       <row> : The {winwrite} function keeps track of the last
  4342.                       line printed to, with an  internal cursor.  After  each
  4343.                       {winwrite}, the cursor is positioned on the next line.
  4344.  
  4345.  
  4346.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  4347.  
  4348.  
  4349.        ----------------------------------------------------------------------
  4350.        CHAPTER 16 : EasyVision's twindow class                    Page 76/111
  4351.        ----------------------------------------------------------------------
  4352.  
  4353.                       When you use <row>,  it tells where the  text is to  be
  4354.                       printed.  Row 1 is the first line under the top frame.
  4355.  
  4356.                       This argument is optional.  If  it is not given, or  if
  4357.                       you use the  macro {EV_DEF}, {winwrite}  will use  it's
  4358.                       internal cursor position.  Text will be printed on  the
  4359.                       cursor line, and the cursor will move to the next line.
  4360.  
  4361.                  -->  If you DON'T give the <row>  argument and write to  the
  4362.                       last window line, all the window will be scrolled up  1
  4363.                       line.  YOU MUST MAKE SURE YOU DON'T HAVE ANY BUTTONS OR
  4364.                       INPUT FIELDS.  THEY  WILL BE SCROLLED  UP ALSO AND  THE
  4365.                       WINDOW'S INTEGRITY WILL HAVE BEEN COMPROMISED!
  4366.  
  4367.                  -->  If you give the <row> argument,  you can then write  to
  4368.                       the last line and no scrolling will occur.  The  window
  4369.                       cursor will stay on the last line.
  4370.  
  4371.                       <col> : Column where text will start.  This argument is
  4372.                       optional.  If it is not given, it will default to 1.
  4373.  
  4374.                       <format> : Determines how the text string is justified.
  4375.  
  4376.                       0 : No justification.  <col> is used.
  4377.                       1 : Left justified.  <col> has no effect.
  4378.                       2 : Centered.  <col> has no effect.
  4379.                       3 : Right justified.  <col> has no effect.
  4380.  
  4381.                       This argument is optional.  If it is not given, it will
  4382.                       default to 0.
  4383.  
  4384.                       <fore> :  Foreground  color  used.   This  argument  is
  4385.                       optional.  If it is not given, or if you use the  macro
  4386.                       {EV_DEF}, it will  default to  the window's  foreground
  4387.                       color.
  4388.  
  4389.                       <back> :  Background  color  used.   This  argument  is
  4390.                       optional.  If it is not given, or if you use the  macro
  4391.                       {EV_DEF}, it will  default to  the window's  background
  4392.                       color.
  4393.  
  4394.               Return  None.
  4395.  
  4396.  
  4397.  
  4398.  
  4399.  
  4400.  
  4401.  
  4402.  
  4403.  
  4404.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  4405.  
  4406.  
  4407.        ----------------------------------------------------------------------
  4408.        CHAPTER 16 : EasyVision's twindow class                    Page 77/111
  4409.        ----------------------------------------------------------------------
  4410.  
  4411.              Example
  4412.                            // Writes to current line, left justified, current
  4413.                             // window's colors, and moves cursor to next line
  4414.                       win->winwrite ("Hello") ;
  4415.  
  4416.                         // Writes to current line, centered, current window's
  4417.                             // colors, and move cursor to next line.  Even if
  4418.                                              // <col> is 1, it has no effect.
  4419.                       win->winwrite ("Hello",EV_DEF,1,2) ;
  4420.  
  4421.                                  // Writes to specific line, specific column,
  4422.                                                            // specific colors
  4423.                       win->winwrite ("Hello",5,10,0,YELLOW,RED) ;
  4424.  
  4425.  
  4426.        TWINDOW::WINTEXT
  4427.        ----------------------------------------------------------------------
  4428.  
  4429.              Summary  Displays a  text  array  in current  window  with  word
  4430.                       wrapping and 'Ok/Esc' prompts.
  4431.  
  4432.               Syntax  #include "twindow.hpp"
  4433.  
  4434.                       void far twindow::wintext         // Text with wrapping
  4435.                       (
  4436.                          char huge *textptr,   // Ptr to text to be displayed
  4437.                          int       fore=EV_DEF,    // Normal foreground color
  4438.                          int       high=YELLOW      // Text's highlight color
  4439.                       ) ;
  4440.  
  4441.              Remarks  The window must be opened to call this function.
  4442.  
  4443.                       <textptr> : This  points to the  text to be  displayed.
  4444.                       This text can be of any length.
  4445.  
  4446.                       This text is an  array of characters  that need not  be
  4447.                       formatted in any way.   This function will display  the
  4448.                       array with word wrapping at the window's right edge.
  4449.  
  4450.                       Any extra spaces will be removed from the text, leaving
  4451.                       only one space between each  word.  Any leading  spaces
  4452.                       to a line will also be removed.  If you want to begin a
  4453.                       line with spaces, or separate some words with more than
  4454.                       one space, you must use the underscore (_) character.
  4455.  
  4456.                       You can highlight your  text by surrounding  characters
  4457.                       with the tilde (~) character.
  4458.  
  4459.                       The array can be of any length.
  4460.  
  4461.  
  4462.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  4463.  
  4464.  
  4465.        ----------------------------------------------------------------------
  4466.        CHAPTER 16 : EasyVision's twindow class                    Page 78/111
  4467.        ----------------------------------------------------------------------
  4468.  
  4469.                       An 'Ok' prompt will be created to allow the user to see
  4470.                       the remaining  text  if  it couldn't  all  fit  in  the
  4471.                       window.
  4472.  
  4473.                       An 'Esc' prompt will  be created to  allow the user  to
  4474.                       stop viewing text at his convenience.
  4475.  
  4476.                  -->  When you use  this function,  make sure  the window  is
  4477.                       totally empty.   Everything that was  in the window  is
  4478.                       erased when you call this function.
  4479.  
  4480.                       <fore> :  Foreground  color  used.   This  argument  is
  4481.                       optional.  If it is not given, or if you use the  macro
  4482.                       {EV_DEF}, the default  foreground color  of the  window
  4483.                       will be used.
  4484.  
  4485.                       <high> :  Highlight  color  used.    This  argument  is
  4486.                       optional.  If it is not given, the color YELLOW will be
  4487.                       used for highlights.
  4488.  
  4489.               Return  None.
  4490.  
  4491.              Example
  4492.                       win->wintext (instructions) ;
  4493.  
  4494.  
  4495.        TWINDOW::WINTEXTFILE
  4496.        ----------------------------------------------------------------------
  4497.  
  4498.              Summary  Displays a text file  from disk in  current window with
  4499.                       word wrapping and 'Ok/Esc' prompts.
  4500.  
  4501.               Syntax  #include "twindow.hpp"
  4502.  
  4503.                       void far twindow::wintextfile   // Displays a text file
  4504.                       (
  4505.                          char huge *path,                     // Path to file
  4506.                          int       fore=EV_DEF,    // Foreground color to use
  4507.                          int       high=YELLOW      // Highlight color to use
  4508.                       ) ;
  4509.  
  4510.              Remarks  This function acts exactly the same as {wintext}.   The
  4511.                       only difference is that it gets it's input text from  a
  4512.                       disk file.
  4513.  
  4514.                       <path> :  Complete path  to disk  file.   If  the  file
  4515.                       cannot  be  found,  the  string  "File  not  found"  is
  4516.                       displayed instead.   This string is  pointed to by  the
  4517.                       system variable ev_filenotfoundtext.
  4518.  
  4519.  
  4520.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  4521.  
  4522.  
  4523.        ----------------------------------------------------------------------
  4524.        CHAPTER 16 : EasyVision's twindow class                    Page 79/111
  4525.        ----------------------------------------------------------------------
  4526.  
  4527.                       <fore> :  Foreground  color  used.   This  argument  is
  4528.                       optional.  If it is not given, or if you use the  macro
  4529.                       {EV_DEF}, the default  foreground color  of the  window
  4530.                       will be used.
  4531.  
  4532.                       <high> :  Highlight  color  used.    This  argument  is
  4533.                       optional.  If it is not given, the color YELLOW will be
  4534.                       used for highlights.
  4535.  
  4536.               Return  None.
  4537.  
  4538.              Example
  4539.                       win->wintextfile ("C:\\autoexec.bat") ;
  4540.  
  4541.  
  4542.        TWINDOW::WINMOVE
  4543.        ----------------------------------------------------------------------
  4544.  
  4545.              Summary  Moves the windows to a new location.
  4546.  
  4547.               Syntax  #include "twindow.hpp"
  4548.  
  4549.                       void far twindow::winmove// Moves window to new position
  4550.                       (
  4551.                          int row,            // Topleft corner's new position
  4552.                          int col
  4553.                       ) ;
  4554.  
  4555.              Remarks  The window must be opened.  <row> and <col> are the new
  4556.                       position of  the topleft  corner of  the window.    The
  4557.                       first and last  lines of the  desktop are reserved  for
  4558.                       the menubar and statusline and  you can't have part  of
  4559.                       the window off  the screen.   Therefore, this  function
  4560.                       will validate all coordinates and change them to get  a
  4561.                       valid window position.
  4562.  
  4563.               Return  None.
  4564.  
  4565.              Example
  4566.                       win->winmove (10,12) ;
  4567.  
  4568.  
  4569.        TWINDOW::WINSCROLL
  4570.        ----------------------------------------------------------------------
  4571.  
  4572.              Summary  Moves window in 1 of 4 directions.
  4573.  
  4574.  
  4575.  
  4576.  
  4577.  
  4578.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  4579.  
  4580.  
  4581.        ----------------------------------------------------------------------
  4582.        CHAPTER 16 : EasyVision's twindow class                    Page 80/111
  4583.        ----------------------------------------------------------------------
  4584.  
  4585.               Syntax  #include "twindow.hpp"
  4586.  
  4587.                       void far twindow::winscroll// Moves window 1 space only
  4588.                       (
  4589.                          char direction  // U: up  D: down  L: left  R: right
  4590.                       ) ;
  4591.  
  4592.              Remarks  The entire  window  will  be moved,  IF  POSSIBLE,  one
  4593.                       character in the requested direction.  The name can  be
  4594.                       a little confusing.  It is not the window content  that
  4595.                       is scrolled.  It's the entire window.
  4596.  
  4597.                       The argument is a character, case insensitive:
  4598.  
  4599.                       U: Up,  D: Down,  L: Left,  R: Right.
  4600.  
  4601.               Return  None.
  4602.  
  4603.              Example
  4604.                       win->winscroll ('U') ;       // Move window up one line
  4605.  
  4606.  
  4607.        TWINDOW::WINONEDGES
  4608.        ----------------------------------------------------------------------
  4609.  
  4610.              Summary  Checks if position is on window's edges.
  4611.  
  4612.               Syntax  #include "twindow.hpp"
  4613.  
  4614.                       bool far twindow::winonedges  // Checks if on for edges
  4615.                       (
  4616.                          int      row,                            // Position
  4617.                          int      col,
  4618.                          int huge *offsetrow=NULL,// Offset to top left corner
  4619.                          int huge *offsetcol=NULL
  4620.                       ) ;
  4621.  
  4622.              Remarks  It will return  {TRUE} if this  position is  on one  of
  4623.                       this window's edges.  This function can also return the
  4624.                       offset of the row and col  positions to the upper  left
  4625.                       most corner  of the  window.   If  you don't  want  the
  4626.                       offsets, set the return variables to 'NULL'.
  4627.  
  4628.               Return  {TRUE} if the position is on one of the edges.
  4629.  
  4630.              Example
  4631.                       int off_row, off_col ;
  4632.                       if (win->winonedges (10,23,&off_row,&off_col))
  4633.                          DoSomething () ;
  4634.  
  4635.  
  4636.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  4637.  
  4638.  
  4639.        ----------------------------------------------------------------------
  4640.        CHAPTER 16 : EasyVision's twindow class                    Page 81/111
  4641.        ----------------------------------------------------------------------
  4642.  
  4643.        TWINDOW::WININSIDE
  4644.        ----------------------------------------------------------------------
  4645.  
  4646.              Summary  Checks if a position is in the window.
  4647.  
  4648.               Syntax  #include "twindow.hpp"
  4649.  
  4650.                       bool far twindow::wininside      // Checks if in window
  4651.                       (
  4652.                          int      row,                            // Position
  4653.                          int      col,
  4654.                          int huge *offsetrow=NULL,// Offset to top left corner
  4655.                          int huge *offsetcol=NULL
  4656.                       ) ;
  4657.  
  4658.              Remarks  It will return  {TRUE} if this  position is inside  the
  4659.                       window.  The  frames are NOT  considered inside.   This
  4660.                       function can also return the offset of the row and  col
  4661.                       positions to the upper left most corner of the  window.
  4662.                       If you don't want the offsets, set the return variables
  4663.                       to 'NULL'.
  4664.  
  4665.               Return  {TRUE} if the position is inside window's edges.
  4666.  
  4667.              Example
  4668.                       int off_row, off_col ;
  4669.                       if (win->wininside (10,23,&off_row,&off_col))
  4670.                          DoSomething () ;
  4671.  
  4672.  
  4673.        TWINDOW::WININPUT
  4674.        ----------------------------------------------------------------------
  4675.  
  4676.              Summary  Makes window  alive , allowing  inputs  to  be made  in
  4677.                       multiple input fields and push buttons selected.
  4678.  
  4679.               Syntax  #include "twindow.hpp"
  4680.  
  4681.                       input_info far twindow::wininput          // Gets input
  4682.                       (
  4683.                          input_info ii                   // input_info struct
  4684.                       ) ;
  4685.  
  4686.              Remarks  The user will be able to move between input fields  and
  4687.                       buttons with {II_TAB} (Tab) and {II_S_TAB} (Shift Tab).
  4688.                       He will  be able  to move  the window,  if allowed,  by
  4689.                       dragging it by one of its edges.
  4690.  
  4691.  
  4692.  
  4693.  
  4694.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  4695.  
  4696.  
  4697.        ----------------------------------------------------------------------
  4698.        CHAPTER 16 : EasyVision's twindow class                    Page 82/111
  4699.        ----------------------------------------------------------------------
  4700.  
  4701.                  -->  You should  refrain  from using  the  {fieldinput}  and
  4702.                       {buttoninput} functions.  Use this one instead.
  4703.  
  4704.               Return  If there are no input fields  and no push buttons,  the
  4705.                       {input_info} structure is returned unchanged.
  4706.  
  4707.                       If no push buttons were created, but at least an  input
  4708.                       field, {wininput} will return  with {II_CR} (Enter)  or
  4709.                       {II_ESC} (Esc).  {II_CR}  means the user confirmed  the
  4710.                       inputs by  pressing ENTER.    {II_ESC} means  the  user
  4711.                       aborted the input by pressing ESC.
  4712.  
  4713.                       If buttons were  created, {wininput}  will return  with
  4714.                       the identification value of the button pushed.
  4715.  
  4716.              Example
  4717.                       userinput = win->wininput (ii) ;
  4718.  
  4719.  
  4720.        TWINDOW::FIELDSETCOLORS
  4721.        ----------------------------------------------------------------------
  4722.  
  4723.              Summary  Sets the  colors used  in the  next input  field to  be
  4724.                       created.
  4725.  
  4726.               Syntax  #include "twindow.hpp"
  4727.  
  4728.                       void far twindow::fieldsetcolors      // Fields' colors
  4729.                       (
  4730.                          int back=BLUE,           // Fields' background color
  4731.                          int foreon=WHITE,    // Foreground color when active
  4732.                          int foreoff=LIGHTCYAN         // Color when inactive
  4733.                       ) ;
  4734.  
  4735.              Remarks  <back> :  Background  color  used.   This  argument  is
  4736.                       optional.  If it is not  given, 'BLUE' is assumed.   If
  4737.                       the macro  {EV_DEF} is  used, it  will default  to  the
  4738.                       window default background color.
  4739.  
  4740.                       <foreon> :  Foreground color  used  when the  field  is
  4741.                       active.   This argument  is optional.    If it  is  not
  4742.                       given, it will default to 'WHITE'.
  4743.  
  4744.                       <foreoff> :  Foreground color  used when  the field  is
  4745.                       inactive.  This  argument is optional.   If  it is  not
  4746.                       given, it will default to 'DARKGRAY'.
  4747.  
  4748.               Return  None.
  4749.  
  4750.  
  4751.  
  4752.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  4753.  
  4754.  
  4755.        ----------------------------------------------------------------------
  4756.        CHAPTER 16 : EasyVision's twindow class                    Page 83/111
  4757.        ----------------------------------------------------------------------
  4758.  
  4759.              Example
  4760.                       win->fieldsetcolors (GREEN,WHITE,WHITE) ;
  4761.  
  4762.  
  4763.        TWINDOW::FIELDCREATE
  4764.        ----------------------------------------------------------------------
  4765.  
  4766.              Summary  Creates a new input field in the window.
  4767.  
  4768.               Syntax  #include "twindow.hpp"
  4769.  
  4770.                       void far twindow::fieldcreate    // Creates input field
  4771.                       (
  4772.                          int       row,                  // Input field's row
  4773.                          int       col,                  // Input field's col
  4774.                          int       answerlength,   // Answers' maximum length
  4775.                          int       length,  // Input field's length in window
  4776.                          int       ftr,  // Input field's filter number (0-4)
  4777.                          char huge *xtraftr,        // Extra chars for filter
  4778.                          bool      capsflag,         // If TRUE, to uppercase
  4779.                          bool      nullflag,   // If TRUE, can enter null str
  4780.                          char huge *defaultasw,             // Default answer
  4781.                          char huge *sltext,      // Statusline text for field
  4782.                          int       hlpctx              // Help context number
  4783.                       ) ;
  4784.  
  4785.              Remarks  The window must be opened before calling this function.
  4786.  
  4787.                       Fields have default built in behaviors when a window is
  4788.                       first created.  If you don't  call any function to  set
  4789.                       their attributes, buttons  will default  to 'WHITE'  on
  4790.                       'BLUE'.
  4791.  
  4792.                       <row> : Row of input field.
  4793.  
  4794.                       <col> : Column of input field.
  4795.  
  4796.                       <row> and <col>  are validated to  make sure the  input
  4797.                       field fits  into  the  window.    If  the  position  is
  4798.                       incorrect, it will be automatically changed.
  4799.  
  4800.                       <answerlength>  :  The  maximum  length  of  the  input
  4801.                       buffer.  The user is allow to enter a string no  longer
  4802.                       than this limit.  The upper limit is 32K.  That  should
  4803.                       be enough!
  4804.  
  4805.  
  4806.  
  4807.  
  4808.  
  4809.  
  4810.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  4811.  
  4812.  
  4813.        ----------------------------------------------------------------------
  4814.        CHAPTER 16 : EasyVision's twindow class                    Page 84/111
  4815.        ----------------------------------------------------------------------
  4816.  
  4817.                       <length> : The length of the input field in the  window
  4818.                       in characters.   The input field  cannot be wider  than
  4819.                       the window.  The input field  cannot be wider than  the
  4820.                       answer buffer's length.
  4821.  
  4822.                       <ftr>  :  An  input  field  will  allow  only   certain
  4823.                       characters  as  input.    <ftr>  will  determine   what
  4824.                       characters are accepted.
  4825.  
  4826.                       0 : All characters are allowed, except control chars.
  4827.                       1 : A-Z and a-z only.  *** Space (32) not allowed ***
  4828.                       2 : 0-9 only.
  4829.                       3 : A-Z, a-z and 0-9 only.
  4830.                       4 : No characters allowed.
  4831.  
  4832.                       <xtraftr> : Include,  between quotes, other  characters
  4833.                       that you want accepted  by the filter.   Often used  to
  4834.                       include the space char (ASCII 32).
  4835.  
  4836.                       <capsflag> :  If  set to  {TRUE},  all inputs  will  be
  4837.                       converted to CAPS.
  4838.  
  4839.                       <nullflag> :  If  set to  {FALSE},  the user  won't  be
  4840.                       allowed to input an empty string.
  4841.  
  4842.                       <defaultasw> : This is the default answer that will  be
  4843.                       put in the input field.  This argument is optional.  If
  4844.                       you want  the  field  to be  initially  empty,  set  to
  4845.                       'NULL'.
  4846.  
  4847.                       <sltext> :  This is  a short  help  text that  will  be
  4848.                       displayed on the status line when the field is  active.
  4849.                       If you don't want a help  text to be displayed, set  to
  4850.                       'NULL'.
  4851.  
  4852.                       <hlpctx> : The help context number for this field.   If
  4853.                       set to {EV_NOHLPCTX}, the  field will use the  window's
  4854.                       default.
  4855.  
  4856.               Return  None.
  4857.  
  4858.              Example
  4859.                       win->fieldcreate (2, 2, 20, 10, 1, " ", TRUE, FALSE,
  4860.                       "Canada", "Enter country", 205) ;
  4861.  
  4862.  
  4863.  
  4864.  
  4865.  
  4866.  
  4867.  
  4868.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  4869.  
  4870.  
  4871.        ----------------------------------------------------------------------
  4872.        CHAPTER 16 : EasyVision's twindow class                    Page 85/111
  4873.        ----------------------------------------------------------------------
  4874.  
  4875.        TWINDOW::FIELDSETASW
  4876.        ----------------------------------------------------------------------
  4877.  
  4878.              Summary  Sets a field current content.
  4879.  
  4880.               Syntax  #include "twindow.hpp"
  4881.  
  4882.                       void far twindow::fieldsetasw    // Sets default answer
  4883.                       (
  4884.                          char huge *answer,  // Default answer for this field
  4885.                          int       fieldnb               // Field's ID number
  4886.                       ) ;
  4887.  
  4888.              Remarks  Even if the content  is immediately changed, the  field
  4889.                       on  the  screen  will  be  updated  only  when  it   is
  4890.                       activated.
  4891.  
  4892.                       <answer> : String to copy in  the field.  It can be  of
  4893.                       any length, but only what will fit in the answer buffer
  4894.                       will be copied.
  4895.  
  4896.                       <fieldnb> : Number of the field to copy to.  Number IDs
  4897.                       are given to the field at their creation, starting with
  4898.                       one.
  4899.  
  4900.               Return  None.
  4901.  
  4902.              Example
  4903.                       win->fieldsetasw ("C:\\UTILS\\",5) ;
  4904.  
  4905.  
  4906.        TWINDOW::FIELDGETASW
  4907.        ----------------------------------------------------------------------
  4908.  
  4909.              Summary  Reads the  content of  the answer  buffer of  an  input
  4910.                       field.
  4911.  
  4912.               Syntax  #include "twindow.hpp"
  4913.  
  4914.                       void far twindow::fieldgetasw  // Gets a field's answer
  4915.                       (
  4916.                          char huge *dest,  // Destination to copy answer's to
  4917.                          int       fieldnb               // Field's ID number
  4918.                       ) ;
  4919.  
  4920.              Remarks  The answer  buffer  of  field <fieldnb>  is  copied  to
  4921.                       <dest>.
  4922.  
  4923.  
  4924.  
  4925.  
  4926.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  4927.  
  4928.  
  4929.        ----------------------------------------------------------------------
  4930.        CHAPTER 16 : EasyVision's twindow class                    Page 86/111
  4931.        ----------------------------------------------------------------------
  4932.  
  4933.                  -->  There is  no  way for  the  function to  know  if  your
  4934.                       destination is big  enough to hold  the content of  the
  4935.                       answer buffer.  YOU MUST MAKE ABSOLUTELY SURE THAT YOUR
  4936.                       DESTINATION IS AS  BIG AS  THE ANSWER  BUFFER PLUS  ONE
  4937.                       CHARACTER for the terminating '\n'.
  4938.  
  4939.               Return  None.
  4940.  
  4941.              Example
  4942.                       win->fieldgetasw (&response,3) ;
  4943.  
  4944.  
  4945.        TWINDOW::FIELDINPUT
  4946.        ----------------------------------------------------------------------
  4947.  
  4948.              Summary  Gets user input from one input field.
  4949.  
  4950.               Syntax  #include "twindow.hpp"
  4951.  
  4952.                       input_info far twindow::fieldinput   // Activates field
  4953.                       (
  4954.                          int fieldnb     // Field's number, to get input from
  4955.                       ) ;
  4956.  
  4957.              Remarks  You must have created at least  one input field to  use
  4958.                       this function.  Fields are given numbers when they  are
  4959.                       created.  The first field created is number one.
  4960.  
  4961.                       <fieldnb> : This is the field from which you will  make
  4962.                       the input.  This field must exist.
  4963.  
  4964.                  -->  You should never have to use this function.  You should
  4965.                       consider using the {wininput}  function instead.   This
  4966.                       is provided to allow for really special cases.
  4967.  
  4968.                  -->  The user won't be able to move the window.
  4969.  
  4970.               Return  {fieldinput} with return with an {input_info} structure
  4971.                       containing the  ASCII code  representing how  the  user
  4972.                       terminated the input.   This can be {II_CR},  {II_ESC},
  4973.                       {II_TAB} or {II_S_TAB}.
  4974.  
  4975.              Example
  4976.                       name = win->fieldinput (1) ;
  4977.  
  4978.  
  4979.  
  4980.  
  4981.  
  4982.  
  4983.  
  4984.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  4985.  
  4986.  
  4987.        ----------------------------------------------------------------------
  4988.        CHAPTER 16 : EasyVision's twindow class                    Page 87/111
  4989.        ----------------------------------------------------------------------
  4990.  
  4991.        TWINDOW::BUTTONSETCOLORS
  4992.        ----------------------------------------------------------------------
  4993.  
  4994.              Summary  Sets the colors used for all the window's buttons.
  4995.  
  4996.               Syntax  #include "twindow.hpp"
  4997.  
  4998.                       void far twindow::buttonsetcolors// Sets buttons's colors
  4999.                       (
  5000.                          int back=GREEN,         // Button's background color
  5001.                          int foreon=WHITE,    // Foreground color when active
  5002.                          int foreoff=BLACK, // Foreground color when inactive
  5003.                          int high=YELLOW          // Highlight color (hotkey)
  5004.                       ) ;
  5005.  
  5006.              Remarks  All buttons  use the  same  color configuration.    You
  5007.                       can't use this function once a button has been created.
  5008.  
  5009.                       <back>  :  Background  color  of  all  buttons.    This
  5010.                       argument is optional and will default to 'GREEN'.
  5011.  
  5012.                       <foreon> : Foreground  color of active  buttons.   This
  5013.                       argument is optional and will default to 'WHITE'.
  5014.  
  5015.                       <foreoff> : Foreground color of inactive buttons.  This
  5016.                       argument is optional and will default to 'BLACK'.
  5017.  
  5018.                       <high> : Highlight color of all buttons.  This argument
  5019.                       is optional and will default to 'YELLOW'.
  5020.  
  5021.               Return  None.
  5022.  
  5023.              Example
  5024.                       win->buttonsetcolors (BLUE,WHITE,BLACK,RED) ;
  5025.  
  5026.  
  5027.        TWINDOW::BUTTONCREATE
  5028.        ----------------------------------------------------------------------
  5029.  
  5030.              Summary  Creates a new button.
  5031.  
  5032.  
  5033.  
  5034.  
  5035.  
  5036.  
  5037.  
  5038.  
  5039.  
  5040.  
  5041.  
  5042.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  5043.  
  5044.  
  5045.        ----------------------------------------------------------------------
  5046.        CHAPTER 16 : EasyVision's twindow class                    Page 88/111
  5047.        ----------------------------------------------------------------------
  5048.  
  5049.               Syntax  #include "twindow.hpp"
  5050.  
  5051.                       void far twindow::buttoncreate      // Creates a button
  5052.                       (
  5053.                          int       row,                       // Button's row
  5054.                          int       col,                       // Button's col
  5055.                          char huge *name,                    // Button's name
  5056.                          int       buttonkey,              // Button's hotkey
  5057.                          char huge *sltext=NULL,  // Button's statusline text
  5058.                          int       hlpctx=EV_NOHLPCTX  // Help context number
  5059.                       ) ;
  5060.  
  5061.              Remarks  The window must be  opened to use  this function.   The
  5062.                       window must be big enough to hold the button.  It  must
  5063.                       be at least 4 lines high, and 11 columns wide.
  5064.  
  5065.                       You can create as many buttons  as you want.  There  is
  5066.                       no upper limit.
  5067.  
  5068.                       Buttons have default built in  values when a window  is
  5069.                       first  created.     You   don't   need  to   call   the
  5070.                       {buttonsetcolors} function.  If you don't, buttons will
  5071.                       default to  a  'GREEN' background,  'WHITE'  text  when
  5072.                       active,  'BLACK'  text  when  inactive,  and   'YELLOW'
  5073.                       highlight.
  5074.  
  5075.                  -->  The availability  status  of  a  newly  created  button
  5076.                       always defaults to {TRUE} (available).
  5077.  
  5078.                       The first button created will be considered the default
  5079.                       button.  This button will be activated when you request
  5080.                       a {buttoninput} or {wininput}.
  5081.  
  5082.                       <row> : Row position of the new button.
  5083.  
  5084.                       <col> : Column position  of the new  button.  If  <row>
  5085.                       and <col>  are not  valid, they  will be  changed to  a
  5086.                       correct position.
  5087.  
  5088.                  -->  You must make  sure buttons  don't overlap.   A  button
  5089.                       needs an empty line under and to the right of itself.
  5090.  
  5091.                       <name> : The name to put on  the button.  It can be  of
  5092.                       any length, but  only the  first 8  characters will  be
  5093.                       considered.  Names aren't automatically centered on the
  5094.                       buttons.  Center the name manually by inserting leading
  5095.                       spaces in the name.
  5096.  
  5097.  
  5098.  
  5099.  
  5100.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  5101.  
  5102.  
  5103.        ----------------------------------------------------------------------
  5104.        CHAPTER 16 : EasyVision's twindow class                    Page 89/111
  5105.        ----------------------------------------------------------------------
  5106.  
  5107.                       <buttonkey> : This is the ASCII code that will identify
  5108.                       a particular button.  Some rules are to be observed:
  5109.  
  5110.                       If the  identification code  of  the button  matches  a
  5111.                       character  in  its   name,  that   character  will   be
  5112.                       highlighted.
  5113.  
  5114.                       {II_TAB} (Tab), {II_S_TAB} (Shift Tab) and {II_ARROW_*}
  5115.                       (arrow keys) codes cannot be used to identify a button.
  5116.  
  5117.                       <sltext> :  This is  a short  help  text that  will  be
  5118.                       displayed on the status line when the button is active.
  5119.                       This argument is optional.  If it is not given, no help
  5120.                       text will be displayed.
  5121.  
  5122.                       <hlpctx> : The help context number for this button.  If
  5123.                       set to {EV_NOHLPCTX}, the  field will use the  window's
  5124.                       default.
  5125.  
  5126.               Return  None.
  5127.  
  5128.              Example
  5129.                       win->buttoncreate (10,2,"  Save",'S',"Save file",153) ;
  5130.  
  5131.  
  5132.        TWINDOW::BUTTONSETAVAIL
  5133.        ----------------------------------------------------------------------
  5134.  
  5135.              Summary  Sets the availability of a button.
  5136.  
  5137.               Syntax  #include "twindow.hpp"
  5138.  
  5139.                       void far twindow::buttonsetavail   // Sets availability
  5140.                       (
  5141.                          int  buttonkey,                   // Button's hotkey
  5142.                          bool available=TRUE               // TRUE: available
  5143.                       ) ;
  5144.  
  5145.              Remarks  The button specified MUST exist.
  5146.  
  5147.                       <buttonkey> : The button's  hotkey that identifies  the
  5148.                       one you want to change.
  5149.  
  5150.                       <available> : {TRUE}  means this  button is  available.
  5151.                       {FALSE} means it is not.  When a button is created with
  5152.                       {buttoncreate},    its    availability    status     is
  5153.                       automatically set to {TRUE}.
  5154.  
  5155.               Return  None.
  5156.  
  5157.  
  5158.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  5159.  
  5160.  
  5161.        ----------------------------------------------------------------------
  5162.        CHAPTER 16 : EasyVision's twindow class                    Page 90/111
  5163.        ----------------------------------------------------------------------
  5164.  
  5165.              Example
  5166.                       win->buttonsetavail ('S',FALSE) ;    // Save button OFF
  5167.  
  5168.  
  5169.        TWINDOW::BUTTONINPUT
  5170.        ----------------------------------------------------------------------
  5171.  
  5172.              Summary  Makes user go through the buttons with {II_TAB}  (Tab),
  5173.                       {II_S_TAB} (Shift Tab) and {II_ARROW_*} (arrow keys).
  5174.  
  5175.               Syntax  #include "twindow.hpp"
  5176.  
  5177.                       input_info far twindow::buttoninput // Waits for button
  5178.                       (
  5179.                          input_info userinput,        // User's initial input
  5180.                          bool       first=TRUE       // TRUE: Makes 1st alive
  5181.                       ) ;
  5182.  
  5183.              Remarks  You must have created at least one button to call  this
  5184.                       function,  and  there  must  be  at  least  one  button
  5185.                       available.
  5186.  
  5187.                       <userinput>  :   The   initial  user   input,   as   an
  5188.                       {input_info} structure.    This could  come  from  some
  5189.                       previous processing.   For instance, the  result of  an
  5190.                       input field.
  5191.  
  5192.                       <first> : Determines  which button will  first be  made
  5193.                       active during  the  input.    {TRUE}  means  the  first
  5194.                       created button, {FALSE} means the last.  This  argument
  5195.                       is optional and will default to {TRUE}.
  5196.  
  5197.                  -->  You should never have to use this function.  You should
  5198.                       consider using the {wininput}  function instead.   This
  5199.                       is provided to allow for really special cases.
  5200.  
  5201.                  -->  The user won't be able to move the window.
  5202.  
  5203.               Return  The  function   returns   an   'int'.     It   is   the
  5204.                       identification code of the button that was pushed.
  5205.  
  5206.              Example
  5207.                       command = win->buttoninput (command) ;
  5208.  
  5209.  
  5210.  
  5211.  
  5212.  
  5213.  
  5214.  
  5215.  
  5216.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  5217.  
  5218.  
  5219.        ----------------------------------------------------------------------
  5220.        APPENDIX A : Keycodes macros                               Page 91/111
  5221.        ----------------------------------------------------------------------
  5222.  
  5223.        ----------------------------------------------------------------------
  5224.        ----------------------------------------------------------------------
  5225.        A P P E N D I X   A : Keycodes macros
  5226.        ----------------------------------------------------------------------
  5227.  
  5228.                       Extended keycodes  are returned  when you  press a  key
  5229.                       that doesn't have an associated  ASCII code.  They  are
  5230.                       represented by  stuffing two  codes into  the  keyboard
  5231.                       buffer.  A 0 followed by an extended key keycode in the
  5232.                       range 0 through 255.
  5233.  
  5234.                       The EasyVision's {getkey} function and {tinput}  class,
  5235.                       deal with these codes by returning values (int) in  the
  5236.                       range 0  through 511.   The  standard ASCII  codes  are
  5237.                       returned unchanged  (Guess why?).   As  a  convenience,
  5238.                       extended keycodes have 256  added to their real  value,
  5239.                       and are returned as a single number.
  5240.  
  5241.                       Macros, always debuting by {II_}, have been assigned to
  5242.                       most of  the  values listed  here.   Those  macros  are
  5243.                       available in "STDMACRO.H".   You should always use  the
  5244.                       macros instead of the actual codes.
  5245.  
  5246.                       Macro               Value                       Comment
  5247.  
  5248.                       II_NUL              0             /* No input at all */
  5249.  
  5250.                       II_MOUSE            256      /* {input_info} = mouse */
  5251.  
  5252.                       II_BS               8                  /* Back space */
  5253.                       II_TAB              9                         /* Tab */
  5254.                       II_CR               13            /* Carriage return */
  5255.                       II_ESC              27                     /* Escape */
  5256.  
  5257.                       II_S_TAB            271                 /* Shift-Tab */
  5258.  
  5259.                       II_A_Q              272   /* Alt-Q/W/E/R/T/Y/U/I/O/P */
  5260.                       II_A_W              273
  5261.                       II_A_E              274
  5262.                       II_A_R              275
  5263.                       II_A_T              276
  5264.                       II_A_Y              277
  5265.                       II_A_U              278
  5266.                       II_A_I              279
  5267.                       II_A_O              280
  5268.                       II_A_P              281
  5269.  
  5270.  
  5271.  
  5272.  
  5273.  
  5274.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  5275.  
  5276.  
  5277.        ----------------------------------------------------------------------
  5278.        APPENDIX A : Keycodes macros                               Page 92/111
  5279.        ----------------------------------------------------------------------
  5280.  
  5281.                       II_A_A              286     /* Alt-A/S/D/F/G/H/J/K/L */
  5282.                       II_A_S              287
  5283.                       II_A_D              288
  5284.                       II_A_F              289
  5285.                       II_A_G              290
  5286.                       II_A_H              291
  5287.                       II_A_J              292
  5288.                       II_A_K              293
  5289.                       II_A_L              294
  5290.  
  5291.                       II_A_Z              300         /* Alt-Z/X/C/V/B/N/M */
  5292.                       II_A_X              301
  5293.                       II_A_C              302
  5294.                       II_A_V              303
  5295.                       II_A_B              304
  5296.                       II_A_N              305
  5297.                       II_A_M              306
  5298.  
  5299.                       II_F1               315                    /* F1-F10 */
  5300.                       II_F2               316
  5301.                       II_F3               317
  5302.                       II_F4               318
  5303.                       II_F5               319
  5304.                       II_F6               320
  5305.                       II_F7               321
  5306.                       II_F8               322
  5307.                       II_F9               323
  5308.                       II_F10              324
  5309.                       II_F11              389                       /* F11 */
  5310.                       II_F12              390                       /* F12 */
  5311.  
  5312.                       II_HOME             327               /* Cursor keys */
  5313.                       II_ARROWUP          328
  5314.                       II_PAGEUP           329
  5315.                       II_ARROWLEFT        331
  5316.                       II_ARROWRIGHT       333
  5317.                       II_END              335
  5318.                       II_ARROWDOWN        336
  5319.                       II_PAGEDOWN         337
  5320.                       II_INS              338
  5321.                       II_DEL              339
  5322.  
  5323.  
  5324.  
  5325.  
  5326.  
  5327.  
  5328.  
  5329.  
  5330.  
  5331.  
  5332.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  5333.  
  5334.  
  5335.        ----------------------------------------------------------------------
  5336.        APPENDIX A : Keycodes macros                               Page 93/111
  5337.        ----------------------------------------------------------------------
  5338.  
  5339.                       II_S_F1             340     /* Shift-F1 to Shift-F10 */
  5340.                       II_S_F2             341
  5341.                       II_S_F3             342
  5342.                       II_S_F4             343
  5343.                       II_S_F5             344
  5344.                       II_S_F6             345
  5345.                       II_S_F7             346
  5346.                       II_S_F8             347
  5347.                       II_S_F9             348
  5348.                       II_S_F10            349
  5349.                       II_S_F11            391                 /* Shift-F11 */
  5350.                       II_S_F12            392                 /* Shift-F12 */
  5351.  
  5352.                       II_C_F1             350       /* Ctrl-F1 to Ctrl-F10 */
  5353.                       II_C_F2             351
  5354.                       II_C_F3             352
  5355.                       II_C_F4             353
  5356.                       II_C_F5             354
  5357.                       II_C_F6             355
  5358.                       II_C_F7             356
  5359.                       II_C_F8             357
  5360.                       II_C_F9             358
  5361.                       II_C_F10            359
  5362.                       II_C_F11            393                  /* Ctrl-F11 */
  5363.                       II_C_F12            394                  /* Ctrl-F12 */
  5364.  
  5365.                       II_A_F1             360         /* Alt-F1 to Alt-F10 */
  5366.                       II_A_F2             361
  5367.                       II_A_F3             362
  5368.                       II_A_F4             363
  5369.                       II_A_F5             364
  5370.                       II_A_F6             365
  5371.                       II_A_F7             366
  5372.                       II_A_F8             367
  5373.                       II_A_F9             368
  5374.                       II_A_F10            369
  5375.                       II_A_F11            395                   /* Alt-F11 */
  5376.                       II_A_F12            396                   /* Alt-F12 */
  5377.  
  5378.                       II_C_PRTSCR         370         /* Ctrl-Print Screen */
  5379.  
  5380.                       II_C_ARROWLEFT      371         /* Ctrl- cursor keys */
  5381.                       II_C_ARROWRIGHT     372
  5382.                       II_C_END            373
  5383.                       II_C_PAGEDOWN       374
  5384.                       II_C_HOME           375
  5385.                       II_C_PAGEUP         388
  5386.  
  5387.  
  5388.  
  5389.  
  5390.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  5391.  
  5392.  
  5393.        ----------------------------------------------------------------------
  5394.        APPENDIX A : Keycodes macros                               Page 94/111
  5395.        ----------------------------------------------------------------------
  5396.  
  5397.                       II_A_1              376/* Alt-1/2/3/4/5/6/7/8/9/0/-/= */
  5398.                       II_A_2              377
  5399.                       II_A_3              378
  5400.                       II_A_4              379
  5401.                       II_A_5              380
  5402.                       II_A_6              381
  5403.                       II_A_7              382
  5404.                       II_A_8              383
  5405.                       II_A_9              384
  5406.                       II_A_0              385
  5407.                       II_A_MINUS          386
  5408.                       II_A_EQUAL          387
  5409.  
  5410.  
  5411.  
  5412.  
  5413.  
  5414.  
  5415.  
  5416.  
  5417.  
  5418.  
  5419.  
  5420.  
  5421.  
  5422.  
  5423.  
  5424.  
  5425.  
  5426.  
  5427.  
  5428.  
  5429.  
  5430.  
  5431.  
  5432.  
  5433.  
  5434.  
  5435.  
  5436.  
  5437.  
  5438.  
  5439.  
  5440.  
  5441.  
  5442.  
  5443.  
  5444.  
  5445.  
  5446.  
  5447.  
  5448.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  5449.  
  5450.  
  5451.        ----------------------------------------------------------------------
  5452.        APPENDIX B : Color codes and symbolic constants            Page 95/111
  5453.        ----------------------------------------------------------------------
  5454.  
  5455.        ----------------------------------------------------------------------
  5456.        ----------------------------------------------------------------------
  5457.        A P P E N D I X   B : Color codes and symbolic constants
  5458.        ----------------------------------------------------------------------
  5459.  
  5460.                       When asked for a color  argument, you must provide  one
  5461.                       of the following  values.  As  an alternative, you  can
  5462.                       also use  special macros,  provided "CONIO.H"  as  been
  5463.                       included.
  5464.  
  5465.                  -->  Functions that require a background color argument  can
  5466.                       use bright  background color.   Refer  to  {tdesktop}'s
  5467.                       {settextmode} for more information.
  5468.  
  5469.                       Available background colors:
  5470.  
  5471.                       0  BLACK       8  DARKGRAY
  5472.                       1  BLUE        9  LIGHTBLUE
  5473.                       2  GREEN       10 LIGHTGREEN
  5474.                       3  CYAN        11 LIGHTCYAN
  5475.                       4  RED         12 LIGHTRED
  5476.                       5  MAGENTA     13 LIGHTMAGENTA
  5477.                       6  BROWN       14 YELLOW
  5478.                       7  LIGHTGRAY   15 WHITE
  5479.  
  5480.  
  5481.                       Available foreground colors:
  5482.  
  5483.                       0  BLACK       8  DARKGRAY
  5484.                       1  BLUE        9  LIGHTBLUE
  5485.                       2  GREEN       10 LIGHTGREEN
  5486.                       3  CYAN        11 LIGHTCYAN
  5487.                       4  RED         12 LIGHTRED
  5488.                       5  MAGENTA     13 LIGHTMAGENTA
  5489.                       6  BROWN       14 YELLOW
  5490.                       7  LIGHTGRAY   15 WHITE
  5491.  
  5492.  
  5493.  
  5494.  
  5495.  
  5496.  
  5497.  
  5498.  
  5499.  
  5500.  
  5501.  
  5502.  
  5503.  
  5504.  
  5505.  
  5506.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  5507.  
  5508.  
  5509.        ----------------------------------------------------------------------
  5510.        APPENDIX C : Context sensitive help system                 Page 96/111
  5511.        ----------------------------------------------------------------------
  5512.  
  5513.  
  5514.        ----------------------------------------------------------------------
  5515.        ----------------------------------------------------------------------
  5516.        A P P E N D I X   C : Context sensitive help system
  5517.        ----------------------------------------------------------------------
  5518.  
  5519.                       EasyVision provides an  easy to  use context  sensitive
  5520.                       help system.  If fact, it's so easy you have nothing to
  5521.                       do except write up the help text.
  5522.  
  5523.                       At startup, the static  instance of the {tinput}  class
  5524.                       (input) will look  in the directory  of the  executable
  5525.                       file "*.EXE" for  the help files  "*.HLP" and  "*.HDX".
  5526.                       If those files  are not found  or one  is missing,  the
  5527.                       program simply won't  use the  help system.   When  the
  5528.                       user requests help by pressing  the F1 function key,  a
  5529.                       message indicating that help  is not available will  be
  5530.                       displayed.
  5531.  
  5532.                       If, however,  you want  your program  to use  the  help
  5533.                       system, follow these few simple steps...
  5534.  
  5535.  
  5536.        What is a context
  5537.        ----------------------------------------------------------------------
  5538.  
  5539.                       Menus in the menubar and items within a menu, each have
  5540.                       their own context  number.  Windows,  input fields  and
  5541.                       push buttons also have their own context number.   They
  5542.                       are given when you create those objects.
  5543.  
  5544.                       When one of  these objects is  active or selected,  its
  5545.                       context number is in effect.   If help is requested  by
  5546.                       the user,  the  help  text associated  with  this  help
  5547.                       context number will be displayed.
  5548.  
  5549.                       These objects provide  easy input fonctions.   You  can
  5550.                       also get inputs from the {tinput::get} member function.
  5551.                       When you do, you also specify a current help context.
  5552.  
  5553.                       So, in  essence,  a  context number  indicates  to  the
  5554.                       library  what  the  user  is  currently  doing  in  the
  5555.                       interface or in  the program.   The help routines  will
  5556.                       thereafter be  able to  display  help relative  to  the
  5557.                       current situation.
  5558.  
  5559.  
  5560.  
  5561.  
  5562.  
  5563.  
  5564.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  5565.  
  5566.  
  5567.        ----------------------------------------------------------------------
  5568.        APPENDIX C : Context sensitive help system                 Page 97/111
  5569.        ----------------------------------------------------------------------
  5570.  
  5571.  
  5572.        Context numbering
  5573.        ----------------------------------------------------------------------
  5574.  
  5575.                       You can  number your  context in  any way.   A  context
  5576.                       number  is  an  integer  number  (int).    You   should
  5577.                       consider,  however, using a logical numbering system.
  5578.  
  5579.                       You could give a menu the context number 100, and  give
  5580.                       the items within  this menu the  numbers 101, 102,  103
  5581.                       and so on...
  5582.  
  5583.                       You would do  the same with  windows.   A window  would
  5584.                       have the number 1000.  The input fields would be  1100,
  5585.                       1101, 1102, etc.  The push buttons could be 1200, 1201,
  5586.                       1202, etc.
  5587.  
  5588.                       You choose the numbering  system that's right for  you.
  5589.                       You'll see in a few moments that there is an easier way
  5590.                       to manage these context numbers.
  5591.  
  5592.  
  5593.        Writing the ASCII help file
  5594.        ----------------------------------------------------------------------
  5595.  
  5596.                       The help file is in plain ASCII.  You can put  comments
  5597.                       everywhere in  the file.   The  help compiler  "HC.EXE"
  5598.                       will consider only  the text between  the two  keywords
  5599.                       delimiters {HLPCTX} and {HLPEND}.
  5600.  
  5601.                  -->  The help text MUST be saved WITHOUT carriage returns or
  5602.                       linefeeds at the end of the lines.  You put a  carriage
  5603.                       return only at the end of  a paragraph.  If you want  a
  5604.                       blank line between paragraphs,  put two returns at  the
  5605.                       end.
  5606.  
  5607.                       I strongly suggest that you  write your help file  with
  5608.                       your favorite word processor and  save the file in  its
  5609.                       native format.  You'll also save  an ASCII copy of  it,
  5610.                       without carriage returns at the  end of the lines,  for
  5611.                       the help compiler.
  5612.  
  5613.                       You MUST  give the  ASCII file  the same  name as  your
  5614.                       program's executable  "*.EXE".   For instance,  if  the
  5615.                       program is named "TOTO.EXE", your ASCII help file  must
  5616.                       be named "TOTO.*".  The extension  is up to you, but  I
  5617.                       strongly suggest  you use  "*.HLT" extensions  for  the
  5618.                       ASCII help file "TOTO.HLT".
  5619.  
  5620.  
  5621.  
  5622.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  5623.  
  5624.  
  5625.        ----------------------------------------------------------------------
  5626.        APPENDIX C : Context sensitive help system                 Page 98/111
  5627.        ----------------------------------------------------------------------
  5628.  
  5629.  
  5630.        ASCII help file format
  5631.        ----------------------------------------------------------------------
  5632.  
  5633.                       The ASCII help file uses the following format.
  5634.  
  5635.                       Example:
  5636.  
  5637.                       HLPCTX 123 MENU_EDIT_PASTE
  5638.                       By using the paste command  you'll copy the content  of
  5639.                       the clipboard back onto the  edit page at the  cursor's
  5640.                       location.
  5641.                       HLPEND
  5642.  
  5643.                       The help  compiler  will  consider only  what  you  put
  5644.                       between the {HLPCTX}  and the {HLPEND}  keywords.   You
  5645.                       can put any comments you want elsewhere.
  5646.  
  5647.                       1.   The HLPCTX keyword can be anywhere on the line and
  5648.                            is case insensitive.
  5649.  
  5650.                       2.   Next you  put  the context  number.   It  must  be
  5651.                            separated from the  {HLPCTX} keyword  by at  least
  5652.                            one white  space character  (spaces (32)  or  TABS
  5653.                            (9)) and ON THE SAME TEXT LINE.
  5654.  
  5655.                            This context number  must be a  valid string  that
  5656.                            will evaluate to an integer.
  5657.  
  5658.                       3.   After the context  number, again  separated by  at
  5659.                            least a  white space  character, and  ON THE  SAME
  5660.                            LINE, you'll put the context '#define' macro.
  5661.  
  5662.                       -->  The compiler will produce a file with the name  of
  5663.                            your program executable and the extension  "*.HCM"
  5664.                            (Help Context Macros).  You can then include  this
  5665.                            file in your  source codes and  reference easy  to
  5666.                            remember macros instead of context number.
  5667.  
  5668.                            This macro is optional.  If not present, you'll be
  5669.                            able to reference this context only by its number.
  5670.  
  5671.                       4.   You then start  your help text  on the next  line.
  5672.                            Everything you  write, up  but not  including  the
  5673.                            following {HLPEND} keyword, will be considered  by
  5674.                            the help compiler as the help text associated with
  5675.                            this context number and macro.
  5676.  
  5677.  
  5678.  
  5679.  
  5680.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  5681.  
  5682.  
  5683.        ----------------------------------------------------------------------
  5684.        APPENDIX C : Context sensitive help system                 Page 99/111
  5685.        ----------------------------------------------------------------------
  5686.  
  5687.  
  5688.                       5.   You then  put  the terminating  {HLPEND}  keyword,
  5689.                            wich is case insensitive.  However, the  preceding
  5690.                            spaces will be considered part of the help text.
  5691.  
  5692.                       Take a look  at the included  examples that comes  with
  5693.                       the demo programs.
  5694.  
  5695.  
  5696.        The help compiler
  5697.        ----------------------------------------------------------------------
  5698.  
  5699.                       After your ASCII help file  "*.HLT" as been saved,  you
  5700.                       compile it with EasyVision's help compiler "HC.EXE".
  5701.  
  5702.                       The command line is :  HC [d:][\path\][filename.ext]
  5703.  
  5704.                       The compiler will parse  the file checking for  errors.
  5705.                       If everything  goes fine,  it will  produce two  files.
  5706.                       One with the extension "*.HLP", the other with "*.HDX".
  5707.  
  5708.                       The files will  have the  same name  as your  program's
  5709.                       executable and be located in the same directory as  the
  5710.                       "*.HLT" file.    As  in  our  example,  "TOTO.HLP"  and
  5711.                       "TOTO.HDX".
  5712.  
  5713.  
  5714.        The "*.HLP" and "*.HDX" help files
  5715.        ----------------------------------------------------------------------
  5716.  
  5717.                       The "*.HLP" and  "*.HDX" files must  be placed in  your
  5718.                       program's executable directory.
  5719.  
  5720.                       The "*.HLP" file is the compile help text.  It stays on
  5721.                       disk and is accessed as  needed during execution.   The
  5722.                       "*.HDX" file  is an  index to  the  help file  that  is
  5723.                       loaded in memory at program startup.  This will provide
  5724.                       extremely fast access to the help file, even if it's on
  5725.                       floppy disk.
  5726.  
  5727.                       That's all  there is  to it!   Your  program can  enjoy
  5728.                       context sensitive help facilities with minimal work  on
  5729.                       your part.
  5730.  
  5731.                       Examples of  creating and  using  the help  system  are
  5732.                       given in the EasyVision's demo programs.
  5733.  
  5734.  
  5735.  
  5736.  
  5737.  
  5738.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  5739.  
  5740.  
  5741.        ----------------------------------------------------------------------
  5742.        APPENDIX D : EasyVision's language system variables       Page 100/111
  5743.        ----------------------------------------------------------------------
  5744.  
  5745.        ----------------------------------------------------------------------
  5746.        ----------------------------------------------------------------------
  5747.        A P P E N D I X   D : EasyVision's language system variables
  5748.        ----------------------------------------------------------------------
  5749.  
  5750.                       EasyVision makes it easy to implement language files.
  5751.  
  5752.                       All the prompts and data strings output by your program
  5753.                       should  be  placed  in   a  separate  file  as   global
  5754.                       variables.   You  then  reference  them  in  the  other
  5755.                       modules with 'extern' declarations.  This way, you  can
  5756.                       have different  language versions  of your  application
  5757.                       without rewriting a single line of code.
  5758.  
  5759.                       EasyVision displays a few default messages.  Those  are
  5760.                       reference by the following  system variables.  You  can
  5761.                       change them  manually to  display appropriate  messages
  5762.                       for you country.
  5763.  
  5764.                       Two functions are also provided to switch the interface
  5765.                       from french to english modes.
  5766.  
  5767.  
  5768.        Language system variables
  5769.        ----------------------------------------------------------------------
  5770.  
  5771.                  -->  All the following system variables are huge pointers to
  5772.                       characters.   The  are  reference in  the  header  file
  5773.                       "EVMSGS.HPP".   You must  include  this file  in  every
  5774.                       module that references these variables.
  5775.  
  5776.        ev_helpwindowtitle
  5777.  
  5778.                       String displayed as the title of the help window.
  5779.  
  5780.                       English : "Help"
  5781.  
  5782.                       French  : "Aide"
  5783.  
  5784.  
  5785.  
  5786.  
  5787.  
  5788.  
  5789.  
  5790.  
  5791.  
  5792.  
  5793.  
  5794.  
  5795.  
  5796.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  5797.  
  5798.  
  5799.        ----------------------------------------------------------------------
  5800.        APPENDIX D : EasyVision's language system variables       Page 101/111
  5801.        ----------------------------------------------------------------------
  5802.  
  5803.        ev_helpwindownohelp
  5804.  
  5805.                       String displayed when  an object does  not have a  help
  5806.                       context or when  the macro {EV_NOHLPCTX}  is passed  to
  5807.                       {input::get}.
  5808.  
  5809.                       English : "Sorry,  but help  is not  available at  this
  5810.                       time..."
  5811.  
  5812.                       French   : "Desole,  mais aucune aide n'est  disponible
  5813.                       en ce moment..."
  5814.  
  5815.        ev_helpwindowfileerror
  5816.  
  5817.                       String displayed when  the help system  finds an  error
  5818.                       accessing the help files.
  5819.  
  5820.                       English : "There  was a  disk error  while opening  the
  5821.                       help file.  If the help files (*.hlp and *.hdx) are  on
  5822.                       a floppy  disk, make  sure it  is  still in  the  drive
  5823.                       unit."
  5824.  
  5825.                       French   :   "Une erreur de  lecture s'est produite  en
  5826.                       ouvrant le  fichier d'aide.    Si les  fichiers  d'aide
  5827.                       (*.hlp et  *.hdx)  se  trouvent  sur  disquette,  soyez
  5828.                       certain qu'elle est bien dans le lecteur."
  5829.  
  5830.        ev_wintextdownbutton
  5831.  
  5832.                       In the  {twindow::wintext}  function and  in  the  help
  5833.                       system, string displayed on the button that will  allow
  5834.                       seeing the following page.
  5835.  
  5836.                       English : "   Ok"
  5837.  
  5838.                       French  : "   Ok"
  5839.  
  5840.        ev_wintextdown
  5841.  
  5842.                       In the  {twindow::wintext}  function and  in  the  help
  5843.                       system, string  displayed on  the statusline  when  the
  5844.                       button that  will allow  seeing the  following page  is
  5845.                       selected.
  5846.  
  5847.                       English : "See next page of text"
  5848.  
  5849.                       French  : "Voir la prochaine page de texte"
  5850.  
  5851.  
  5852.  
  5853.  
  5854.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  5855.  
  5856.  
  5857.        ----------------------------------------------------------------------
  5858.        APPENDIX D : EasyVision's language system variables       Page 102/111
  5859.        ----------------------------------------------------------------------
  5860.  
  5861.        ev_wintextquitbutton
  5862.  
  5863.                       In the  {twindow::wintext}  function and  in  the  help
  5864.                       system, string displayed on  the button that will  stop
  5865.                       the display of text.
  5866.  
  5867.                       English : "  Esc"
  5868.  
  5869.                       French  : "  Esc"
  5870.  
  5871.        ev_wintextquit
  5872.  
  5873.                       In the  {twindow::wintext}  function and  in  the  help
  5874.                       system, string  displayed on  the statusline  when  the
  5875.                       button that will allow  stopping the following page  is
  5876.                       selected.
  5877.  
  5878.                       English : "Quit viewing text"
  5879.  
  5880.                       French  : "Termine l'affichage du text"
  5881.  
  5882.        ev_filenotfoundtext
  5883.  
  5884.                       In   the   {twindow::wintextfile}   function,    string
  5885.                       displayed when the requested file is not found.
  5886.  
  5887.                       English : "File not found!"
  5888.  
  5889.                       French  : "Fichier non trouve!"
  5890.  
  5891.        ev_filetobig
  5892.  
  5893.                       In   the   {twindow::wintextfile}   function,    string
  5894.                       displayed when  the  requested file  is  to big  to  be
  5895.                       loaded in memory.
  5896.  
  5897.                       English :  "Sorry,  not  enough  memory  to  load  this
  5898.                       file..."
  5899.  
  5900.                       French   : "Desole, pas  assez de memoire pour  charger
  5901.                       ce fichier..."
  5902.  
  5903.  
  5904.  
  5905.  
  5906.  
  5907.  
  5908.  
  5909.  
  5910.  
  5911.  
  5912.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  5913.  
  5914.  
  5915.        ----------------------------------------------------------------------
  5916.        APPENDIX D : EasyVision's language system variables       Page 103/111
  5917.        ----------------------------------------------------------------------
  5918.  
  5919.        ev_windowmove
  5920.  
  5921.                       String displayed when a window is moved by dragging one
  5922.                       of its edges.
  5923.  
  5924.                       English :  "Drag  window  while  holding  mouse's  left
  5925.                       button"
  5926.  
  5927.                       French   :  "Deplacez la fenetre  en tenant le  boutton
  5928.                       gauche de la souris"
  5929.  
  5930.        ev_statuslinehelp
  5931.  
  5932.                       String displayed in  the left part  of the  statusline,
  5933.                       indicating that the  user should press  F1 to  activate
  5934.                       the help system.
  5935.  
  5936.                       English : "Help"
  5937.  
  5938.                       French   : "Help"
  5939.  
  5940.  
  5941.        english() and french() functions
  5942.        ----------------------------------------------------------------------
  5943.  
  5944.                       Two functions  will allow  you  to reset  the  language
  5945.                       system variables to their default values.
  5946.  
  5947.                       void language_english () ;       // English definitions
  5948.  
  5949.                       void language_french () ;         // French definitions
  5950.  
  5951.                       language_english () is automatically called at  program
  5952.                       startup.  To call one of these functions,  "EVMSGS.HPP"
  5953.                       must be included.
  5954.  
  5955.  
  5956.  
  5957.  
  5958.  
  5959.  
  5960.  
  5961.  
  5962.  
  5963.  
  5964.  
  5965.  
  5966.  
  5967.  
  5968.  
  5969.  
  5970.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  5971.  
  5972.  
  5973.        ----------------------------------------------------------------------
  5974.        APPENDIX E : EasyVision's demo programs                   Page 104/111
  5975.        ----------------------------------------------------------------------
  5976.  
  5977.        ----------------------------------------------------------------------
  5978.        ----------------------------------------------------------------------
  5979.        A P P E N D I X   E : EasyVision's demo program
  5980.        ----------------------------------------------------------------------
  5981.  
  5982.                       I am  a true  believer in  the motto  'An example  will
  5983.                       often be simple than its written explanation'.
  5984.  
  5985.                       I  have  included  two  complete  demo  programs   with
  5986.                       EasyVision.  They are  in the two archives  "DEMO1.ZIP"
  5987.                       and "HANOI.ZIP".  The source codes, BC++ project  files
  5988.                       and executables are given.
  5989.  
  5990.                       I have tried to  use as many  functions as possible  in
  5991.                       these short programs.   They are  fully documented  and
  5992.                       they illustrate  the working  relationship between  all
  5993.                       those functions and classes.
  5994.  
  5995.                       I really  think  that  90% of  your  questions  can  be
  5996.                       answered by going through these demo programs.  You are
  5997.                       invited to try some modifications of your own, and  see
  5998.                       the results.
  5999.  
  6000.                       I'll say it again...  You should really print all  this
  6001.                       documentation for  easier reading.   It's  also a  good
  6002.                       idea to print the header files for quick references.
  6003.  
  6004.  
  6005.        Things to remember
  6006.        ----------------------------------------------------------------------
  6007.  
  6008.                       A couple of things are to be remembered from this  demo
  6009.                       source code.
  6010.  
  6011.                       -    You should  always  use 'huge'  POINTERS  in  your
  6012.                            code.  You'll be on the  safe side and avoid  many
  6013.                            problems.
  6014.  
  6015.                       -    You should put  all text and  prompt strings in  a
  6016.                            separate resource file.  This will make it easy to
  6017.                            update prompts or make an alternate language file.
  6018.  
  6019.                       -    EasyVision won't prevent  you from using  'printf'
  6020.                            statements.    However,  you  should  work  within
  6021.                            EasyVision's  boundaries  and  use  the   provided
  6022.                            output functions.
  6023.  
  6024.  
  6025.  
  6026.  
  6027.  
  6028.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  6029.  
  6030.  
  6031.        ----------------------------------------------------------------------
  6032.        APPENDIX E : EasyVision's demo programs                   Page 105/111
  6033.        ----------------------------------------------------------------------
  6034.  
  6035.                       -    All classes  come with  built in  default  values.
  6036.                            Often, only one call is needed to use them if  the
  6037.                            defaults are to your likings.
  6038.  
  6039.                       -    Looking at this demo program, you can see that you
  6040.                            can make great looking software faster than  ever.
  6041.                            Take the time to become familiar with  EasyVision.
  6042.                            The rewards will  be fewer  frustrations and  more
  6043.                            enjoyment out of your programming.
  6044.  
  6045.                       Have fun!
  6046.  
  6047.  
  6048.  
  6049.  
  6050.  
  6051.  
  6052.  
  6053.  
  6054.  
  6055.  
  6056.  
  6057.  
  6058.  
  6059.  
  6060.  
  6061.  
  6062.  
  6063.  
  6064.  
  6065.  
  6066.  
  6067.  
  6068.  
  6069.  
  6070.  
  6071.  
  6072.  
  6073.  
  6074.  
  6075.  
  6076.  
  6077.  
  6078.  
  6079.  
  6080.  
  6081.  
  6082.  
  6083.  
  6084.  
  6085.  
  6086.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  6087.  
  6088.  
  6089.        ----------------------------------------------------------------------
  6090.        APPENDIX F : How to reach the author                      Page 106/111
  6091.        ----------------------------------------------------------------------
  6092.  
  6093.        ----------------------------------------------------------------------
  6094.        ----------------------------------------------------------------------
  6095.        A P P E N D I X   F : How to reach the author
  6096.        ----------------------------------------------------------------------
  6097.  
  6098.                       I will  gladly answer  any questions  relating to  this
  6099.                       software.  I can  be reach through  the FidoNet or  the
  6100.                       Internet.
  6101.  
  6102.                       FidoNet  : 1:240/1       (Make message to Remy Gendron)
  6103.  
  6104.                       InterNet : REMY_GENDRON@F1.N240.Z1.FIDONET.ORG
  6105.  
  6106.                       Phone    : (418) 525-6803(TNG SOFT's answering machine)
  6107.  
  6108.                       Mail     : Remy Gendron
  6109.                                  2480 ave de Vitre
  6110.                                  Quebec, Quebec, Canada
  6111.                                  G1J 4A6
  6112.  
  6113.                       I can't get back to you on the phone.  Be sure to leave
  6114.                       an electronic or conventional  mail address.  I'll  get
  6115.                       back to you real fast.
  6116.  
  6117.                       Any  comments,  bug  reports  or  suggestions  will  be
  6118.                       appreciated.
  6119.  
  6120.                       Thank you for considering this software!
  6121.  
  6122.  
  6123.  
  6124.                       Remy Gendron
  6125.                       Author of EasyVision
  6126.  
  6127.  
  6128.  
  6129.  
  6130.  
  6131.  
  6132.  
  6133.  
  6134.  
  6135.  
  6136.  
  6137.  
  6138.  
  6139.  
  6140.  
  6141.  
  6142.  
  6143.  
  6144.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  6145.  
  6146.  
  6147.        ----------------------------------------------------------------------
  6148.        APPENDIX G : Trademarks                                   Page 107/111
  6149.        ----------------------------------------------------------------------
  6150.  
  6151.        ----------------------------------------------------------------------
  6152.        ----------------------------------------------------------------------
  6153.        A P P E N D I X   G : Trademarks
  6154.        ----------------------------------------------------------------------
  6155.  
  6156.                       Turbo Vision from Borland.
  6157.  
  6158.                       Borland C++ 3.1 from Borland.
  6159.  
  6160.                       DeskViev from Quarterdeck.
  6161.  
  6162.                       CXL from Mike Smedley.
  6163.  
  6164.  
  6165.  
  6166.  
  6167.  
  6168.  
  6169.  
  6170.  
  6171.  
  6172.  
  6173.  
  6174.  
  6175.  
  6176.  
  6177.  
  6178.  
  6179.  
  6180.  
  6181.  
  6182.  
  6183.  
  6184.  
  6185.  
  6186.  
  6187.  
  6188.  
  6189.  
  6190.  
  6191.  
  6192.  
  6193.  
  6194.  
  6195.  
  6196.  
  6197.  
  6198.  
  6199.  
  6200.  
  6201.  
  6202.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  6203.  
  6204.  
  6205.        ----------------------------------------------------------------------
  6206.        INDEX                                                     Page 108/111
  6207.        ----------------------------------------------------------------------
  6208.  
  6209.        ----------------------------------------------------------------------
  6210.        ----------------------------------------------------------------------
  6211.        I N D E X
  6212.        ----------------------------------------------------------------------
  6213.  
  6214.  
  6215.                                            BUTTONSETCOLORS, 87
  6216.  
  6217.                                            C
  6218.        -                                   C++ default parameter values, 45
  6219.        -> operator, 46                     classes, 45
  6220.                                            clock's colors, 49
  6221.        .                                   CLOSE, 51
  6222.        . operator, 46                      colors (appendix B), 49
  6223.                                            command line arguments, 22
  6224.        {                                   conditional compilation, 13
  6225.        {bool}, 17, 19                      consistency, 15
  6226.        {byte}, 17, 19                      context number, 60
  6227.        {dword}, 17, 19                     context number (menus), 63
  6228.        {FALSE}, 17                         context sensitive help, 59
  6229.        {TRUE}, 17                          Conventions, 45
  6230.        {word}, 17, 19                      conventions, 14, 19
  6231.                                            cur_info, 32
  6232.        ~                                   cursor attributes, 32
  6233.        ~ (highlight), 77                   cursor's coordinates, 61
  6234.                                            curtype, 32
  6235.        A                                   curx, 32
  6236.        ADDITEM, 65                         cury, 32
  6237.        ADDMENU, 64                         CXL, 8
  6238.        ANSI escape sequences, 44
  6239.        ANSI standard, 12                   D
  6240.        ANSI.SYS driver, 44                 delete, 46
  6241.        ANSICOLOR, 44                       desktop, 47
  6242.        ARG_EXIST, 22                       desktop's size, 49
  6243.        ARG_IEXIST, 23                      desktop's title, 50
  6244.        ASSERT, 21                          DESKview, 12
  6245.        assert_err, 22                      DIFFDATE, 42
  6246.        available colors (appendix B), 49   DISPLAY, 54
  6247.                                            driver (mouse), 56
  6248.        B
  6249.        blinking, 48                        E
  6250.        Bright background colors, 72        Error (System variable), 22
  6251.        bright background colors, 30, 47    error messages, 14
  6252.        buffer (keyb and mouse), 60         EV_MOUSE, 61
  6253.        button availability, 89             EV_NOHLPCTX, 60, 64
  6254.        button creation, 88                 extended keys, 26, 60
  6255.        BUTTONCREATE, 87                    extern "C", 13
  6256.        BUTTONINPUT, 90                     EXTTOASCII, 27
  6257.        BUTTONSETAVAIL, 89
  6258.  
  6259.  
  6260.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  6261.  
  6262.  
  6263.        ----------------------------------------------------------------------
  6264.        INDEX                                                     Page 109/111
  6265.        ----------------------------------------------------------------------
  6266.  
  6267.        F                                   ITEMSETAVAIL, 66
  6268.        F1 (help), 60
  6269.        F10, 62, 67                         K
  6270.        farfree replacement, 24             key_code, 59, 61
  6271.        farmalloc replacement, 23           KEYBFCTS.H, 26
  6272.        FCOPY, 29                           keycode, 60
  6273.        FIDONET (author's address), 11
  6274.        FIELDCREATE, 83                     L
  6275.        FIELDGETASW, 85                     license, 10
  6276.        FIELDINPUT, 86                      Linker errors, 14
  6277.        FIELDSETASW, 85
  6278.        FIELDSETCOLORS, 82                  M
  6279.        FILEFCTS.H, 28                      manual (true type version), 10
  6280.        filter, 60                          Memory model, 12
  6281.        FNEWLINE, 28                        menu (adding a), 64
  6282.        FSIZE, 28                           menu (hotkey), 64
  6283.        function's description, 19          menu creation, 64
  6284.                                            menu hotkeys, 62
  6285.        G                                   menu item separator, 66
  6286.        GET, 59                             menu items (offline), 63
  6287.        GETKEY, 26                          menubar, 62
  6288.        GETMSG, 54                          menus, 62
  6289.        GETSIZE, 48                         mouse driver, 56
  6290.        gettextinfo replacement, 31         mouse support during input, 59
  6291.        global output messages, 17          mouse's cursor, 56, 57, 58
  6292.                                            mouse's left button, 58
  6293.        H                                   mouse's position, 58
  6294.        header files compile error, 18      mouse's right button, 60
  6295.        HEAPALLOC, 23                       MOUSE_HIDE, 58
  6296.        HEAPFREE, 24, 25                    MOUSE_INIT, 56
  6297.        help, 59                            MOUSE_LB_DOWN, 58
  6298.        help file (see appendix C), 60      MOUSE_POS, 58
  6299.        Help text format, 77                MOUSE_SHOW, 57
  6300.        history, 9                          MOUSE_STATUS, 57
  6301.        hotkey, 64                          msg_, 17
  6302.                                            msg_stderr, 22
  6303.        I                                   msg_stderr[], 22
  6304.        input, 56
  6305.        input facilities, 59                N
  6306.        input field creation, 83            name prefix, 19
  6307.        input fields colors, 82             new, 46
  6308.        input_info, 59, 62                  new line character, 28
  6309.        input_info structure, 59
  6310.        instantiation, 46                   O
  6311.        INTERNET (Author's address), 11     OPEN, 51
  6312.        interrupt clock, 49                 optimization, 19
  6313.        item's availabitity, 66             overhead, 19
  6314.        item's context number, 66
  6315.        items (menu), 65
  6316.  
  6317.  
  6318.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  6319.  
  6320.  
  6321.        ----------------------------------------------------------------------
  6322.        INDEX                                                     Page 110/111
  6323.        ----------------------------------------------------------------------
  6324.  
  6325.        P                                   stricmp replacement, 35
  6326.        Parameter validation, 9             string inversion, 39
  6327.        PASCAL to C, 37                     string normalisation, 38
  6328.        Prototypes, 19                      string to uppercase, 36
  6329.        pull down menus, 62                 strlen replacement, 34
  6330.                                            struct cur_info, 32
  6331.        R                                   struct input_info, 59
  6332.        redeclaration errors, 13
  6333.        REFRESH, 52, 55, 67                 T
  6334.        registration, 9                     tdesktop, 47
  6335.        Registration fee, 10                TDESKTOP::CLOSE, 51
  6336.        Remy Gendron (Who is), 11           TDESKTOP::GETSIZE, 48
  6337.        rules for C++ default arguments,    TDESKTOP::OPEN, 51
  6338.        45                                  TDESKTOP::REFRESH, 52
  6339.                                            TDESKTOP::SETDESKCOLORS, 49
  6340.        S                                   TDESKTOP::SETTEXTMODE, 47
  6341.        SCR_CRESTORE, 33                    TDESKTOP::SETTEXTURE, 50
  6342.        SCR_CSAVE, 32                       TDESKTOP::SETTITLE, 50
  6343.        SCR_TEXTATTR, 30                    templates, 15
  6344.        SCR_VRESTORE, 31                    Testing (header files), 18
  6345.        SCR_VSAVE, 31                       text file display, 78
  6346.        screen background texture, 50       text_info, 31
  6347.        screen functions, 30                THROUGH, 66
  6348.        SCRFCTS.H, 30                       Ticks, 41
  6349.        sensitive help, 59                  TICKTIMER_INSTALL, 41
  6350.        SETCOLORS, 62                       TICKTIMER_READ, 42
  6351.        SETDESKCOLORS, 49                   TICKTIMER_RESET, 41
  6352.        SETHLPCTX, 63                       tilde, 54
  6353.        SETLEFTCOLORS, 53                   TIMEFCTS.H, 41
  6354.        SETTEXTMODE, 47                     tinput, 56
  6355.        SETTEXTURE, 50                      TINPUT::GET, 59
  6356.        SETTITLE, 50                        TINPUT::MOUSE_HIDE, 58
  6357.        shell to DOS, 51, 52                TINPUT::MOUSE_INIT, 56
  6358.        shortcuts key, 65                   TINPUT::MOUSE_LB_DOWN, 58
  6359.        size of a file, 28                  TINPUT::MOUSE_POS, 58
  6360.        size_t, 34                          TINPUT::MOUSE_SHOW, 57
  6361.        statusline, 53                      TINPUT::MOUSE_STATUS, 57
  6362.        STR_CENTER, 39                      title (desktop), 50
  6363.        STR_CMP, 35                         tmenubar, 62
  6364.        STR_CPY, 34                         TMENUBAR::ADDITEM, 65
  6365.        STR_ICMP, 35                        TMENUBAR::ADDMENU, 64
  6366.        STR_INVNAMES, 39                    TMENUBAR::ITEMSETAVAIL, 66
  6367.        STR_LEN, 34                         TMENUBAR::SETCOLORS, 62
  6368.        STR_PASTOC, 37                      TMENUBAR::SETHLPCTX, 63
  6369.        STR_TOLOWER, 37                     TMENUBAR::THROUGH, 66
  6370.        STR_TOUPPER, 36                     TO_LOWER, 25
  6371.        STR_TRIM, 38                        TO_UPPER, 24, 25
  6372.        strcmp replacement, 35              tstatusline, 53
  6373.        strcpy replacement, 34              TSTATUSLINE::DISPLAY, 54
  6374.  
  6375.  
  6376.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  6377.  
  6378.  
  6379.        ----------------------------------------------------------------------
  6380.        INDEX                                                     Page 111/111
  6381.        ----------------------------------------------------------------------
  6382.  
  6383.        TSTATUSLINE::GETMSG, 54             window's height, 71
  6384.        TSTATUSLINE::REFRESH, 55            window's help context, 73
  6385.        TSTATUSLINE::SETLEFTCOLORS, 53      window's internal cursor, 76
  6386.        TURBO VISION, 8, 12                 window's size, 70
  6387.        twindow, 68                         window's title, 72
  6388.        TWINDOW::BUTTONCREATE, 87           window's width, 71
  6389.        TWINDOW::BUTTONINPUT, 90            Windows, 68
  6390.        TWINDOW::BUTTONSETAVAIL, 89         WINGETCOL, 70
  6391.        TWINDOW::BUTTONSETCOLORS, 87        WINGETROW, 69
  6392.        TWINDOW::FIELDCREATE, 83            WINGETWIDTH, 71
  6393.        TWINDOW::FIELDGETASW, 85            WININPUT, 81
  6394.        TWINDOW::FIELDINPUT, 86             WININSIDE, 81
  6395.        TWINDOW::FIELDSETASW, 85            WINMOVE, 79
  6396.        TWINDOW::FIELDSETCOLORS, 82         WINONEDGES, 80
  6397.        TWINDOW::WINCLEAR, 74               WINOPEN, 73
  6398.        TWINDOW::WINCLOSE, 74               WINSCROLL, 79
  6399.        TWINDOW::WINGETHEIGHT, 71           WINSETHLPCTX, 73
  6400.        TWINDOW::WININPUT, 81               WINSETSIZE, 70
  6401.        TWINDOW::WININSIDE, 81              WINSETTITLE, 72
  6402.        TWINDOW::WINMOVE, 79                WINTEXT, 77
  6403.        TWINDOW::WINONEDGES, 80             WINTEXTFILE, 78
  6404.        TWINDOW::WINOPEN, 73                WINWRITE, 75
  6405.        TWINDOW::WINSCROLL, 79              Word wrapping format, 77
  6406.        TWINDOW::WINSETCOLORS, 71
  6407.        TWINDOW::WINSETHLPCTX, 73
  6408.        TWINDOW::WINSETPOS, 69
  6409.        TWINDOW::WINSETTITLE, 72
  6410.        TWINDOW::WINTEXT, 77
  6411.        TWINDOW::WINTEXTFILE, 78
  6412.        TWINDOW::WINWRITE, 75
  6413.  
  6414.        U
  6415.        Updates, 10
  6416.  
  6417.        V
  6418.        Validation, 14
  6419.  
  6420.        W
  6421.        WAIT FOR, 60
  6422.        WINCLEAR, 74
  6423.        WINCLOSE, 74
  6424.        window alive, 81
  6425.        window dragging, 81
  6426.        window features, 68
  6427.        window moving, 79
  6428.        window screen output, 75
  6429.        window scrolling, 76
  6430.        window word wrapping, 77
  6431.        window's colors, 71
  6432.  
  6433.  
  6434.        EV 2.0 User's guide            TNG SOFT : The Next Generation Software
  6435.