package Implements_Buildable is new Glib.Types.Implements (Gtk.Buildable.Gtk_Buildable, Gtk_Layout_Record, Gtk_Layout);
type Gtk_Layout_Record is new Gtk_Container_Record with null record;
type Gtk_Layout is access all Gtk_Layout_Record'Class;
Hadjustment_Property : constant Glib.Properties.Property_Object;
Height_Property : constant Glib.Properties.Property_Uint;
Vadjustment_Property : constant Glib.Properties.Property_Object;
Width_Property : constant Glib.Properties.Property_Uint;
Signal_Set_Scroll_Adjustments : constant Glib.Signal_Name := "set-scroll-adjustments";
procedure Gtk_New
( | Layout | : out Gtk_Layout; |
Hadjustment | : Gtk.Adjustment.Gtk_Adjustment := null; | |
Vadjustment | : Gtk.Adjustment.Gtk_Adjustment := null); |
procedure Initialize
( | Layout | : access Gtk_Layout_Record'Class; |
Hadjustment | : Gtk.Adjustment.Gtk_Adjustment := null; | |
Vadjustment | : Gtk.Adjustment.Gtk_Adjustment := null); |
function Get_Type return Glib.GType;
procedure Freeze
( | Layout | : access Gtk_Layout_Record); |
function Get_Bin_Window
( | Layout | : access Gtk_Layout_Record) return Gdk.Window.Gdk_Window; |
function Get_Hadjustment
( | Layout | : access Gtk_Layout_Record) return Gtk.Adjustment.Gtk_Adjustment; |
procedure Set_Hadjustment
( | Layout | : access Gtk_Layout_Record; |
Adjustment | : access Gtk.Adjustment.Gtk_Adjustment_Record'Class); |
procedure Get_Size
( | Layout | : access Gtk_Layout_Record; |
Width | : out Guint; | |
Height | : out Guint); |
procedure Set_Size
( | Layout | : access Gtk_Layout_Record; |
Width | : Guint; | |
Height | : Guint); |
function Get_Vadjustment
( | Layout | : access Gtk_Layout_Record) return Gtk.Adjustment.Gtk_Adjustment; |
procedure Set_Vadjustment
( | Layout | : access Gtk_Layout_Record; |
Adjustment | : access Gtk.Adjustment.Gtk_Adjustment_Record'Class); |
procedure Move
( | Layout | : access Gtk_Layout_Record; |
Child_Widget | : access Gtk.Widget.Gtk_Widget_Record'Class; | |
X | : Gint; | |
Y | : Gint); |
procedure Put
( | Layout | : access Gtk_Layout_Record; |
Child_Widget | : access Gtk.Widget.Gtk_Widget_Record'Class; | |
X | : Gint; | |
Y | : Gint); |
procedure Thaw
( | Layout | : access Gtk_Layout_Record); |
function "+"
( | Widget | : access Gtk_Layout_Record'Class) return Gtk.Buildable.Gtk_Buildable renames Implements_Buildable.To_Interface; |
function "-"
( | Interf | : Gtk.Buildable.Gtk_Buildable) return Gtk_Layout renames Implements_Buildable.To_Object; |
A Gtk_Layout is a widget that can have an almost infinite size, without occupying a lot of memory. Its children can be located anywhere within it, but will only appear on the screen if the visible area of the layout contains them. Just like a Gtk_Viewport, its visible area is indicated by two Gtk_Adjustment widgets, and thus a Gtk_Layout can be put as is in a Gtk_Scrolled_Window. As for Gtk_Fixed containers, the children can be located anywhere in the layout (no automatic organization is done). But, as opposed to Gtk_Fixed widgets, a Gtk_Layout does not try to resize itself to show all its children.
Starting from GtkAda 2.0, you have to call Set_Size and specify the maximum size of the layout, otherwise children added with Put outside the size defined for the layout will never be visible. One way to do this is to systematically call Set_Size before calling Put, and make sure you specify a size big enough for the layout.