On 05/28/12 07:54, testalucida wrote:
>> On 05/28/12 04:44, testalucida wrote:
>>> seems as if widgets placed onto a Fl_Scroll don't keep their positions on 
>>> scrolling.
>>
>>      Yes, when you scroll, it changes the children's
>>      xy positions in order to move them.
> 
> and is there a way to prevent FLTK from doing so?

        No, that is how it operates.

        Drawing and event delivery of widgets all work in absolute
        positions to prevent constant x/y conversions for events
        and drawing.

        Routes I /don't/ think would work easily:

                a) put the widgets into a subwindow (which resets
                   the drawing origin to 0,0) and then pan that around, or..

                b) use the new fltk matrix stuff (fl_pushmatrix(), 
fl_translate()..)
                   to move the drawing origin around

        I don't think (a) works well because IIRC sub Fl_Window's don't work
        inside Fl_Scroll (for reasons I can't remember, but I recall having
        trouble making that work), and although (b) would work for drawing,
        I don't think the matrix stack affects important things like event 
delivery.


_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to