# Copyright(c) 1992 Bell Communications Research, Inc. (Bellcore)
# Copyright(c) 1995-99 Andrew Lister
#
# $Date: 1999/12/22 00:26:22 $
# $Id: ChangeLog,v 1.2 1999/12/22 00:26:22 danny Exp $

Changes in 4.7.2
----------------
* Changed libtool version numbers according to the rules, which means
  this will probably upset some people trying to use the library.
  An interface was added, see below.

* CELL_WIDGETS fixes by Linas Vesptas.

* CELL_WIDGETS functionality extended with XbaeMatrixGetCellWidget()
  which you can use to figure out whether a cell already has a
  widget.

* CELL_WIDGETS now enabled by default.

Changes in 4.7.1
----------------
* Maintenance is transferred to the LessTif core team.

* Configuration based on automake, autoconf, libtool is added, this
  is the preferred environment for the current (new) maintainers.

Changes in 4.7
----------------

* Swapped out the XmTextField widget to use the XmText widget to enable
  multi line rows and the like - thanks to Mark Gibson (magibso@uswest.com)
  for his methods in achieving this goal.

* Added a patch from Philip Aston (philipa@parallax.co.uk) that
  reportedly speeds up things by 300% when using pixmaps.  Acheivable
  by specifying the width, height and depth of a pixmap to an
  XbaeMatrixDrawCellCallbackStruct.

* Another patch from Philip provided correct behaviour when setting
  the XmNsensitive resource on ancestors of the matrix widget.

* "Ceklosky" (b1dqza9@is200005.bell-atl.com) reported a memory leak
  when the widget was destroyed.  This came about from highlighted-
  cells not being freed.

* Donato Petrino (dp@rtsffm.com) provided an efficient way of detecting
  if partially displayed rows were visible

* He also supplied a patch that corrected the placement of the text
  widget if the user first clicked on an editable fixed row.

* Scott Harrington (scotth@ibl.bm) figured out that xbaeComputeSize()
  should not add space for scrollbars if the displayPolicy is set to
  XmDISPLAY_NONE.  He also provided a patch.

* Made a small change to a conditional in Matrix.c that prevents
  an erroneous warning message being displayed.  Thanks to Curt
  Malouin (cmalouin@ford.com) for that one.

* Merged two patches from Jay Schmidgall (Jay.Schmidgall@Sungardss.com)
  one fixed a slight error in the drawing of scrollbar heights/widths
  while the other fixed some casting problems under Solaris [they
  must be getting stricter on this ANSI C thing!]

* Brian McAllister (brian@hotrats.mit.edu) provided a fix for compilation
  of Xbae on Dec Alphas

* Jay Schmidgall continued work on the widget, providing:

o Corrected some bugs with row/column shadow drawing and clearing
o Corrected some bugs related to not having row/column labels
o Changed the way shadows are drawn to be the correct way,
  i.e., mine. That is, XmSHADOW_OUT results in an outset shadow.
  Note: this may have implications for Motif 1.1 compatibility,
  since type isn't passed along to _XmDrawShadow()
(ED: Since 1.1 is no longer supported, this isn't an issue!)
o Changed the grid type enumeration to be more explicit
o Made the unneeded grid types deprecated, which will result
  in runtime warning messages
o Added grid types XmGRID_ROW_LINE and XmGRID_COLUMN_LINE
  (this was suprisingly simple :)
o Modified the matrix resource declaration to come into line
  with grid/shadow changes
o Modified the choice example program to reflect these changes
o Modified the man page to reflect these changes

*** NOTE ************************************************************
  The new types for gridType are:
  enum
  {
      XmGRID_NONE             = 0x00,
      XmGRID_CELL_LINE        = 0x02,
      XmGRID_CELL_SHADOW      = 0x03,
      XmGRID_ROW_LINE         = 0x04,
      XmGRID_ROW_SHADOW       = 0x05,
      XmGRID_COLUMN_LINE      = 0x08,
      XmGRID_COLUMN_SHADOW    = 0x09,

      /* Deprecated types. Use will cause
       * a run-time warning to be issued. */
      XmGRID_LINE             = 0x20,
      XmGRID_SHADOW_IN        = 0x40,
      XmGRID_SHADOW_OUT       = 0x80
  };

  If any of the bottom three values, a runtime warning will be output.
  You simply need to tweak the resources in your app to avoid it.

*********************************************************************

* Added a patch supplied by Martin Helmling (mh@octogon.de) that
  correctly manages the insensitive pixmap when creating for multiple
  screens.  Patches were also sent in by Dimitri Castiglioni and
  Donato Petrino.

* Added the doc/XbaeMatrix.man.html file as part of the official release

* Jay Schmidgall sent in another patch!  This time he:

o got irritated by how the matrix did column shadows/lines.
  In particular, there could be a little gap between the last
  non-fixed row and the first trailing fixed row, and that gap
  looked bad because the column shadow just ended there. So,
  I modified the shadow & highlight code so that gap got filled
  in. Looks much better now.
o Fixed the column resize shadow so it draws all the way to the
  bottom of the matrix, plus handles the gap like the above.
o Added a new resource, XmNtrailingAttachedBottom. (If you can
  come up with a better name, feel free :). This resource makes
  the matrix keep the trailing fixed rows on the bottom. It only
  has effect when XmNfill is true and there are trailing fixed
  rows. It's probably easier to understand visually.
o I put the equivalent AttachedRight in the matrix's resources,
  but I didn't feel up to doing the code for it :).
o Added a bunch of macros.
o Added the resource to the man page (yay!)
o Mucked around some more with the choice program to add the
  attachedBottom resource, and let you change the selection mode.
  I did this mostly because choice is the test bed for changes I
  make, and I needed to test the highlighting. Also let you do
  Arm mode, which looks neat in the grid shadow modes.

* Philip Aston sent in yet another patch that remedied an array
  bounds read as reported by Purify.

* A segmentation fault occurred if the user pressed <ESC> when no
  cells had been defined.  Diligently spotted and patch provided
  by Noel Yap (nyap@garban.com)

* Removed an unnecessary reference to XmNeditVerifyCallback in
  Matrix.h that Noel found as well.

* Added fix from Jon Sibala (jon_sibala@hotmail.com) where zero 
  rows was causing a crash in xbaeDrawCell.

* David North reported a bug in the charWidth macro on OpenVMS.
  A cast to unsigned char of the passed character was required.

* Marty Leisner (leisner@sdsp.mc.xerox.com) advised that the runtest
  script required '.' to be in your path.  Added an explicit ./ to
  all commands run from the script

* Cleaned up a few potential problems with compilation

* Removed the xqCellWidget from the release. The subclassed widget
  started causing problems when using Motif 2.1 probably due to
  incompatibilities between the XmText and XmTextField widgets
  The change may also fix problems reported by the guys back at
  Bellcore, running under Motif 2.1

* There are some new public functions:- XbaeMatrixSetRowLabel and,
  funnily enough, XbaeMatrixSetColumnLabel and their Get equivalents
  are now documented in the man page.

* Just as some sort of benchmark, Callum and myself loaded up a
  historical database comprising of somewhere around 780,000 rows and
  3 columns.  Using the drawCellCallback, XbaeMatrix handled display
  of the data as if there were 100 rows.  If anyone has tried creating
  a bigger table, please let me know the results!  (That applies to
  tables created with commercial widgets too)

* The building of shared libraries is now the default behaviour in
  the Imakefile.  If anybody has trouble running the demos due
  to the shared library not being picked up, please let me know
  so we can work out a fix.

* The HTML man page is probably a bit behind as I prefer methods
  from yesteryear.  Updates are always appreciated!

* Removed a strdup call and added __EMX__ to the preprocessor directives
  for not having bcopy.  Patch sent in by Evgeny Stambulchik
  (fnevgeny@plasma-gate.weizmann.ac.il)

* Two fixes from Mark Crowther (markc@parallax.co.uk) that better
  controlled scrolling with the pointer outside the clip and prevented
  the scrollbar warnings when columns were deleted.

* Noel Yap (nyap@garban.com) pointed out a small error in the draw
  example where the columns for pixmaps was incorrect

* Added the XEvent structure to all callbacks

* New widget!  XbaeInput allows a 'pattern' to be specified to restrict
  input to certain characters.  Read the new man page to find out
  more.

* Added some extra parameters to the XbaeMatrixEnterCellCallbackStruct -
  namely, position, pattern, auto_fill, convert_case, and
  overwrite_mode for use with the XbaeInput widget.
  Also, the params and num_params are passed through to the
  enterCellCB too.

* New resource - XmNcalcCursorPosition that allows the pointer to
  specify the insert position when clicked on a cell to be edited
  rather than at the end (default is False so behaviour is unchanged)

* Nick Banyard (nbanyard@micromuse.com) provided the ability to
  allow multibyte characters to be displayed with the addition of an
  XFontSet.  There is a new example program also, named multibyte
  that *should* display multibyte characters but some work may be
  needed there.

* Mark Hatch (mhatch@ics.com) provided me a free copy of Integrated
  Computer Solutions (http://www.ics.com) Builder Xcessory for both
  Solaris and Linux so the integration and compatibility between the
  two can be maintained.  If you're looking for an excellent GUI builder,
  I'd recommend checking this one out!

* Added a matrix creation convenience routine - XbaeCreateMatrix for
  smoother integration into Builder Xcessory

* Added a caption creation convenience routine - XbaeCreateCaption for
  smoother integration into Builder Xcessory

* Added an input creation convenience routine - XbaeCreateInput for
  smoother integration into Builder Xcessory

* Evgeny Stambulchik (fnevgeny@plasma-gate.weizmann.ac.il) supplied the
  GNU autoconf tools needed to compile the widget via ./configure as so
  many people feel the urge to do nowadays.  However, I have no intention
  of supporting it so you'd better have a friend who can & will.

* Callum Gibson (callum.gibson@aus.deuba.com) wrote a couple of new
  public functions to refresh entire rows or columns efficiently.
  They are called XbaeMatrixRefreshRow() and XbaeMatrixRefreshColumn().

* The XbaeMatrixAnyCallbackStruct was created to allow the reason, 
  event, row and column members to be aligned and facilitate the use
  of one callback struct in multiple callbacks.

* Fixed a bug with wrong fg/bg colours when editing a cell with
  reverse select enabled and using a draw cell callback which set
  foreground or background. (Everyone does that don't they?)

* Added a new action that allows the matrix to be scrolled up and
  down using the PgUp/PgDn keys when the text field is mapped.  It
  is installed by default.

Changes in 4.6.2
----------------

* Heinz Nagel (heinznagel@lucent.com) discovered an uninitialised
  variable in Methods.c

* Tim Bomgardner (Tim.Bomgardner@mci.com) found a clipping problem
  when a horizontal scrollbar and row labels are present.  The
  row labels were being drawn to the left of the horizontal SB.

* Whilst fixing Tim's problem, I also found several other small
  scrolling problems that were rectified

Changes in 4.6.1
----------------

* Added a weeny patch from Callum Gibson (callum.gibson@aus.deuba.com)
  that fixed a problem when there are no rows and row 0 is accessed.

* Philip Aston (philipa@parallax.co.uk) sent a patch in that missed out
  on the 4.6 release that handled null buttons when row or column label
  buttons were specified.  Added that in.

* Daiji Takamori (daijit@std.teradyne.com) suggested that all clip
  widgets should change their background colour - not just the main
  one.  Made this change.

* Steven Chase (schase@xpletive.mitre.org) provided two more public
  routines called XbaeMatrixGetColumnLabel() and
  XbaeMatrixGetRowLabel() which do what they imply.

* Inspired by Steven's idea, I went ahead and wrote some companion
  routines called XbaeMatrixSetColumnLabel() and XbaeMatrixSetRowLabel()
  which remove the overhead and flicker of SetValues() as well as help
  me not to have to answer people who try to "swap" columns the wrong way.

* Found a couple of public functions that weren't documented -
  XbaeMatrixSetRowUserData() and XbaeMatrixSetColumnUserData() and
  put them in the manual page.

* Made an effort to support smooth scrolling.  You'll now find that
  the last row, if not fully displayed is not blanked out as it was
  previously.  Change suggested by Adam Kerrison
  (Adam.Kerrison@micromuse.co.uk)

* Converted comments in the imake stuff to use XCOMM - apparently, it's the
  standard.

* Fixed a redisplay problem when there are different coloured backgrounds/
  foregrounds and rows are deleted.  Found by Craig Bruenell
  (cbruenell@macaw.retix.com)

* Added in a patch from Andy Warburton (andyw@parallax.co.uk) that fixed
  problems causing the SelectCell callback not to be called when the
  pointer was outside the matrix.

* Howie Kaye (howie@columbia.edu) suggested a smoother method for
  scrolling when setting XmNtopRow.  It prevents excessive redraws
  by using the matrix's internal scrolling methods.

* Philip Aston (philipa@parallax.co.uk) had an idea that scrolling to
  the selected cell when in auto scroll mode should be disabled.  I
  liked the idea, too.


Changes in 4.6
--------------

* Fixed the problem with passing non printable chars to the matrix.

  Fixed a couple of bugs associated with changing rows and colours at
  the same time.

  Does not do the free, malloc and drawing of a cell if the value is
  the same and SetValues is called.

  New public function - XbaeMatrixRefreshCell(mw, row, column) which
  forces a cell to be redrawn.  When using the drawCellCallback, an
  event may trigger a change to a cell that is not displayed until an
  expose event is generated.  Using XbaeMatrixRefresh() is a bit of an
  overkill if just changing one cell.

  Added a delete button to the add demo.  Removed the debug write from
  the colors demo.

  The above changes were incorporated into the patch released to the
  mailing list on 2nd of March, 1996 to take 4.5 to 4.5.1

* Fixed a problem that was allowing double clicks to be performed with
  any mouse button rather than using the translation table to work out
  which button should be used.

* Did some work on improving the update flicker if
  XbaeMatrixDisableRedisplay() has been called.  Earl Revett
  (erevett@kokomo.bmc.com) provided the initial idea and a patch.

* Merged in a patch from Earl Revett that fixed some portability
  issues for him and most likely for others too.

* Made a change suggested by Daiji Takamori (daijit@std.teradyne.com)
  that eliminates some excess variable-checking and reports individual
  errors for no non-fixed rows and no non-fixed columns.

* Created an FAQ as I was getting sick and tired of answering the "How
  do I make a cell non-editable?"question.  Callum Gibson
  (callum.gibson@aus.deuba.com) initiated the proceedings, I merely did
  the answers.

* Disabled a warning message if a matrix has 0 rows or 0 columns and is
  editable as the EditCell routine was being passed a bad row / column
  even though there are no cells to be edited.  Suggested by Ross Milward
  (ross.milward@aus.deuba.com)

* Added a new public function called XbaeMatrixMakeCellVisible() that
  allows a cell to be programatically scrolled onto the visible area of
  the matrix.  Suggested by Steve Wall (sjwall@uswest.com).

* Added the XmNshowArrows resource to make it optional whether obscured
  data is indicated by a drawn triangle or not.  The default value is
  False.  Enough people complained about it so there ya go.

* Removed parameter names from function prototypes as it could cause
  clashes with typedefs and #define's in other header file.

* Added three public functions from Matthew Francey (mdf@angoss.com) -
  XbaeMatrixIsRowVisible(), XbaeMatrixIsCellVisible() and
  XbaeMatrixIsColumnVisible() which do pretty much as the name suggests.

* Fixed a bug, found by Matthew Francey which would occasionally cause a
  crash when the widget was destroyed.  Fix contributed by Matthew also.

* Made some more changes hinted at by Jason Smith
  (jason.smith@europe.sbil.co.uk) to make the widget motif 1.1 compatible.
  The widget is probably still not entirely compatible with 1.1 as I have
  no way of testing whether it is or not and nobody seems willing to
  send me an entire patch.

* Adding rows or columns with no labels when XmNbuttonLabels is set to
  True will now draw buttons around the empty labels.  Previously, a
  blank label would result in no button and it looked weird.

* Included a patch from Andy Warburton (andyw@parralax.co.uk) which
  corrected colours of selected cells when using the drawCellCallback
  and the reverseSelect resource.

* Added the ability for the matrix to *look* insensitive by using a
  stipple pixmap to create the effect on the text.  Suggested by
  "tom" (kriener.pad@sni.de).

* Rewrote the LICENSE file and actually included the above copyright
  notice that was never there.  See the FAQ for the license in plain
  english.

* Added in a patch from Martin Helmling (mh@octogon.de) that prevented
  problems with NULL pointers in String array resources.

* Modified the way the drawing of fixed cells were cleared and drawn.
  There were problems with setting the values of fixed cells and also
  an incorrect visual was sometimes obtained when selecting fixed rows
  and / or columns.

* Fixed the way the matrix dealt with moving the pointer off the clip
  widget and outside the matrix widget's window so it behaves more like
  the list widget.  <Btn1Up> events should now report the last cell that
  was left rather than fail completely.  Invaluable for multiple selection
  of cells.

* Added a couple of new public functions inspired by Philip Aston
  (philipa@parallax.co.uk) named XbaeMatrixEventToXY() and
  XbaeMatrixRowColumnToXY().  See the man page for details.

* Changed the method of pointer grabbing for the button presses and
  MotionEvent's outside of the matrix from XtGrabPointer to XtAddGrab
  since grabbing the pointer seemed to be a bit of an overkill.  It
  also makes debugging easier and improves performance.

* Added an allowance to enable use of the XmText resource XmNshadowThickness
  on the text field.  Idea from by Daiji Takamori (daijit@std.teradyne.com).
  I had to add a new resource to do this named XmNtextShadowThickness.

* Merged in a fix from Andy Warburton (andyw@parallax.co.uk) to fix
  a problem in the reverse selection when using a draw cell callback

* Added a new member to the XbaeMatrixEnterCellCallbackStruct called map
  that, when set to False, prevents the text field from being mapped onto a
  cell.

* Tim Bomgardner (timbo@apdev.cs.mci.com) provided a new public routine
  called XbaeMatrixVisibleCells() that allows the rows and columns on the
  edges of a matrix to be obtained

* Added the XEvent pointer to the XbaeMatrixLabelActivateCallbackStruct
  as suggested by Saroj Mahapatra (saroj@nynexst.com)

* Callum Gibson (callum.gibson@aus.deuba.com) kindly made the effort to
  put all existing releases into a CVS source tree in an effort to get me
  organised (Don't really know if it helped!).

* Made a fix suggested by Martin Helmling (mh@octogon.de) that prevented
  a possible crash in the calls to XtCheckSubclass()

* Added in several patches from Philip Aston (philipa@parallax.co.uk).
  One removed all scrolling events when XbaeMatrixEnableRedisplay()
  was called that fixed up some redraw problems for him.  He also
  provided the Boolean resources, XmNrowButtonLabels and
  XmNcolumnButtonLabels that define which labels should be drawn as
  buttons.

* Callum Gibson offered his services again and made fixed cells editable
  and thus made it possible to remove question 2.8 from the FAQ.  For the
  optimists out there who haven't allowed for this in their applications,
  another resource has been added, XmNtraverseFixedCells, with a default
  of False has been added.  A new series of clip widgets have been added
  which should fix most of the redraw issues.  Want details?  Ask
  Callum.

* Completely rewrote the method in which row and column shading gets drawn
  which should prove to be faster and more reliable when dynamically
  changing the matrix's size.  The highlighting and unhighlighting had
  to be rewritten too.  These procedures also will affect pixmap cells which,
  I believe, would not have worked otherwise.

* (4.6 BETA released)

* Added a credit in this file for Philip Aston and the XmNrowButtonLabels
  resource.

* Jay Schmidgall <Jay.Schmidgall@sungardss.com> provided a patch to fix
  the calls to private xbae functions that the program used.  Also
  pointed out a few problems with changes I had made to Xbae.tmpl which
  I hope I have fixed.

* Added a patch from Alexander Ivanov <avi@eaglesoft.com> that fixed
  a crash when destroying the matrix on Solaris 2.5.  That's what you
  get if you don't initialise variables.

* Daiji Takamori pointed out an incorrect endif in Xbae.tmpl.

* Philip Aston provided a patch to make the String to String Array type
  converter a little more sane.  Here's his interpretation of the change:

  Improved the handling of escaped characters by the String to String
  Array type converter. Previously only ',' could be escaped as \,',
  now any character can be escaped using '\'.
  Note, this behaviour is _not_ backwardly compatible, but is only
  likely to break code which uses backslashes in resource strings. Use
  '\\' instead of '\' to quote a backslash.

* Changed the alignment_center routine to check a little better for the
  end of a string when the existing check may cause an infinite loop.
  Problem brought to recognition by Donato Petrino (dp@rtsffm.com)

* Philip Aston pointed out a few problems that sometimes caused
  column labels not to refresh.  Fix also suggested by Philip.

* Rewrote the code in XbaeMatrixRefresh() that caused a "double flicker"
  when called so there is only *one* flash



Changes in 4.5
--------------

* Added "<" and ">" symbols to signify when data in a cell is out of
  sight.  This was causing a few problems when a minus sign was hidden
  or other numbers were obscured.  The new feature can also be used
  to indicate that a column should be resized in order to see all the
  data contained in a cell.

* Removed references to XmDrawHighlight() if the Motif version is less
  than 1.2.  This will hopefully allow the widgets to compile under
  Motif 1.1, but with a little less functionality.  There is probably
  more work to be done to actually get it to compile under 1.1 but,
  as I cannot test it, I need a patch from somebody with access to it.

* Updated the Imakefile and Xbae.tmpl files to allow shared and debug
  libraries to be made and installed as well as the normal libXbae.a.
  If your system does not support shared libraries or they don't compile
  properly like Linux/a.out, then only set DoNormalLib to YES.  I don't
  want to hear complaints about shared libraries not working!  Thanks
  to Dirk Vangestel (gesteld@sebb.bel.alcatel.be) for the initial idea
  and patch.

* Broke Utils.[ch] into smaller parts to add Create.[ch] to the
  distribution.  This new module basically handles the creation of the
  matrix widget's data and freeing of the same data.  Also moved a few
  functions that were incorrectly located in Actions.c, namely
  xbaeXYToRowColumn() and xbaeRowColToXY().

* Modified xbaeXYToRowColumn() to correctly detect and report an event
  occurring on a row or column label.

* Tidied up the MatrixP.h file which was getting a little dishevelled.

* Changed the way the matrix handles the cell_backgrounds initialisation.
  Instead of setting all the backgrounds to the core's background, the
  colours are now inherited from the odd and even row backgrounds.  If
  these values have not been set, they inherit the core's colour anyway.

* Altered the background cell colour calculation to provide even and
  odd row backgrounds for fixed rows.  Previously, the calculation would
  only use the odd and even row backgrounds for non fixed rows and
  trailing fixed rows which seemed a little inconsistent.
  
* Fixed a serious bug that no one has reported that involves resizing
  a widget that has trailing fixed rows.  The widget attempted to set
  the height of the vertical scroll bar to zero causing one of those
  XError messages that are nice and hard to track down.

* Changed the way the row label width is calculated.  It now uses the
  average width of the characters.  Normally, it should be calculated
  correctly but if some characters are clipped, you might need to
  change the rowLabelWidth resource.  Generally speaking, the row
  labels look better placed.  This change will only affect proportional
  fonts used as the label font.

* Added a patch from Martin Helmling (mh@c3i.sel.de) to allow the cells
  resource to be row terminated with a single \n rather than the
  original \\n.  I then did the same for the colors and cellBackgrounds.
  Old resources will still work, however.

* Removed the "leading_fixed_rows" and "leading_fixed_columns" members
  of the XbaeMatrixTraverseCellCallbackStruct as they were not referenced
  nor documented.  I really hope this doesn't cause anyone any grief.

* Added the resources XmNbuttonLabels and XmNlabelActivateCallback to
  draw the labels as a drawn PushButton when set to True.  When a label
  is clicked on and released, callbacks on the labelActivateCallback
  will be called.  Also modified the choice demo to allow the buttons
  to be shown.  The background colour of the buttons can be changed
  with the XmNbuttonLabelBackground.

* Made the XmNmodifyVerifyCallback *not* be called when the text field
  is mapped onto a cell.  This is not the default behaviour of the
  text field and produced misleading results.  Pointed out by N. J. 
  O'Neill (njoneil@sandia.gov)


Changes in 4.4
--------------

* Merged in a patch from Martin Helmling (mh@c3i.sel.de) that
  allows cells and pixel tables to be specified in a resource file. The
  matrix example (although too colourful and ugly!) demonstrates the
  possibilites.

* Added a new directory (vmsstuff) that contains the necessary files
  for compilation on VMS.  Courtesy of Vince Li (vli@mpr.ca)

* Fixed a bug found by Andrew Reid (areid@bain.oz.au) that caused
  problems with using XtVaSetValues() on XmNcolors and XmNcellBackgrounds.
  Optimised much of the code handling these settings too.

* Fixed a bug that caused cells not to be drawn even though they were
  visible.  Unearthed by Donato Petrino (dp@rtsffm.com)

* Added support for colour pixmaps to be displayed. flavius@sed.psrw.com
  suggested this change and also modified the "draw" demo to make use of it.
  NOTE: For the draw demo to display colour pixmaps, you should define
  HaveXpm in Xbae.tmpl.  That is, of course, if you have it!  The need for
  returning the width and height of the pixmap to the widget has also been
  removed.  Invaluable help on masks was provided by Adam Kerrison
  (adam@micromuse.co.uk)

* Patched in and modified a resizeColumnCallback from Alexander Ivanov
  <avi@elais.physics.ox.ac.uk>  Refer to the man page for information.
  The new callback allows processing to be done after the columns
  have been resized.  The add example uses this callback to achieve some 
  pretty funky results!

* Patched in some work done by Dirk Vangestel (gesteld@sebb.bel.alcatel.be)
  to allow scroll bars to be placed in different locations, similar to a
  Motif scrolled window.  The new resource, XmNscrollBarPlacement
  behaves exactly the way the resource for XmScrolledWindow does and
  accepts the same values.  Dirk also modified the choice program to
  show off the new behaviour.

* Rewrote (with permission from ICS) a wml file for use with the ICS Builder
  Xcessory GUI builder and the current version of Xbae.  It can be
  found in the contrib subdirectory.  As I no longer have a copy
  of Builder Xcessory, it will be difficult to maintain.  The file
  can (probably) also be found at ftp.ics.com in
  /pub/Products/ToolsAndTricks/BxXbae.tar.gz.  I would expect that the
  other files in the contrib directory may now be out of date also.

* Changed the Imakefile to install Xbae as Xbae-$(VERSION) and make a
  symbolic link.  For those who have production environments, this should
  help in rebuilding with previous versions of the widgets - suggested by
  Ross Milward (rossm@bain.oz.au)

* Tracked down a bug in xbaeComputeCellColors() that incorrectly calculated
  the colour value _if_ the colour had a pixel value of zero (typically white
  in the colourmap)

* Added in a fix from Philip Aston (philipa@parallax.co.uk) to "fix a
  duff calculation of the selected column in a fixed row".

* Changed the XbaeMatrixEnterCellCallbackStruct to include a new member
  called select_text.  By setting to True in the enterCellCallback, the
  text in the textField will be selected and deleted when the next
  insertion occurs.


Changes in 4.3
--------------

* Added an XbaeVersion to Matrix.h.  The value for this is calculated in a way
  similar to how Motif does it:

	#define XbaeVERSION       4
	#define XbaeREVISION      3
	#define XbaeVersion (XbaeVERSION * 1000 + XbaeREVISION)

  This brings another header file into the release - patchlevel.h.

* Merged in another patch from Jay Schmidgall that added the resources
  XmNcellShadowTypes, XmNcellUserData, XmNclipWindow, XmNcolumnShadowTypes,
  XmNcolumnUserData, XmNrowShadowTypes, XmNrowUserData and XmNtextField.
  Also some more public functions to manipulate the data.
  See the manual page for more information on these.

* Also added two more demo programs from Jay, fifteen and select-push

* Added row and column label colour resources (suggested by Adam Kerrison,
  Adam.Kerrison@micromuse.co.uk)

* Merged in a patch from Jason Smith <js81736@internet.sbi.com>
  that allows the Matrix to be compiled using Sunos 4.1.x Openwindows 3.0
  and Motif 1.1.x

* Removed the line in SetValues() that resets the scrollbar to 0 when
  the Matrix is redrawn (suggested by Adam Kerrison also)

* Added more public routines: XbaeMatrixIsRowSelected(),
  XbaeMatrixIsColumnSelected(), XbaeMatrixIsCellSelected(),
  XbaeMatrixFirstSelectedRow(), XbaeMatrixFirstSelectedColumn(),
  XbaeMatrixFirstSelectedCell(), XbaeMatrixYToRow(), XbaeMatrixXToCol()
  Suggested by Adam Kerrison.

* Fixed a bug with XmNtopRow and XmNleftColumn, found by Lori Corbani
  (lec@informatics.jax.org)

* Fixed a bug that caused the selectedCells resource to not be updated if
  a row or column was not visible. Pointed out by Jay Schmidgall.

* Added some new public functions - XbaeSelectAll() - to select all the
  cells in the matrix which XbaeGetNumSelected() which returns the number
  of selected cells in the matrix.  This value is updated dynamically to
  prevent traversing the entire matrix.  Suggested by Eric Bruno
  (bruno@nsipo.arc.nasa.gov)

* Looked some more into drawing a pixmap in a cell.  Had it working but
  decided that the method originally inspired by Kevin Brannen was less
  than satisfactory and needs to be rethought.  The current idea is to
  allow a user defined widget, whether it be a label, togglebutton, etc.
  widget, to be drawn in a cell.

* Added the XDesigner contribution from Eric Bruno (bruno@nsipo.arc.nasa.gov)

* The user can now dynamically change the width of a column by using the
  Shift Key and middle button and dragging the column to a new position.
  A column cannot be resized to less than one character.

* Added the Rogue Wave View.h++ contribution from Mark Steckel
  (msteckel@aracada.com)

* Added a resizeCallback called when the matrix is resized so columns
  can be adjusted, etc.  Patch from Mark Steckel.

* Removed the losingFocusCB that was added in 4.0 as it was causing problems
  and the overhead was not necessary, particularly in the case of a very
  lengthy leaveCellCallback routine.

* Changed the default value for XmNspace to 4, rather than 6 as suggested by
  Mike Perik <mikep@crt.com>

* Jay Schmidgall continued his work on the widget to provide us with:
  o	{Un}Highlight{Cell,Column,Row,All} routines
  o	XmNhighlightedCells to go along with the highlight routines
  o	ProcessDrag() routine - bound to Btn2Down to match Motif.
  o	XmNprocessDragCallback
  o	XmN{vertical,horizontal}ScrollBarDisplayPolicy
  o	XmNfill to make the matrix fill the available form.
  o	ResizeColumns reworked to draw across various portions of
  	the matrix's display
  o	allow zero rows and columns
  o	allow visible rows,columns > #rows,columns for sizing purposes
  o	XbaeMatrixNum{Rows,Columns} routines
  o	XbaeMatrix{En,Dis}ableRedisplay routines
  	This is typically most effective when the enable is called
  	just after an XmUpdateDisplay(), at least so I've found.

  Plus a new demo program, "list", that emulates a motif list widget with
  the added advantage of th matrix widgets resource.  The choice program
  was also enhanced.

* Split up more source files to provide Draw.c and Shadow.c so as
  to keep the size of files down to a minimum.

* Added editres capability to all demo programs and cleaned up most
  compilation warnings.

* Modified the Xbae.tmpl to allow a few more configurable options related
  to resizing columns on the fly

* Changed all example program resource files to be the class name of the
  demo.  Now, to run a program something like setenv XAPPLRESDIR . and
  then the program should suffice.

* Reworked the drawing of the resize columns.

* Removed the allocation of cells, selected cells and highlighted_cells
  when the matrix is initialised.  For very large (and I'm talkin' very)
  matrixes, the memory consumption is quite considerable.  A caveat of
  this feature is, if there is no drawCellCallback, memory for the
  above resources is allocated when one of the values changes.
  Pointed out by Daiji Takamori (daijit@std.teradyne.com).

  IMPORTANT:  This feature may cause an application to crash if
  the selected_cells, highlighted_cells or cells is dereferenced
  before being initialised.  Please check the value of the pointer in
  all callbacks.  The functions similar to XbaeMatrixIsCellSelected()
  should probably be used rather than mucking around with matrix
  internals.

* Realised that when using the drawCellCallback, there is no method to
  actually edit the data in the cell and commit these changes.  And
  thus was born the writeCellCallback which should be defined for an
  editable matrix that is drawn using the drawCellCallback.  Failure
  to do so will result in a warning message.  The writeCellCallback
  is called from the set cell action and all normal callbacks (leave, etc)
  are called along the way.

* Checked on quite a few other implications of the drawCellCallback and
  corrected where appropriate.

* Implemented the drawing of Pixmaps in cells via the XmNdrawCellCallback.
  See the "draw" demo program for an example.  I don't really know what
  people expect to achieve by using this functionality.  If you are one of
  those people who intend to use it, please let me know the details.

  I would still like to implement the idea described above about allowing
  any widget to be drawn into a cell.  Maybe in the next release!

* Added the demo program "draw" that demonstrates the drawCellCallback,
  and writeCellCallback and pixmaps in cells.

* Updated the manual page for XbaeMatrix with Jay Schmidgall updating
  the changes that he made.


Changes in 4.2
--------------

* Fixed up several teething problems pointed out by Neil Weber
  (neilw@pyramid.com) who also provided a patch for this update.

* Patched in the trailingFixedRows, trailingFixedColumns, shadowType
  and cellShadowType.  Added the multifixed demo program.  All
  contributed by Jay Schmidgall (jay.schmidgall@spdbump.sungardss.com)

* Renamed all global functions to have the same name with an 'xbae'
  prefix to prevent problems with resolving symbols

* Added a different font for the row and column labels, fixed some existing
  problems that did not allow a proportional font's baseline and cell size
  to be handled correctly.

* Adjusted the cellMarginWidth and Height to default to 3.  Combined with
  a cellHighlightThickness of 2, by default, the cell should appear the same
  but the cells are now resized properly and allow larger and or different
  typeface label fonts to be used.

* Fixed the textBackground resource which was overlooked in release 4.1

* Added more grid types donated by Jay Schmidgall.  These types include
  XmGRID_ROW_SHADOW, XmGRID_COLUMN_SHADOW, and combined some of the
  Motif shadow types (XmSHADOW_ETCHED_IN and XmSHADOW_ETCHED_OUT) to
  perform some very interesting grid types.  These grid types are
  on display in an example program, also written by Jay, called choice.

* Removed the FrameMaker documents, deciding to keep the manual pages
  up to date instead.  I also intend to provide a PostScript version
  of the manual pages to facilitate printing.  These documents are in
  the doc/ subdirectory.

* Removed the set-values program as it was very buggy.

* Removed the cancelEdit() call from SetValues().  What this meant was any
  time the widget was redrawn, the cell currently being edited would have
  the edits cancelled and the text field unmapped.  For real time systems
  and other applications that may be displaying live data in the widget via
  XtSetValues() I don't think it is desirable behaviour.  If anybody has
  an objection to this, please let me know.  A cancelEdit is now only
  performed if the size of the cells change.

* Went through the SetValues() routine and checked that everything being
  done was necessary.  Added a few more values such as altRowCount which
  has not been settable in previous (4.1, 4.0) releases via XtSetValues.

* added an XmNreverseSelect resource to override the available methods
  of drawing a selected cell and draw it in exactly the reverse colours
  of the cell.  Inspired by Donato Petrino (dp@rtsffm.com).  As yet,
  this resource remains virtually untested.

* Fixed many more bugs and hiccups found by all the people helping with
  testing.

* Updated the XbaeMatrix manual page and wrote one for XbaeCaption.  If
  anyone has a way to split tables up over multiple pages, any tips would
  be appreciated.


Changes in 4.1
--------------

* Ripped apart the src/Matrix.c into several (significantly) smaller files.
  I don't know if this is a good idea (feedback appreciated) but one ten
  thousand line file is getting a bit large (+ hilit19 stops working ;-)

* Ansified and prototyped all functions in a way significantly more
  readable than release 4.0

* Patched in (by hand) changes made by Q Frank Xia in the "pretty" patch.
  These were not included in their entirety in release 4.0 and would have
  probably made it difficult for some to use.

* Added a defaultActionCallback and doubleClickInterval (analagous to
  XmList) that allows a callback to be invoked when a double click occurs
  in a cell.

* Added XbaeMatrixVisibleColumns() and XbaeMatrixVisibleRows(), suggested by
  Craig Wilson.

* Added XbaeMatrixSetCellBackground(), XbaeMatrixSetRowBackgrounds()
  and XbaeMatrixSetColumnBackgrounds() to set cell backgrounds to
  supplement the XbaeMatrixSetCellColor() set of functions.

* Supplied an XmNleftColumn resource to work in conjuction with XmNtopRow.

* Fixed a few bugs that I found (nothing serious, mind you)

* Rewrote the manual page to get it up to scratch.  Unfortunately, I
  do not have access to FrameMaker so the PostScript and FrameMaker
  documents in the doc directory could not be maintained.  They are
  included merely for reference and for the pretty pictures.  If anyone
  could convert the FrameMaker documents into a different format, let me
  know and I'll consider maintaining these too.  I don't see a real need
  as the man page doesn't look too bad on a PS printer at all.  The
  Caption widget also needs a man page.

This release is intended to get people interested in the package again.
It is now compatible with the 3.8 pl 1, 3.8 and 4.0.

I now have a workable platform on which to expand so please, if you
have suggestions, let me know and I will add attempt to add it to the next
release.

Please refer to the manual page(s) for detailed information.

Andrew


Changes in 4.0
--------------

(from kbrannen@metronet.com)

[Note:  "you" in this section is defined to be the application programmer.]

Changes:
--------
* Started with virgin 3.8 version.
* Merged in patches from Andrew Wason.  This fixed several major bugs,
  including a few with geometry management.  Internal version 3.9,
  never publically released.
* Added a LosingFocusCB for the TextField to call the CommitEdit function.
  This is an internal change.  [It seems so natural and needed, that I didn't
  allow a way for this to be overriden and not done.  If you find this to be
  be a *real difficulty*, please email and tell me why I need to add a
  resource for you to turn this off.  Well, you could override this by removing
  the Losing-Focus callbacks for the TextField widget after the widget is
  created.]
* Added current raw text value to XbaeModifyVerifyCallbackStruct, suggestion
  by Duncan Prindle.  This new field in the callback struct will allow your
  callback to "know" what's currently in the cell, as the user sees it,
  before the modification.
* Added VMS support, suggestion and code by Vince Li.
* Added support for 2-byte fonts (not a true wchar resource, but for fonts
  where font->max_byte1 != 0); code courtesy of Vince Li.
* Added new Xbae types for ease of use (e.g. AlignmentArray, MaxLength, etc.).
  Use -DXBAE_NO_EXTRA_TYPES if you don't want.
* Changed CONST to _Xconst, in agreement with X11R5.
* Add _XFUNCPROTOBEGIN & _XFUNCPROTOEND around prototypes, in agreement with
  X11R5.
* Added defines for _Xconst, _XFUNCPROTOBEGIN, _XFUNCPROTOEND for those who
  are stuck with X11R4.  I've tried to keep it working with R4, but as I don't
  have one of those systems anymore, I can't test; so please email me if it
  doesn't work for you under R4--and what you had to do to get it to work.
* Updated the frame document, reprinted the postscript file.
* Created a man page for XbaeMatrix; and the tbl/nroff output version.
* Changed all index() to strchr().  [Even my Sun has strchr() :-]
* Added ifdef to remove the need for bcopy for those you who have memmove()
  and you're still at R4 or Xfuncs.h doesn't help for some reason.  Use
  -DXBAE_NEED_BCOPY if you need bcopy(), else by default it will use
  memmove().
* If you were to look in EditCell(), you'd see a comment from Andrew W about
  finding a bug in Motif that can cause a protocol error, so he ifdef'ed the
  code out.  However, without this code, the TextField may not have the
  expected colors.  Every system I've run on has worked just fine with this
  code.  I'm in the process of trying to find out more about this, but don't
  yet know the details.  If you find that you are getting protocol errors,
  you can try recompiling Matrix.c with -DXBAE_NO_PROTOCOL_BUG which will
  turn this code off.
* Tested with R5 and Motif 1.2; and R6 and Motif 2.0.
* Compatibility with R3 & R4 and Motif 1.0 & 1.1 is untested.  I've done my
  best to avoid "breaking" the code for these platforms, but I really can't
  test there anymore.
* I've fixed a few reported compile time warnings with the Caption & Clip
  widgets.  If you find more, please email me a copy.

New Resources:
--------------
* Added XmNtextBackground resource.  This resource allows you to give the 1
  TextField it's own background if you need it to standout.  Most useful where
  you want the Matrix to have a uniform color appearance, but want the
  entry cell to be plainly visible.  [Makes me wonder if I also need to add
  a XmNtextForeground, but the color stuff is getting so complicated...]
* Added XmNverticalScrollBar and XmNhorizontalScrollBar resources (get only).
  These resources are useful for those you need to "tie" another scrolled
  window (of some sort) to the Matrix and have it scroll synchronously.
  Again, note that these are GET resources only, you may not change the
  value of these 2 resources, though you may manipulate the ScrollBar widgets.
* Added XmNselectScrollVisible resource, code courtesy of Vince Li.  This
  resource when True gives the 3.8 functionality (the default), but when
  False, does not make the Matrix scroll "programmically selected cells" into
  view (so you don't have to watch it go thru contortions :-) .
* Merged in some of Q. Frank Xia's changes found on ftp.x.org.  Added
  XmNevenRowBackground and XmNoddRowBackground.  These allow you to have
  alternating background row colors, like the "old" computer paper.
* Added the XmNaltRowCount resource.  This allows you to specify how many
  rows each of the evenRowBackground and oddRowBackground covers; IOW, how
  wide the bands are.
* Added a drawCellCallback callback.  This is the biggest change to the
  widget and potetially the most dramatic for the end-users.  This callback
  list (in my mind, it really only make sense to have 1 function in the list)
  will be called whenever a cell needs to be drawn; hence the application
  can wait until "draw" time to tell the widget what to put in the cell.
  This also means that the widget will not make a copy of the value.  So
  you get to make a choice between more control and less memory usage--versus
  --slightly slower code due to more function call overhead.  Note:
  I had planned to allow pixmaps to be drawn thru this mechinism also, but
  this is being delayed until the next release due to time contraints, sorry.
  Therefore, as of 4.0, if a type of XbaePixmap is return, the empty string
  will be drawn.

New Public Functions:
---------------------
* Added public function XbaeMatrixGetEventRowColumn().  This function
  allows you translate a button-press event into cell coordinates, IOW
  a row/column.  This is useful for those who want to install a pop-up
  and need to map the event to a row/column/cell to know what actions
  should be presented to the user.
* Added XbaeMatrixGetCurrentCell().  A public function for you to query the
  Matrix about where the "current" cell is.
* Added XbaeMatrixRefresh().  This function allows you to force the widget
  to redraw itself.  See doc for why.

Bugs fixed in version 3.8:
--------------------------

 * Changes so widgets compile under Motif 1.2.1
   Known problem: the XmTextField doesn't correctly register it's dropsite
 * Fix function prototypes in Matrix.h
 * Fix Caption so a Caption Pixmap will use the Captions
   XmNforeground resource
 * Include FrameMaker source files for docs

Bugs fixed in version 3.7:
--------------------------

 * XbaeMatrix would occasionally steal the focus from other widgets
   in the same shell.  The Clip widget was changed to only respond
   to synthetic FocusIn events.
 * XbaeMatrix StringToAlignmentArray converter should free the array
   when the conversion fails.
 * All header files now use a more specific inclusion protection symbol
   to avoid conflicts with other packages.
 * The XbaeMatrix documentation incorrectly documented the
   XbaeMatrixLeaveCellCallbackStruct.
 
Bugs fixed in version 3.6:
--------------------------

 * XbaeMatrix computes a bad width when XmNvisibleColumns == XmNcolumns.
   (reported by salevin@drl.mobil.com (S. A. Levin [Stewart]))
 * Changed XbaeMatrix to allow XmNvisibleRows to be greater than XmNrows.
   (reported by mark@bryce.llnl.gov (Mark Spruiell))
 * The XbaeMatrix methods: XbaeMatrixAddRows, XbaeMatrixDeleteRows,
   XbaeMatrixAddColumns, XbaeMatrixDeleteColumns, XbaeMatrixSetRowColors,
   XbaeMatrixSetColumnColors and XbaeMatrixSetCellColor need to check
   if they are realized.
   (reported by salevin@drl.mobil.com (S. A. Levin [Stewart]))
 * Calling XbaeMatrixEditCell before the widget is realized could result
   in the edit TextField being positioned wrong.
 * XbaeMatrix needs to call the XmNtraverseCellCallback functions when
   the widget initially gets traversed into, and it is not currently
   editing a cell.
   (reported by mark@bryce.llnl.gov (Mark Spruiell))
 * Adding/deleting rows from an XbaeMatrix with XmNfixedRows could later
   result in a core dump when scrolling to the bottom of the matrix.
   (reported by nick@ps.quotron.com (Nick Aiuto))
 * Changed XbaeMatrix to use XrmPermStringToQuark for R5.
