The
gtk:layout widget is similar to the
gtk:drawing-area
widget in that it is a "blank slate" and does not do anything but paint
a blank background by default.
It is different in that it supports scrolling natively, you can add it to a
gtk:scrolled-window widget, and it can contain child widgets, since it is a
gtk:container widget. However if you are just going to draw, a
gtk:drawing-area widget is a better choice since it has lower
overhead.
When handling expose events on a
gtk:layout widget, you must draw to the
gdk:window object returned by the
gtk:layout-bin-window function, rather than to the one returned by the
gtk:widget-window
function as you would for a drawing area.
Child Property Details
- x
- The x child property of type :int (Read / Write)
x position of the child widget.
Default value: 0 - y
- The y child property of type :int (Read / Write)
y position of the child widget.
Default value: 0