
COMPOSITE OBJECTS
     The remaining three objects - graph, grid,  and  togglegrid,
     are composite objects. That is, they are made up of a number
     of simpler objects. A graph is made up  of  sliders.  Moving
     the  sliders  changes  the  values  of the samples in a one-
     dimensional function. You might want to use  it  to  display
     and  edit  data.  A grid is a two-dimensional matrix of but-
     tons. When you click on one of the buttons, actions  can  be
     performed,  using the coordinates of the button. This can be
     useful for choosing the values of two independent parameters
     (x and y position) simultaneously instead of using two slid-
     ers. A togglegrid is similar except the elements can be tog-
     gled  between  two samples. You might use this, for example,
     to edit a bitmap.


     An interesting use for these composite objects is to  add  a
     background  pixmap  or bitmap (see the MISCELLANEOUS PARAME-
     TERS section).  The pixmap  or  bitmap  appears  behind  the
     sliders  or buttons, which are then used to "pick" points or
     curves in the data.


     Composite objects consist of a form  object  containing  the
     buttons or toggles. There is no label or other annotation.


     graph
        A graph is a composite object, made up  of  a  number  of
        scrollbars.  Syntax:

        graph={ nsamp=... value=... name=...  action=...  min=...
        max=... format=... width=... height=... }

        A graph object has nsamp scrollbars, each of  which  sets
        the  value  of  one  sample  in the graph. The value of a
        graph is a string containing the sample values, separated
        by spaces.

        nsamp number of samples in the graph.  name  defaults  to
        "graph1",  "graph2"  etc. value is the starting value for
        the graph; defaults to the minimum.  You can  specify  up
        to nsamp values in a blank-separated list. If you specify
        fewer than nsamp, the last value specified is re-used  as
        needed.  Thus  you  can use value=0 to set all samples to
        zero.  action: Graph objects cannot do  PRINT  or  SYSTEM
        actions  by  themselves.  You  must supply another button
        that uses the graph's value to perform an action.

        min, max, and format are the same as for sliders.

        width and height are the lengths of the major  and  minor
        axes of the scrollbars in the graph. These are the dimen-
        sions of each scrollbar, not the graph as a whole.

        By default, the  scrollbars  are  oriented  horizontally.
        This  can  be changed by using the orientation parameter;
        see the MISCELLANEOUS PARAMETERS section below.

        Assigning a new value to a graph will change the value of
        the  samples.  You  can  specify  up to nsamp values in a
        blank-separated list. If you specify  fewer  than  nsamp,
        the last value specified is re-used as needed.

        Holding down the meta key (with no mouse buttons pressed)
        while the cursor is inside a graph object allows the user
        to "draw" the graph without having to  press  mouse  but-
        tons.  This  drawing  can be slow for graphs with a large
        number of samples,  because  of  the  number  of  widgets
        involved.

        example
        graph={ nsamp=100 min=-100 max=100 value=0 format=%4.0f }

     grid
        A grid is a composite object, like a graph, but  made  up
        of a number of buttons rather than scrollbars.  Syntax:

        grid={  nx=...  ny=...  value=...   name=...   action=...
        xmin=...  ymin=...  dx=...  dy=...  format=...  width=...
        height=...  }

        A grid object is a form  containing  nx  by  ny  buttons.
        Clicking  on  one  of  the  buttons  invokes  the  grid's
        actions.  The value of the grid is  a  string  containing
        the x and y coordinates of the selected button.

        nx and ny number of samples in the grid in the horizontal
        and  vertical  directions.   name  defaults  to  "grid1",
        "grid2" etc. value are the  x  and  y  coordinates  of  a
        selected  button. action: The actions take place whenever
        a grid button is selected.

        xmin, ymin, dx and dy are used to compute the coordinates
        of  a  selected  button  for output purposes. By default,
        xmin and ymin are 0 and dx and dy are 1. This means  that
        the  coordinates reported will be (0,0) if the upper left
        button is selected and (nx-1,ny-1)  if  the  lower  right
        button is selected.

        width and height are the  dimensions  of  the  individual
        buttons in a grid. These default to 10 pixels.

        The output is formatted according to format.  The default
        is  "%.0f  %.0f".  This will print the two coordinates as
        integers, separated by a space.

        example
        grid={ nx=20 ny=20 format="x=%.0f y=%.0f" }


     togglegrid
        A togglegrid is a similar to a  grid,  but  with  toggles
        instead of buttons.

        Syntax:

        togglegrid={ nx=... ny=... value=... name=...  action=...
        xmin=...  ymin=...  dx=...  dy=...  format=...  width=...
        height=...  formtype=... }

        A togglegrid is a  form  containing  nx  by  ny  toggles.
        Clicking  on  one  of the toggles changes its state.  The
        value of the grid is a string containing either the x and
        y  coordinates  of all toggles that are highlighted, or a
        string of 0's and 1's describing the  state  of  all  the
        toggles.   The  formtype parameter specifies which output
        format is to be used.

        nx and ny number of samples in the grid in the horizontal
        and vertical directions.  name defaults to "togglegrid1",
        "togglegrid2" etc. value depends on formtype; see  below.
        action: The actions take place whenever the cursor leaves
        the togglegrid. You may wish to give  the  togglegrid  no
        actions, and instead supply a button to do something with
        the togglegrid's value.

        xmin, ymin, dx and dy are the same as for grid.

        width and height are the  dimensions  of  the  individual
        toggles. Default is 10.

        formtype determines what goes into the value of the  tog-
        glegrid.  formtype=xy  will result in a string containing
        the x and y coordinates  of  all  the  toggles  that  are
        highlighted,   each   formatted   according   to  format.
        formtype=bits will result in a  string  of  0's  and  1's
        being  output  for each row of the togglegrid, indicating
        the state of the entire grid. In this case, format is not
        used.

        format is the same as for grids.

        Assigning a new value to a  togglegrid  will  change  the
        state  of  the  samples.  If formtype=bits, the new value
        should be a string of 0's and 1's. It can be up to  nx*ny
        characters  long.   If  you specify fewer than nx*ny, the
        value string is used repeatedly. Thus  you  can  turn  on
        every   third   sample   in   a   togglegrid   by   doing
        action="ASSIGN xxx 100", where xxx is  the  name  of  the
        togglegrid.

        Holding down the meta key (with no mouse buttons pressed)
        while the cursor is inside a togglegrid object allows the
        user to "draw" without having  to  press  mouse  buttons.
        This  drawing  can be slow for graphs with a large number
        of samples, because of the number  of  widgets  involved.
        Similarly,  hold  down  the  control  key while moving to
        "erase".

        example
        togglegrid={ nx=50 ny=50 formtype=bits }
