package Implements_Gtk_Buildable is new Glib.Types.Implements (Gtk.Buildable.Gtk_Buildable, Gtk_Overlay_Record, Gtk_Overlay);
type Gtk_Overlay_Record is new Gtk_Bin_Record with null record;
type Gtk_Overlay is access all Gtk_Overlay_Record'Class;
type Cb_Gtk_Overlay_Gtk_Widget_Cairo_Rectangle_Int_Boolean is not null access function (Self : access Gtk_Overlay_Record'Class; Widget : not null access Gtk.Widget.Gtk_Widget_Record'Class; Allocation : access Cairo.Region.Cairo_Rectangle_Int) return Boolean;
type Cb_GObject_Gtk_Widget_Cairo_Rectangle_Int_Boolean is not null access function (Self : access Glib.Object.GObject_Record'Class; Widget : not null access Gtk.Widget.Gtk_Widget_Record'Class; Allocation : access Cairo.Region.Cairo_Rectangle_Int) return Boolean;
Signal_Get_Child_Position : constant Glib.Signal_Name := "get-child-position";
procedure Gtk_New
( | Self | : out Gtk_Overlay); |
procedure Initialize
( | Self | : not null access Gtk_Overlay_Record'Class); |
function Gtk_Overlay_New return Gtk_Overlay;
function Get_Type return Glib.GType;
procedure Add_Overlay
( | Self | : not null access Gtk_Overlay_Record; |
Widget | : not null access Gtk.Widget.Gtk_Widget_Record'Class); |
procedure On_Get_Child_Position
( | Self | : not null access Gtk_Overlay_Record; |
Call | : Cb_Gtk_Overlay_Gtk_Widget_Cairo_Rectangle_Int_Boolean; | |
After | : Boolean := False); |
procedure On_Get_Child_Position
( | Self | : not null access Gtk_Overlay_Record; |
Call | : Cb_GObject_Gtk_Widget_Cairo_Rectangle_Int_Boolean; | |
Slot | : not null access Glib.Object.GObject_Record'Class; | |
After | : Boolean := False); |
function "+"
( | Widget | : access Gtk_Overlay_Record'Class) return Gtk.Buildable.Gtk_Buildable renames Implements_Gtk_Buildable.To_Interface; |
function "-"
( | Interf | : Gtk.Buildable.Gtk_Buildable) return Gtk_Overlay renames Implements_Gtk_Buildable.To_Object; |
GtkOverlay is a container which contains a single main child, on top of which it can place 'overlay' widgets. The position of each overlay widget is determined by its Gtk.Widget.Gtk_Widget:halign and Gtk.Widget.Gtk_Widget:valign properties. E.g. a widget with both alignments set to Gtk.Widget.Align_Start will be placed at the top left corner of the main widget, whereas an overlay with halign set to Gtk.Widget.Align_Center and valign set to Gtk.Widget.Align_End will be placed a the bottom edge of the main widget, horizontally centered. The position can be adjusted by setting the margin properties of the child to non-zero values.
More complicated placement of overlays is possible by connecting to the Gtk.Overlay.Gtk_Overlay::get-child-position signal. == GtkOverlay as GtkBuildable == The GtkOverlay implementation of the GtkBuildable interface supports placing a child as an overlay by specifying "overlay" as the "type" attribute of a <tag class="starttag">child</tag> element.