Object Hierarchy:

Gtk.Overlay Gtk.Overlay Gtk.Overlay Gtk.Bin Gtk.Bin Gtk.Bin->Gtk.Overlay Gtk.Container Gtk.Container Gtk.Container->Gtk.Bin Gtk.Widget Gtk.Widget Gtk.Widget->Gtk.Container GLib.InitiallyUnowned GLib.InitiallyUnowned GLib.InitiallyUnowned->Gtk.Widget GLib.Object GLib.Object GLib.Object->GLib.InitiallyUnowned Atk.Implementor Atk.Implementor Atk.Implementor->Gtk.Overlay Atk.Implementor->Gtk.Bin Atk.Implementor->Gtk.Container Atk.Implementor->Gtk.Widget Gtk.Buildable Gtk.Buildable Gtk.Buildable->Gtk.Overlay Gtk.Buildable->Gtk.Bin Gtk.Buildable->Gtk.Container Gtk.Buildable->Gtk.Widget


[ CCode ( type_id = "gtk_overlay_get_type ()" ) ]
public class Overlay : Bin, Implementor, Buildable

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 halign and valign properties. E.g. a widget with both alignments set to gtk_align_start will be placed at the top left corner of the GtkOverlay container, whereas an overlay with halign set to gtk_align_center and valign set to gtk_align_end will be placed a the bottom edge of the GtkOverlay, 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 get_child_position signal.

An overlay’s minimum and natural sizes are those of its main child. The sizes of overlay children are not considered when measuring these preferred sizes.

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 `<child>` element.

CSS nodes

GtkOverlay has a single CSS node with the name “overlay”. Overlay children whose alignments cause them to be positioned at an edge get the style classes “.left”, “.right”, “.top”, and/or “.bottom” according to their position.

Namespace: Gtk
Package: gtk+-3.0


Creation methods:



Inherited Members:

All known members inherited from class Gtk.Bin
All known members inherited from class Gtk.Widget
All known members inherited from interface Atk.Implementor