[cairo] Cairo, Python and GTK widgets within a context

natan yellin aantny at gmail.com
Sun Feb 10 10:56:31 PST 2008

Can't you use gtk.Layout to pack widgets into a drawable area?

I'm trying to do something similar, with mixed success so far.

2007/12/15, Donn <donn.ingle at gmail.com
>* Hi,
*>*  Is there any way to "house" a GTK widget (say a button, or a text entry
*>* field) within a GDK DrawingArea (for which I can get a cairo context)?
A DrawingArea isn't a container, so not really (at the moment at
least). However, if you take a dip and learn how to write a container
in GTK (it's not really that difficult, though it requires to learn
how the widget system works), it's possible to write a canvas widget
that contains the other widgets...

>* I want to see if I can mix-in some GTK widgets and place them on
the canvas. I
*>* am aiming at having them obey the matrix of the current context, so they can
*>* scale and rotate etc.
...though to get this far you'll either have to do uglish things to
acquire the widget's drawing or wait for the offscreen rendering patch
to be in a GTK+ release to do it properly. And even after that, you'll
get the input problem, ie. you need to transform also the input events
(mouse clicks etc) for the widgets...

>* Any hope?
Hope: yes, practical implementation: at least not yet, unfortunately.

Kalle Vahlman, zuh at iki.fi
Powered by http://movial.fi
Interesting stuff at http://syslog.movial.fi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cairographics.org/archives/cairo/attachments/20080210/2eddadab/attachment.htm 

More information about the cairo mailing list