Jens Grunert <[EMAIL PROTECTED]> wrote:
> Ian,
> 
> thanks for your answer, maybe you could give me some more precise hints on 
> howto solve the problem in a better and more elegant way.
> 
> I use the Fl_Scroll widget to scroll a resizable area. For the resizing I 
> implemented some rudimentary zoom-in/out functionality which can make the 
> whole area very big!
> 
> Could you provide me some sample code how you implemented this functionality 
> (zoom + scrolling) using a virtual coordinating system?

You may have a look at my Fl_Huge_Scroll widget that is part of flimsel
(http://www.ecademix.com/JohannesHofmann/flimsel.html).

Regards,
Johannes


> 
> Thanks,
> Jens
> 
>> On 27 Dec 2007, at 22:35, Jens Grunert wrote:
>>
>> > I have very large widgets and my program did not work. After
>> > changing x_,y_,w_,h_ in FL_Widget.H from short to in it works ok.
>> > Is there any reason why x_,y_,w_,h_ are decleard as short in
>> > Fl_Widget?
>>
>> They are shorts because the underlying graphics API's use shorts
>> (although a few are moving to larger sizes now.) So rendering with a
>> co-ordinate frame bigger than a short can give odd results, or give
>> different results on different platforms.
>>
>> Fltk-2 uses a larger frame - int I think - (as do some of the
>> fltk-1.1-utf8 patches.)
>>
>> However (and this is gong to sound harsh, sorry!) it may be better to
>> think about *why* your frame has to be so large, and manage your own
>> "virtual" co-ordinate system at your "full" resolution, then map your
>> "extended virtual widget space" back into a small subset of actual
>> widgets close to the visible screen space.
>>
>> That's what I did.
>>
>> Of course, that may be no use at all for your situation!
>>
>> Cheers,
>> --
>> Ian
>>
>>
>>
> 
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to