Layout is similar to DrawingArea in that it’s a “blank slate” and doesn’t do anything except paint a blank background by default.
It’s different in that it supports scrolling natively due to implementing Scrollable , and can contain child widgets since it’s a Container.
If you just want to draw, a DrawingArea is a better choice since it has lower overhead. If you just need to position child widgets at specific points, then Fixed provides that functionality on its own.
When handling expose events on a Layout, you must draw to the Window returned by get_bin_window, rather than to the one returned by get_window as you would for a DrawingArea.
child_widget
to this
, at position (x
,y
).