Re: Sliding effect of widgets



2008/8/12 dolly vittal <dollyvittal yahoo com>:
I am developing a small GTK+ application on the lines of a media player.   When a widget replaces another 
widget, I need to have the sliding effect.   I have searched the GTK+ and came to know that the sliding 
effects are not implemented in it.

You can do some simple animations with gtk. For some widgets in my app
I have panels that slide in and out, or widgets that scroll into view.

I do this by setting a timeout every 50ms or so, and in the timeout
adjusting a widget property such as x position. Here's a widget I made
on top of GtkPane:

   http://vips.svn.sourceforge.net/viewvc/vips/nip2/trunk/src/pane.c?view=markup

this widget sits on the left or the right side of your main window and
slides open and closed with a timeout animation.

The animation is a bit clunky though :-( As Dave said, something like
clutter can make much better animations possible.

John



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]