Re: tabular woes

2002-08-02 Thread Duncan Simpson
Would it be relevent to mention that in TeX tabular and matricies *are* implemented using the same basic command, namely \halign? Matricies construct math boxes using a template contianing math shifts (aka $ signs) and tabular uses a template without math shifts. Plain TeX's \cases uses a templat

Re: tabular woes

2002-07-31 Thread Jean-Marc Lasgouttes
> "John" == John Levon <[EMAIL PROTECTED]> writes: John> On Tue, Jul 30, 2002 at 12:08:33PM +0200, Jean-Marc Lasgouttes John> wrote: Now you're making a double comparison without an epsilon John> ... that's not reliable. We have a float_equals<> somewhere >> No, because what we want to detec

Re: tabular woes

2002-07-31 Thread Jean-Marc Lasgouttes
> "Edwin" == Edwin Leuven <[EMAIL PROTECTED]> writes: Edwin> Like John's patch this should go in I think (also 1.2.X) This one is in 1.2.x now. JMarc

Re: tabular woes

2002-07-30 Thread John Levon
On Tue, Jul 30, 2002 at 12:08:33PM +0200, Jean-Marc Lasgouttes wrote: > John> Now you're making a double comparison without an epsilon ... > John> that's not reliable. We have a float_equals<> somewhere > > No, because what we want to detect is repetition of identical events. > This corresponds

Re: tabular woes

2002-07-30 Thread Lars Gullik Bjønnes
Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: >> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes: > | Lars> Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: | - static | Lars> long scrollbar_value_old = -1; | + static double | Lars> scrollbar_value_old = -1; > | Lars> -1.0 > | Doe

Re: tabular woes

2002-07-30 Thread Jean-Marc Lasgouttes
> "John" == John Levon <[EMAIL PROTECTED]> writes: John> On Fri, Jul 26, 2002 at 03:14:08PM +0200, Jean-Marc Lasgouttes John> wrote: >> The reason I meantion it is that I do not understand how a test >> like if (ev->xmotion.x != x_old || ev-> xmotion.y != y_old || >> fl_get_scrollbar_value(ar

Re: tabular woes

2002-07-30 Thread Jean-Marc Lasgouttes
> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes: Lars> Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: | - static Lars> long scrollbar_value_old = -1; | + static double Lars> scrollbar_value_old = -1; Lars> -1.0 Does it make _any_ difference? JMarc

Re: tabular woes

2002-07-30 Thread Jean-Marc Lasgouttes
> "Edwin" == Edwin Leuven <[EMAIL PROTECTED]> writes: Edwin> What is better? would it make a difference performance wise? The rule I use is to profile first, and think about optimizing later, when you actually know what should be optimized. JMarc

Re: tabular woes

2002-07-29 Thread Andre Poenitz
On Mon, Jul 29, 2002 at 04:03:11PM +0200, Lars Gullik Bjønnes wrote: > Depends on how much needs to be reevaluated to regure out the rows and > columns... Even then you'd probably need -O3 on g++ to get it actually inlined... Andre' -- Those who desire to give up Freedom in order to gain Secur

Re: tabular woes

2002-07-29 Thread Edwin Leuven
> if the class function rows() is an inline version that is just > returning an int... then I prefere the for(... tabular->rows() ...) > version. int rows() const { return rows_; }

Re: tabular woes

2002-07-29 Thread Kuba Ober
On poniedziałek 29 lipiec 2002 09:59 am, Edwin Leuven wrote: > ...completely unrelated and just wondering what the experts say. > > How about: > > for(int i = 0; i < tabular->rows(); ++i) { > for(int j = 0; j < tabular->columns(); ++j) { > > > as opposed to: > > int const r = tabular->rows();

Re: tabular woes

2002-07-29 Thread Lars Gullik Bjønnes
Edwin Leuven <[EMAIL PROTECTED]> writes: | ...completely unrelated and just wondering what the experts say. > | How about: > | for(int i = 0; i < tabular->rows(); ++i) { | for(int j = 0; j < tabular->columns(); ++j) { > > | as opposed to: > | int const r = tabular->rows(); | int const c = ta

Re: tabular woes

2002-07-29 Thread Andre Poenitz
On Mon, Jul 29, 2002 at 03:59:40PM +0200, Edwin Leuven wrote: > for(int i = 0; i < tabular->rows(); ++i) { > for(int j = 0; j < tabular->columns(); ++j) { > > > as opposed to: > > int const r = tabular->rows(); > int const c = tabular->columns(); > for(int i = 0; i < r; ++i) { > for(int

Re: tabular woes

2002-07-29 Thread Edwin Leuven
...completely unrelated and just wondering what the experts say. How about: for(int i = 0; i < tabular->rows(); ++i) { for(int j = 0; j < tabular->columns(); ++j) { as opposed to: int const r = tabular->rows(); int const c = tabular->columns(); for(int i = 0; i < r; ++i) { for(int j

Re: tabular woes

2002-07-29 Thread John Levon
On Mon, Jul 29, 2002 at 03:00:18PM +0200, Edwin Leuven wrote: > As for the rest. From my layman's point of view lyxtext, tabular etc won't get > the Design Pattern of the Year award, and seem as they could benefit from a > bit of rethinking. Well I'm a little more vertical and I'm not a huge

Re: tabular woes

2002-07-29 Thread Andre Poenitz
On Mon, Jul 29, 2002 at 03:00:18PM +0200, Edwin Leuven wrote: > But then again, I am a layman and therefore probably very wrong... Well. I have come to about the same conclusion but did not have the time so far to come up with something better. > And then I don't mention the most important thing

Re: tabular woes

2002-07-29 Thread Edwin Leuven
> If you can provide more of these examples to Jug perhaps he can do > something, but I don't think it's a good idea for 1.2.x (yeT) I tried to understand the drawing and updating code in insettabular but I can't really say that the code is self documenting. For the moment I am only thinking of

Re: tabular woes

2002-07-29 Thread Andre Poenitz
On Mon, Jul 29, 2002 at 01:31:38PM +0100, John Levon wrote: > Most of theese over-drawings come from problems when we weren't doing > enough updating in certai circumstances. There are corner cases where > figuring out what needs to be repainted is hard. I still think that we should at least have

Re: tabular woes

2002-07-29 Thread John Levon
On Mon, Jul 29, 2002 at 12:24:53PM +0200, Edwin Leuven wrote: > There are still some problems with the code I think. setPos/resetPos gets > called when moving a cursor in a selected cell. And I have the impression > that the whole table gets redrawm when selecting a (range of) cells. > Selecti

Re: tabular woes

2002-07-29 Thread Andre Poenitz
On Mon, Jul 29, 2002 at 01:09:43PM +0200, Edwin Leuven wrote: > > > > It's not exactly trivial, though, as we currently can't nest math and > > non-math insets within each other, so we can neither implement matrices > > as tables nor vice versa, nor even use some common base to factor out code. >

Re: tabular woes

2002-07-29 Thread Edwin Leuven
On Monday 29 July 2002 12:46, Andre Poenitz wrote: > On Mon, Jul 29, 2002 at 12:41:03PM +0200, Edwin Leuven wrote: > > > Which matrix? > > > > the one in mathed. > > Would be nice, indeed. > > It's not exactly trivial, though, as we currently can't nest math and > non-math insets within each other

Re: tabular woes

2002-07-29 Thread Andre Poenitz
On Mon, Jul 29, 2002 at 12:41:03PM +0200, Edwin Leuven wrote: > > Which matrix? > > the one in mathed. Would be nice, indeed. It's not exactly trivial, though, as we currently can't nest math and non-math insets within each other, so we can neither implement matrices as tables nor vice versa, n

Re: tabular woes

2002-07-29 Thread Edwin Leuven
> Which matrix? the one in mathed.

Re: tabular woes

2002-07-29 Thread Andre Poenitz
On Mon, Jul 29, 2002 at 12:24:53PM +0200, Edwin Leuven wrote: > I guess there is still work to be done. Which makes me wonder about the > following: shouldn't tabular and matrix be build on the same codebase? Which matrix? Andre' -- Those who desire to give up Freedom in order to gain Securit

Re: tabular woes

2002-07-29 Thread Edwin Leuven
> Edwin, are you satisfied with performance now? It's a bit better now. There are still some problems with the code I think. setPos/resetPos gets called when moving a cursor in a selected cell. And I have the impression that the whole table gets redrawm when selecting a (range of) cells. Sel

Re: tabular woes

2002-07-26 Thread Jean-Marc Lasgouttes
> "John" == John Levon <[EMAIL PROTECTED]> writes: John> On Wed, Jul 24, 2002 at 07:34:20PM +0200, Edwin Leuven wrote: >> what I do is the following 1. start lyx 2. insert 5x5 table 3a. >> click left mouse button and keep it pressed for ca 5 secs John> Try the below. Same goes for 1.2.x Whe

Re: tabular woes

2002-07-26 Thread John Levon
On Fri, Jul 26, 2002 at 03:14:08PM +0200, Jean-Marc Lasgouttes wrote: > The reason I meantion it is that I do not understand how a test like > if (ev->xmotion.x != x_old || > ev->xmotion.y != y_old || > fl_get_scrollbar_value(area->scrollbar) != s

Re: tabular woes

2002-07-25 Thread Juergen Vigna
Jean-Marc Lasgouttes wrote: > And do you agree it should go in 1.2.x? Does it make a big performance > difference (Edwin, are you satisfied with performance now?) Yes I think that should go into 1.2.x too, it helps performance and cannot harm. Jug -- -._-._-._-._-._-._-._-._-._-._-._-

Re: tabular woes

2002-07-25 Thread Jean-Marc Lasgouttes
> "Juergen" == Juergen Vigna <[EMAIL PROTECTED]> writes: Juergen> Edwin Leuven wrote: >> Like John's patch this should go in I think (also 1.2.X) Juergen> Thanks for sending the patch, but I included this already Juergen> from your other mail by hand. And do you agree it should go in 1.2.x?

Re: tabular woes

2002-07-25 Thread Juergen Vigna
Edwin Leuven wrote: > Like John's patch this should go in I think (also 1.2.X) Thanks for sending the patch, but I included this already from your other mail by hand. Jug -- -._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._ Dr. Jürgen VignaE-Mail: [EMAIL P

Re: tabular woes

2002-07-25 Thread Edwin Leuven
Like John's patch this should go in I think (also 1.2.X) Index: src/insets/ChangeLog === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/ChangeLog,v retrieving revision 1.474 diff -u -p -r1.474 ChangeLog --- src/insets/ChangeLo

Re: tabular woes

2002-07-24 Thread Edwin Leuven
On Wednesday 24 July 2002 09:42 pm, you wrote: > > It does seem excessive. > > The same happens if I click to select a cell, and then move the mouse > (holding the button) *within* the cell. There seems to be constant > redrawing even though there is no reason for this! I think there should be > o

Re: tabular woes

2002-07-24 Thread Edwin Leuven
> It does seem excessive. The same happens if I click to select a cell, and then move the mouse (holding the button) *within* the cell. There seems to be constant redrawing even though there is no reason for this! I think there should be only a redraw when the pointer leaves the cell (and then

Re: tabular woes

2002-07-24 Thread John Levon
On Wed, Jul 24, 2002 at 08:49:41PM +0200, Edwin Leuven wrote: > Thanks John! Don't know what you did but it helps with the cursor flickering. We were firing off motion events when we didn't actually move ... dunno why xforms generates them to be honest. > Are these normal numbers (I mean the 19

Re: tabular woes

2002-07-24 Thread Edwin Leuven
Thanks John! Don't know what you did but it helps with the cursor flickering. I am still wondering about the following. If I select all cells in a 5x5 table with the mouse I still get (after applying your patch) f.e.: 0.00 0.17 0.00 199282 0.00 0.00 LyXTabular::column_of

Re: tabular woes

2002-07-24 Thread John Levon
On Wed, Jul 24, 2002 at 07:34:20PM +0200, Edwin Leuven wrote: > what I do is the following > 1. start lyx > 2. insert 5x5 table > 3a. click left mouse button and keep it pressed for ca 5 secs Try the below. Same goes for 1.2.x john Index: XWorkArea.C ==

tabular woes

2002-07-24 Thread Edwin Leuven
I compiled lyx with -pg in order to do some profiling what I do is the following 1. start lyx 2. insert 5x5 table 3a. click left mouse button and keep it pressed for ca 5 secs 3b. do the same for ca 25 secs I only keep the mouse button pressed. I don't move the mouse. I don't touch the keyboard