Hi! After lots of testing, here are some patches to the mouse tracking code in NSMatrix. The behaviour of mouse tracking is a bit different on OS42 and MaxOSX. The implementation here reflects OS42 more closely (as the original code in NSMatrix). Examples of differences: - highlighting of NSButtonCells is different; - OS42 makes each cell under the cursor track the mouse, MacOSX makes only the clicked cell track it, untilMouseUp; - if mouse goes up outside of a cell, OS42 sends the action, MacOSX does not; - keys used for selection in list mode are not the same (shift and alternate on OS42, command and shift on MacOSX).
Changes in the patch: Some macros didn't protect their arguments. New method -_setDottedRow:column: Method -_selectCell:atRow:column: changed to use _setDotted Method -highlightCell:atRow:column: has been highly simplified, doesn't draw immediately, marks as needing display. Method -setSelectionFrom:to:anchor:highlight: reimplemented (original did not work well and I could not understand it). Method -_mouseDownNonListMode: simplified to do less drawing and flushing. Method -_mouseDownListMode: new method, taken from -mouseDown and simplified. Method -mouseDown: calls previous method. Method -_setState:highlight:startIndex:endIndex: was not working well with rectangular selections; optimized to not draw cells that are not changed. Also attached is the little program I used to test rectangular selections. Regards, Benhur
matrix.patch.gz
Description: Unix tar archive
testmatrix.m.gz
Description: Unix tar archive
_______________________________________________ Bug-gnustep mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-gnustep
