<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
<!ENTITY version SYSTEM "version.xml">
<!ENTITY pi "&#960;">
<!ENTITY solidus "&#8260;">
]>
<refentry id="GtkOverlay">
<refmeta>
<refentrytitle role="top_of_page" id="GtkOverlay.top_of_page">GtkOverlay</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GtkOverlay</refname>
<refpurpose>A container which overlays widgets on top of each other</refpurpose>
</refnamediv>

<refsect1 id="GtkOverlay.functions" role="functions_proto">
<title role="functions_proto.title">Functions</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="functions_proto_type" colwidth="150px"/>
<colspec colname="functions_proto_name"/>
<tbody>
<row><entry role="function_type"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-overlay-new">gtk_overlay_new</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-overlay-set-child">gtk_overlay_set_child</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-overlay-get-child">gtk_overlay_get_child</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-overlay-add-overlay">gtk_overlay_add_overlay</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-overlay-remove-overlay">gtk_overlay_remove_overlay</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-overlay-get-measure-overlay">gtk_overlay_get_measure_overlay</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-overlay-set-measure-overlay">gtk_overlay_set_measure_overlay</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-overlay-get-clip-overlay">gtk_overlay_get_clip_overlay</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-overlay-set-clip-overlay">gtk_overlay_set_clip_overlay</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkOverlay.properties" role="properties">
<title role="properties.title">Properties</title>
<informaltable frame="none">
<tgroup cols="3">
<colspec colname="properties_type" colwidth="150px"/>
<colspec colname="properties_name" colwidth="300px"/>
<colspec colname="properties_flags" colwidth="200px"/>
<tbody>
<row><entry role="property_type"><link linkend="GtkWidget"><type>GtkWidget</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkOverlay--child">child</link></entry><entry role="property_flags">Read / Write</entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkOverlay.signals" role="signal_proto">
<title role="signal_proto.title">Signals</title>
<informaltable frame="none">
<tgroup cols="3">
<colspec colname="signal_proto_type" colwidth="150px"/>
<colspec colname="signal_proto_name" colwidth="300px"/>
<colspec colname="signal_proto_flags" colwidth="200px"/>
<tbody>
<row><entry role="signal_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkOverlay-get-child-position">get-child-position</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkOverlay.other" role="other_proto">
<title role="other_proto.title">Types and Values</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="other_proto_type" colwidth="150px"/>
<colspec colname="other_proto_name"/>
<tbody>
<row><entry role="datatype_keyword"></entry><entry role="function_name"><link linkend="GtkOverlay-struct">GtkOverlay</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkOverlay.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<screen>    <link linkend="GObject">GObject</link>
    <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> <link linkend="GInitiallyUnowned">GInitiallyUnowned</link>
        <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> <link linkend="GtkWidget">GtkWidget</link>
            <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> GtkOverlay
</screen>
</refsect1>
<refsect1 id="GtkOverlay.implemented-interfaces" role="impl_interfaces">
<title role="impl_interfaces.title">Implemented Interfaces</title>
<para>
GtkOverlay implements
 <link linkend="AtkImplementorIface">AtkImplementorIface</link>,  <link linkend="GtkBuildable">GtkBuildable</link> and  <link linkend="GtkConstraintTarget">GtkConstraintTarget</link>.</para>

</refsect1>

<refsect1 id="GtkOverlay.includes"><title>Includes</title><synopsis>#include &lt;gtk/gtk.h&gt;
</synopsis></refsect1>

<refsect1 id="GtkOverlay.description" role="desc">
<title role="desc.title">Description</title>
<para>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 <link linkend="GtkWidget--halign"><type>“halign”</type></link> and <link linkend="GtkWidget--valign"><type>“valign”</type></link>
properties. E.g. a widget with both alignments set to <link linkend="GTK-ALIGN-START:CAPS"><literal>GTK_ALIGN_START</literal></link>
will be placed at the top left corner of the GtkOverlay container,
whereas an overlay with halign set to <link linkend="GTK-ALIGN-CENTER:CAPS"><literal>GTK_ALIGN_CENTER</literal></link> and valign set
to <link linkend="GTK-ALIGN-END:CAPS"><literal>GTK_ALIGN_END</literal></link> 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.</para>
<para>More complicated placement of overlays is possible by connecting
to the <link linkend="GtkOverlay-get-child-position"><type>“get-child-position”</type></link> signal.</para>
<para>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.</para>
<refsect2><title>GtkOverlay as GtkBuildable</title><para>The GtkOverlay implementation of the GtkBuildable interface
supports placing a child as an overlay by specifying “overlay” as
the “type” attribute of a <literal>&lt;child&gt;</literal> element.</para>
</refsect2>
<refsect2><title>CSS nodes</title><para>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.</para>
</refsect2>

</refsect1>
<refsect1 id="GtkOverlay.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gtk-overlay-new" role="function">
<title>gtk_overlay_new&#160;()</title>
<indexterm zone="gtk-overlay-new"><primary>gtk_overlay_new</primary></indexterm>
<programlisting language="C"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
gtk_overlay_new (<parameter><type>void</type></parameter>);</programlisting>
<para>Creates a new <link linkend="GtkOverlay"><type>GtkOverlay</type></link>.</para>
<refsect3 id="gtk-overlay-new.returns" role="returns">
<title>Returns</title>
<para> a new <link linkend="GtkOverlay"><type>GtkOverlay</type></link> object.</para>
</refsect3></refsect2>
<refsect2 id="gtk-overlay-set-child" role="function">
<title>gtk_overlay_set_child&#160;()</title>
<indexterm zone="gtk-overlay-set-child"><primary>gtk_overlay_set_child</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_overlay_set_child (<parameter><link linkend="GtkOverlay"><type>GtkOverlay</type></link> *overlay</parameter>,
                       <parameter><link linkend="GtkWidget"><type>GtkWidget</type></link> *child</parameter>);</programlisting>
<para>Sets the child widget of <parameter>overlay</parameter>
.</para>
<refsect3 id="gtk-overlay-set-child.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>overlay</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkOverlay"><type>GtkOverlay</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>child</para></entry>
<entry role="parameter_description"><para>the child widget. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-overlay-get-child" role="function">
<title>gtk_overlay_get_child&#160;()</title>
<indexterm zone="gtk-overlay-get-child"><primary>gtk_overlay_get_child</primary></indexterm>
<programlisting language="C"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
gtk_overlay_get_child (<parameter><link linkend="GtkOverlay"><type>GtkOverlay</type></link> *overlay</parameter>);</programlisting>
<para>Gets the child widget of <parameter>overlay</parameter>
.</para>
<refsect3 id="gtk-overlay-get-child.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>overlay</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkOverlay"><type>GtkOverlay</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-overlay-get-child.returns" role="returns">
<title>Returns</title>
<para>the child widget of <parameter>overlay</parameter>
. </para>
<para><emphasis role="annotation">[<acronym>nullable</acronym>][<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-overlay-add-overlay" role="function">
<title>gtk_overlay_add_overlay&#160;()</title>
<indexterm zone="gtk-overlay-add-overlay"><primary>gtk_overlay_add_overlay</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_overlay_add_overlay (<parameter><link linkend="GtkOverlay"><type>GtkOverlay</type></link> *overlay</parameter>,
                         <parameter><link linkend="GtkWidget"><type>GtkWidget</type></link> *widget</parameter>);</programlisting>
<para>Adds <parameter>widget</parameter>
 to <parameter>overlay</parameter>
.</para>
<para>The widget will be stacked on top of the main widget
added with <link linkend="gtk-container-add"><function>gtk_container_add()</function></link>.</para>
<para>The position at which <parameter>widget</parameter>
 is placed is determined
from its <link linkend="GtkWidget--halign"><type>“halign”</type></link> and <link linkend="GtkWidget--valign"><type>“valign”</type></link> properties.</para>
<refsect3 id="gtk-overlay-add-overlay.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>overlay</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkOverlay"><type>GtkOverlay</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>widget</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkWidget"><type>GtkWidget</type></link> to be added to the container</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-overlay-remove-overlay" role="function">
<title>gtk_overlay_remove_overlay&#160;()</title>
<indexterm zone="gtk-overlay-remove-overlay"><primary>gtk_overlay_remove_overlay</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_overlay_remove_overlay (<parameter><link linkend="GtkOverlay"><type>GtkOverlay</type></link> *overlay</parameter>,
                            <parameter><link linkend="GtkWidget"><type>GtkWidget</type></link> *widget</parameter>);</programlisting>
<para>Removes an overlay that was added with <link linkend="gtk-overlay-add-overlay"><function>gtk_overlay_add_overlay()</function></link>.</para>
<refsect3 id="gtk-overlay-remove-overlay.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>overlay</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkOverlay"><type>GtkOverlay</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>widget</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkWidget"><type>GtkWidget</type></link> to be removed</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-overlay-get-measure-overlay" role="function">
<title>gtk_overlay_get_measure_overlay&#160;()</title>
<indexterm zone="gtk-overlay-get-measure-overlay"><primary>gtk_overlay_get_measure_overlay</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_overlay_get_measure_overlay (<parameter><link linkend="GtkOverlay"><type>GtkOverlay</type></link> *overlay</parameter>,
                                 <parameter><link linkend="GtkWidget"><type>GtkWidget</type></link> *widget</parameter>);</programlisting>
<para>Gets whether <parameter>widget</parameter>
's size is included in the measurement of
<parameter>overlay</parameter>
.</para>
<refsect3 id="gtk-overlay-get-measure-overlay.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>overlay</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkOverlay"><type>GtkOverlay</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>widget</para></entry>
<entry role="parameter_description"><para>an overlay child of <link linkend="GtkOverlay"><type>GtkOverlay</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-overlay-get-measure-overlay.returns" role="returns">
<title>Returns</title>
<para> whether the widget is measured</para>
</refsect3></refsect2>
<refsect2 id="gtk-overlay-set-measure-overlay" role="function">
<title>gtk_overlay_set_measure_overlay&#160;()</title>
<indexterm zone="gtk-overlay-set-measure-overlay"><primary>gtk_overlay_set_measure_overlay</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_overlay_set_measure_overlay (<parameter><link linkend="GtkOverlay"><type>GtkOverlay</type></link> *overlay</parameter>,
                                 <parameter><link linkend="GtkWidget"><type>GtkWidget</type></link> *widget</parameter>,
                                 <parameter><link linkend="gboolean"><type>gboolean</type></link> measure</parameter>);</programlisting>
<para>Sets whether <parameter>widget</parameter>
 is included in the measured size of <parameter>overlay</parameter>
.</para>
<para>The overlay will request the size of the largest child that has
this property set to <link linkend="TRUE:CAPS"><literal>TRUE</literal></link>. Children who are not included may
be drawn outside of <parameter>overlay</parameter>
's allocation if they are too large.</para>
<refsect3 id="gtk-overlay-set-measure-overlay.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>overlay</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkOverlay"><type>GtkOverlay</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>widget</para></entry>
<entry role="parameter_description"><para>an overlay child of <link linkend="GtkOverlay"><type>GtkOverlay</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>measure</para></entry>
<entry role="parameter_description"><para>whether the child should be measured</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-overlay-get-clip-overlay" role="function">
<title>gtk_overlay_get_clip_overlay&#160;()</title>
<indexterm zone="gtk-overlay-get-clip-overlay"><primary>gtk_overlay_get_clip_overlay</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_overlay_get_clip_overlay (<parameter><link linkend="GtkOverlay"><type>GtkOverlay</type></link> *overlay</parameter>,
                              <parameter><link linkend="GtkWidget"><type>GtkWidget</type></link> *widget</parameter>);</programlisting>
<para>Gets whether <parameter>widget</parameter>
 should be clipped within the parent.</para>
<refsect3 id="gtk-overlay-get-clip-overlay.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>overlay</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkOverlay"><type>GtkOverlay</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>widget</para></entry>
<entry role="parameter_description"><para>an overlay child of <link linkend="GtkOverlay"><type>GtkOverlay</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-overlay-get-clip-overlay.returns" role="returns">
<title>Returns</title>
<para> whether the widget is clipped within the parent.</para>
</refsect3></refsect2>
<refsect2 id="gtk-overlay-set-clip-overlay" role="function">
<title>gtk_overlay_set_clip_overlay&#160;()</title>
<indexterm zone="gtk-overlay-set-clip-overlay"><primary>gtk_overlay_set_clip_overlay</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_overlay_set_clip_overlay (<parameter><link linkend="GtkOverlay"><type>GtkOverlay</type></link> *overlay</parameter>,
                              <parameter><link linkend="GtkWidget"><type>GtkWidget</type></link> *widget</parameter>,
                              <parameter><link linkend="gboolean"><type>gboolean</type></link> clip_overlay</parameter>);</programlisting>
<para>Sets whether <parameter>widget</parameter>
 should be clipped within the parent.</para>
<refsect3 id="gtk-overlay-set-clip-overlay.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>overlay</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkOverlay"><type>GtkOverlay</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>widget</para></entry>
<entry role="parameter_description"><para>an overlay child of <link linkend="GtkOverlay"><type>GtkOverlay</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>clip_overlay</para></entry>
<entry role="parameter_description"><para>whether the child should be clipped</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GtkOverlay.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GtkOverlay-struct" role="struct">
<title>GtkOverlay</title>
<indexterm zone="GtkOverlay-struct"><primary>GtkOverlay</primary></indexterm>
<programlisting language="C">typedef struct _GtkOverlay GtkOverlay;</programlisting>
</refsect2>

</refsect1>
<refsect1 id="GtkOverlay.property-details" role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2 id="GtkOverlay--child" role="property"><title>The <literal>“child”</literal> property</title>
<indexterm zone="GtkOverlay--child"><primary>GtkOverlay:child</primary></indexterm>
<programlisting>  “child”                    <link linkend="GtkWidget"><type>GtkWidget</type></link>&#160;*</programlisting>
<para>The child widget.</para><para>Owner: GtkOverlay</para>
<para>Flags: Read / Write</para>
</refsect2>

</refsect1>
<refsect1 id="GtkOverlay.signal-details" role="signals">
<title role="signals.title">Signal Details</title>
<refsect2 id="GtkOverlay-get-child-position" role="signal"><title>The <literal>“get-child-position”</literal> signal</title>
<indexterm zone="GtkOverlay-get-child-position"><primary>GtkOverlay::get-child-position</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
user_function (<link linkend="GtkOverlay"><type>GtkOverlay</type></link>   *overlay,
               <link linkend="GtkWidget"><type>GtkWidget</type></link>    *widget,
               <link linkend="GdkRectangle"><type>GdkRectangle</type></link> *allocation,
               <link linkend="gpointer"><type>gpointer</type></link>      user_data)</programlisting>
<para>The ::get-child-position signal is emitted to determine
the position and size of any overlay child widgets. A
handler for this signal should fill <parameter>allocation</parameter>
 with
the desired position and size for <parameter>widget</parameter>
, relative to
the 'main' child of <parameter>overlay</parameter>
.</para>
<para>The default handler for this signal uses the <parameter>widget</parameter>
's
halign and valign properties to determine the position
and gives the widget its natural size (except that an
alignment of <link linkend="GTK-ALIGN-FILL:CAPS"><literal>GTK_ALIGN_FILL</literal></link> will cause the overlay to
be full-width/height). If the main child is a
<link linkend="GtkScrolledWindow"><type>GtkScrolledWindow</type></link>, the overlays are placed relative
to its contents.</para>
<refsect3 id="GtkOverlay-get-child-position.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>overlay</para></entry>
<entry role="parameter_description"><para>the <link linkend="GtkOverlay"><type>GtkOverlay</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>widget</para></entry>
<entry role="parameter_description"><para>the child widget to position</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>allocation</para></entry>
<entry role="parameter_description"><para>return
location for the allocation. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>type</acronym> Gdk.Rectangle][<acronym>out caller-allocates</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="GtkOverlay-get-child-position.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the <parameter>allocation</parameter>
has been filled</para>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2>
</refsect1>

</refentry>
