NAME:
    cw_pixed
 PURPOSE: (one line)
    Pixel editor.
 DESCRIPTION:
    This compound widget may be used to edit a grid of pixels in an array.
 Unless near the edge of the image, the grid is centered on (xpos, ypos).
 The left column and the bottom row display the y and x coordinates,
 respectively, for the grid. Xpos and ypos are enclosed in brackets,
 for identification.
 CATEGORY:
    Compound Widgets
 CALLING SEQUENCE:
    result = cw_pixed( parent, image, xpos, ypos )
 INPUTS:
    parent      : The id of the parent widget.
    image       : The array to be edited.
    xpos, ypos  : The pixel at this location in the array, along with a
                  collection of its neighbors, will be displayed as a grid of
                  editable text widgets.

 OPTIONAL INPUT PARAMETERS:

 INPUT KEYWORD PARAMETERS:
    GRIDsize = The size of the grid of surrounding pixels. Default
               is 7 pixels (7X7 grid). Note: In order to maintain symmetry
               about the center pixel, the grid size needs to be odd.
               Therefore, even values will be increased by 1 pixel.

 OUTPUTS:
    result : The id of the compound widget.
 COMMON BLOCKS:

 SIDE EFFECTS:
    This compound widget generates events with the following structure:
    { id:0L, top:0L, handler:0L, type:0, count:0, x:0, y:0, value:v }
    where,
       type    The event type (0=Done, 1=single pixel changed).
       count   Specifies the number of elements in the remaining three tags
       x and y Coordinates of changed pixel(s).
       value   Value(s) for changed pixel(s).

    The zero values in the above structure indicate the data types for the
 those tags, not the actual values. The 'value' tag will be the same type
 as the data in the array being edited.

 RESTRICTIONS:

 PROCEDURE:

 MODIFICATION HISTORY:
    Written by Doug Loucks, Lowell Observatory, April 28, 1994.
 95/10/31, MWB, Fixed widget layout problem caused by IDL v4.0 changes.
 2000/05/08, MWB, Control UPDATE to speed up 2-n invocations of this tool.