On Fri, 27 Aug 2010, MacArthur, Ian (SELEX GALILEO, UK) wrote:

> One question though; does an Fl_GIF_Image widget have a concept of who
> its parent is?

So far it didn't, but it seemed a useful addition so I've added
a parent() getter/setter method. This now makes it possible to
get things to animate without having to set up a timer callback
handler (1).

Of course in my situation (where Fl_Help_View loads the
images), unless I change Fl_Help_View, I have no control over
it setting the parent property. In such cases, however, it is
still possible to achieve animation by having the GIF animate
'under the hood' and simply forcing a periodic redraw(). (2).

It's also possible to freeze the under-the-hood animation
altogether and do everything manually- for instance allowing
backwards animation or animation at speeds other than those
specified in the GIF file. (3).

I've put up a script with a few demo files where the above
situations are demonstrated in animate.fl, animate2.fl and
animate3.fl.

Still to do:

- Implementing the repeat count (animations don't *have* to
loop!)
- Writing a method to allow getting (and perhaps setting)
   the frame delay time so that manually performed animations
   as described in paragraph (3) can be timed accurately.

Almost ready for prime time then!

Best,
Marc

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

Reply via email to