Evgeny Stambulchik writes
>to the beginning of the DrawCB() function in examples/draw.c and see what
>happens when changing the cell focus, either by Tab traversing or clicking with
>the mouse. For such an event, Xbae makes _4_ redraws: (old cell) (old cell) (new
>cell) (old cell), while I'd expect only two are needed: (old cell) (new cell).
While it sounds good in theory, there are actually more calls needed in
practice due to the refresh of the text widget and Xbae not really knowing
where it is. I believe it is caused by the draw cell cb asking what i should
draw in the text field *twice* - once for the leaveCell, once for the
enterCell, and then asking what it needs for the non-text cell.
If you think about it, when you leave a cell, it (the matrix) has to
request wha's in the current cell (one call), leave it (another), find
out what's in the next cell (another) and redraw that (anoher). The reason
for that is so it knows what should be passed to the appropriate callback.
It's possible that it could be streamlined but I doubt the overhead is
significant.
BTW Does the same happen when not using the drawCellCallback? I would
expect not as all the information is "at hand". Memory over there,
performance.... over there.
Andrew
PS If there are any 't's missing in this transmission, blame my keyboard.