[PD-dev] much better scrolling algorithm (pd-extended 0.42.5)
hans at at.or.at
Fri Dec 4 18:16:29 CET 2009
On Dec 4, 2009, at 7:56 AM, Ivica Ico Bukvic wrote:
>>> please see attached patch. it applies cleanly against 0.41.4
>>> extended as
>>> well as 0.42.5 extended.
>> It works for me Pd-extended 0.42.5-20091112, thanks for that. Sorry
>> for the delay, its been a busy week. Two things I tried:
>> - like the current Pd-extended scroll logic, scrolling with the wheel
>> moves the patch when there are no scrollbars, except it'll scroll the
>> patch contents out of the visible area and not add scrollbars.
> I've not touched this part. This is simply how 0.42.5 does scrolling
> respect to the mouse wheel so I would say this part has nothing to
> do with
> my patch...
Ah, ok, didn't realize you weren't changing that. IMHO, if we are
going to look at scrolling, we need to look at the whole picture.
This is bad behavior that should be fixed. That's why I started this
dev wiki page, to make a catalog of the whole picture:
>> - resizing the window doesn't seem to track comments, I tried
>> 3.audio.examples/A02.amplitude.pd, the scrollbars don't kick in until
>> I cover the objects. the comments don't seem to affect the
> I realized this earlier last week as well. This is because I am
> text in manually calculating bbox to avoid redundant scrollbars
> which are
> apparent in all other versions, particularly when using number boxes
> larger fonts. I think it would be a good idea to report your
> experience on
> this one: namely whether you are getting the same results in this
> respect so
> that we have this also covered as part of the algorithm's assessment.
> That said, I thought a bit about this and I think text can be added
> in two
> different ways:
> 1) by creating an invisible box around them (not sure if canvas
> this) or if there is already one identifying it in the manual bbox
> 2) trying to figure out what is the font scaling discrepancy and
> that number to text (once again inside manual bbox calculation since
> that is
> the only place you could do so on an individual basis such as this
What was the problem with using Tcl/Tk's bbox calculations? It'll get
the comments automatically, IIRC.
Programs should be written for people to read, and only incidentally
for machines to execute.
- from Structure and Interpretation of Computer Programs
More information about the Pd-dev