It derives from <GtkWidget>.
Places “overlay” widgets on top of a single main child.
The position of each overlay widget is determined by its
widget:halign and widget:valign properties. E.g. a widget with both
alignments set to start will be placed at the top
left corner of the <GtkOverlay> container, whereas
an overlay with halign set to center and valign set
to 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
overlay: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.
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.
<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.
The main child widget.
Its value is a <GtkWidget>, or #f.
Set it with (set! (overlay:child self) value).
Adds widget to self.
The widget will be stacked on top of the main widget added with
overlay:set-child.
The position at which widget is placed is determined from its
widget:halign and widget:valign properties.
Passed: a <GtkOverlay>.
Passed: a <GtkWidget>.
a <GtkWidget> to be added to the container
Gets the child widget of self.
Passed: a <GtkOverlay>.
Returned: a <GtkWidget>, or #f.
the child widget of self
Gets whether widget should be clipped within the parent.
Passed: a <GtkOverlay>.
Passed: a <GtkWidget>.
an overlay child of <GtkOverlay>
Returned: a boolean.
whether the widget is clipped within the parent.
Gets whether widget’s size is included in the measurement of self.
Passed: a <GtkOverlay>.
Passed: a <GtkWidget>.
an overlay child of <GtkOverlay>
Returned: a boolean.
whether the widget is measured
Creates a new <GtkOverlay>.
Returned: a <GtkWidget>.
a new <GtkOverlay> object.
Removes an overlay that was added with overlay:add-overlay.
Passed: a <GtkOverlay>.
Passed: a <GtkWidget>.
a <GtkWidget> to be removed
Sets the child widget of self.
Passed: a <GtkOverlay>.
Passed, or left out: a <GtkWidget>, or #f.
the child widget
Sets whether widget should be clipped within the parent.
Passed: a <GtkOverlay>.
Passed: a <GtkWidget>.
an overlay child of <GtkOverlay>
Passed: a boolean.
whether the child should be clipped
Sets whether widget is included in the measured size of self.
The overlay will request the size of the largest child that has this
property set to #t. Children who are not included may be drawn
outside of self’s allocation if they are too large.
Passed: a <GtkOverlay>.
Passed: a <GtkWidget>.
an overlay child of <GtkOverlay>
Passed: a boolean.
whether the child should be measured
Connect a handler with (connect object overlay:get-child-position!
handler). It is called as (handler self widget allocation) ⇒
%return.
Emitted to determine the position and size of any overlay child widgets.
A handler for this signal should fill allocation with the desired position and size for widget, relative to the ’main’ child of overlay.
The default handler for this signal uses the widget’s halign and
valign properties to determine the position and gives the widget its
natural size (except that an alignment of fill will
cause the overlay to be full-width/height). If the main child is a
<GtkScrolledWindow>, the overlays are
placed relative to its contents.
Passed: a <GtkOverlay>.
Passed: a <GtkWidget>.
the child widget to position
Passed, for the procedure to fill in: a
<GdkRectangle>.
return location for the allocation
Returned: a boolean.
#t if the allocation has been filled