Introducing GeditOverlay/GeditAnimatedOverlayFebruary 26, 2011 5:27 pm Uncategorized
GeditOverlay is a new GtkContainer similar to GtkFixed but that only allows you to put the childs in specific positions, north-west/east, south-west/east etc. Apart from this, this container is based on the main-widget idea. Where all the requesitions and allocations are proxied from the main widget or relative widget attached.
The idea of this was in my summer of code when I decided to port the monodevelop’s animated popup to C. With the new solitudes that I had in the last weeks to make it animation-less we decided to improve it a little and create a GeditOverlay (without any animation) and GeditAnimatedOverlay that inherits from GeditOverlay and helps to provide animation specifics to the widgets implementing the GeditAnimatable interface.
To use this new widgets you can check it out from the gedit repository. The main classes are:
- GeditOverlay: main container
- GeditOverlayChild: this is the widget added to GeditOverlay. You will only want to create this widget if you want to animate it or make it themeable in some way. Usually you don’t have to care about it as GeditOverlay creates it for you if you are not passing one widget of this type.
- GeditAnimatedOverlay: container inheriting from GeditOverlay where you can add widget implementing GeditAnimatable
- GeditFloatingSlider: widget inheriting from GeditOverlayChild and implementing GeditAnimatable that provides a slide/in/out animation
- NautilusFloatingBar: (this one in the nautilus repository) which inherits from GeditOverlayChild and provides a themed floating widget and loading visualizations
Also say that currently there are already a few applications using this: gedit, epiphany and nautilus and we hope to get it included in gtk+ 3.2