  
  [1m[4m[31m4. Browsing Tables in [1mGAP[1m[4m[31m using [22m[32mncurses[1m[4m[31m -- The User Interface[0m
  
  As  stated in Section [1m1.1[0m, one aim of the [1mBrowse[0m package is to provide tools
  for the quite usual task to show a two-dimensional array or certain rows and
  columns  of it on a character screen in a formatted way, to navigate in this
  array  via  key strokes, and to search for strings, to sort the array by row
  or column values etc. The idea is that one starts with an array of data, the
  [22m[36mmain  table[0m.  Optionally,  labels  for each row of the main table are given,
  which  are also arranged in an array (with perhaps several columns), the [22m[36mrow
  labels  table[0m;  analogously, a [22m[36mcolumn labels table[0m of labels for the columns
  of  the main table may be given. The row labels are shown to the left of the
  main  table,  the  column  labels  are shown above the main table. The space
  above  the row labels and to the left of the column labels can be used for a
  fourth  table,  the [22m[36mcorner table[0m, with information about the labels or about
  the  main  table.  Optionally,  a [22m[36mheader[0m and a [22m[36mfooter[0m may be shown above and
  below  these  four tables, respectively. Header and footer are not separated
  into columns. So the shown window has the following structure. 
        ----------------------------------
        |             header             |
        ----------------------------------
        |        |                       |
        | corner |     column labels     |
        |        |                       |
        ----------------------------------
        |        |                       |
        |        |                       |
        |  row   |                       |
        | labels |         main          |
        |        |                       |
        |        |                       |
        |        |                       |
        ----------------------------------
        |             footer             |
        ----------------------------------
  
  
  If  not the whole tables fit into the window then only subranges of rows and
  columns of the main table are shown, together with the corresponding row and
  column  labels.  Also  in  this  case, the row heights and column widths are
  computed  w.r.t. the whole table not w.r.t. the shown rows and columns. This
  means  that the shown row labels are unchanged if the range of shown columns
  is changed, the shown column labels are unchanged if the range of shown rows
  is changed, and the whole corner table is always shown.
  
  The  current  chapter describes the user interface for [22m[36mstandard applications[0m
  of  this  kind,  i. e., those applications for which one just has to collect
  the  data  to  be shown in a record --which we call a [22m[36mbrowse table[0m-- without
  need for additional [1mGAP[0m programming.
  
  Section [1m4.1[0m  gives  an overview of the features available in standard browse
  table  applications,  and  Section [1m4.2[0m describes the data structures used in
  browse    tables.    Finally,    Section [1m4.3[0m    introduces    the   function
  [1m[34mNCurses.BrowseGeneric[0m  ([1m4.3-1[0m),  which  is  the generic function for showing
  browse table in visual mode.
  
  For technical details needed to extend these applications and to build other
  applications, see Chapter [1m5.[0m.
  
  Examples of browse table applications are shown in Chapter [1m6.[0m.
  
  
  [1m[4m[31m4.1 Features Supported by the Function [22m[32mNCurses.BrowseGeneric[1m[4m[31m[0m
  
  Standard applications of the function [1m[34mNCurses.BrowseGeneric[0m ([1m4.3-1[0m) have the
  following  functionality.  Other  applications may provide only a subset, or
  add further functionality, see Chapters [1m5.[0m and [1m6.[0m.
  
  [1m[33mScrolling:[0m
        The  subranges  of  shown  rows  and  columns of the main table can be
        modified, such that the focus area is moved to the left, to the right,
        up,  or  down;  depending  on  the  context, the focus is moved by one
        character,  by  one  table  cell  or  a  part  of  it,  by  the window
        height/width (minus one character or minus one table cell).
  
  [1m[33mSelecting:[0m
        A  cell,  row, or column of the main table can be selected; then it is
        shown  highlighted  on  the  screen  (by  default  using the attribute
        [22m[32mNCurses.attrs.STANDOUT[0m, see Section [1m2.1-7[0m). The selection can be moved
        inside  the  main  table  to  a neighboring cell, row, or column; this
        causes  also  scrolling  of the main table when the window borders are
        reached.
  
  [1m[33mSearching:[0m
        A  search  string  is entered by the user, and the first matching cell
        becomes  selected;  one can search further for the next matching cell.
        Global search parameters define what matching means (case sensitive or
        not,  search  for substrings or complete words) and what the first and
        the  next matching cells are (search in the whole table or just in the
        selected  row  or  column,  search  for  whole  words  or  prefixes or
        suffixes, search forwards or backwards).
  
  [1m[33mSorting:[0m
        If  a  row  or  column  is  selected then the main table can be sorted
        w.r.t.  the  entries  in  this  row  or column. Global sort parameters
        describe   for   example  whether  one  wants  to  sort  ascending  or
        descending, or case sensitive or not.
  
  [1m[33mSorting and Categorizing:
  [0m
        If  a  column is selected then the main table can be sorted w.r.t. the
        entries in this column, and additionally these entries are turned into
        [22m[36mcategory  rows[0m,  i. e.,  additional  rows are added to the main table,
        appearing  immediately  above the table rows with a fixed value in the
        selected  column,  and  showing this column value. (There should be no
        danger  to  mix  up  this notion of categories with the one introduced
        in [1m`Reference:  Categories'[0m.) The category rows can be [22m[36mcollapsed[0m (that
        is,  the table rows that belong to this category row are not shown) or
        [22m[36mexpanded[0m  (that  is,  the corresponding table rows are shown). Some of
        the  global  search  parameters affect the category rows, for example,
        whether  the  category rows shall involve a counter with the number of
        corresponding  data rows. With additional programming, one can achieve
        that a row of the browse table appears under several category rows.
  
  [1m[33mHelp:[0m
        Depending  on  the application and on the situation, different sets of
        user  inputs  may  be available and different meanings of these inputs
        are  possible. An overview of the currently available inputs and their
        meanings can be opened in each situation, by hitting the [1m[46m?[0m key.
  
  [1m[33mRe-entering:[0m
        When one has called [1m[34mNCurses.BrowseGeneric[0m ([1m4.3-1[0m) with a browse table,
        and  returns  from visual mode to the [1mGAP[0m prompt after some navigation
        steps,  calling [22m[32mNCurses.BrowseGeneric[0m again with this table will enter
        visual  mode in the same situation where it was left. For example, the
        cell  in  the  top-left  position will be the same as before, and if a
        cell was selected before then this cell will be selected now. (One can
        avoid   this   behavior   using   the   optional  second  argument  of
        [22m[32mNCurses.BrowseGeneric[0m.)
  
  [1m[33mLogging:[0m
        The  integers  corresponding  to  the  user  inputs in visual mode are
        collected in a list that is stored in the component [22m[32mdynamic.log[0m of the
        browse  table. It can be used for repeating the inputs with the replay
        feature.  (For  browse table applications that give the user no access
        to  the  browse  table itself, one can force the log to be assigned to
        the   component   [22m[32mlog[0m   of   the   global   variable  [22m[32mBrowseData[0m,  see
        Section [1m5.4-1[0m.)
  
  [1m[33mReplay:[0m
        Instead  of  interactively  hitting  keys  in  visual  mode,  one  can
        prescribe the user inputs to a browse table via a "replay record"; the
        inputs  are  then processed with given time intervals. The easiest way
        to   create   a   meaningful   replay   record  is  via  the  function
        [1m[34mBrowseData.SetReplay[0m  ([1m5.4-2[0m), with argument the [22m[32mdynamic.log[0m component
        of  the  browse  table  in  question that was stored in an interactive
        session.
  
  The  following  features  are  not  available in standard applications. They
  require additional programming.
  
  [1m[33mClicking:[0m
        One  possible action is to "click" a selected cell, row, or column. It
        depends  on the application what the effect is. A typical situation is
        that  a corresponding [1mGAP[0m object is added to the list of return values
        of  [1m[34mNCurses.BrowseGeneric[0m ([1m4.3-1[0m). Again it depends on the application
        what  this  [1mGAP[0m  object  is.  In order to use this feature, one has to
        provide a record whose components are [1mGAP[0m functions, see Section [1m5.4-1[0m
        for details.
  
  [1m[33mReturn Value:
  [0m
        The  function  [1m[34mNCurses.BrowseGeneric[0m  ([1m4.3-1[0m)  may have an application
        dependent  return value. A typical situation is that a list of objects
        corresponding to those cells is returned that were "clicked" in visual
        mode.  In  order  to  use  this feature, one has to assign the desired
        value to the component [22m[32mdynamic.Return[0m of the browse table.
  
  
  [1m[4m[31m4.2 Data Structures used by [22m[32mNCurses.BrowseGeneric[1m[4m[31m[0m
  
  [1m[4m[31m4.2-1 BrowseData.IsBrowseTableCellData[0m
  
  [1m[34m> BrowseData.IsBrowseTableCellData( [0m[22m[34mobj[0m[1m[34m ) __________________________[0mfunction
  [1mReturns:[0m  [22m[32mtrue[0m if the argument is a list or a record in a supported format.
  
  A [22m[36mtable cell data object[0m describes the input data for the contents of a cell
  in   a  browse  table.  It  is  represented  by  either  an  attribute  line
  (see [1m[34mNCurses.IsAttributeLine[0m ([1m2.2-3[0m)), for cells of height one, or a list of
  attribute  lines  or  a record with the components [22m[32mrows[0m, a list of attribute
  lines,  and  optionally  [22m[32malign[0m,  a  substring of [22m[32m"bclt"[0m, which describes the
  alignment  of  the attribute lines in the table cell -- bottom, horizontally
  centered,  left,  and  top  alignment;  the  default is right and vertically
  centered  alignment. (Note that the height of a table row and the width of a
  table column can be larger than the height and width of an individual cell.)
  
  [22m[35m---------------------------  Example  ----------------------------[0m
    [22m[35mgap> BrowseData.IsBrowseTableCellData( "abc" );[0m
    [22m[35mtrue[0m
    [22m[35mgap> BrowseData.IsBrowseTableCellData( [ "abc", "def" ] );[0m
    [22m[35mtrue[0m
    [22m[35mgap> BrowseData.IsBrowseTableCellData( rec( rows:= [ "ab", "cd" ],[0m
    [22m[35m>                                           align:= "tl" ) );[0m
    [22m[35mtrue[0m
    [22m[35mgap> BrowseData.IsBrowseTableCellData( "" );[0m
    [22m[35mtrue[0m
    [22m[35mgap> BrowseData.IsBrowseTableCellData( [] );[0m
    [22m[35mtrue[0m
  [22m[35m------------------------------------------------------------------[0m
  
  The  [22m[36mempty  string[0m  is a table cell data object of height one and width zero
  whereas  the  [22m[36mempty  list[0m  (which  is  not  in  [22m[32mIsStringRep[0m, see [1m[34mIsStringRep[0m
  ([1mReference:  IsStringRep[0m))  is  a  table cell data object of height zero and
  width zero.
  
  [1m[4m[31m4.2-2 BrowseData.BlockEntry[0m
  
  [1m[34m> BrowseData.BlockEntry( [0m[22m[34mtablecelldata, height, width[0m[1m[34m ) ____________[0mfunction
  [1mReturns:[0m  a list of attribute lines.
  
  For       a       table       cell       data      object      [22m[34mtablecelldata[0m
  (see [1m[34mBrowseData.IsBrowseTableCellData[0m  ([1m4.2-1[0m))  and  two  positive integers
  [22m[34mheight[0m  and  [22m[34mwidth[0m, [22m[32mBrowseData.BlockEntry[0m returns a list of [22m[34mheight[0m attribute
  lines   of   displayed  length  [22m[34mwidth[0m  each  (see [1m[34mNCurses.WidthAttributeLine[0m
  ([1m2.2-7[0m)), that represents the formatted version of [22m[34mtablecelldata[0m.
  
  If  the rows of [22m[34mtablecelldata[0m have different numbers of displayed characters
  then  they  are  filled  up  to  the  desired  numbers  of rows and columns,
  according   to  the  alignment  prescribed  by  [22m[34mtablecelldata[0m;  the  default
  alignment is right and vertically centered.
  
  [22m[35m---------------------------  Example  ----------------------------[0m
    [22m[35mgap> BrowseData.BlockEntry( "abc", 3, 5 );[0m
    [22m[35m[ "     ", "  abc", "     " ][0m
    [22m[35mgap> BrowseData.BlockEntry( rec( rows:= [ "ab", "cd" ],[0m
    [22m[35m>                                align:= "tl" ), 3, 5 );[0m
    [22m[35m[ "ab   ", "cd   ", "     " ][0m
  [22m[35m------------------------------------------------------------------[0m
  
  [1m[4m[31m4.2-3 BrowseData.IsBrowseTable[0m
  
  [1m[34m> BrowseData.IsBrowseTable( [0m[22m[34mobj[0m[1m[34m ) __________________________________[0mfunction
  [1mReturns:[0m  [22m[32mtrue[0m  if  the  argument  record has the required components and is
            consistent.
  
  A [22m[36mbrowse table[0m is a [1mGAP[0m record that can be used as the first argument of the
  function [1m[34mNCurses.BrowseGeneric[0m ([1m4.3-1[0m).
  
  The  supported  components  of  a  browse  table are [22m[32mwork[0m and [22m[32mdynamic[0m, their
  values  must  be  records:  The components in [22m[32mwork[0m describe that part of the
  data  that  are not likely to depend on user interactions, such as the table
  entries  and  their  heights  and widths. The components in [22m[32mdynamic[0m describe
  that  part  of  the  data that is intended to change with user interactions,
  such  as  the  currently  shown  top-left entry of the table, or the current
  status  w.r.t.  sorting. For example, suppose you call [1m[34mNCurses.BrowseGeneric[0m
  ([1m4.3-1[0m)  twice  with the same browse table; the second call enters the table
  in  the  same status where it was left [22m[36mafter[0m the first call if the component
  [22m[32mdynamic[0m  is  kept,  whereas  one has to reset (which usually simply means to
  unbind)  the  component  [22m[32mdynamic[0m if one wants to start in the same status as
  [22m[36mbefore[0m the first call.
  
  The  following  components  are  the most important ones for standard browse
  applications.  All  these  components  belong  to the [22m[32mwork[0m record. For other
  supported  components (of [22m[32mwork[0m as well as of [22m[32mdynamic[0m) and for the meaning of
  the term "mode", see Section [1m5.2[0m.
  
  [1m[33m[22m[32mmain[0m[0m
        is  the  list of lists of table cell data objects that form the matrix
        to  be  shown. There is no default for this component. (It is possible
        to  compute  the  entries  of  the  main  table  on  demand,  see  the
        description of the component [22m[32mMain[0m in Section [1m5.4-1[0m. In this situation,
        the value of the component [22m[32mmain[0m can be an empty list.)
  
  [1m[33m[22m[32mheader[0m[0m
        describes  a  header  that shall be shown above the column labels. The
        value  is  either  a  list  of  attribute lines ("static header") or a
        function  or  a  record  whose  component names are names of available
        modes  of  the  browse table ("dynamic header"). In the function case,
        the  function  must  take  the  browse table as its only argument, and
        return  a  list  of attribute lines. In the record case, the values of
        the  components  must be such functions. It is assumed that the number
        of  these  lines  depends at most on the mode. The default is an empty
        list, i. e., there is no header.
  
  [1m[33m[22m[32mfooter[0m[0m
        describes  a  footer that shall be shown below the table. The value is
        analogous  to  that  of  [22m[32mfooter[0m.  The default is an empty list, i. e.,
        there is no footer.
  
  [1m[33m[22m[32mlabelsRow[0m[0m
        is  a  list  of  row  label rows, each being a list of table cell data
        objects.  These  rows  are  shown  to  the left of the main table. The
        default is an empty list, i. e., there are no row labels.
  
  [1m[33m[22m[32mlabelsCol[0m[0m
        is  a list of column information rows, each being a list of table cell
        data  objects.  These  rows  are shown between the header and the main
        table.  The  default  is  an  empty  list,  i. e., there are no column
        labels.
  
  [1m[33m[22m[32mcorner[0m[0m
        is  a list of lists of table cell data objects that are printed in the
        upper  left  corner,  i. e.,  to the left of the column label rows and
        above the row label columns. The default is an empty list.
  
  [1m[33m[22m[32msepRow[0m[0m
        describes the separators above and below rows of the main table and of
        the  row labels table. The value is either an attribute line or a (not
        necessarily  dense)  list  of  attribute  lines.  In  the former case,
        repetitions  of  the  attribute line are used as separators below each
        row  and  above  the  first  row  of  the  table;  in the latter case,
        repetitions  of  the  entry  at the first position (if bound) are used
        above  the  first  row, and repetitions of the last bound entry before
        the  (i+2)-th  position  (if  there  is such an entry at all) are used
        below  the i-th table row. The default is an empty string, which means
        that there are no row separators.
  
  [1m[33m[22m[32msepCol[0m[0m
        describes  the  separators  in front of and behind columns of the main
        table  and  of  the  column  labels  table. The format of the value is
        analogous to that of the component [22m[32msepRow[0m; the default is the string [22m[32m"
        "[0m (whitespace of width one).
  
  [1m[33m[22m[32msepLabelsCol[0m[0m
        describes  the  separators  above  and below rows of the column labels
        table  and  of the corner table, analogously to [22m[32msepRow[0m. The default is
        an   empty  string,  which  means  that  there  are  no  column  label
        separators.
  
  [1m[33m[22m[32msepLabelsRow[0m[0m
        describes  the  separators  in  front of and behind columns of the row
        labels  table  and  of  the  corner  table, analogously to [22m[32msepCol[0m. The
        default is an empty string.
  
  We give a few examples of standard applications.
  
  The  first  example  defines  a  small  browse  table by prescribing ony the
  component  [22m[32mwork.main[0m,  so  the  defaults  for row and column labels (no such
  labels),  and  for  separators  are used. The table cells are given by plain
  strings, so they have height one. Usually this table will fit on the screen.
  
  [22m[35m---------------------------  Example  ----------------------------[0m
    [22m[35mgap> m:= 10;;  n:= 5;;[0m
    [22m[35mgap> xpl1:= rec( work:= rec([0m
    [22m[35m>      main:= List( [ 1 .. m ], i -> List( [ 1 .. n ],[0m
    [22m[35m>        j -> String( [ i, j ] ) ) ) ) );;[0m
    [22m[35mgap> BrowseData.IsBrowseTable( xpl1 );[0m
    [22m[35mtrue[0m
  [22m[35m------------------------------------------------------------------[0m
  
  In  the  second  example,  also  row and column labels appear, and different
  separators are used. The table cells have height three. Also this table will
  usually fit on the screen.
  
  [22m[35m---------------------------  Example  ----------------------------[0m
    [22m[35mgap> m:= 6;;  n:= 5;;[0m
    [22m[35mgap> xpl2:= rec( work:= rec([0m
    [22m[35m>      main:= List( [ 1 .. m ], i -> List( [ 1 .. n ],[0m
    [22m[35m>        j -> rec( rows:= List( [ -i*j, i*j*1000+j, i-j ], String ),[0m
    [22m[35m>                  align:= "c" ) ) ),[0m
    [22m[35m>      labelsRow:= List( [ 1 .. m ], i -> [ String( i ) ] ),[0m
    [22m[35m>      labelsCol:= [ List( [ 1 .. n ], String ) ],[0m
    [22m[35m>      sepRow:= "-",[0m
    [22m[35m>      sepCol:= "|",[0m
    [22m[35m>  ) );;[0m
    [22m[35mgap> BrowseData.IsBrowseTable( xpl2 );[0m
    [22m[35mtrue[0m
  [22m[35m------------------------------------------------------------------[0m
  
  The third example additionally has a static header and a dynamic footer, and
  the  table  cells involve attributes. This table will usually not fit on the
  screen.
  
  [22m[35m---------------------------  Example  ----------------------------[0m
    [22m[35mgap> m:= 30;;  n:= 25;;[0m
    [22m[35mgap> xpl3:= rec( work:= rec([0m
    [22m[35m>      header:= [ "                    Example 3" ],[0m
    [22m[35m>      main:= List( [ 1 .. m ], i -> List( [ 1 .. n ],[0m
    [22m[35m>        j -> rec( rows:= [ String( -i*j ),[0m
    [22m[35m>                           [ NCurses.attrs.BOLD, true,[0m
    [22m[35m>                             NCurses.attrs.ColorPairs[56+1], true,[0m
    [22m[35m>                             String( i*j*1000+j ),[0m
    [22m[35m>                             NCurses.attrs.NORMAL, true ],[0m
    [22m[35m>                             String( i-j ) ],[0m
    [22m[35m>                  align:= "c" ) ) ),[0m
    [22m[35m>      labelsRow:= List( [ 1 .. 30 ], i -> [ String( i ) ] ),[0m
    [22m[35m>      sepLabelsRow:= " % ",[0m
    [22m[35m>      labelsCol:= [ List( [ 1 .. 30 ], i -> [[0m
    [22m[35m>        NCurses.attrs.ColorPairs[ 56+4 ], true,[0m
    [22m[35m>        String( i ),[0m
    [22m[35m>        NCurses.attrs.NORMAL, true ] ) ],[0m
    [22m[35m>      sepLabelsCol:= "=",[0m
    [22m[35m>      sepRow:= "*",[0m
    [22m[35m>      sepCol:= " |",[0m
    [22m[35m>      footer:= t -> [ Concatenation( "top-left entry is: ",[0m
    [22m[35m>                          String( t.dynamic.topleft{ [ 1, 2] } ) ) ],[0m
    [22m[35m>  ) );;[0m
    [22m[35mgap> BrowseData.IsBrowseTable( xpl3 );[0m
    [22m[35mtrue[0m
  [22m[35m------------------------------------------------------------------[0m
  
  The  fourth  example illustrates that highlighting may not work properly for
  browse  tables containing entries whose attributes are not set with explicit
  Boolean     values,     see     [1m[34mNCurses.IsAttributeLine[0m     ([1m2.2-3[0m).    Call
  [22m[32mNCurses.BrowseGeneric[0m  with the browse table [22m[32mxpl4[0m, and select an entry (or a
  column  or  a  row):  Only  the  middle  row  of  each selected cell will be
  highlighted,  because  only  in this row, the color attribute is switched on
  with an explicit [22m[32mtrue[0m.
  
  [22m[35m---------------------------  Example  ----------------------------[0m
    [22m[35mgap> xpl4:= rec([0m
    [22m[35m>     defc:= NCurses.defaultColors,[0m
    [22m[35m>     wd:= Maximum( List( ~.defc, Length ) ),[0m
    [22m[35m>     ca:= NCurses.ColorAttr,[0m
    [22m[35m>     fs:= FormattedString,[0m
    [22m[35m>     work:= rec([0m
    [22m[35m>       header:= [ "Examples of NCurses.ColorAttr" ],[0m
    [22m[35m>       main:= List( ~.defc, i -> List( ~.defc,[0m
    [22m[35m>         j -> [ [ ~.ca( i, j ), ~.fs( i, ~.wd ) ],        # no true![0m
    [22m[35m>                [ ~.ca( i, j ), true, ~.fs( "on", ~.wd ) ],[0m
    [22m[35m>                [ ~.ca( i, j ), ~.fs( j, ~.wd ) ] ] ) ),  # no true![0m
    [22m[35m>       labelsRow:= List( ~.defc, i -> [ String( i ) ] ),[0m
    [22m[35m>       labelsCol:= [ List( ~.defc, String ) ],[0m
    [22m[35m>       sepRow:= "-",[0m
    [22m[35m>       sepCol:= [ " |", "|" ],[0m
    [22m[35m>  ) );;[0m
    [22m[35mgap> BrowseData.IsBrowseTable( xpl4 );[0m
    [22m[35mtrue[0m
  [22m[35m------------------------------------------------------------------[0m
  
  
  [1m[4m[31m4.3 The Function [22m[32mNCurses.BrowseGeneric[1m[4m[31m[0m
  
  [1m[4m[31m4.3-1 NCurses.BrowseGeneric[0m
  
  [1m[34m> NCurses.BrowseGeneric( [0m[22m[34mt[, arec][0m[1m[34m ) _______________________________[0mfunction
  [1mReturns:[0m  an application dependent value, or nothing.
  
  [22m[32mNCurses.BrowseGeneric[0m    is    used    to    show   the   browse   table   [22m[34mt[0m
  (see [1m[34mBrowseData.IsBrowseTable[0m  ([1m4.2-3[0m)) in a formatted way on a text screen,
  and allows the user to navigate in this table.
  
  The optional argument [22m[34marec[0m, if given, must be a record whose components [22m[32mwork[0m
  and  [22m[32mdynamic[0m,  if  bound, are used to provide defaults for missing values in
  the  corresponding  components  of  [22m[34mt[0m.  The  default  for  [22m[34marec[0m  and for the
  components  not  provided  in  [22m[34marec[0m  is  [22m[32mBrowseData.defaults[0m, see [1m[34mBrowseData[0m
  ([1m5.4-1[0m), the function [22m[32mBrowseData.SetDefaults[0m sets these default values.
  
  At  least  the  component [22m[32mwork.main[0m must be bound in [22m[34mt[0m, with value a list of
  list   of  table  cell  data  objects,  see [1m[34mBrowseData.IsBrowseTableCellData[0m
  ([1m4.2-1[0m).
  
  When  the  window or the screen is too small for the browse table, according
  to its component [22m[32mwork.minyx[0m, the table will not be shown in visual mode, and
  [22m[32mfail[0m  is returned. (This holds also if there would be no return value of the
  call  in  a  large enough screen.) Thus one should check for [22m[32mfail[0m results of
  programmatic calls of [22m[32mNCurses.BrowseGeneric[0m, and one should better not admit
  [22m[32mfail[0m as a regular return value.
  
  Most  likely,  [22m[32mNCurses.BrowseGeneric[0m will not be called on the command line,
  but  the  browse  table [22m[34mt[0m will be composed by a suitable function which then
  calls [22m[32mNCurses.BrowseGeneric[0m, see the examples in Chapter [1m6.[0m.
  
