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.
