diff -c -r Xbae-4.6/CHANGELOG Xbae-4.6.1/CHANGELOG *** Xbae-4.6/CHANGELOG Sat Feb 8 17:04:36 1997 --- Xbae-4.6.1/CHANGELOG Sat May 3 10:48:17 1997 *************** *** 1,8 **** # Copyright(c) 1992 Bell Communications Research, Inc. (Bellcore) # Copyright(c) 1995-97 Andrew Lister # ! # $Date: 1997/02/08 06:04:36 $ # $Source: /usr/local/src/Xbae/CHANGELOG,v $ Changes in 4.5 -------------- --- 1,203 ---- # Copyright(c) 1992 Bell Communications Research, Inc. (Bellcore) # Copyright(c) 1995-97 Andrew Lister # ! # $Date: 1997/05/03 00:48:17 $ # $Source: /usr/local/src/Xbae/CHANGELOG,v $ + + 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. 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 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 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 lables 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 -------------- diff -c -r Xbae-4.6/INSTALL Xbae-4.6.1/INSTALL *** Xbae-4.6/INSTALL Sat Feb 8 17:04:36 1997 --- Xbae-4.6.1/INSTALL Sat May 24 08:28:45 1997 *************** *** 1,5 **** # ! # $Date: 1997/02/08 06:04:36 $ # $Source: /usr/local/src/Xbae/INSTALL,v $ INSTALLATION --- 1,5 ---- # ! # $Date: 1997/05/23 22:28:45 $ # $Source: /usr/local/src/Xbae/INSTALL,v $ INSTALLATION *************** *** 26,46 **** a level, too and perhaps modify a few files as they will be out of date] ! 4. Run "make World". ! 5. Go to the examples sub directory and run "runtest" for a simple demo and to test it's all working OK. ! 6. Run "make install". The library and header files will be installed with a -(RELEASE.NO) suffix and symbolic links made. That way, you will be able to relink with older versions of the widget if the need arises. ! 7. Run "make install.man" to install the manual pages. ! 8. Send me (lister@shadow.apana.org.au) some email to let me know how ! installation went, the platform on which compiled and what you intend ! to use the widgets for. This step is optional but will help me to get ! an idea of what needs to be done in further releases. Don't forget to ! join the mailing list! Also, I need more postcards :p --- 26,53 ---- a level, too and perhaps modify a few files as they will be out of date] ! 4. Run "make World". Alternatively, you can use xmkmf -a if your xmkmf ! supports it. ! 5. If it doesn't compile cleanly, then I'd almost guarantee that there ! is something wrong with your setup of imake, so contact your system ! administrator before coming to me. If I can compile it on a pyramid ! system running DC/OSx and Motif1.1 then it should work for you. ! ! 6. Go to the examples sub directory and run "runtest" for a simple demo and to test it's all working OK. ! 7. Run "make install". The library and header files will be installed with a -(RELEASE.NO) suffix and symbolic links made. That way, you will be able to relink with older versions of the widget if the need arises. ! 8. Run "make install.man" to install the manual pages. ! 9. Send me (lister@syd.net.au after June '97 or lister@shadow.apana.org.au ! before that) some email to let me know how installation went, the ! platform on which compiled and what you intend to use the widgets for. ! This step is optional but will help me to get an idea of what needs to ! be done in further releases. Don't forget to join the mailing list! ! Also, I need more postcards :p diff -c -r Xbae-4.6/PROBLEMS Xbae-4.6.1/PROBLEMS *** Xbae-4.6/PROBLEMS Sat Feb 8 17:04:37 1997 --- Xbae-4.6.1/PROBLEMS Wed Mar 5 19:02:20 1997 *************** *** 1,5 **** # ! # $Date: 1997/02/08 06:04:37 $ # $Source: /usr/local/src/Xbae/PROBLEMS,v $ Known bugs: --- 1,5 ---- # ! # $Date: 1997/03/05 08:02:20 $ # $Source: /usr/local/src/Xbae/PROBLEMS,v $ Known bugs: *************** *** 11,18 **** * When resizing the matrix to smaller than the fixed rows/columns, drawing occurs outside of the matrix. - - * Two undocumented public functions XbaeMatrixYToRow() and XbaeMatrixXToCol() - exist but don't work correctly for fixed rows / columns - they have been - removed. If you were using them you should have received copious amounts - of warning messages. --- 11,13 ---- diff -c -r Xbae-4.6/README Xbae-4.6.1/README *** Xbae-4.6/README Sat Feb 15 15:04:51 1997 --- Xbae-4.6.1/README Sat May 24 08:27:55 1997 *************** *** 1,14 **** # ! # $Date: 1997/02/15 04:04:51 $ # $Source: /usr/local/src/Xbae/README,v $ ! Xbae Library version 4.6 ! ------------------------ See the INSTALL file for installation procedure. Once again, comments, questions, bugs & postcards can be directed to ! Andrew Lister (lister@shadow.apana.org.au). Postcards will earn you a spot in the manual page and can be sent to --- 1,16 ---- # ! # $Date: 1997/05/23 22:27:55 $ # $Source: /usr/local/src/Xbae/README,v $ ! Xbae Library version 4.6.1 ! -------------------------- See the INSTALL file for installation procedure. Once again, comments, questions, bugs & postcards can be directed to ! Andrew Lister (lister@syd.net.au). This is a new address which will ! not be available until after June '97. The old address is ! lister@shadow.apana.org.au. Postcards will earn you a spot in the manual page and can be sent to *************** *** 27,32 **** --- 29,42 ---- with "subscribe" in the Subject: field. + Also, take a look at the web page: + + http://xbae.syd.net.au + + If that's not there, try: + + http://shadow.apana.org.au/~lister + Documentation ------------- *************** *** 87,281 **** for associating labels with individual XmTextField widgets. ! 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@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 ! (rossm@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. 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 True, 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@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 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 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 lables 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 --- 97,150 ---- for associating labels with individual XmTextField widgets. ! 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. diff -c -r Xbae-4.6/TODO Xbae-4.6.1/TODO *** Xbae-4.6/TODO Wed Sep 25 10:58:15 1996 --- Xbae-4.6.1/TODO Sat May 3 10:58:23 1997 *************** *** 13,20 **** - Different fonts in different cells? - - Editable fixed rows/columns - - Fix the list emulation to work when the pointer is in the "filled" part of the matrix. --- 13,18 ---- diff -c -r Xbae-4.6/Xbae.rules Xbae-4.6.1/Xbae.rules *** Xbae-4.6/Xbae.rules Sat Feb 8 17:04:38 1997 --- Xbae-4.6.1/Xbae.rules Sat May 3 10:48:17 1997 *************** *** 1,19 **** ! /* ! * Copyright(c) 1992 Bell Communications Research, Inc. (Bellcore) ! * Copyright(c) 1995-97 Andrew Lister ! * ! * $Date: 1997/02/08 06:04:38 $ ! * $Id: Xbae.rules,v 1.7 1997/02/08 06:04:38 lister Exp $ ! */ ! ! /* ! * Additional imake rule for building a demo program which does not need ! * to be installed. ! * ! * UninstalledSimpleProgramTarget - generate rules for compiling and linking ! * programs that only have one C source file. It should only be used in ! * Imakefiles that describe a single program. ! */ #ifndef UninstalledSimpleProgramTarget #define UninstalledSimpleProgramTarget(program) @@\ OBJS = program.o @@\ --- 1,19 ---- ! #ifndef XCOMM ! #define XCOMM # ! #endif ! XCOMM Copyright(c) 1992 Bell Communications Research, Inc. (Bellcore) ! XCOMM Copyright(c) 1995-97 Andrew Lister ! ! XCOMM $Date: 1997/05/03 00:48:17 $ ! XCOMM $Id: Xbae.rules,v 1.8 1997/05/03 00:48:17 lister Exp $ ! ! XCOMM Additional imake rule for building a demo program which does not need ! XCOMM to be installed. ! ! XCOMM UninstalledSimpleProgramTarget - generate rules for compiling and linking ! XCOMM programs that only have one C source file. It should only be used in ! XCOMM Imakefiles that describe a single program. ! #ifndef UninstalledSimpleProgramTarget #define UninstalledSimpleProgramTarget(program) @@\ OBJS = program.o @@\ *************** *** 37,46 **** #endif /* UninstalledSimpleProgramTarget */ #if ProjectX > 5 ! /* ! * SaberProgramTarget - generate rules to make Saber-C read in sources and ! * objects. ! */ #ifndef SaberProgramTarget #if HasSaberC #define SaberProgramTarget(program,srclist,objlist,locallibs,syslibs) @@\ --- 37,46 ---- #endif /* UninstalledSimpleProgramTarget */ #if ProjectX > 5 ! ! XCOMM SaberProgramTarget - generate rules to make Saber-C read in sources and ! XCOMM objects. ! #ifndef SaberProgramTarget #if HasSaberC #define SaberProgramTarget(program,srclist,objlist,locallibs,syslibs) @@\ diff -c -r Xbae-4.6/Xbae.tmpl Xbae-4.6.1/Xbae.tmpl *** Xbae-4.6/Xbae.tmpl Sat Feb 8 14:23:32 1997 --- Xbae-4.6.1/Xbae.tmpl Sun May 11 14:38:25 1997 *************** *** 1,95 **** ! /* ! * Copyright(c) 1992 Bell Communications Research, Inc. (Bellcore) ! * Copyright(c) 1995-97 Andrew Lister ! * ! * $Date: 1997/02/08 03:23:32 $ ! * $Id: Xbae.tmpl,v 1.14 1997/02/08 03:23:32 lister Exp $ ! */ #include "Xbae.rules" ! /* ! * Specify which libraries need to be built. NOTE: If you want to try out ! * demo programs, it is recommended that you only mark DoNormalLib as ! * yes as the demos may have trouble finding the shared library. ! */ #define DoNormalLib YES #define DoSharedLib NO /* Don't define if you want the demos! */ #define DoDebugLib NO ! /* Some of the examples use Wcl. If you haven't got Wcl, it doesn't ! * change the functionality of the matrix or caption widget. Just ! * some of the examples won't run ! */ #define HaveWcl NO ! /* ! * If Xpm is installed, set to this to yes for colour pixmaps in the ! * draw example. It does not affect the widget compilation but without ! * it, apps will only be able to display two colour (Black & White) bitmaps ! * ! * NOTE: The example program expects the include file to be in ..../X11/xpm.h ! * and the library in the default library location. ! */ #define HaveXpm YES ! /* ! * Resizing of columns... ! * ! * Two choices here: ! * 1) Draw the resize column line as a simple line ! * #define DRAW_RESIZE_LINE ! * or ! * 2) Draw the resize column as a shadowed line. ! * #define DRAW_RESIZE_SHADOW ! * ! * #2 looks much cooler but is less efficient, just because ! * it takes more to draw. But it looks much much better. ! * ! * If the overhead of drawing a column, is a bit much for your X server, ! * try defining DRAW_RESIZE_LINE otherwise (as it "looks much cooler", use ! * DRAW_RESIZE_SHADOW. Of course, if you prefer the look of a single line ! * define it here too. ! * ! * I would imagine that drawing a shadow would be capable in most servers. ! * ! */ COLUMN_RESIZE = DRAW_RESIZE_SHADOW ! /* ! * Define ALLOW_COLUMN_RESIZE to be YES if you want to make ! * XmNallowColumnResize True by default, otherwise define as NO. ! * ! * This resource enables a user to resize the columns using Shift ! * ! * NOTE: The resource can be overridden by the application. ! */ #define ALLOW_COLUMN_RESIZE NO ! /* ! * If you have editres, the demos can be compiled to allow use of it ! * If you don't set it to NO ! */ #define USE_EDITRES YES ! /* ! * Set the slowest scrolling speed for when the pointer is moved out of ! * clip widget. Default is 500 milliseconds (+ computation time). This ! * value is halved each time the pointer moves half a row from the clip ! */ /* #define DEFAULT_SCROLL_SPEED 500 /**/ ! /* ! * If you want to use two byte characters - eg Kanji you can try defining ! * NEED_WCHAR. The functionality of two byte fonts is still under ! * development and probably doesn't work :( ! */ /* #define NEED_WCHAR /**/ ! /* ! * If your Motif installation needs a hand, enter the paths here ! * The ones provided could be used for Solaris 2.4 with CDE ! */ /* EXTRA_INCLUDES=-I/usr/dt/include /**/ /* EXTRA_LDOPTIONS=-L/usr/dt/lib /**/ --- 1,87 ---- ! XCOMM Copyright(c) 1992 Bell Communications Research, Inc. (Bellcore) ! XCOMM Copyright(c) 1995-97 Andrew Lister ! XCOMM ! XCOMM $Date: 1997/05/11 04:38:25 $ ! XCOMM $Id: Xbae.tmpl,v 1.16 1997/05/11 04:38:25 lister Exp $ #include "Xbae.rules" ! XCOMM Specify which libraries need to be built. NOTE: If you want to try out ! XCOMM demo programs, it is recommended that you only mark DoNormalLib as ! XCOMM yes as the demos may have trouble finding the shared library. ! #define DoNormalLib YES #define DoSharedLib NO /* Don't define if you want the demos! */ #define DoDebugLib NO ! XCOMM Some of the examples use Wcl. If you haven't got Wcl, it doesn't ! XCOMM change the functionality of the matrix or caption widget. Just ! XCOMM some of the examples won't run ! #define HaveWcl NO ! XCOMM If Xpm is installed, set to this to yes for colour pixmaps in the ! XCOMM draw example. It does not affect the widget compilation but without ! XCOMM it, apps will only be able to display two colour (Black & White) bitmaps ! ! XCOMM NOTE: The example program expects the include file to be in ..../X11/xpm.h ! XCOMM and the library in the default library location. ! #define HaveXpm YES ! ! XCOMM Resizing of columns... ! ! XCOMM Two choices here: ! XCOMM 1) Draw the resize column line as a simple line ! XCOMM #define DRAW_RESIZE_LINE ! XCOMM or ! XCOMM 2) Draw the resize column as a shadowed line. ! XCOMM #define DRAW_RESIZE_SHADOW ! ! XCOMM #2 looks much cooler but is less efficient, just because ! XCOMM it takes more to draw. But it looks much much better. ! ! XCOMM If the overhead of drawing a column, is a bit much for your X server, ! XCOMM try defining DRAW_RESIZE_LINE otherwise (as it "looks much cooler", use ! XCOMM DRAW_RESIZE_SHADOW. Of course, if you prefer the look of a single line ! XCOMM define it here too. ! ! XCOMM I would imagine that drawing a shadow would be capable in most servers. ! COLUMN_RESIZE = DRAW_RESIZE_SHADOW ! XCOMM Define ALLOW_COLUMN_RESIZE to be YES if you want to make ! XCOMM XmNallowColumnResize True by default, otherwise define as NO. ! ! XCOMM This resource enables a user to resize the columns using Shift ! ! XCOMM NOTE: The resource can be overridden by the application. ! #define ALLOW_COLUMN_RESIZE NO ! XCOMM If you have editres, the demos can be compiled to allow use of it ! XCOMM If you don't set it to NO ! #define USE_EDITRES YES ! XCOMM Set the slowest scrolling speed for when the pointer is moved out of ! XCOMM clip widget. Default is 500 milliseconds (+ computation time). This ! XCOMM value is halved each time the pointer moves half a row from the clip ! /* #define DEFAULT_SCROLL_SPEED 500 /**/ ! ! XCOMM If you want to use two byte characters - eg Kanji you can try defining ! XCOMM NEED_WCHAR. The functionality of two byte fonts is still under ! XCOMM development and probably doesn't work :( ! /* #define NEED_WCHAR /**/ ! ! XCOMM If your Motif installation needs a hand, enter the paths here ! XCOMM The ones provided could be used for Solaris 2.4 with CDE ! /* EXTRA_INCLUDES=-I/usr/dt/include /**/ /* EXTRA_LDOPTIONS=-L/usr/dt/lib /**/ *************** *** 108,150 **** DEPLIBS = INCLUDES = -I../../src ! /* ! * This is for use on Dec Alphas. It may or may not work - if you send ! * me a Dec Alpha, I'll test it. But for now, let me know if you need to ! * tweak this line on a Dec Alpha ! */ #ifdef AlphaArchitecture CCOPTIONS=-D__STDC__ #endif ! /* ! * Everything under here should be fine. ! */ #include ! /* ! * -g for debugging, -O for optimisation. Only uncomment this if you want ! * to override the definitions in Library.tmpl. Not recommended unless ! * you know what you're doing! ! */ ! /* CDEBUGFLAGS=-g -Wall -pedantic /**/ ! ! /* ! * Version to make the shared library. Only used if DoSharedLib is set to ! * YES. Again, don't change this, unless you know what you are doing. ! */ XbaeSharedLibraryRevision=6.0 XBAEVERSION=4.6 #define INSTALL_HEADERS YES ! /* ! * R4 doesn't know about LOCAL_LDFLAGS. ! * R4 uses includes in wrong order. ! * We need to fix both of these problems so the includes and lib in this ! * source tree get picked up before any that are already installed. ! */ #if ProjectX < 5 LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(LOCAL_LDFLAGS) ALLINCLUDES = $(INCLUDES) $(STD_INCLUDES) $(TOP_INCLUDES) $(EXTRA_INCLUDES) --- 100,142 ---- DEPLIBS = INCLUDES = -I../../src ! ! XCOMM This is for use on Dec Alphas. It may or may not work - if you send ! XCOMM me a Dec Alpha, I'll test it. But for now, let me know if you need to ! XCOMM tweak this line on a Dec Alpha ! #ifdef AlphaArchitecture CCOPTIONS=-D__STDC__ #endif ! ! XCOMM Everything under here should be fine. ! #include ! ! XCOMM -g for debugging, -O for optimisation. Only uncomment this if you want ! XCOMM to override the definitions in Library.tmpl. Not recommended unless ! XCOMM you know what you're doing! The second one is for me. ! ! /* CDEBUGFLAGS=-g -Wall -pedantic -pedantic-errors -ansi /**/ ! ! ! XCOMM Version to make the shared library. Only used if DoSharedLib is set to ! XCOMM YES. Again, don't change this, unless you know what you are doing. ! XbaeSharedLibraryRevision=6.0 XBAEVERSION=4.6 #define INSTALL_HEADERS YES ! ! XCOMM R4 doesn't know about LOCAL_LDFLAGS. ! XCOMM R4 uses includes in wrong order. ! XCOMM We need to fix both of these problems so the includes and lib in this ! XCOMM source tree get picked up before any that are already installed. ! #if ProjectX < 5 LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(LOCAL_LDFLAGS) ALLINCLUDES = $(INCLUDES) $(STD_INCLUDES) $(TOP_INCLUDES) $(EXTRA_INCLUDES) diff -c -r Xbae-4.6/doc/Xbae-FAQ Xbae-4.6.1/doc/Xbae-FAQ *** Xbae-4.6/doc/Xbae-FAQ Sat Feb 8 14:09:54 1997 --- Xbae-4.6.1/doc/Xbae-FAQ Sat May 24 08:29:30 1997 *************** *** 62,68 **** Alexander Ivanov(avi@elais.physics.ox.ac.uk) Adam Kerrison (adam@micromuse.co.uk) Vince Li (vli@mpr.ca) ! Andrew Lister (lister@shadow.apana.org.au) Earl Revett (erevett@kokomo.bmc.com) Jay Schmidgall (jay.schmidgall@spdbump.sungardss.com) Jason Smith (js81736@internet.sbi.com) --- 62,68 ---- Alexander Ivanov(avi@elais.physics.ox.ac.uk) Adam Kerrison (adam@micromuse.co.uk) Vince Li (vli@mpr.ca) ! Andrew Lister (lister@syd.net.au) Earl Revett (erevett@kokomo.bmc.com) Jay Schmidgall (jay.schmidgall@spdbump.sungardss.com) Jason Smith (js81736@internet.sbi.com) *************** *** 111,117 **** The best way to ask questions is via the mailing list. If you have any abject excuse as to being a part of a mailing list then send mail ! to the maintainer (lister@shadow.apana.org.au). 1.7 Where do I mail suggestions/comments for this FAQ? --- 111,117 ---- The best way to ask questions is via the mailing list. If you have any abject excuse as to being a part of a mailing list then send mail ! to the maintainer (lister@syd.net.au). 1.7 Where do I mail suggestions/comments for this FAQ? *************** *** 289,305 **** 2.11 How do I redraw just a single cell? ! Use XbaeMatrixRedrawCell( Widget w, int row, int column). This function uses the internal drawing routines of the widget to explicitly redraw a single cell. - - - - - - - - - - - --- 289,294 ---- 2.11 How do I redraw just a single cell? ! Use XbaeMatrixRefreshCell(Widget w, int row, int column). This function uses the internal drawing routines of the widget to explicitly redraw a single cell. diff -c -r Xbae-4.6/examples/add/Add Xbae-4.6.1/examples/add/Add *** Xbae-4.6/examples/add/Add Sat Feb 8 17:04:51 1997 --- Xbae-4.6.1/examples/add/Add Sun May 11 15:16:49 1997 *************** *** 1,5 **** ! ! ! $Id: Add,v 1.5 1997/02/08 06:04:51 lister Exp $ ! *rc.orientation: horizontal *number.showValue: True --- 1,5 ---- ! ! ! $Id: Add,v 1.7 1997/05/11 05:16:49 lister Exp $ ! *rc.orientation: horizontal *number.showValue: True *************** *** 8,15 **** *add.labelString: Add *row.labelString: Add rows *column.labelString: Add columns - !*mw.fill: True *mw.rows: 7 *mw.columns: 5 *mw.columnWidths: 15, 15, 15, 15, 15 *mw.traverseFixedCells: True --- 8,15 ---- *add.labelString: Add *row.labelString: Add rows *column.labelString: Add columns *mw.rows: 7 + *mw.columns: 5 *mw.columnWidths: 15, 15, 15, 15, 15 *mw.traverseFixedCells: True diff -c -r Xbae-4.6/examples/draw/draw.c Xbae-4.6.1/examples/draw/draw.c *** Xbae-4.6/examples/draw/draw.c Sat Feb 8 17:04:53 1997 --- Xbae-4.6.1/examples/draw/draw.c Sat May 24 08:29:35 1997 *************** *** 1,9 **** /* ! * AUTHOR: Andrew Lister * * Simple example of the draw cell, write cell routines * ! * $Id: draw.c,v 1.6 1997/02/08 06:04:53 lister Exp $ */ #include "../../src/Matrix.h" --- 1,9 ---- /* ! * AUTHOR: Andrew Lister * * Simple example of the draw cell, write cell routines * ! * $Id: draw.c,v 1.7 1997/05/23 22:29:35 lister Exp $ */ #include "../../src/Matrix.h" diff -c -r Xbae-4.6/examples/matrix/matrix.c Xbae-4.6.1/examples/matrix/matrix.c *** Xbae-4.6/examples/matrix/matrix.c Sat Feb 8 17:04:55 1997 --- Xbae-4.6.1/examples/matrix/matrix.c Sun May 11 15:33:06 1997 *************** *** 19,25 **** * LOST PROFITS OR OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES RELAT- * ING TO THE SOFTWARE. * ! * $Id: matrix.c,v 1.6 1997/02/08 06:04:55 lister Exp $ */ #include "../../src/Matrix.h" --- 19,25 ---- * LOST PROFITS OR OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES RELAT- * ING TO THE SOFTWARE. * ! * $Id: matrix.c,v 1.8 1997/05/11 05:33:06 lister Exp $ */ #include "../../src/Matrix.h" *************** *** 32,37 **** --- 32,38 ---- { XbaeMatrixLabelActivateCallbackStruct *cbs = ( XbaeMatrixLabelActivateCallbackStruct * )cb; + int row, column; if( cbs->row_label ) if( XbaeMatrixIsRowSelected( mw, cbs->row ) ) diff -c -r Xbae-4.6/src/Actions.c Xbae-4.6.1/src/Actions.c *** Xbae-4.6/src/Actions.c Sat Feb 8 14:08:19 1997 --- Xbae-4.6.1/src/Actions.c Sat May 24 08:24:16 1997 *************** *** 21,27 **** * LOST PROFITS OR OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES RELAT- * ING TO THE SOFTWARE. * ! * $Id: Actions.c,v 1.9 1997/02/08 03:08:19 lister Exp $ */ /* --- 21,27 ---- * LOST PROFITS OR OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES RELAT- * ING TO THE SOFTWARE. * ! * $Id: Actions.c,v 1.12 1997/05/23 22:24:16 lister Exp $ */ /* *************** *** 102,107 **** --- 102,110 ---- static int last_row = 0; static int last_column = 0; + static int last_selected_row = 0; + static int last_selected_column = 0; + static Boolean scrolling = False; /* ARGSUSED */ *************** *** 134,140 **** return; } ! if( !mw->matrix.default_action_callback ) return; if (!xbaeEventToXY(mw, event, &x, &y, &cell)) --- 137,143 ---- return; } ! if (!mw->matrix.default_action_callback) return; if (!xbaeEventToXY(mw, event, &x, &y, &cell)) *************** *** 143,149 **** if (!xbaeXYToRowCol(mw, &x, &y, &row, &column, cell)) return; ! if( DoubleClick( mw, event, row, column ) ) { XbaeMatrixDefaultActionCallbackStruct call_data; --- 146,152 ---- if (!xbaeXYToRowCol(mw, &x, &y, &row, &column, cell)) return; ! if (DoubleClick (mw, event, row, column)) { XbaeMatrixDefaultActionCallbackStruct call_data; *************** *** 159,165 **** } static void ! DrawSlideColumn( mw, x ) XbaeMatrixWidget mw; int x; { --- 162,168 ---- } static void ! DrawSlideColumn (mw, x) XbaeMatrixWidget mw; int x; { *************** *** 173,180 **** #endif Dimension height; Window win; ! Display *display = XtDisplay( mw ); ! int column = xbaeXtoCol( mw, x - COLUMN_LABEL_OFFSET( mw ) ); int top, bottom; int adjusted_x; int y; --- 176,183 ---- #endif Dimension height; Window win; ! Display *display = XtDisplay (mw); ! int column = xbaeXtoCol (mw, x - COLUMN_LABEL_OFFSET (mw)); int top, bottom; int adjusted_x; int y; *************** *** 186,200 **** * If the column being resized is a fixed one then we don't need to * bother with the clip region */ ! if( column < mw->matrix.fixed_columns ) { y = ROW_LABEL_OFFSET(mw); height = VISIBLE_HEIGHT(mw) + FIXED_ROW_HEIGHT(mw) + TRAILING_FIXED_ROW_HEIGHT(mw); ! win = XtWindow( mw ); #ifdef DRAW_RESIZE_LINE ! XDrawLine( display, win, gc, x, y, x, y + height ); if (XtIsManaged(LeftClip(mw))) XDrawLine(display, XtWindow(LeftClip(mw)), gc, x - COLUMN_LABEL_OFFSET(mw), 0, --- 189,203 ---- * If the column being resized is a fixed one then we don't need to * bother with the clip region */ ! if (column < mw->matrix.fixed_columns) { y = ROW_LABEL_OFFSET(mw); height = VISIBLE_HEIGHT(mw) + FIXED_ROW_HEIGHT(mw) + TRAILING_FIXED_ROW_HEIGHT(mw); ! win = XtWindow (mw); #ifdef DRAW_RESIZE_LINE ! XDrawLine (display, win, gc, x, y, x, y + height); if (XtIsManaged(LeftClip(mw))) XDrawLine(display, XtWindow(LeftClip(mw)), gc, x - COLUMN_LABEL_OFFSET(mw), 0, *************** *** 220,258 **** * Similarly for trailingFixedColumns - beware going off the clip child * here also */ ! if( column >= TRAILING_HORIZ_ORIGIN(mw) || ! x >= ClipChild(mw)->core.x + ClipChild(mw)->core.width ) { y = ROW_LABEL_OFFSET(mw); height = VISIBLE_HEIGHT(mw) + FIXED_ROW_HEIGHT(mw) + TRAILING_FIXED_ROW_HEIGHT(mw); ! win = XtWindow( mw ); #ifdef DRAW_RESIZE_LINE ! XDrawLine( display, win, gc, x, y, x, y + height ); if (XtIsManaged(RightClip(mw))) XDrawLine(display, XtWindow(RightClip(mw)), gc, x - TRAILING_FIXED_COLUMN_LABEL_OFFSET(mw), 0, x - TRAILING_FIXED_COLUMN_LABEL_OFFSET(mw), ! RightClip(mw)->core.height ); #endif #ifdef DRAW_RESIZE_SHADOW DRAW_SHADOW(display, win, mw->matrix.resize_top_shadow_gc, mw->matrix.resize_bottom_shadow_gc, ! shadow_width, x, y, width, height, XmSHADOW_OUT ); if (XtIsManaged(RightClip(mw))) DRAW_SHADOW(display, XtWindow(RightClip(mw)), mw->matrix.resize_top_shadow_gc, mw->matrix.resize_bottom_shadow_gc, shadow_width, x - TRAILING_FIXED_COLUMN_LABEL_OFFSET(mw), 0, ! width, RightClip(mw)->core.height, XmSHADOW_OUT ); #endif return; } ! xbaeGetVisibleRows( mw, &top, &bottom ); /* * we need all non-fixed rows, so add 1 to bottom * to include the last one as the return values --- 223,261 ---- * Similarly for trailingFixedColumns - beware going off the clip child * here also */ ! if (column >= TRAILING_HORIZ_ORIGIN(mw) || ! x >= ClipChild(mw)->core.x + ClipChild(mw)->core.width) { y = ROW_LABEL_OFFSET(mw); height = VISIBLE_HEIGHT(mw) + FIXED_ROW_HEIGHT(mw) + TRAILING_FIXED_ROW_HEIGHT(mw); ! win = XtWindow (mw); #ifdef DRAW_RESIZE_LINE ! XDrawLine (display, win, gc, x, y, x, y + height); if (XtIsManaged(RightClip(mw))) XDrawLine(display, XtWindow(RightClip(mw)), gc, x - TRAILING_FIXED_COLUMN_LABEL_OFFSET(mw), 0, x - TRAILING_FIXED_COLUMN_LABEL_OFFSET(mw), ! RightClip(mw)->core.height); #endif #ifdef DRAW_RESIZE_SHADOW DRAW_SHADOW(display, win, mw->matrix.resize_top_shadow_gc, mw->matrix.resize_bottom_shadow_gc, ! shadow_width, x, y, width, height, XmSHADOW_OUT); if (XtIsManaged(RightClip(mw))) DRAW_SHADOW(display, XtWindow(RightClip(mw)), mw->matrix.resize_top_shadow_gc, mw->matrix.resize_bottom_shadow_gc, shadow_width, x - TRAILING_FIXED_COLUMN_LABEL_OFFSET(mw), 0, ! width, RightClip(mw)->core.height, XmSHADOW_OUT); #endif return; } ! xbaeGetVisibleRows (mw, &top, &bottom); /* * we need all non-fixed rows, so add 1 to bottom * to include the last one as the return values *************** *** 266,272 **** */ y = 0; /* relative to clip */ ! height = ROW_HEIGHT( mw ) * ( bottom - top ); /* * If we are on the clip, the x location is offset by the --- 269,275 ---- */ y = 0; /* relative to clip */ ! height = ROW_HEIGHT (mw) * (bottom - top); /* * If we are on the clip, the x location is offset by the *************** *** 274,289 **** */ adjusted_x = x - FIXED_COLUMN_LABEL_OFFSET(mw); ! win = XtWindow( ClipChild(mw) ); #ifdef DRAW_RESIZE_LINE ! XDrawLine( display, win, gc, adjusted_x, y, adjusted_x, y + height ); #endif #ifdef DRAW_RESIZE_SHADOW DRAW_SHADOW(display, win, mw->matrix.resize_top_shadow_gc, mw->matrix.resize_bottom_shadow_gc, ! shadow_width, adjusted_x, y, width, height, XmSHADOW_OUT ); #endif /* * Now draw the line (or shadow) on the non clipped region - that is --- 277,292 ---- */ adjusted_x = x - FIXED_COLUMN_LABEL_OFFSET(mw); ! win = XtWindow (ClipChild(mw)); #ifdef DRAW_RESIZE_LINE ! XDrawLine (display, win, gc, adjusted_x, y, adjusted_x, y + height); #endif #ifdef DRAW_RESIZE_SHADOW DRAW_SHADOW(display, win, mw->matrix.resize_top_shadow_gc, mw->matrix.resize_bottom_shadow_gc, ! shadow_width, adjusted_x, y, width, height, XmSHADOW_OUT); #endif /* * Now draw the line (or shadow) on the non clipped region - that is *************** *** 291,302 **** */ y = ROW_LABEL_OFFSET(mw); ! height = FIXED_ROW_HEIGHT( mw ); ! win = XtWindow( mw ); #ifdef DRAW_RESIZE_LINE ! XDrawLine( display, XtWindow(TopClip(mw)), gc, adjusted_x, 0, ! adjusted_x, height ); #endif #ifdef DRAW_RESIZE_SHADOW if (XtIsManaged(TopClip(mw))) --- 294,305 ---- */ y = ROW_LABEL_OFFSET(mw); ! height = FIXED_ROW_HEIGHT (mw); ! win = XtWindow (mw); #ifdef DRAW_RESIZE_LINE ! XDrawLine (display, XtWindow(TopClip(mw)), gc, adjusted_x, 0, ! adjusted_x, height); #endif #ifdef DRAW_RESIZE_SHADOW if (XtIsManaged(TopClip(mw))) *************** *** 304,323 **** mw->matrix.resize_top_shadow_gc, mw->matrix.resize_bottom_shadow_gc, shadow_width, adjusted_x, 0, width, height, ! XmSHADOW_OUT ); #endif /* * The trailingFixedRows */ ! if( mw->matrix.trailing_fixed_rows ) { y = TRAILING_FIXED_ROW_LABEL_OFFSET(mw); height = TRAILING_FIXED_ROW_HEIGHT(mw); xbaeSetClipMask(mw, CLIP_TRAILING_FIXED_ROWS); #ifdef DRAW_RESIZE_LINE ! XDrawLine( display, XtWindow(BottomClip(mw)), gc, adjusted_x, 0, ! adjusted_x, height ); #endif #ifdef DRAW_RESIZE_SHADOW if (XtIsManaged(BottomClip(mw))) --- 307,326 ---- mw->matrix.resize_top_shadow_gc, mw->matrix.resize_bottom_shadow_gc, shadow_width, adjusted_x, 0, width, height, ! XmSHADOW_OUT); #endif /* * The trailingFixedRows */ ! if (mw->matrix.trailing_fixed_rows) { y = TRAILING_FIXED_ROW_LABEL_OFFSET(mw); height = TRAILING_FIXED_ROW_HEIGHT(mw); xbaeSetClipMask(mw, CLIP_TRAILING_FIXED_ROWS); #ifdef DRAW_RESIZE_LINE ! XDrawLine (display, XtWindow(BottomClip(mw)), gc, adjusted_x, 0, ! adjusted_x, height); #endif #ifdef DRAW_RESIZE_SHADOW if (XtIsManaged(BottomClip(mw))) *************** *** 325,360 **** mw->matrix.resize_top_shadow_gc, mw->matrix.resize_bottom_shadow_gc, shadow_width, adjusted_x, 0, ! width, height, XmSHADOW_OUT ); #endif ! xbaeSetClipMask( mw, CLIP_NONE ); } } static void ! SlideColumn( w, data, event, cont ) Widget w; XtPointer data; XEvent *event; Boolean *cont; { ! XbaeMatrixResizeColumnStruct *rd = ( XbaeMatrixResizeColumnStruct * )data; XMotionEvent *motionEvent; Boolean relayout = False; int numCharacters; int i; ! if( event->type == ButtonRelease ) { ! DrawSlideColumn( rd->mw, rd->lastx ); ! XUngrabPointer( XtDisplay( w ), CurrentTime ); rd->grabbed = False; /* * Remanage the VSB if we unmapped it earlier */ ! if( rd->haveVSB ) ! XtManageChild( VertScrollChild( rd->mw ) ); if (rd->mw->matrix.resize_column_callback) { --- 328,363 ---- mw->matrix.resize_top_shadow_gc, mw->matrix.resize_bottom_shadow_gc, shadow_width, adjusted_x, 0, ! width, height, XmSHADOW_OUT); #endif ! xbaeSetClipMask (mw, CLIP_NONE); } } static void ! SlideColumn (w, data, event, cont) Widget w; XtPointer data; XEvent *event; Boolean *cont; { ! XbaeMatrixResizeColumnStruct *rd = (XbaeMatrixResizeColumnStruct *)data; XMotionEvent *motionEvent; Boolean relayout = False; int numCharacters; int i; ! if (event->type == ButtonRelease) { ! DrawSlideColumn (rd->mw, rd->lastx); ! XUngrabPointer (XtDisplay (w), CurrentTime); rd->grabbed = False; /* * Remanage the VSB if we unmapped it earlier */ ! if (rd->haveVSB) ! XtManageChild (VertScrollChild (rd->mw)); if (rd->mw->matrix.resize_column_callback) { *************** *** 370,402 **** (XtPointer) &call_data); } ! for( i = 0; i < rd->mw->matrix.columns; i++ ) ! if( rd->columnWidths[ i ] != rd->mw->matrix.column_widths[ i ] ) { /* Make sure everything is handled correctly with SetValues */ ! XtVaSetValues( ( Widget )rd->mw, XmNcolumnWidths, ! rd->columnWidths, NULL ); break; } /* * If maxColumnLengths are set and we have resized the column to * larger, reset the corresponding maxColumnLength */ ! if( rd->mw->matrix.column_max_lengths && rd->columnWidths[ rd->column - 1 ] > ! rd->mw->matrix.column_max_lengths[ rd->column - 1 ] ) rd->mw->matrix.column_max_lengths[ rd->column - 1 ] = rd->columnWidths[ rd->column - 1 ]; ! XtFree( ( char * )rd->columnWidths ); return; } ! if( event->type != MotionNotify ) /* Double check! */ return; ! motionEvent = ( XMotionEvent * )event; ! if( rd->currentx - motionEvent->x > FONT_WIDTH( rd->mw ) ) { /* If we're only one character wide, we cannae get any smaller */ if (rd->columnWidths[ rd->column - 1 ] == BAD_WIDTH + 1) --- 373,405 ---- (XtPointer) &call_data); } ! for (i = 0; i < rd->mw->matrix.columns; i++) ! if (rd->columnWidths[ i ] != rd->mw->matrix.column_widths[ i ]) { /* Make sure everything is handled correctly with SetValues */ ! XtVaSetValues ( (Widget)rd->mw, XmNcolumnWidths, ! rd->columnWidths, NULL); break; } /* * If maxColumnLengths are set and we have resized the column to * larger, reset the corresponding maxColumnLength */ ! if (rd->mw->matrix.column_max_lengths && rd->columnWidths[ rd->column - 1 ] > ! rd->mw->matrix.column_max_lengths[ rd->column - 1 ]) rd->mw->matrix.column_max_lengths[ rd->column - 1 ] = rd->columnWidths[ rd->column - 1 ]; ! XtFree ( (char *)rd->columnWidths); return; } ! if (event->type != MotionNotify) /* Double check! */ return; ! motionEvent = (XMotionEvent *)event; ! if (rd->currentx - motionEvent->x > FONT_WIDTH (rd->mw)) { /* If we're only one character wide, we cannae get any smaller */ if (rd->columnWidths[ rd->column - 1 ] == BAD_WIDTH + 1) *************** *** 405,441 **** * Moved left a full character - update the column widths and force * a redisplay */ ! numCharacters = ( rd->currentx - motionEvent->x ) / ! FONT_WIDTH( rd->mw ); ! if( numCharacters >= rd->columnWidths[ rd->column - 1 ] ) /* Must keep a column at least one character wide */ numCharacters = rd->columnWidths[ rd->column - 1 ] - 1; rd->columnWidths[ rd->column - 1 ] -= numCharacters; ! rd->currentx -= numCharacters * FONT_WIDTH( rd->mw ); relayout = True; } ! if( motionEvent->x - rd->currentx > FONT_WIDTH( rd->mw ) ) { /* * Moved right a full character - update the column widths and force * a redisplay */ ! numCharacters = ( motionEvent->x - rd->currentx ) / ! FONT_WIDTH( rd->mw ); rd->columnWidths[ rd->column - 1 ] += numCharacters; ! rd->currentx += numCharacters * FONT_WIDTH( rd->mw ); relayout = True; } ! if( relayout ) { /* Draw the marker line in the new location */ ! if( rd->lastx != rd->currentx ) { ! DrawSlideColumn( rd->mw, rd->currentx ); ! DrawSlideColumn( rd->mw, rd->lastx ); rd->lastx = rd->currentx; } --- 408,444 ---- * Moved left a full character - update the column widths and force * a redisplay */ ! numCharacters = (rd->currentx - motionEvent->x) / ! FONT_WIDTH (rd->mw); ! if (numCharacters >= rd->columnWidths[ rd->column - 1 ]) /* Must keep a column at least one character wide */ numCharacters = rd->columnWidths[ rd->column - 1 ] - 1; rd->columnWidths[ rd->column - 1 ] -= numCharacters; ! rd->currentx -= numCharacters * FONT_WIDTH (rd->mw); relayout = True; } ! if (motionEvent->x - rd->currentx > FONT_WIDTH (rd->mw)) { /* * Moved right a full character - update the column widths and force * a redisplay */ ! numCharacters = (motionEvent->x - rd->currentx) / ! FONT_WIDTH (rd->mw); rd->columnWidths[ rd->column - 1 ] += numCharacters; ! rd->currentx += numCharacters * FONT_WIDTH (rd->mw); relayout = True; } ! if (relayout) { /* Draw the marker line in the new location */ ! if (rd->lastx != rd->currentx) { ! DrawSlideColumn (rd->mw, rd->currentx); ! DrawSlideColumn (rd->mw, rd->lastx); rd->lastx = rd->currentx; } *************** *** 506,526 **** * allowed delta. x is modified in xbaeXYToRowCol() to be * the x distance from the cell's border */ ! if (mw->matrix.cell_shadow_thickness > fuzzy ) fuzzy = mw->matrix.cell_shadow_thickness; ! if ( x > fuzzy && COLUMN_WIDTH(mw, column) - x > fuzzy ) return; /* * Looks like we hit a column border, determine the column that is * intended to be resized */ ! if( (COLUMN_WIDTH(mw, column) - x) <= fuzzy ) column++; /* Can't adjust the origin or should you be able to?? */ ! if( column == 0 ) return; /* --- 509,529 ---- * allowed delta. x is modified in xbaeXYToRowCol() to be * the x distance from the cell's border */ ! if (mw->matrix.cell_shadow_thickness > fuzzy) fuzzy = mw->matrix.cell_shadow_thickness; ! if (x > fuzzy && COLUMN_WIDTH(mw, column) - x > fuzzy) return; /* * Looks like we hit a column border, determine the column that is * intended to be resized */ ! if ((COLUMN_WIDTH(mw, column) - x) <= fuzzy) column++; /* Can't adjust the origin or should you be able to?? */ ! if (column == 0) return; /* *************** *** 528,535 **** */ /* Create the left / right cursor */ ! if( !cursor ) ! cursor = XCreateFontCursor( display, XC_sb_h_double_arrow ); /* Commit any edit in progress and unmap the text field - it's just bad luck */ --- 531,538 ---- */ /* Create the left / right cursor */ ! if (!cursor) ! cursor = XCreateFontCursor (display, XC_sb_h_double_arrow); /* Commit any edit in progress and unmap the text field - it's just bad luck */ *************** *** 544,553 **** /* * Say goodbye to the Vertical ScrollBar -> it only gets in the way! */ ! if( ( resizeData.haveVSB = XtIsManaged( VertScrollChild( mw ) ) && ! ( (mw->matrix.scrollbar_placement == XmTOP_RIGHT ) || ! (mw->matrix.scrollbar_placement == XmBOTTOM_RIGHT ) ) ) ) ! XtUnmanageChild( VertScrollChild( mw ) ); /* * Flush the commit events out to the server. Otherwise, our changes * to the GCs below have a bad effect. --- 547,556 ---- /* * Say goodbye to the Vertical ScrollBar -> it only gets in the way! */ ! if ( (resizeData.haveVSB = XtIsManaged (VertScrollChild (mw)) && ! ((mw->matrix.scrollbar_placement == XmTOP_RIGHT) || ! (mw->matrix.scrollbar_placement == XmBOTTOM_RIGHT)))) ! XtUnmanageChild (VertScrollChild (mw)); /* * Flush the commit events out to the server. Otherwise, our changes * to the GCs below have a bad effect. *************** *** 555,572 **** XSync(display, True); event_mask = PointerMotionMask | ButtonReleaseMask; ! XtAddEventHandler( w, event_mask, ! True, ( XtEventHandler )SlideColumn, ! ( XtPointer )&resizeData ); ! ! XGrabPointer( display, XtWindow(w), True, event_mask, ! GrabModeAsync, GrabModeAsync, XtWindow( ( Widget )mw ), ! cursor, CurrentTime ); /* Copy the columnWidth array */ resizeData.columnWidths = ! ( short * )XtMalloc( mw->matrix.columns * sizeof( short ) ); ! for( i = 0; i < mw->matrix.columns; i++ ) resizeData.columnWidths[ i ] = mw->matrix.column_widths[ i ]; resizeData.grabbed = True; resizeData.mw = mw; --- 558,575 ---- XSync(display, True); event_mask = PointerMotionMask | ButtonReleaseMask; ! XtAddEventHandler (w, event_mask, ! True, (XtEventHandler)SlideColumn, ! (XtPointer)&resizeData); ! ! XGrabPointer (display, XtWindow(w), True, event_mask, ! GrabModeAsync, GrabModeAsync, XtWindow ( (Widget)mw), ! cursor, CurrentTime); /* Copy the columnWidth array */ resizeData.columnWidths = ! (short *)XtMalloc (mw->matrix.columns * sizeof (short)); ! for (i = 0; i < mw->matrix.columns; i++) resizeData.columnWidths[ i ] = mw->matrix.column_widths[ i ]; resizeData.grabbed = True; resizeData.mw = mw; *************** *** 577,598 **** gcmask = GCForeground | GCBackground | GCFunction; values.function = GXxor; #ifdef DRAW_RESIZE_LINE ! XGetGCValues( display, mw->matrix.draw_gc, gcmask, &save ); values.foreground = values.background = save.background; XChangeGC(display, mw->matrix.draw_gc, gcmask, &values); #endif ! DrawSlideColumn( mw, resizeData.currentx ); ! appcontext = XtWidgetToApplicationContext( w ); ! while( resizeData.grabbed ) ! XtAppProcessEvent( appcontext, XtIMAll ); ! XtRemoveEventHandler( w, event_mask, True, ! ( XtEventHandler )SlideColumn, ! ( XtPointer )&resizeData ); #ifdef DRAW_RESIZE_LINE XSetFunction(display, mw->matrix.draw_gc, GXcopy); --- 580,601 ---- gcmask = GCForeground | GCBackground | GCFunction; values.function = GXxor; #ifdef DRAW_RESIZE_LINE ! XGetGCValues (display, mw->matrix.draw_gc, gcmask, &save); values.foreground = values.background = save.background; XChangeGC(display, mw->matrix.draw_gc, gcmask, &values); #endif ! DrawSlideColumn (mw, resizeData.currentx); ! appcontext = XtWidgetToApplicationContext (w); ! while (resizeData.grabbed) ! XtAppProcessEvent (appcontext, XtIMAll); ! XtRemoveEventHandler (w, event_mask, True, ! (XtEventHandler)SlideColumn, ! (XtPointer)&resizeData); #ifdef DRAW_RESIZE_LINE XSetFunction(display, mw->matrix.draw_gc, GXcopy); *************** *** 634,640 **** return; } ! if( !mw->matrix.process_drag_callback ) return; if (!xbaeEventToXY(mw, event, &x, &y, &cell)) --- 637,643 ---- return; } ! if (!mw->matrix.process_drag_callback) return; if (!xbaeEventToXY(mw, event, &x, &y, &cell)) *************** *** 653,659 **** call_data.type = xbaeGetDrawCellValue( mw, row, column, &call_data.string, &call_data.pixmap, ! &call_data.mask, &width, &height, &bgcolor, &fgcolor, &depth ); } else call_data.string = mw->matrix.cells ? --- 656,662 ---- call_data.type = xbaeGetDrawCellValue( mw, row, column, &call_data.string, &call_data.pixmap, ! &call_data.mask, &width, &height, &bgcolor, &fgcolor, &depth); } else call_data.string = mw->matrix.cells ? *************** *** 944,950 **** /* * Traverse to the textField */ ! ( void )XmProcessTraversal(TextChild(mw), XmTRAVERSE_CURRENT); } /* --- 947,953 ---- /* * Traverse to the textField */ ! (void)XmProcessTraversal(TextChild(mw), XmTRAVERSE_CURRENT); } /* *************** *** 1101,1108 **** double click */ mw->matrix.last_row = row; mw->matrix.last_column = column; ! if( ret ) /* just had a double click */ ! mw->matrix.last_click_time = ( Time )0; else mw->matrix.last_click_time = event->xbutton.time; ret = 0; --- 1104,1111 ---- double click */ mw->matrix.last_row = row; mw->matrix.last_column = column; ! if (ret) /* just had a double click */ ! mw->matrix.last_click_time = (Time)0; else mw->matrix.last_click_time = event->xbutton.time; ret = 0; *************** *** 1113,1119 **** delta = current_time - mw->matrix.last_click_time; if (row == mw->matrix.last_row && column == mw->matrix.last_column && ! delta < ( unsigned long )mw->matrix.double_click_interval ) ret = 1; else ret = 0; --- 1116,1122 ---- delta = current_time - mw->matrix.last_click_time; if (row == mw->matrix.last_row && column == mw->matrix.last_column && ! delta < (unsigned long)mw->matrix.double_click_interval) ret = 1; else ret = 0; *************** *** 1123,1169 **** /*ARGSUSED*/ static void ! PushButton( w, data, event, cont ) Widget w; XtPointer data; XEvent *event; Boolean *cont; { XbaeMatrixButtonPressedStruct *button = ! ( XbaeMatrixButtonPressedStruct * )data; XMotionEvent *motionEvent; int x, y; int row, column; Boolean pressed = button->pressed; CellType cell; ! if( event->type == ButtonRelease ) { button->grabbed = False; ! XtRemoveGrab( w ); scrolling = False; ! if( button->pressed ) { /* If the button is still pressed, it has been released in the same button that was pressed. "Unpress" it and call the callbacks */ ! if( button->column == -1 ) ! xbaeDrawRowLabel( button->mw, button->row, False ); ! else if( button->row == -1 ) ! xbaeDrawColumnLabel( button->mw, button->column, False ); ! if( button->mw->matrix.label_activate_callback ) { XbaeMatrixLabelActivateCallbackStruct call_data; call_data.reason = XbaeLabelActivateReason; call_data.event = event; ! call_data.row_label = ( button->column == -1 ); call_data.row = button->row; call_data.column = button->column; ! if( button->column == -1 ) call_data.label = button->mw->matrix.row_labels[ button->row ]; else --- 1126,1172 ---- /*ARGSUSED*/ static void ! PushButton (w, data, event, cont) Widget w; XtPointer data; XEvent *event; Boolean *cont; { XbaeMatrixButtonPressedStruct *button = ! (XbaeMatrixButtonPressedStruct *)data; XMotionEvent *motionEvent; int x, y; int row, column; Boolean pressed = button->pressed; CellType cell; ! if (event->type == ButtonRelease) { button->grabbed = False; ! XtRemoveGrab (w); scrolling = False; ! if (button->pressed) { /* If the button is still pressed, it has been released in the same button that was pressed. "Unpress" it and call the callbacks */ ! if (button->column == -1) ! xbaeDrawRowLabel (button->mw, button->row, False); ! else if (button->row == -1) ! xbaeDrawColumnLabel (button->mw, button->column, False); ! if (button->mw->matrix.label_activate_callback) { XbaeMatrixLabelActivateCallbackStruct call_data; call_data.reason = XbaeLabelActivateReason; call_data.event = event; ! call_data.row_label = (button->column == -1); call_data.row = button->row; call_data.column = button->column; ! if (button->column == -1) call_data.label = button->mw->matrix.row_labels[ button->row ]; else *************** *** 1178,1212 **** return; } ! if( event->type != MotionNotify ) /* We want to be sure about this! */ return; ! motionEvent = ( XMotionEvent * )event; x = motionEvent->x; y = motionEvent->y; if (!xbaeEventToXY(button->mw, event, &x, &y, &cell)) return; ! if( xbaeXYToRowCol( button->mw, &x, &y, &row, &column, cell ) ) /* Moved off the labels */ pressed = False; else { ! if( button->column != column || button->row != row ) /* Moved out of the button that was originally pressed */ pressed = False; ! else if( button->column == column || button->row == row ) pressed = True; } /* If the status of whether or not the button should be pressed has changed, redraw the appropriate visual */ ! if( pressed != button->pressed ) { ! if( button->column == -1 ) ! xbaeDrawRowLabel( button->mw, button->row, pressed ); ! else if( button->row == -1 ) ! xbaeDrawColumnLabel( button->mw, button->column, pressed ); /* And set our struct's pressed member to the current setting */ button->pressed = pressed; } --- 1181,1215 ---- return; } ! if (event->type != MotionNotify) /* We want to be sure about this! */ return; ! motionEvent = (XMotionEvent *)event; x = motionEvent->x; y = motionEvent->y; if (!xbaeEventToXY(button->mw, event, &x, &y, &cell)) return; ! if (xbaeXYToRowCol (button->mw, &x, &y, &row, &column, cell)) /* Moved off the labels */ pressed = False; else { ! if (button->column != column || button->row != row) /* Moved out of the button that was originally pressed */ pressed = False; ! else if (button->column == column || button->row == row) pressed = True; } /* If the status of whether or not the button should be pressed has changed, redraw the appropriate visual */ ! if (pressed != button->pressed) { ! if (button->column == -1) ! xbaeDrawRowLabel (button->mw, button->row, pressed); ! else if (button->row == -1) ! xbaeDrawColumnLabel (button->mw, button->column, pressed); /* And set our struct's pressed member to the current setting */ button->pressed = pressed; } *************** *** 1227,1233 **** Boolean translation; /* if we have a double click and a callback - break out! */ ! if (event->type != ButtonPress && event->type != ButtonRelease ) return; if (!xbaeEventToXY(mw, event, &x, &y, &cell)) --- 1230,1236 ---- Boolean translation; /* if we have a double click and a callback - break out! */ ! if (event->type != ButtonPress && event->type != ButtonRelease) return; if (!xbaeEventToXY(mw, event, &x, &y, &cell)) *************** *** 1250,1271 **** /* If the row and column are invalid, return. If it is ButtonRelease event, also return - the ButtonRelease events are handled in the event handler loop below */ ! if( event->type != ButtonPress ) return; ! if( column == -1 && event->type == ButtonPress ) /* row label */ ! xbaeDrawRowLabel( mw, row, True ); ! else if( row == -1 && event->type == ButtonPress ) /* Column label */ ! xbaeDrawColumnLabel( mw, column, True ); /* Action stations! */ event_mask = ButtonReleaseMask | PointerMotionMask; scrolling = True; ! XtAddGrab( w, True, False ); /* Copy the data needed to be passed to the event handler */ button.mw = mw; button.row = row; --- 1253,1274 ---- /* If the row and column are invalid, return. If it is ButtonRelease event, also return - the ButtonRelease events are handled in the event handler loop below */ ! if (event->type != ButtonPress) return; ! if (column == -1 && event->type == ButtonPress) /* row label */ ! xbaeDrawRowLabel (mw, row, True); ! else if (row == -1 && event->type == ButtonPress) /* Column label */ ! xbaeDrawColumnLabel (mw, column, True); /* Action stations! */ event_mask = ButtonReleaseMask | PointerMotionMask; scrolling = True; ! XtAddGrab (w, True, False); /* Copy the data needed to be passed to the event handler */ button.mw = mw; button.row = row; *************** *** 1273,1300 **** button.pressed = True; button.grabbed = True; ! XtAddEventHandler( w, event_mask, ! True, ( XtEventHandler )PushButton, ! ( XtPointer )&button ); ! XtAddEventHandler( TextChild(mw), event_mask, ! True, ( XtEventHandler )PushButton, ! ( XtPointer )&button ); ! ! appcontext = XtWidgetToApplicationContext( w ); ! ! while( button.grabbed ) ! XtAppProcessEvent( appcontext, XtIMAll ); ! ! XtRemoveEventHandler( w, event_mask, True, ! ( XtEventHandler )PushButton, ! ( XtPointer )&button ); ! XtRemoveEventHandler( TextChild( mw ), event_mask, True, ! ( XtEventHandler )PushButton, ! ( XtPointer )&button ); } else if (translation && mw->matrix.default_action_callback && ! w != ( Widget )mw && DoubleClick(mw, event, mw->matrix.current_row, mw->matrix.current_column)) { --- 1276,1303 ---- button.pressed = True; button.grabbed = True; ! XtAddEventHandler (w, event_mask, ! True, (XtEventHandler)PushButton, ! (XtPointer)&button); ! XtAddEventHandler (TextChild(mw), event_mask, ! True, (XtEventHandler)PushButton, ! (XtPointer)&button); ! ! appcontext = XtWidgetToApplicationContext (w); ! ! while (button.grabbed) ! XtAppProcessEvent (appcontext, XtIMAll); ! ! XtRemoveEventHandler (w, event_mask, True, ! (XtEventHandler)PushButton, ! (XtPointer)&button); ! XtRemoveEventHandler (TextChild (mw), event_mask, True, ! (XtEventHandler)PushButton, ! (XtPointer)&button); } else if (translation && mw->matrix.default_action_callback && ! w != (Widget)mw && DoubleClick(mw, event, mw->matrix.current_row, mw->matrix.current_column)) { *************** *** 1302,1308 **** to be recognised */ XbaeMatrixDefaultActionCallbackStruct call_data; ! if( row == -1 || column == -1 ) return; call_data.reason = XbaeDefaultActionReason; --- 1305,1311 ---- to be recognised */ XbaeMatrixDefaultActionCallbackStruct call_data; ! if (row == -1 || column == -1) return; call_data.reason = XbaeDefaultActionReason; *************** *** 1358,1373 **** /* * Convert the point to a row,column. If it does not pick a valid ! * cell, then return. */ if (!xbaeXYToRowCol(mw, &x, &y, &row, &column, cell)) ! return; ! /* * Call our select_cell callbacks */ call_data.reason = XbaeSelectCellReason; ! if( scrolling ) { call_data.row = last_row; call_data.column = last_column; --- 1361,1387 ---- /* * Convert the point to a row,column. If it does not pick a valid ! * cell, then return. If button up then use the last selected cell ! * to make sure a valid button up event occurs when dragging out of ! * the matrix */ if (!xbaeXYToRowCol(mw, &x, &y, &row, &column, cell)) ! { ! if (event->type == ButtonRelease) ! { ! column = last_selected_column; ! row = last_selected_row; ! } ! else ! { ! return; ! } ! } /* * Call our select_cell callbacks */ call_data.reason = XbaeSelectCellReason; ! if (scrolling) { call_data.row = last_row; call_data.column = last_column; *************** *** 1377,1382 **** --- 1391,1400 ---- call_data.row = row; call_data.column = column; } + + last_selected_column = call_data.column; + last_selected_row = call_data.row; + call_data.selected_cells = mw->matrix.selected_cells; call_data.cells = mw->matrix.cells; call_data.num_params = *nparams; *************** *** 1421,1427 **** * on out of the mw. yuck! */ mw->matrix.traversing = XmTRAVERSE_NEXT_TAB_GROUP; ! ( void )XmProcessTraversal(TextChild(mw), XmTRAVERSE_NEXT_TAB_GROUP); mw->matrix.traversing = NOT_TRAVERSING; } --- 1439,1445 ---- * on out of the mw. yuck! */ mw->matrix.traversing = XmTRAVERSE_NEXT_TAB_GROUP; ! (void)XmProcessTraversal(TextChild(mw), XmTRAVERSE_NEXT_TAB_GROUP); mw->matrix.traversing = NOT_TRAVERSING; } *************** *** 1457,1500 **** * the Clip focusCallback, TraverseInCB, and we will continue to traverse * on out of the mw. yuck! */ ! mw->matrix.traversing = ( int )XmTRAVERSE_PREV_TAB_GROUP; ! ( void )XmProcessTraversal(TextChild(mw), XmTRAVERSE_PREV_TAB_GROUP); mw->matrix.traversing = NOT_TRAVERSING; } static void ! callSelectCellAction( mw ) XbaeMatrixWidget mw; { XbaeMatrixSelectCellCallbackStruct call_data; ! call_data.reason = XbaeSelectCellReason; call_data.row = last_row; call_data.column = last_column; call_data.selected_cells = mw->matrix.selected_cells; call_data.cells = mw->matrix.cells; call_data.num_params = 1; ! call_data.params = ( char ** )XtMalloc( sizeof( char * ) ); ! call_data.params[ 0 ] = strdup( "extend" ); ! call_data.event = ( XEvent * )NULL; XtCallCallbackList( ! ( Widget )mw, mw->matrix.select_cell_callback, ! ( XtPointer ) &call_data ); ! ( void )XtFree( call_data.params[ 0 ] ); ! ( void )XtFree( ( char * )call_data.params ); } /*ARGSUSED*/ static void ! checkScrollValues( w, data, event, cont ) Widget w; XtPointer data; XEvent *event; Boolean *cont; { ! XbaeMatrixScrollStruct *ss = ( XbaeMatrixScrollStruct * )data; XMotionEvent *motionEvent; int x, y; CellType cell; --- 1475,1523 ---- * the Clip focusCallback, TraverseInCB, and we will continue to traverse * on out of the mw. yuck! */ ! mw->matrix.traversing = (int)XmTRAVERSE_PREV_TAB_GROUP; ! (void)XmProcessTraversal(TextChild(mw), XmTRAVERSE_PREV_TAB_GROUP); mw->matrix.traversing = NOT_TRAVERSING; } static void ! callSelectCellAction (mw) XbaeMatrixWidget mw; { XbaeMatrixSelectCellCallbackStruct call_data; ! Boolean old_scroll_select = mw->matrix.scroll_select; ! ! mw->matrix.scroll_select = False; ! call_data.reason = XbaeSelectCellReason; call_data.row = last_row; call_data.column = last_column; call_data.selected_cells = mw->matrix.selected_cells; call_data.cells = mw->matrix.cells; call_data.num_params = 1; ! call_data.params = (char **)XtMalloc (sizeof (char *)); ! call_data.params[0] = strdup ("extend"); ! call_data.event = (XEvent *)NULL; XtCallCallbackList( ! (Widget)mw, mw->matrix.select_cell_callback, ! (XtPointer) &call_data); ! (void)XtFree (call_data.params[ 0 ]); ! (void)XtFree ( (char *)call_data.params); ! ! mw->matrix.scroll_select = old_scroll_select; } /*ARGSUSED*/ static void ! checkScrollValues (w, data, event, cont) Widget w; XtPointer data; XEvent *event; Boolean *cont; { ! XbaeMatrixScrollStruct *ss = (XbaeMatrixScrollStruct *)data; XMotionEvent *motionEvent; int x, y; CellType cell; *************** *** 1505,1534 **** int row, column; int i; ! if( event->type == ButtonRelease ) { ! XtRemoveTimeOut( ss->timerID ); ss->grabbed = False; ! if( ss->mw->matrix.selection_policy == XmMULTIPLE_SELECT || ! ss->mw->matrix.selection_policy == XmEXTENDED_SELECT ) ! callSelectCellAction( ss->mw ); return; } ! if( !xbaeEventToXY( ss->mw, event, &x, &y, &cell)) return; ! motionEvent = ( XMotionEvent * )event; /* * In this instance, we don't care if a valid row and column are * returned as we'll be the judge of the result */ ! inMatrix = xbaeXYToRowCol( ss->mw, &x, &y, &row, &column, cell ); ! if( inMatrix && cell == NonFixedCell ) { ss->inClip = True; return; --- 1528,1557 ---- int row, column; int i; ! if (event->type == ButtonRelease) { ! XtRemoveTimeOut (ss->timerID); ss->grabbed = False; ! if (ss->mw->matrix.selection_policy == XmMULTIPLE_SELECT || ! ss->mw->matrix.selection_policy == XmEXTENDED_SELECT) ! callSelectCellAction (ss->mw); return; } ! if(!xbaeEventToXY (ss->mw, event, &x, &y, &cell)) return; ! motionEvent = (XMotionEvent *)event; /* * In this instance, we don't care if a valid row and column are * returned as we'll be the judge of the result */ ! inMatrix = xbaeXYToRowCol (ss->mw, &x, &y, &row, &column, cell); ! if (inMatrix && cell == NonFixedCell) { ss->inClip = True; return; *************** *** 1538,1544 **** /* * Calculate our position relative to the clip and adjust. */ ! if( motionEvent->y >= ss->cw->core.y + ss->cw->core.height ) { /* Below the matrix */ distance = motionEvent->y - ss->cw->core.y - ss->cw->core.height; --- 1561,1567 ---- /* * Calculate our position relative to the clip and adjust. */ ! if (motionEvent->y >= ss->cw->core.y + ss->cw->core.height) { /* Below the matrix */ distance = motionEvent->y - ss->cw->core.y - ss->cw->core.height; *************** *** 1549,1560 **** * still changed from horizontal motion. */ i = 0; ! while( COLUMN_POSITION( ss->mw, i ) < motionEvent->x ) i++; ! if( i <= ss->mw->matrix.columns && i > 0 ) last_column = i - 1; } ! else if( motionEvent->y <= ss->cw->core.y ) { /* * Above the matrix - can't be both above and below at the same --- 1572,1585 ---- * still changed from horizontal motion. */ i = 0; ! while (COLUMN_POSITION (ss->mw, i) < HORIZ_ORIGIN(ss->mw) + ! motionEvent->x) i++; ! ! if (i <= ss->mw->matrix.columns && i > 0) last_column = i - 1; } ! else if (motionEvent->y <= ss->cw->core.y) { /* * Above the matrix - can't be both above and below at the same *************** *** 1564,1630 **** ss->below = False; ss->above = True; i = 0; ! while( COLUMN_POSITION( ss->mw, i ) < motionEvent->x ) i++; ! if( i > 0 && i <= ss->mw->matrix.columns ) last_column = i - 1; } ! if( motionEvent->x <= ss->cw->core.x ) { /* To the left */ ss->left = True; ss->right = False; ! distance = Min( distance, ss->cw->core.x - motionEvent->x ); /* * Check for any vertical motion */ ! if( !ss->below && !ss->above ) { ! last_row = YtoRow( ss->mw, motionEvent->y ) + ! VERT_ORIGIN( ss->mw ); } } ! else if( motionEvent->x >= ss->cw->core.x + ss->cw->core.width ) { /* To the right */ ss->left = False; ss->right = True; ! distance = Min( distance, motionEvent->x - ss->cw->core.x - ! ss->cw->core.width ); ! if( !ss->below && !ss->above ) ! last_row = YtoRow( ss->mw, motionEvent->y ) + ! VERT_ORIGIN( ss->mw ); } /* * Adjust the value of the update interval based on the distance we * are away from the matrix */ ! halfRows = distance / ( ROW_HEIGHT( ss->mw ) / 2 ); /* * Avoid use of the math library by doing a simple calculation */ ! for( i = 0; i < halfRows; i++ ) denom *= 2; ! ss->interval = DEFAULT_SCROLL_SPEED / ( denom > 0 ? denom : 1 ); ! if( ss->interval <= 0 ) /* Just to be on the safe side */ ss->interval = 1; } } static void ! updateScroll( data ) XtPointer data; { ! XbaeMatrixScrollStruct *ss = ( XbaeMatrixScrollStruct * )data; Boolean callCallback = False; static int my_last_row = -1, my_last_column = -1; ! if( !scrolling ) return; ! if( my_last_column != last_column || my_last_row != last_row ) callCallback = True; my_last_row = last_row; --- 1589,1662 ---- ss->below = False; ss->above = True; i = 0; ! while (COLUMN_POSITION (ss->mw, i) < HORIZ_ORIGIN(ss->mw) + ! motionEvent->x) i++; ! if (i > 0 && i <= ss->mw->matrix.columns) last_column = i - 1; } ! if (motionEvent->x <= ss->cw->core.x) { /* To the left */ ss->left = True; ss->right = False; ! distance = Min (distance, ss->cw->core.x - motionEvent->x); /* * Check for any vertical motion */ ! if (!ss->below && !ss->above) { ! last_row = YtoRow (ss->mw, motionEvent->y - ! COLUMN_LABEL_HEIGHT(ss->mw)) + ! VERT_ORIGIN (ss->mw); ! SANITY_CHECK_ROW( ss->mw, last_row ); } } ! else if (motionEvent->x >= ss->cw->core.x + ss->cw->core.width) { /* To the right */ ss->left = False; ss->right = True; ! distance = Min (distance, motionEvent->x - ss->cw->core.x - ! ss->cw->core.width); ! if (!ss->below && !ss->above) ! { ! last_row = YtoRow (ss->mw, motionEvent->y - ! COLUMN_LABEL_HEIGHT(ss->mw)) + ! VERT_ORIGIN (ss->mw); ! SANITY_CHECK_ROW( ss->mw, last_row ); ! } } /* * Adjust the value of the update interval based on the distance we * are away from the matrix */ ! halfRows = distance / (ROW_HEIGHT (ss->mw) / 2); /* * Avoid use of the math library by doing a simple calculation */ ! for (i = 0; i < halfRows; i++) denom *= 2; ! ss->interval = DEFAULT_SCROLL_SPEED / (denom > 0 ? denom : 1); ! if (ss->interval <= 0) /* Just to be on the safe side */ ss->interval = 1; } } static void ! updateScroll (data) XtPointer data; { ! XbaeMatrixScrollStruct *ss = (XbaeMatrixScrollStruct *)data; Boolean callCallback = False; static int my_last_row = -1, my_last_column = -1; ! if (!scrolling) return; ! if (my_last_column != last_column || my_last_row != last_row) callCallback = True; my_last_row = last_row; *************** *** 1635,1676 **** * scroll them into view. If not, start setting the fixed * rows and columns as the current row and column. */ ! if( ss->below && last_row < TRAILING_VERT_ORIGIN( ss->mw ) - 1 ) { ! xbaeMakeRowVisible( ss->mw, ++last_row ); callCallback = True; } ! else if( ss->above && last_row > ss->mw->matrix.fixed_rows ) { ! xbaeMakeRowVisible( ss->mw, --last_row ); callCallback = True; } ! if( ss->right && last_column < TRAILING_HORIZ_ORIGIN( ss->mw ) - 1 ) { ! xbaeMakeColumnVisible( ss->mw, ++last_column ); callCallback = True; } ! else if( ss->left && last_column > ss->mw->matrix.fixed_columns ) { ! xbaeMakeColumnVisible( ss->mw, --last_column ); callCallback = True; } ! if( callCallback && ! ( ss->mw->matrix.selection_policy == XmMULTIPLE_SELECT || ! ss->mw->matrix.selection_policy == XmEXTENDED_SELECT ) ) ! callSelectCellAction( ss->mw ); /* * Flush the updates out to the server so we don't end up lagging * behind too far and end up with a million redraw requests. * Particularly for higher update speeds */ ! XFlush( XtDisplay( ( Widget )ss->mw ) ); ss->timerID = XtAppAddTimeOut( ! ss->app_context, ss->interval, ( XtTimerCallbackProc )updateScroll, ! ( XtPointer )ss ); } /* ARGSUSED */ --- 1667,1708 ---- * scroll them into view. If not, start setting the fixed * rows and columns as the current row and column. */ ! if (ss->below && last_row < TRAILING_VERT_ORIGIN (ss->mw) - 1) { ! xbaeMakeRowVisible (ss->mw, ++last_row); callCallback = True; } ! else if (ss->above && last_row > ss->mw->matrix.fixed_rows) { ! xbaeMakeRowVisible (ss->mw, --last_row); callCallback = True; } ! if (ss->right && last_column < TRAILING_HORIZ_ORIGIN (ss->mw) - 1) { ! xbaeMakeColumnVisible (ss->mw, ++last_column); callCallback = True; } ! else if (ss->left && last_column > ss->mw->matrix.fixed_columns) { ! xbaeMakeColumnVisible (ss->mw, --last_column); callCallback = True; } ! if (callCallback && ! (ss->mw->matrix.selection_policy == XmMULTIPLE_SELECT || ! ss->mw->matrix.selection_policy == XmEXTENDED_SELECT)) ! callSelectCellAction (ss->mw); /* * Flush the updates out to the server so we don't end up lagging * behind too far and end up with a million redraw requests. * Particularly for higher update speeds */ ! XFlush (XtDisplay ( (Widget)ss->mw)); ss->timerID = XtAppAddTimeOut( ! ss->app_context, ss->interval, (XtTimerCallbackProc)updateScroll, ! (XtPointer)ss); } /* ARGSUSED */ *************** *** 1689,1695 **** CellType cell; Boolean inMatrix; ! if( scrolling ) return; /* --- 1721,1727 ---- CellType cell; Boolean inMatrix; ! if (scrolling) return; /* *************** *** 1708,1717 **** NULL, 0); return; } ! motionEvent = ( XMotionEvent * )event; ! buttonEvent = ( XButtonEvent * )event; ! cw = ( XbaeClipWidget )ClipChild( mw ); if (!xbaeEventToXY(mw, event, &x, &y, &cell)) return; --- 1740,1749 ---- NULL, 0); return; } ! motionEvent = (XMotionEvent *)event; ! buttonEvent = (XButtonEvent *)event; ! cw = (XbaeClipWidget)ClipChild(mw); if (!xbaeEventToXY(mw, event, &x, &y, &cell)) return; *************** *** 1722,1743 **** */ inMatrix = xbaeXYToRowCol(mw, &x, &y, &row, &column, cell); ! if( inMatrix && cell == NonFixedCell ) { /* * If we are in a NonFixedCell, then we're cruisin'. Just * update our position */ ! if( row != last_row || column != last_column ) { ! if( row < mw->matrix.rows && column < mw->matrix.columns ) { last_row = row; last_column = column; ! if( mw->matrix.selection_policy == XmMULTIPLE_SELECT || ! mw->matrix.selection_policy == XmEXTENDED_SELECT ) ! callSelectCellAction( mw ); } } } --- 1754,1775 ---- */ inMatrix = xbaeXYToRowCol(mw, &x, &y, &row, &column, cell); ! if (inMatrix && cell == NonFixedCell) { /* * If we are in a NonFixedCell, then we're cruisin'. Just * update our position */ ! if (row != last_row || column != last_column) { ! if (row < mw->matrix.rows && column < mw->matrix.columns) { last_row = row; last_column = column; ! if (mw->matrix.selection_policy == XmMULTIPLE_SELECT || ! mw->matrix.selection_policy == XmEXTENDED_SELECT) ! callSelectCellAction (mw); } } } *************** *** 1756,1801 **** scrolling = True; ! XtAddGrab( w, True, False ); scrollData.mw = mw; scrollData.cw = cw; scrollData.interval = DEFAULT_SCROLL_SPEED; scrollData.inClip = False; scrollData.grabbed = True; ! scrollData.app_context = XtWidgetToApplicationContext( w ); scrollData.above = scrollData.below = False; scrollData.left = scrollData.right = False; ! XtAddEventHandler( w, PointerMotionMask | ButtonReleaseMask, ! True, ( XtEventHandler )checkScrollValues, ! ( XtPointer )&scrollData ); /* * Call checkScrollValues() to find out where exactly we are in * relation to the clip widget */ ! checkScrollValues( w, ( XtPointer )&scrollData, event, &cont ); /* * The above / below / left / right members of the scrollData struct * should now be set so we know where we should be moving. Let's * get on with it, eh? */ ! updateScroll( ( XtPointer )&scrollData ); ! while( scrollData.grabbed && !scrollData.inClip ) ! XtAppProcessEvent( scrollData.app_context, XtIMAll ); ! XtRemoveEventHandler( w, PointerMotionMask | ButtonReleaseMask, ! True, ( XtEventHandler )checkScrollValues, ! ( XtPointer )&scrollData ); ! XtRemoveGrab( w ); /* * We don't want the timeout getting called again as, in two lines, * we'll be way out of scope! */ ! XtRemoveTimeOut( scrollData.timerID ); scrolling = False; } } --- 1788,1833 ---- scrolling = True; ! XtAddGrab (w, True, False); scrollData.mw = mw; scrollData.cw = cw; scrollData.interval = DEFAULT_SCROLL_SPEED; scrollData.inClip = False; scrollData.grabbed = True; ! scrollData.app_context = XtWidgetToApplicationContext (w); scrollData.above = scrollData.below = False; scrollData.left = scrollData.right = False; ! XtAddEventHandler (w, PointerMotionMask | ButtonReleaseMask, ! True, (XtEventHandler)checkScrollValues, ! (XtPointer)&scrollData); /* * Call checkScrollValues() to find out where exactly we are in * relation to the clip widget */ ! checkScrollValues (w, (XtPointer)&scrollData, event, &cont); /* * The above / below / left / right members of the scrollData struct * should now be set so we know where we should be moving. Let's * get on with it, eh? */ ! updateScroll ( (XtPointer)&scrollData); ! while (scrollData.grabbed && !scrollData.inClip) ! XtAppProcessEvent (scrollData.app_context, XtIMAll); ! XtRemoveEventHandler (w, PointerMotionMask | ButtonReleaseMask, ! True, (XtEventHandler)checkScrollValues, ! (XtPointer)&scrollData); ! XtRemoveGrab (w); /* * We don't want the timeout getting called again as, in two lines, * we'll be way out of scope! */ ! XtRemoveTimeOut (scrollData.timerID); scrolling = False; } } diff -c -r Xbae-4.6/src/Draw.c Xbae-4.6.1/src/Draw.c *** Xbae-4.6/src/Draw.c Tue Feb 4 19:05:58 1997 --- Xbae-4.6.1/src/Draw.c Thu Mar 13 19:22:25 1997 *************** *** 20,26 **** * LOST PROFITS OR OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES RELAT- * ING TO THE SOFTWARE. * ! * $Id: Draw.c,v 1.8 1997/02/04 08:05:58 lister Exp $ */ #include --- 20,26 ---- * LOST PROFITS OR OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES RELAT- * ING TO THE SOFTWARE. * ! * $Id: Draw.c,v 1.9 1997/03/13 08:22:25 lister Exp $ */ #include *************** *** 838,848 **** int i; GC gc; Window win = XtWindow(mw); ! Boolean clipped = ( column >= (int)mw->matrix.fixed_columns && ! column < TRAILING_HORIZ_ORIGIN(mw) ); ! if (mw->matrix.column_labels[column][0] == '\0' && ! !mw->matrix.button_labels) return; /* --- 838,851 ---- int i; GC gc; Window win = XtWindow(mw); ! Boolean clipped = (column >= (int)mw->matrix.fixed_columns && ! column < TRAILING_HORIZ_ORIGIN(mw)); ! Boolean button = mw->matrix.button_labels || ! (mw->matrix.column_button_labels && ! mw->matrix.column_button_labels[column]); ! ! if (mw->matrix.column_labels[column][0] == '\0' && !button) return; /* *************** *** 886,898 **** mw->matrix.column_label_lines[column].lines) * LABEL_HEIGHT(mw) + HORIZ_SB_OFFSET(mw); ! if( clipped ) gc = mw->matrix.label_clip_gc; else gc = mw->matrix.label_gc; ! if (mw->matrix.button_labels || (mw->matrix.column_button_labels && ! mw->matrix.column_button_labels[column])) { XSetForeground(XtDisplay(mw), gc, mw->matrix.button_label_background); XFillRectangle(XtDisplay(mw), win, gc, buttonX, HORIZ_SB_OFFSET(mw), --- 889,900 ---- mw->matrix.column_label_lines[column].lines) * LABEL_HEIGHT(mw) + HORIZ_SB_OFFSET(mw); ! if (clipped) gc = mw->matrix.label_clip_gc; else gc = mw->matrix.label_gc; ! if (button) { XSetForeground(XtDisplay(mw), gc, mw->matrix.button_label_background); XFillRectangle(XtDisplay(mw), win, gc, buttonX, HORIZ_SB_OFFSET(mw), *************** *** 904,910 **** label = mw->matrix.column_labels[column]; ! if( label[ 0 ] != '\0' ) for (i = 0; i < mw->matrix.column_label_lines[column].lines; i++) { xbaeDrawString( mw, XtWindow(mw), gc, label, --- 906,912 ---- label = mw->matrix.column_labels[column]; ! if (label[ 0 ] != '\0') for (i = 0; i < mw->matrix.column_label_lines[column].lines; i++) { xbaeDrawString( mw, XtWindow(mw), gc, label, *************** *** 919,927 **** labelY += LABEL_HEIGHT(mw); label += mw->matrix.column_label_lines[column].lengths[i] + 1; } ! if( mw->matrix.button_labels || ! (mw->matrix.column_button_labels && ! mw->matrix.column_button_labels[column])) xbaeDrawCellShadow( mw, XtWindow(mw), -1, column, buttonX, HORIZ_SB_OFFSET(mw), COLUMN_WIDTH( mw, column ), --- 921,927 ---- labelY += LABEL_HEIGHT(mw); label += mw->matrix.column_label_lines[column].lengths[i] + 1; } ! if (button) xbaeDrawCellShadow( mw, XtWindow(mw), -1, column, buttonX, HORIZ_SB_OFFSET(mw), COLUMN_WIDTH( mw, column ), *************** *** 946,953 **** GC gc; Window win = XtWindow(mw); ! if (mw->matrix.row_labels[row][0] == '\0' && ! !mw->matrix.button_labels) return; /* --- 946,955 ---- GC gc; Window win = XtWindow(mw); ! Boolean button = mw->matrix.button_labels || ! (mw->matrix.row_button_labels && mw->matrix.row_button_labels[row]); ! ! if (mw->matrix.row_labels[row][0] == '\0' && !button) return; /* *************** *** 966,973 **** gc = mw->matrix.label_gc; ! if (mw->matrix.button_labels || ! (mw->matrix.row_button_labels && mw->matrix.row_button_labels[row])) { XSetForeground(XtDisplay(mw), gc, mw->matrix.button_label_background); XFillRectangle(XtDisplay(mw), win, gc, VERT_SB_OFFSET(mw), --- 968,974 ---- gc = mw->matrix.label_gc; ! if (button) { XSetForeground(XtDisplay(mw), gc, mw->matrix.button_label_background); XFillRectangle(XtDisplay(mw), win, gc, VERT_SB_OFFSET(mw), *************** *** 988,995 **** mw->matrix.bold_labels, True, False, mw->matrix.row_label_color); ! if(mw->matrix.button_labels || ! (mw->matrix.row_button_labels && mw->matrix.row_button_labels[row])) xbaeDrawCellShadow( mw, win, row, -1, VERT_SB_OFFSET(mw), y - TEXT_Y_OFFSET(mw), ROW_LABEL_WIDTH(mw), ROW_HEIGHT(mw), True, False, pressed ); --- 989,995 ---- mw->matrix.bold_labels, True, False, mw->matrix.row_label_color); ! if (button) xbaeDrawCellShadow( mw, win, row, -1, VERT_SB_OFFSET(mw), y - TEXT_Y_OFFSET(mw), ROW_LABEL_WIDTH(mw), ROW_HEIGHT(mw), True, False, pressed ); diff -c -r Xbae-4.6/src/Imakefile Xbae-4.6.1/src/Imakefile *** Xbae-4.6/src/Imakefile Sat Feb 8 17:04:59 1997 --- Xbae-4.6.1/src/Imakefile Sat May 3 11:16:11 1997 *************** *** 1,7 **** ! # Copyright(c) 1992 Bell Communications Research, Inc. (Bellcore) ! # Copyright(c) 1995-97 Andrew Lister ! # ! # $Id: Imakefile,v 1.9 1997/02/08 06:04:59 lister Exp $ #include "../Xbae.tmpl" --- 1,7 ---- ! XCOMM Copyright(c) 1992 Bell Communications Research, Inc. (Bellcore) ! XCOMM Copyright(c) 1995-97 Andrew Lister ! XCOMM ! XCOMM $Id: Imakefile,v 1.10 1997/05/03 01:16:11 lister Exp $ #include "../Xbae.tmpl" *************** *** 11,20 **** Draw.o Matrix.o Methods.o Public.o ScrollMgr.o Shadow.o Utils.o HEADERS = Matrix.h MatrixP.h Clip.h ClipP.h Caption.h Cell.h \ CellP.h CaptionP.h patchlevel.h - #if ALLOW_COLUMN_RESIZE - DEFINES = -D$(COLUMN_RESIZE) -DALLOW_COLUMN_RESIZE - #else DEFINES = -D$(COLUMN_RESIZE) #endif INCLUDES = -I. --- 11,19 ---- Draw.o Matrix.o Methods.o Public.o ScrollMgr.o Shadow.o Utils.o HEADERS = Matrix.h MatrixP.h Clip.h ClipP.h Caption.h Cell.h \ CellP.h CaptionP.h patchlevel.h DEFINES = -D$(COLUMN_RESIZE) + #if ALLOW_COLUMN_RESIZE + DEFINES += -DALLOW_COLUMN_RESIZE #endif INCLUDES = -I. *************** *** 35,41 **** #if ProjectX >= 5 ! /* Rules for building the libraries */ #if DoSharedLib #if ProjectX > 5 --- 34,40 ---- #if ProjectX >= 5 ! XCOMM Rules for building the libraries #if DoSharedLib #if ProjectX > 5 *************** *** 56,62 **** LibraryObjectRule() ! /* Rules for installing the libraries */ #if DoSharedLib InstallSharedLibrary(Xbae,$(XbaeSharedLibraryRevision),$(USRLIBDIR)) --- 55,61 ---- LibraryObjectRule() ! XCOMM Rules for installing the libraries #if DoSharedLib InstallSharedLibrary(Xbae,$(XbaeSharedLibraryRevision),$(USRLIBDIR)) *************** *** 104,110 **** #endif /* X11R5 or X11R4 */ ! /* Rule to install the header files */ #if INSTALL_HEADERS InstallMultiple($(HEADERS),$(INCROOT)/Xbae-$(XBAEVERSION)) #endif --- 103,109 ---- #endif /* X11R5 or X11R4 */ ! XCOMM Rule to install the header files #if INSTALL_HEADERS InstallMultiple($(HEADERS),$(INCROOT)/Xbae-$(XBAEVERSION)) #endif diff -c -r Xbae-4.6/src/Macros.h Xbae-4.6.1/src/Macros.h *** Xbae-4.6/src/Macros.h Sat Feb 8 14:08:22 1997 --- Xbae-4.6.1/src/Macros.h Sat May 3 11:15:50 1997 *************** *** 21,27 **** * LOST PROFITS OR OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES RELAT- * ING TO THE SOFTWARE. * ! * $Id: Macros.h,v 1.8 1997/02/08 03:08:22 lister Exp $ */ /* --- 21,27 ---- * LOST PROFITS OR OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES RELAT- * ING TO THE SOFTWARE. * ! * $Id: Macros.h,v 1.9 1997/05/03 01:15:50 lister Exp $ */ /* *************** *** 74,79 **** --- 74,81 ---- /* * Macros to retrieve our children. Children must be created in this order. */ + #define XbaeNumChildren 8 + #define HorizScrollChild(mw) (mw->composite.children[0]) #define VertScrollChild(mw) (mw->composite.children[1]) #define ClipChild(mw) (mw->composite.children[2]) diff -c -r Xbae-4.6/src/Matrix.c Xbae-4.6.1/src/Matrix.c *** Xbae-4.6/src/Matrix.c Sat Feb 8 14:08:23 1997 --- Xbae-4.6.1/src/Matrix.c Sun May 11 14:29:08 1997 *************** *** 22,28 **** * * MatrixWidget Author: Andrew Wason, Bellcore, aw@bae.bellcore.com * ! * $Id: Matrix.c,v 1.14 1997/02/08 03:08:23 lister Exp $ */ /* --- 22,28 ---- * * MatrixWidget Author: Andrew Wason, Bellcore, aw@bae.bellcore.com * ! * $Id: Matrix.c,v 1.16 1997/05/11 04:29:08 lister Exp $ */ /* *************** *** 981,990 **** XmNmaximum, 1, XmNbackground, new->core.background_pixel, XmNforeground, new->manager.foreground, ! XmNbottomShadowColor, ! new->manager.bottom_shadow_color, ! XmNbottomShadowPixmap, ! new->manager.bottom_shadow_pixmap, XmNhighlightColor, new->manager.highlight_color, XmNhighlightPixmap, new->manager.highlight_pixmap, XmNtopShadowColor, new->manager.top_shadow_color, --- 981,988 ---- XmNmaximum, 1, XmNbackground, new->core.background_pixel, XmNforeground, new->manager.foreground, ! XmNbottomShadowColor, new->manager.bottom_shadow_color, ! XmNbottomShadowPixmap, new->manager.bottom_shadow_pixmap, XmNhighlightColor, new->manager.highlight_color, XmNhighlightPixmap, new->manager.highlight_pixmap, XmNtopShadowColor, new->manager.top_shadow_color, *************** *** 1006,1015 **** XmNsliderSize, 1, XmNbackground, new->core.background_pixel, XmNforeground, new->manager.foreground, ! XmNbottomShadowColor, ! new->manager.bottom_shadow_color, ! XmNbottomShadowPixmap, ! new->manager.bottom_shadow_pixmap, XmNhighlightColor, new->manager.highlight_color, XmNhighlightPixmap, new->manager.highlight_pixmap, XmNtopShadowColor, new->manager.top_shadow_color, --- 1004,1011 ---- XmNsliderSize, 1, XmNbackground, new->core.background_pixel, XmNforeground, new->manager.foreground, ! XmNbottomShadowColor, new->manager.bottom_shadow_color, ! XmNbottomShadowPixmap, new->manager.bottom_shadow_pixmap, XmNhighlightColor, new->manager.highlight_color, XmNhighlightPixmap, new->manager.highlight_pixmap, XmNtopShadowColor, new->manager.top_shadow_color, *************** *** 1111,1120 **** xbaeGetCellTotalWidth(new); /* ! Make the clips for the fixed cells which are scrollable (i.e. the ! fixed rows that can scroll horizontally, and the fixed columns which ! can scroll vertically. This makes 4 scrollable fixed-cell areas. ! */ new->matrix.left_clip = XtVaCreateWidget( "leftclip", xbaeClipWidgetClass, (Widget) new, XmNexposeProc, Redisplay, --- 1107,1116 ---- xbaeGetCellTotalWidth(new); /* ! * Make the clips for the fixed cells which are scrollable (i.e. the ! * fixed rows that can scroll horizontally, and the fixed columns which ! * can scroll vertically. This makes 4 scrollable fixed-cell areas. ! */ new->matrix.left_clip = XtVaCreateWidget( "leftclip", xbaeClipWidgetClass, (Widget) new, XmNexposeProc, Redisplay, *************** *** 1189,1211 **** if( !new->core.sensitive ) { values.fill_style = FillStippled; /* * Change our drawing GC's to the stipple effect to indicate * the widget is insensitive and redraw */ ! XChangeGC( dpy, new->matrix.draw_gc, valuemask, &values ); ! XChangeGC( dpy, new->matrix.label_gc, valuemask, &values ); ! XChangeGC( dpy, new->matrix.label_clip_gc, valuemask, &values ); ! XChangeGC( dpy, new->matrix.pixmap_gc, valuemask, &values ); /* * Propogate the insensitive feel to our children */ ! XtSetSensitive( TextChild( new ), False ); ! XtSetSensitive( HorizScrollChild( new ), False ); ! XtSetSensitive( VertScrollChild( new ), False ); ! XtSetSensitive( ClipChild( new ), False ); } } --- 1185,1207 ---- if( !new->core.sensitive ) { + int i; + values.fill_style = FillStippled; /* * Change our drawing GC's to the stipple effect to indicate * the widget is insensitive and redraw */ ! XChangeGC(dpy, new->matrix.draw_gc, valuemask, &values); ! XChangeGC(dpy, new->matrix.label_gc, valuemask, &values); ! XChangeGC(dpy, new->matrix.label_clip_gc, valuemask, &values); ! XChangeGC(dpy, new->matrix.pixmap_gc, valuemask, &values); /* * Propogate the insensitive feel to our children */ ! for (i = 0; i < XbaeNumChildren; i++) ! XtSetSensitive(new->composite.children[i], False); } } *************** *** 2035,2043 **** --- 2031,2054 ---- n = 0; if (NE(core.background_pixel)) { + /* + * Set all clip widgets to the new background (thanks Daiji) + */ XtVaSetValues(ClipChild(new), XmNbackground, new->core.background_pixel, NULL); + XtVaSetValues(LeftClip(new), + XmNbackground, new->core.background_pixel, + NULL); + XtVaSetValues(RightClip(new), + XmNbackground, new->core.background_pixel, + NULL); + XtVaSetValues(TopClip(new), + XmNbackground, new->core.background_pixel, + NULL); + XtVaSetValues(BottomClip(new), + XmNbackground, new->core.background_pixel, + NULL); XtSetArg(wargs[n], XmNbackground, new->core.background_pixel); n++; } if (NE(manager.foreground)) *************** *** 2262,2274 **** * Check whether the widget is sensitive has changed and set our GC's * appropriately */ ! if( NE( core.sensitive ) ) { XGCValues values; unsigned long valuemask = GCFillStyle; ! Display *dpy = XtDisplay( new ); ! if( !new->core.sensitive ) { values.fill_style = FillStippled; --- 2273,2286 ---- * Check whether the widget is sensitive has changed and set our GC's * appropriately */ ! if (NE(core.sensitive)) { XGCValues values; + int i; unsigned long valuemask = GCFillStyle; ! Display *dpy = XtDisplay(new); ! if(!new->core.sensitive) { values.fill_style = FillStippled; *************** *** 2276,2306 **** * Change our drawing GC's to the stipple effect to indicate * the widget is insensitive and redraw */ ! XChangeGC( dpy, new->matrix.draw_gc, valuemask, &values ); ! XChangeGC( dpy, new->matrix.label_gc, valuemask, &values ); ! XChangeGC( dpy, new->matrix.label_clip_gc, valuemask, &values ); ! XChangeGC( dpy, new->matrix.pixmap_gc, valuemask, &values ); /* * Propogate the insensitive feel to our children */ ! XtSetSensitive( TextChild( new ), False ); ! XtSetSensitive( HorizScrollChild( new ), False ); ! XtSetSensitive( VertScrollChild( new ), False ); ! XtSetSensitive( ClipChild( new ), False ); } else { values.fill_style = FillSolid; ! XChangeGC( dpy, new->matrix.draw_gc, valuemask, &values ); ! XChangeGC( dpy, new->matrix.label_gc, valuemask, &values ); ! XChangeGC( dpy, new->matrix.label_clip_gc, valuemask, &values ); ! XChangeGC( dpy, new->matrix.pixmap_gc, valuemask, &values ); ! ! XtSetSensitive( TextChild( new ), True ); ! XtSetSensitive( HorizScrollChild( new ), True ); ! XtSetSensitive( VertScrollChild( new ), True ); ! XtSetSensitive( ClipChild( new ), True ); } redisplay = True; } --- 2288,2314 ---- * Change our drawing GC's to the stipple effect to indicate * the widget is insensitive and redraw */ ! XChangeGC(dpy, new->matrix.draw_gc, valuemask, &values); ! XChangeGC(dpy, new->matrix.label_gc, valuemask, &values); ! XChangeGC(dpy, new->matrix.label_clip_gc, valuemask, &values); ! XChangeGC(dpy, new->matrix.pixmap_gc, valuemask, &values); /* * Propogate the insensitive feel to our children */ ! for (i = 0; i < XbaeNumChildren; i++) ! XtSetSensitive(new->composite.children[i], False); } else { values.fill_style = FillSolid; ! XChangeGC(dpy, new->matrix.draw_gc, valuemask, &values); ! XChangeGC(dpy, new->matrix.label_gc, valuemask, &values); ! XChangeGC(dpy, new->matrix.label_clip_gc, valuemask, &values); ! XChangeGC(dpy, new->matrix.pixmap_gc, valuemask, &values); ! ! for (i = 0; i < XbaeNumChildren; i++) ! XtSetSensitive(new->composite.children[i], True); } redisplay = True; } *************** *** 2433,2451 **** */ if (NE(matrix.top_row) || do_top_row) { xbaeAdjustTopRow(new); XtVaSetValues(VertScrollChild(new), XmNvalue, VERT_ORIGIN(new), NULL); - redisplay = True; } ! if (NE(matrix.left_column) || do_left_column) { xbaeAdjustLeftColumn(new); XtVaSetValues(HorizScrollChild(new), XmNvalue, HORIZ_ORIGIN(new), NULL); - redisplay = True; } /* --- 2441,2473 ---- */ if (NE(matrix.top_row) || do_top_row) { + XmScrollBarCallbackStruct call_data; + xbaeAdjustTopRow(new); + call_data.value = VERT_ORIGIN(new); + /* + * Trick xbaeScrollVertCB() into believing it needs to scroll + */ + VERT_ORIGIN(new) = VERT_ORIGIN(current); + xbaeScrollVertCB((Widget)VertScrollChild(new), NULL, &call_data); + VERT_ORIGIN(new) = call_data.value; /* and reset VERT_ORIGIN */ XtVaSetValues(VertScrollChild(new), XmNvalue, VERT_ORIGIN(new), NULL); } ! if (NE(matrix.left_column) || do_left_column) ! { ! XmScrollBarCallbackStruct call_data; ! xbaeAdjustLeftColumn(new); + call_data.value = HORIZ_ORIGIN(new); + HORIZ_ORIGIN(new) = HORIZ_ORIGIN(current); + xbaeScrollHorizCB((Widget)VertScrollChild(new), NULL, &call_data); + HORIZ_ORIGIN(new) = call_data.value; XtVaSetValues(HorizScrollChild(new), XmNvalue, HORIZ_ORIGIN(new), NULL); } /* diff -c -r Xbae-4.6/src/Matrix.h Xbae-4.6.1/src/Matrix.h *** Xbae-4.6/src/Matrix.h Sat Feb 8 14:08:24 1997 --- Xbae-4.6.1/src/Matrix.h Sat May 3 11:04:33 1997 *************** *** 23,29 **** * * MatrixWidget Author: Andrew Wason, Bellcore, aw@bae.bellcore.com * ! * $Id: Matrix.h,v 1.13 1997/02/08 03:08:24 lister Exp $ */ #ifndef _Xbae_Matrix_h --- 23,29 ---- * * MatrixWidget Author: Andrew Wason, Bellcore, aw@bae.bellcore.com * ! * $Id: Matrix.h,v 1.14 1997/05/03 01:04:33 lister Exp $ */ #ifndef _Xbae_Matrix_h *************** *** 410,415 **** --- 410,419 ---- extern Boolean XbaeMatrixIsColumnVisible P(( Widget, int )); extern Boolean XbaeMatrixIsCellVisible P(( Widget, int, int )); extern void XbaeMatrixVisibleCells P(( Widget, int *, int *, int *, int * )); + extern String XbaeMatrixGetColumnLabel P(( Widget, int )); + extern String XbaeMatrixGetRowLabel P(( Widget, int )); + extern void XbaeMatrixSetColumnLabel P(( Widget, int, String )); + extern void XbaeMatrixSetRowLabel P(( Widget, int, String )); _XFUNCPROTOEND diff -c -r Xbae-4.6/src/Methods.c Xbae-4.6.1/src/Methods.c *** Xbae-4.6/src/Methods.c Sat Feb 8 14:08:25 1997 --- Xbae-4.6.1/src/Methods.c Sun May 11 15:25:49 1997 *************** *** 20,26 **** * LOST PROFITS OR OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES RELAT- * ING TO THE SOFTWARE. * ! * $Id: Methods.c,v 1.10 1997/02/08 03:08:25 lister Exp $ */ /* --- 20,26 ---- * LOST PROFITS OR OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES RELAT- * ING TO THE SOFTWARE. * ! * $Id: Methods.c,v 1.14 1997/05/11 05:25:49 lister Exp $ */ /* *************** *** 738,744 **** mw->matrix.column_labels[j + position] = labels ? XtNewString(labels[j]) : XtNewString(""); xbaeParseColumnLabel(mw->matrix.column_labels[j + position], ! &mw->matrix.column_label_lines[j + position]); } /* --- 738,744 ---- mw->matrix.column_labels[j + position] = labels ? XtNewString(labels[j]) : XtNewString(""); xbaeParseColumnLabel(mw->matrix.column_labels[j + position], ! &mw->matrix.column_label_lines[j + position]); } /* *************** *** 1006,1030 **** { XbaeMatrixWriteCellCallbackStruct cbd; ! if( !mw->matrix.write_cell_callback ) { ! XtAppWarningMsg( ! XtWidgetToApplicationContext((Widget) mw), ! "xbaeSetCell", "noCallback", "XbaeMatrix", ! "XbaeMatrix: drawCellCallback defined with editable Matrix and no writeCellCallback.", ! NULL, 0); ! return; ! } ! cbd.reason = XbaeWriteCellReason; ! cbd.row = row; ! cbd.column = column; ! cbd.string = value; ! cbd.type = XbaeString; ! cbd.pixmap = ( Pixmap )NULL; ! cbd.mask = ( Pixmap )NULL; ! XtCallCallbackList((Widget)mw, mw->matrix.write_cell_callback, ! (XtPointer) &cbd); } else { --- 1006,1024 ---- { XbaeMatrixWriteCellCallbackStruct cbd; ! if( mw->matrix.write_cell_callback ) { ! cbd.reason = XbaeWriteCellReason; ! cbd.row = row; ! cbd.column = column; ! cbd.string = value; ! cbd.type = XbaeString; ! cbd.pixmap = ( Pixmap )NULL; ! cbd.mask = ( Pixmap )NULL; ! XtCallCallbackList((Widget)mw, mw->matrix.write_cell_callback, ! (XtPointer) &cbd); ! } } else { *************** *** 1617,1627 **** XtConfigureWidget(ClipChild(mw), FIXED_COLUMN_LABEL_OFFSET(mw), FIXED_ROW_LABEL_OFFSET(mw), ! cell_width, ! rows_visible <= 0 ! ? cell_height ! : rows_visible * ROW_HEIGHT(mw), ! 0); /* Resize all the other clips */ if (mw->matrix.fixed_columns <= 0) --- 1611,1617 ---- XtConfigureWidget(ClipChild(mw), FIXED_COLUMN_LABEL_OFFSET(mw), FIXED_ROW_LABEL_OFFSET(mw), ! cell_width, cell_height, 0); /* Resize all the other clips */ if (mw->matrix.fixed_columns <= 0) *************** *** 1632,1644 **** else { XtConfigureWidget(LeftClip(mw), ! COLUMN_LABEL_OFFSET(mw), ! FIXED_ROW_LABEL_OFFSET(mw), ! FIXED_COLUMN_WIDTH(mw), ! rows_visible <= 0 ! ? cell_height ! : rows_visible * ROW_HEIGHT(mw), ! 0); if (!XtIsManaged(LeftClip(mw))) XtManageChild(LeftClip(mw)); } --- 1622,1629 ---- else { XtConfigureWidget(LeftClip(mw), ! COLUMN_LABEL_OFFSET(mw), FIXED_ROW_LABEL_OFFSET(mw), ! FIXED_COLUMN_WIDTH(mw), cell_height, 0); if (!XtIsManaged(LeftClip(mw))) XtManageChild(LeftClip(mw)); } *************** *** 1653,1662 **** cell_width + FIXED_COLUMN_LABEL_OFFSET(mw), FIXED_ROW_LABEL_OFFSET(mw), TRAILING_FIXED_COLUMN_WIDTH(mw), ! rows_visible <= 0 ! ? cell_height ! : rows_visible * ROW_HEIGHT(mw), ! 0); if (!XtIsManaged(RightClip(mw))) XtManageChild(RightClip(mw)); } --- 1638,1644 ---- cell_width + FIXED_COLUMN_LABEL_OFFSET(mw), FIXED_ROW_LABEL_OFFSET(mw), TRAILING_FIXED_COLUMN_WIDTH(mw), ! cell_height, 0); if (!XtIsManaged(RightClip(mw))) XtManageChild(RightClip(mw)); } *************** *** 1668,1678 **** else { XtConfigureWidget(TopClip(mw), ! FIXED_COLUMN_LABEL_OFFSET(mw), ! ROW_LABEL_OFFSET(mw), ! cell_width, ! FIXED_ROW_HEIGHT(mw), ! 0); if (!XtIsManaged(TopClip(mw))) XtManageChild(TopClip(mw)); } --- 1650,1657 ---- else { XtConfigureWidget(TopClip(mw), ! FIXED_COLUMN_LABEL_OFFSET(mw), ROW_LABEL_OFFSET(mw), ! cell_width, FIXED_ROW_HEIGHT(mw), 0); if (!XtIsManaged(TopClip(mw))) XtManageChild(TopClip(mw)); } *************** *** 1685,1697 **** { XtConfigureWidget(BottomClip(mw), FIXED_COLUMN_LABEL_OFFSET(mw), ! (rows_visible <= 0 ! ? cell_height ! : rows_visible * ROW_HEIGHT(mw)) + ! FIXED_ROW_LABEL_OFFSET(mw), ! cell_width, ! TRAILING_FIXED_ROW_HEIGHT(mw), ! 0); if (!XtIsManaged(BottomClip(mw))) XtManageChild(BottomClip(mw)); } --- 1664,1671 ---- { XtConfigureWidget(BottomClip(mw), FIXED_COLUMN_LABEL_OFFSET(mw), ! cell_height + FIXED_ROW_LABEL_OFFSET(mw), ! cell_width, TRAILING_FIXED_ROW_HEIGHT(mw), 0); if (!XtIsManaged(BottomClip(mw))) XtManageChild(BottomClip(mw)); } *************** *** 2719,2724 **** --- 2693,2700 ---- Pixel *backgrounds; int num_rows; { + Boolean haveVSB, haveHSB; + /* * Do some error checking. */ *************** *** 2734,2739 **** --- 2710,2717 ---- return; } + haveVSB = XtIsManaged(VertScrollChild(mw)); + haveHSB = XtIsManaged(HorizScrollChild(mw)); /* * If we add rows, and there is no drawCellCallback, we must allocate * the cells array to prevent potential disaster *************** *** 2795,2804 **** } SETRECT(rect, 0, y, mw->core.width, mw->core.height); xbaeRedrawLabelsAndFixed(mw, &rect); - /*XbaeClipRedraw(ClipChild(mw));*/ XClearArea(XtDisplay(mw), XtWindow(ClipChild(mw)), rect.x1, rect.y1, rect.x2 - rect.x1, rect.y2 - rect.y1, True); } } --- 2773,2798 ---- } SETRECT(rect, 0, y, mw->core.width, mw->core.height); xbaeRedrawLabelsAndFixed(mw, &rect); XClearArea(XtDisplay(mw), XtWindow(ClipChild(mw)), rect.x1, rect.y1, rect.x2 - rect.x1, rect.y2 - rect.y1, True); + /* + * If the scrollbars have just been mapped and there are + * labels then the labels shift around. The labels need + * to be redrawn + */ + if (!haveVSB && XtIsManaged(VertScrollChild(mw)) && + mw->matrix.column_labels) + XClearArea(XtDisplay(mw), XtWindow(mw), + 0, HORIZ_SB_OFFSET(mw), 0, + COLUMN_LABEL_HEIGHT(mw), True); + if ((!haveHSB && XtIsManaged(VertScrollChild(mw)) && + mw->matrix.row_labels) || + ((mw->matrix.scrollbar_placement == XmTOP_LEFT || + mw->matrix.scrollbar_placement == XmBOTTOM_LEFT) && + !haveVSB && XtIsManaged(VertScrollChild(mw)))) + XClearArea(XtDisplay(mw), XtWindow(mw), + VERT_SB_OFFSET(mw), 0, ROW_LABEL_WIDTH(mw), 0, True); } } *************** *** 2812,2817 **** --- 2806,2813 ---- int num_rows; { int max, value; + Boolean haveVSB; + Boolean haveHSB; /* * Do some error checking. *************** *** 2838,2843 **** --- 2834,2842 ---- return; } + haveVSB = XtIsManaged(VertScrollChild(mw)); + haveHSB = XtIsManaged(HorizScrollChild(mw)); + /* * Delete the new rows from the internal cells/labels data structure. */ *************** *** 2856,2862 **** (int) mw->matrix.trailing_fixed_rows) : 1; XtVaSetValues(VertScrollChild(mw), ! XmNvalue, (value > max) ? max - 1 : value, XmNmaximum, mw->matrix.rows - (int) mw->matrix.fixed_rows - (int) mw->matrix.trailing_fixed_rows ? (mw->matrix.rows - (int) mw->matrix.fixed_rows - --- 2855,2861 ---- (int) mw->matrix.trailing_fixed_rows) : 1; XtVaSetValues(VertScrollChild(mw), ! XmNvalue, (value >= max) ? max - 1 : value, XmNmaximum, mw->matrix.rows - (int) mw->matrix.fixed_rows - (int) mw->matrix.trailing_fixed_rows ? (mw->matrix.rows - (int) mw->matrix.fixed_rows - *************** *** 2895,2906 **** } else { ! if (mw->matrix.scrollbar_placement == XmTOP_LEFT || ! mw->matrix.scrollbar_placement == XmTOP_RIGHT) ! y = HORIZ_SB_SPACE(mw); ! else ! y = 0; ! y += ROW_HEIGHT(mw) * position + COLUMN_LABEL_HEIGHT(mw); } SETRECT(rect, 0, y, mw->core.width, mw->core.height); XClearArea(XtDisplay(mw), XtWindow(mw), --- 2894,2901 ---- } else { ! y = HORIZ_SB_OFFSET(mw) + ROW_HEIGHT(mw) * position + ! COLUMN_LABEL_HEIGHT(mw); } SETRECT(rect, 0, y, mw->core.width, mw->core.height); XClearArea(XtDisplay(mw), XtWindow(mw), *************** *** 2911,2917 **** XClearArea(XtDisplay(mw), XtWindow(ClipChild(mw)), rect.x1, rect.y1, rect.x2 - rect.x1, rect.y2 - rect.y1, True); ! /*XbaeClipRedraw(ClipChild(mw));*/ } } --- 2906,2934 ---- XClearArea(XtDisplay(mw), XtWindow(ClipChild(mw)), rect.x1, rect.y1, rect.x2 - rect.x1, rect.y2 - rect.y1, True); ! /* ! * If the scrollbars have just been unmapped and there are ! * labels then the labels shift around. The labels need ! * to be redrawn ! */ ! if (haveVSB && !XtIsManaged(VertScrollChild(mw)) && ! mw->matrix.column_labels) ! XClearArea(XtDisplay(mw), XtWindow(mw), ! 0, HORIZ_SB_OFFSET(mw), 0, ! COLUMN_LABEL_HEIGHT(mw), True); ! if (haveHSB && !XtIsManaged(VertScrollChild(mw)) && ! mw->matrix.row_labels) ! XClearArea(XtDisplay(mw), XtWindow(mw), ! VERT_SB_OFFSET(mw), 0, ROW_LABEL_WIDTH(mw), 0, True); ! /* ! * If we are deleting rows and there are different cell backgrounds ! * or foregrounds and the deleted row was on the visible clip, then ! * the colours can get confused. ! */ ! if (mw->matrix.colors || mw->matrix.even_row_background != ! mw->core.background_pixel || mw->matrix.odd_row_background != ! mw->core.background_pixel) ! XbaeClipRedraw(ClipChild(mw)); } } *************** *** 2933,2938 **** --- 2950,2958 ---- Pixel *backgrounds; int num_columns; { + Boolean haveVSB; + Boolean haveHSB; + /* * Do some error checking. */ *************** *** 2964,2969 **** --- 2984,2992 ---- if( !mw->matrix.cells && !mw->matrix.draw_cell_callback ) xbaeCopyCells( mw ); + haveVSB = XtIsManaged(VertScrollChild(mw)); + haveHSB = XtIsManaged(HorizScrollChild(mw)); + /* * Add the new rows into the internal cells/labels data structure. */ *************** *** 3022,3027 **** --- 3045,3069 ---- XClearArea(XtDisplay(mw), XtWindow(ClipChild(mw)), rect.x1, rect.y1, rect.x2 - rect.x1, rect.y2 - rect.y1, True); + /* + * If the scrollbars have just been mapped and there are + * labels then the labels shift around. The labels need + * to be redrawn + */ + if ((!haveVSB && XtIsManaged(VertScrollChild(mw)) && + mw->matrix.column_labels) || + ((mw->matrix.scrollbar_placement == XmTOP_LEFT || + mw->matrix.scrollbar_placement == XmTOP_RIGHT) && + !haveHSB && XtIsManaged(HorizScrollChild(mw)))) + XClearArea(XtDisplay(mw), XtWindow(mw), + 0, HORIZ_SB_OFFSET(mw), 0, + COLUMN_LABEL_HEIGHT(mw), True); + if ((!haveHSB && XtIsManaged(VertScrollChild(mw)) && + mw->matrix.row_labels) || + ((mw->matrix.scrollbar_placement == XmTOP_LEFT || + mw->matrix.scrollbar_placement == XmTOP_RIGHT))) + XClearArea(XtDisplay(mw), XtWindow(mw), + VERT_SB_OFFSET(mw), 0, ROW_LABEL_WIDTH(mw), 0, True); } } *************** *** 3034,3039 **** --- 3076,3085 ---- int position; int num_columns; { + int maxlines; + Boolean haveVSB; + Boolean haveHSB; + /* * Do some error checking. */ *************** *** 3059,3064 **** --- 3105,3113 ---- return; } + haveVSB = XtIsManaged(VertScrollChild(mw)); + haveHSB = XtIsManaged(HorizScrollChild(mw)); + /* * Delete the new columns from the internal cells/labels data structure. */ *************** *** 3089,3094 **** --- 3138,3156 ---- Rectangle rect; int x, y; + if (maxlines != mw->matrix.column_label_maxlines) + { + /* + * If a column with a high label gets deleted, then the matrix + * gets pulled up the screen and leaves dangly bits underneath. + * Clear the whole area to ensure correct display and forget the + * rest of the calculation + */ + XClearArea(XtDisplay(mw), XtWindow(mw), + 0, 0, 0 /*Full Width*/, 0 /*Full Height*/, + True); + return; + } /* * Determine which part of the non clip region needs to be * redisplayed *************** *** 3121,3127 **** XClearArea(XtDisplay(mw), XtWindow(ClipChild(mw)), rect.x1, rect.y1, rect.x2 - rect.x1, rect.y2 - rect.y1, True); ! /*XbaeClipRedraw(ClipChild(mw));*/ } } --- 3183,3202 ---- XClearArea(XtDisplay(mw), XtWindow(ClipChild(mw)), rect.x1, rect.y1, rect.x2 - rect.x1, rect.y2 - rect.y1, True); ! /* ! * If the scrollbars have just been unmapped and there are ! * labels then the labels shift around. The labels need ! * to be redrawn ! */ ! if (haveVSB && !XtIsManaged(VertScrollChild(mw)) && ! mw->matrix.column_labels) ! XClearArea(XtDisplay(mw), XtWindow(mw), ! 0, HORIZ_SB_OFFSET(mw), 0, ! COLUMN_LABEL_HEIGHT(mw), True); ! if (haveHSB && !XtIsManaged(VertScrollChild(mw)) && ! mw->matrix.row_labels) ! XClearArea(XtDisplay(mw), XtWindow(mw), ! VERT_SB_OFFSET(mw), 0, ROW_LABEL_WIDTH(mw), 0, True); } } diff -c -r Xbae-4.6/src/Public.c Xbae-4.6.1/src/Public.c *** Xbae-4.6/src/Public.c Sat Feb 15 15:11:50 1997 --- Xbae-4.6.1/src/Public.c Sat May 3 11:15:03 1997 *************** *** 23,29 **** * * MatrixWidget Author: Andrew Wason, Bellcore, aw@bae.bellcore.com * ! * $Id: Public.c,v 1.11 1997/02/15 04:11:50 lister Exp $ */ /* --- 23,29 ---- * * MatrixWidget Author: Andrew Wason, Bellcore, aw@bae.bellcore.com * ! * $Id: Public.c,v 1.12 1997/05/03 01:15:03 lister Exp $ */ /* *************** *** 57,64 **** XtCheckSubclass(w, xbaeMatrixWidgetClass, NULL); /* ! * Call the set_cell method ! */ (*((XbaeMatrixWidgetClass) XtClass(w))->matrix_class.set_cell) ((XbaeMatrixWidget) w, row, column, value, True); } --- 57,64 ---- XtCheckSubclass(w, xbaeMatrixWidgetClass, NULL); /* ! * Call the set_cell method ! */ (*((XbaeMatrixWidgetClass) XtClass(w))->matrix_class.set_cell) ((XbaeMatrixWidget) w, row, column, value, True); } *************** *** 259,266 **** XtCheckSubclass(w, xbaeMatrixWidgetClass, NULL); /* ! * Call the get_cell method ! */ return (*((XbaeMatrixWidgetClass) XtClass(w))->matrix_class.get_cell) ((XbaeMatrixWidget) w, row, column); } --- 259,266 ---- XtCheckSubclass(w, xbaeMatrixWidgetClass, NULL); /* ! * Call the get_cell method ! */ return (*((XbaeMatrixWidgetClass) XtClass(w))->matrix_class.get_cell) ((XbaeMatrixWidget) w, row, column); } *************** *** 872,878 **** copy = (XtPointer **) XtMalloc(mw->matrix.rows * sizeof(XtPointer*)); for (i = 0; i < mw->matrix.rows; i++) ! copy[i] = (XtPointer*) XtCalloc(mw->matrix.columns, sizeof(XtPointer)); mw->matrix.cell_user_data = copy; } --- 872,879 ---- copy = (XtPointer **) XtMalloc(mw->matrix.rows * sizeof(XtPointer*)); for (i = 0; i < mw->matrix.rows; i++) ! copy[i] = (XtPointer*) XtCalloc(mw->matrix.columns, ! sizeof(XtPointer)); mw->matrix.cell_user_data = copy; } *************** *** 1784,1786 **** --- 1785,1946 ---- } + /* + * Get the label of the column passed here. + */ + String + XbaeMatrixGetColumnLabel(w, column) + Widget w; + int column; + { + XbaeMatrixWidget mw; + + if (!XtIsSubclass(w, xbaeMatrixWidgetClass)) + return NULL; + + mw = (XbaeMatrixWidget)w; + + if ( !(mw->matrix.column_labels) || column > mw->matrix.columns ) + return NULL; + else + return mw->matrix.column_labels[column]; + } + + /* + * Get the label of the row passed here. + */ + String + XbaeMatrixGetRowLabel(w, row) + Widget w; + int row; + { + XbaeMatrixWidget mw; + + if (!XtIsSubclass(w, xbaeMatrixWidgetClass)) + return NULL; + + mw = (XbaeMatrixWidget)w; + + if ( !(mw->matrix.row_labels) || row > mw->matrix.rows ) + return NULL; + else + return mw->matrix.row_labels[row]; + } + + void + XbaeMatrixSetColumnLabel(w, column, value) + Widget w; + int column; + String value; + { + XbaeMatrixWidget mw; + ColumnLabelLines lines; + String copy; + + if (!XtIsSubclass(w, xbaeMatrixWidgetClass) || !value) + return; + + mw = (XbaeMatrixWidget) w; + + /* + * Setting a column label when none are defined or changing the number + * of lines in a column label would cause the need for a redraw of the + * widget so we won't allow it. + */ + if (!mw->matrix.column_labels) + { + XtAppWarningMsg( + XtWidgetToApplicationContext((Widget) mw), + "setColumnLabel", "noLabels", "XbaeMatrix", + "XbaeMatrix: Cannot set column labels when none defined", + NULL, 0); + return; + } + + lines = (ColumnLabelLines)XtMalloc(sizeof(ColumnLabelLinesRec)); + copy = XtNewString(value); + xbaeParseColumnLabel(copy, lines); + + if (lines->lines != mw->matrix.column_label_lines[column].lines) + { + XtAppWarningMsg( + XtWidgetToApplicationContext((Widget) mw), + "setColumnLabel", "changeLines", "XbaeMatrix", + "XbaeMatrix: Cannot change lines when setting column labels", + NULL, 0); + XtFree((XtPointer)copy); + XtFree((XtPointer)lines->lengths); + XtFree((XtPointer)lines); + return; + } + /* + * OK to make the change + */ + XtFree((XtPointer) mw->matrix.column_labels[column]); + XtFree((XtPointer) mw->matrix.column_label_lines[column].lengths); + + mw->matrix.column_labels[column] = copy; + mw->matrix.column_label_lines[column] = *lines; + + /* + * Redraw the column label if it is visible. No expose event is + * generated by simply changing the label + */ + if (xbaeIsColumnVisible(mw, column)) + { + /* + * Don't generate expose events and let xbaeRedrawLabelsAndFixed + * work it out - we know where we need to draw + */ + XClearArea(XtDisplay(mw), XtWindow(mw), COLUMN_LABEL_OFFSET(mw) + + COLUMN_POSITION(mw, column), 0, COLUMN_WIDTH(mw, column), + COLUMN_LABEL_HEIGHT(mw), False); + xbaeDrawColumnLabel(mw, column, False); + } + return; + } + + void + XbaeMatrixSetRowLabel(w, row, value) + Widget w; + int row; + String value; + { + XbaeMatrixWidget mw; + + if (!XtIsSubclass(w, xbaeMatrixWidgetClass)) + return; + + mw = (XbaeMatrixWidget) w; + + if (!mw->matrix.row_labels || !value) + { + XtAppWarningMsg( + XtWidgetToApplicationContext((Widget) mw), + "setRowLabel", "noLabels", "XbaeMatrix", + "XbaeMatrix: Cannot set row labels when none defined", + NULL, 0); + return; + } + XtFree((XtPointer) mw->matrix.row_labels[row]); + mw->matrix.row_labels[row] = XtNewString(value); + + if (xbaeIsRowVisible(mw, row)) + { + int y; + + if (row < (int)mw->matrix.fixed_rows) + y = ROW_LABEL_OFFSET(mw) + ROW_HEIGHT(mw) * row; + else if (row >= TRAILING_VERT_ORIGIN(mw)) + y = TRAILING_FIXED_ROW_LABEL_OFFSET(mw) + ROW_HEIGHT(mw) * + (row - TRAILING_VERT_ORIGIN(mw)); + else + y = ROW_LABEL_OFFSET(mw) + ROW_HEIGHT(mw) * + (row - VERT_ORIGIN(mw)); + + XClearArea(XtDisplay(mw), XtWindow(mw), 0, y, ROW_LABEL_WIDTH(mw), + ROW_HEIGHT(mw), False); + + xbaeDrawRowLabel(mw, row, False); + } + } diff -c -r Xbae-4.6/src/ScrollMgr.c Xbae-4.6.1/src/ScrollMgr.c *** Xbae-4.6/src/ScrollMgr.c Sat Feb 8 14:08:26 1997 --- Xbae-4.6.1/src/ScrollMgr.c Thu Mar 13 19:23:55 1997 *************** *** 20,26 **** * LOST PROFITS OR OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES RELAT- * ING TO THE SOFTWARE. * ! * $Id: ScrollMgr.c,v 1.8 1997/02/08 03:08:26 lister Exp $ */ /* --- 20,26 ---- * LOST PROFITS OR OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES RELAT- * ING TO THE SOFTWARE. * ! * $Id: ScrollMgr.c,v 1.9 1997/03/13 08:23:55 lister Exp $ */ /* *************** *** 994,1000 **** /* * Handle row labels that aren't in fixed rows */ ! if (mw->matrix.row_labels) { Rectangle rect; --- 994,1000 ---- /* * Handle row labels that aren't in fixed rows */ ! if (mw->matrix.row_labels && mw->matrix.rows) { Rectangle rect; *************** *** 1126,1132 **** /* * Handle column labels that aren't in fixed columns */ ! if (mw->matrix.column_labels) { Rectangle rect; --- 1126,1132 ---- /* * Handle column labels that aren't in fixed columns */ ! if (mw->matrix.column_labels && mw->matrix.columns) { Rectangle rect; diff -c -r Xbae-4.6/src/Utils.c Xbae-4.6.1/src/Utils.c *** Xbae-4.6/src/Utils.c Sat Feb 8 14:08:27 1997 --- Xbae-4.6.1/src/Utils.c Sat May 3 11:03:33 1997 *************** *** 22,28 **** * * MatrixWidget Author: Andrew Wason, Bellcore, aw@bae.bellcore.com * ! * $Id: Utils.c,v 1.8 1997/02/08 03:08:27 lister Exp $ */ /* --- 22,28 ---- * * MatrixWidget Author: Andrew Wason, Bellcore, aw@bae.bellcore.com * ! * $Id: Utils.c,v 1.10 1997/05/03 01:03:33 lister Exp $ */ /* *************** *** 207,221 **** { row -= mw->matrix.fixed_rows; ! if(row >= VERT_ORIGIN(mw)) { ! if( row < ( ( ( int )( ClipChild( mw )->core.height ) / ! ROW_HEIGHT( mw ) ) + VERT_ORIGIN( mw ) ) ) return True; ! if( ClipChild(mw)->core.height > TEXT_HEIGHT_OFFSET(mw) && ClipChild(mw)->core.height < ROW_HEIGHT(mw) && ! row == VERT_ORIGIN( mw ) ) return True; } --- 207,221 ---- { row -= mw->matrix.fixed_rows; ! if (row >= VERT_ORIGIN(mw)) { ! if (row < (((int)(ClipChild(mw)->core.height) / ! ROW_HEIGHT(mw)) + VERT_ORIGIN(mw)) + 1) return True; ! if (ClipChild(mw)->core.height > TEXT_HEIGHT_OFFSET(mw) && ClipChild(mw)->core.height < ROW_HEIGHT(mw) && ! row == VERT_ORIGIN(mw)) return True; } *************** *** 1024,1032 **** break; case RowLabelCell: ! if (!inBox && (mw->matrix.button_labels || ! mw->matrix.row_button_labels) && ! mw->matrix.row_labels) { /* Check the various regions of the matrix to make sure we get the correct row label */ --- 1024,1030 ---- break; case RowLabelCell: ! if (!inBox && mw->matrix.row_labels) { /* Check the various regions of the matrix to make sure we get the correct row label */ *************** *** 1096,1104 **** break; case ColumnLabelCell: ! if (!inBox && (mw->matrix.button_labels || ! mw->matrix.column_button_labels) && ! mw->matrix.column_labels) { if( mw->matrix.fixed_columns ) { --- 1094,1100 ---- break; case ColumnLabelCell: ! if (!inBox && mw->matrix.column_labels) { if( mw->matrix.fixed_columns ) { diff -c -r Xbae-4.6/src/XbaeMatrix.man Xbae-4.6.1/src/XbaeMatrix.man *** Xbae-4.6/src/XbaeMatrix.man Sat Feb 8 14:08:28 1997 --- Xbae-4.6.1/src/XbaeMatrix.man Sat May 24 08:29:59 1997 *************** *** 7,13 **** .de LI .IP \fB\\$1\fR 5 .. ! .TH XbaeMatrix 3x "8 February, 1997" "Version 4.6" "Xbae Widget Set" .SH NAME XbaeMatrix \- The Bellcore Application Environment (BAE) XbaeMatrix widget class. --- 7,13 ---- .de LI .IP \fB\\$1\fR 5 .. ! .TH XbaeMatrix 3x "3 May, 1997" "Version 4.6" "Xbae Widget Set" .SH NAME XbaeMatrix \- The Bellcore Application Environment (BAE) XbaeMatrix widget class. *************** *** 466,472 **** .B XbaeMatrixSetCellUserData(\|) and retrieved using .BR XbaeMatrixGetCellUserData(\|) . ! This resource cannot be specified in a resource file. .LI XmNcells Points to an array of pointers to rows. Each row is an array of String, one for each column in that row. For example, the cells for a 2x3 Matrix --- 466,472 ---- .B XbaeMatrixSetCellUserData(\|) and retrieved using .BR XbaeMatrixGetCellUserData(\|) . ! This resource cannot be specified in a resource file and is copied. .LI XmNcells Points to an array of pointers to rows. Each row is an array of String, one for each column in that row. For example, the cells for a 2x3 Matrix *************** *** 3001,3006 **** --- 3001,3035 ---- .sp .ne 4 .RE + .B XbaeMatrixGetColumnLabel(\|) + .PP + .RS + .TS + l s s + l l li . + String XbaeMatrixGetColumnLabel(\|) + Widget w; + int column; + .TE + .sp + .cI w + An + .B XbaeMatrix + widget. + .cI column + The column of the label that should be retrieved. + .PP + .B XbaeMatrixGetColumnLabel(\|) + returns a pointer to the label of the given column. If no column labels + exist or the given column is not a valid column + .SM NULL + is returned. + If no data is found to be associated with the particular column, + .SM NULL + is returned. + .sp + .ne 4 + .RE .B XbaeMatrixGetColumnUserData(\|) .PP .RS *************** *** 3112,3117 **** --- 3141,3172 ---- .sp .ne 4 .RE + .B XbaeMatrixGetRowLabel(\|) + .PP + .RS + .TS + l s s + l l li . + String XbaeMatrixGetRowLabel(\|) + Widget w; + int row; + .TE + .sp + .cI w + An + .B XbaeMatrix + widget. + .cI row + The row of the label that should be retrieved. + .PP + .B XbaeMatrixGetRowLabel(\|) + returns a pointer to the label of the given row. If no row labels + exist or the given row is not a valid row + .SM NULL + is returned. + .sp + .ne 4 + .RE .B XbaeMatrixGetRowUserData(\|) .PP .RS *************** *** 3997,4002 **** --- 4052,4116 ---- will changed the specified columns in that resource to the specified colors. .sp + .ne 5 + .RE + .B XbaeMatrixSetColumnLabel(\|) + .PP + .RS + .TS + l s s + l l li . + void XbaeMatrixSetColumnLabel(\|) + Widget w; + int column; + String value; + .TE + .sp + .cI w + An + .B XbaeMatrix + widget. + .cI column + The column of the label is to be set. + .cI value + The new value of the label. + .PP + .B XbaeMatrixSetColumnLabel(\|) + allows the application developer to programmatically + change the label of a specified column. The resource + .B XmNcolumnLabels + must be set before using + .B XbaeMatrixSetColumnLabel(\|) + and the number of lines in the column label being set cannot be different + to the existing label. + .sp + .ne 5 + .RE + .B XbaeMatrixSetColumnUserData(\|) + .PP + .RS + .TS + l s s + l l li . + void XbaeMatrixSetColumnUserData(\|) + Widget w; + int column; + XtPointer data; + .TE + .sp + .cI w + An + .B XbaeMatrix + widget. + .cI column + The column whose value should be set. + .cI data + A pointer to a user defined data area. + .PP + .B XbaeMatrixSetColumnUserData(\|) + allows the application developer to programmatically + associate user data for the specified column. + .sp .ne 6 .RE .B XbaeMatrixSetRowBackgrounds(\|) *************** *** 4097,4102 **** --- 4211,4273 ---- .B XbaeMatrixSetRowColors(\|) will changed the specified rows in that resource to the specified colors. .sp + .ne 5 + .RE + .B XbaeMatrixSetRowLabel(\|) + .PP + .RS + .TS + l s s + l l li . + void XbaeMatrixSetRowLabel(\|) + Widget w; + int row; + String value; + .TE + .sp + .cI w + An + .B XbaeMatrix + widget. + .cI row + The row of the label is to be set. + .cI value + The new value of the label. + .PP + .B XbaeMatrixSetRowLabel(\|) + allows the application developer to programmatically + change the label of the specified row. The resource + .B XmNrowLabels + must be set before using + .B XbaeMatrixSetRowLabel(\|) . + .sp + .ne 5 + .RE + .B XbaeMatrixSetRowUserData(\|) + .PP + .RS + .TS + l s s + l l li . + void XbaeMatrixSetRowUserData(\|) + Widget w; + int column; + XtPointer data; + .TE + .sp + .cI w + An + .B XbaeMatrix + widget. + .cI row + The row whose value should be set. + .cI data + A pointer to a user defined data area. + .PP + .B XbaeMatrixSetRowUserData(\|) + allows the application developer to programmatically + associate user data for the specified row. + .sp .ne 3 .RE .B XbaeMatrixUnhighlightAll(\|) *************** *** 4395,4411 **** following Andrew Wason's departure and released version 4.0. .sp .B Andrew Lister ! \fC(lister@shadow.apana.org.au)\fP is the current maintainer and any bugs, problems or requests are solely his responsibility. .SH "SPECIAL THANKS" Andrew Wason for the original idea and source code. .br Jay Schmidgall for his contributions. .br - Callum Gibson for making fixed rows editable and flicker removal. - .br - Philip Aston as winner of the most number of patches for this release. - .br Bill Gates for ruining the Internet and computers in general. .SH "POSTCARDS and other contributions" Postcards have been received from the following users of the XbaeWidgets and --- 4566,4578 ---- following Andrew Wason's departure and released version 4.0. .sp .B Andrew Lister ! \fC(lister@syd.net.au)\fP is the current maintainer and any bugs, problems or requests are solely his responsibility. .SH "SPECIAL THANKS" Andrew Wason for the original idea and source code. .br Jay Schmidgall for his contributions. .br Bill Gates for ruining the Internet and computers in general. .SH "POSTCARDS and other contributions" Postcards have been received from the following users of the XbaeWidgets and *************** *** 4416,4422 **** Kenneth Flaxman (knf@kenlaw.com) Chicago, USA Corey Huinker (coreyh@aifp.com) Portland, USA (x4!) Earl J Revett (erevett@kokomo.bmc.com) Texas, USA ! Dirk Vangestel (gesteld@sebb.bel.alcatel.be) Hasselt, Belgium Charles Vidal (charles@cln46ht.der.edf.fr) Paris, France Tom (kriener.pad@sni.de) Paderborn, Germany Jay Schmidgall (jay.schmidgall@spdbump.sungardss.com) Las Vegas, USA --- 4583,4589 ---- Kenneth Flaxman (knf@kenlaw.com) Chicago, USA Corey Huinker (coreyh@aifp.com) Portland, USA (x4!) Earl J Revett (erevett@kokomo.bmc.com) Texas, USA ! Dirk Vangestel (gesteld@se.bel.alcatel.be) Hasselt, Belgium Charles Vidal (charles@cln46ht.der.edf.fr) Paris, France Tom (kriener.pad@sni.de) Paderborn, Germany Jay Schmidgall (jay.schmidgall@spdbump.sungardss.com) Las Vegas, USA *************** *** 4425,4430 **** --- 4592,4601 ---- Ole Holm Nielsen (Ole.H.Nielsen@fysik.dtu.dk) Denmark Mariano (mariano@tomcat.tid.es) Madrid, Spain Donato Petrino (dp@rtsffm.com) Mouse pads from Frankfurt, Germany + Liora Maron (liora@ilogix.co.il) Various locations, Israel + Dirk Vangestel (gesteld@se.bel.alcatel.be) Four bottles of Belgian beer, hand delivered (Yum!) + Andy Warburton (andyw@parallax.co.uk) and + Philip Aston (philipa@paralax.co.uk) Coventry, UK .TE .SH RELEASE .sp *************** *** 4463,4469 **** .PP Copyright 1991, 1992 Bellcore. .br ! Copyright 1995, 1996 Andrew Lister All Rights Reserved. .sp 3 The above no warranty extends to all additions and contributions. No --- 4634,4640 ---- .PP Copyright 1991, 1992 Bellcore. .br ! Copyright 1995-97 Andrew Lister All Rights Reserved. .sp 3 The above no warranty extends to all additions and contributions. No