gtk.overlay
Module for [Overlay] class
Types 3
gtk.overlay.Overlay 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.Widget.halign and gtk.widget.Widget.valign properties. E.g. a widget with both alignments set to gtk.types.Align.Start will be placed at the top left corner of the gtk.overlay.Overlay container, whereas an overlay with halign set to gtk.types.Align.Center and valign set to gtk.types.Align.End will be placed a the bottom edge of the gtk.overlay.Overlay, 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.Overlay.getChildPosition 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 gtk.overlay.Overlay implementation of the gtk.buildable.Buildable interface supports placing a child as an overlay by specifying “overlay” as the “type” attribute of a <child> element.
CSS nodes
gtk.overlay.Overlay 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.
OverlayGidBuilder builder() static nothrowGet builder for [gtk.overlay.Overlay] Returns: New builder objectvoid child(gtk.widget.Widget propval) @property nothrowSet `child` property. Params: propval = The main child widget.gtk.widget.Widget getChild() nothrowGets the child widget of overlay. Returns: the child widget of overlaybool getClipOverlay(gtk.widget.Widget widget) nothrowGets whether widget should be clipped within the parent.bool getMeasureOverlay(gtk.widget.Widget widget) nothrowGets whether widget's size is included in the measurement of overlay.void removeOverlay(gtk.widget.Widget widget) nothrowRemoves an overlay that was added with [gtk.overlay.Overlay.addOverlay].void setClipOverlay(gtk.widget.Widget widget, bool clipOverlay) nothrowSets whether widget should be clipped within the parent.void setMeasureOverlay(gtk.widget.Widget widget, bool measure) nothrowSets whether widget is included in the measured size of overlay.gulong connectGetChildPosition(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == bool)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtk.widget.Widget)))
&& (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.out_ && is(Parameters!T[1] == gdk.rectangle.Rectangle)))
&& (Parameters!T.length < 3 || (ParameterStorageClassTuple!T[2] == ParameterStorageClass.none && is(Parameters!T[2] : gtk.overlay.Overlay)))
&& Parameters!T.length < 4) nothrowConnect to `GetChildPosition` signal.Fluent builder implementation template for gtk.overlay.Overlay
T child(gtk.widget.Widget propval) nothrowSet `child` property. Params: propval = The main child widget. Returns: Builder instance for fluent chainingFluent builder for gtk.overlay.Overlay