On Mon, 2002-10-21 at 04:35, John Levon wrote: > On Mon, Oct 21, 2002 at 03:44:37AM +0930, Darren Freeman wrote: > > > I would like to help document the code. First I have to understand it > > for myself. > > And we are happy to help you with that, as much as we can. > > > At the minimum I would be happy to go through some of it and > > reformat it to the standards I learned while working for Motorola (which > > I now choose to use all the time!) > > Hmm, what are these standards ? If they agree with LyX's putative > standards, sure. But I used to work with some Motorola code myself ...
Ahem! Well if the code you got came from Motorola TCG then I wouldn't blame you for booting me right now... But before you do, I was working at MASC where we operated at CMM level 4 (level 5 was the goal). You could _understand_ our code on the first inspection =) > > If I reverse-engineer correctly, the calling parameter "time" is the > > time that a button has been pressed until now. > > No. (time is completely wrong name). See text3.C:1317-1322 I figured it out fairly quickly ;) My version is fixed. Patch coming soon. > > Each call to scroll() is then supposed to scroll down by one line plus > > (1/8) * time^2 > > Something like that. > > > But from my test of the code, it only scrolls to the first line, hence > > my suspicion that scrollDocView accepts an _absolute_ value rather than > > the relative displacement given. > > Yes, scrollDocView is absolute. > > > To me the code was never meant to handle a mouse wheel, it looks > > It was. Check out the 1.2 source for working code. Some changes meant I > broke it :( I don't have it, don't want it. It would mean finding my way around 2 sets of code =) > > > That's what wheel_jump (should) does. > > > > There's a wheel_jump()? =) > > see text3.C/lyxrc Again, worked it out. > > /// wheel mouse scroll > > int scroll(long time); > > > > One of the few comments that aren't FIX_ME =) > > A patch to fix that the parameter name would be more than welcome. Tomorrow. I promise. As long as someone tells me how to do it with CVS to their liking. Sleep now, think later. > > Well IMHO it's not testworthy, it needs a rewrite. Once again, that's if > > this was meant for wheel scrolling only, nothing else. But I haven't > > looked beyond those two files because I was pointed to them for simple > > tweaking. I don't think tweaking will help =) > > Tweaking is what is needed. You need to get the current first_y, make > the correct modification to move it up or down, and pass the new value > to scrollDocView. Yup done. However what I did is normally called a rewrite =) > > Well, I hope we sort this out soon as I'm eager to use the 1.3.0CVS > > version. > > Great. Apart from unexplained lockups of my box, at the same place scrolling the same document, it's OK now on my disc. I can't see how scrolling could lock up my box, but I suspect the pre-1.0 xforms I have *might* have something to do with it. Again, locking up GNU/Linux isn't an easy thing to do, but... ? > john Have fun, Darren