Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: Overlay

[31:7] extends: object

Places “overlay” widgets on top of a single main child. An
example GtkOverlay The position of each overlay widget is determined by its [property@Gtk.Widget:halign] and [property@Gtk.Widget: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 [signal@Gtk.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. # 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.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • Overlay ()

    Creates a new GtkOverlay.

  • toNativeHandle (Source)

    Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from fn.call(...), another generated wrapper exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • asWidget ()

    Wraps this handle as Widget.

    • @r A Widget object.
  • asAccessible ()

    Wraps this handle as Accessible.

    • @r A Accessible object.
  • asBuildable ()

    Wraps this handle as Buildable.

    • @r A Buildable object.
  • asConstraintTarget ()

    Wraps this handle as ConstraintTarget.

    • @r A ConstraintTarget object.
  • connectSignal (string Name, CallbackObj)

    Connects one generated callback wrapper to a named signal.

    • @p Name is the signal name.
    • @p CallbackObj is the generated callback wrapper to connect.
    • @r The connected handler id.
  • disconnectSignalHandler (int HandlerId)

    Disconnects one retained signal handler id.

    • @p HandlerId is the signal handler id to disconnect.
    • @r None.
  • getProperty (string Name)

    Reads one generated property by name.

  • setProperty (string Name, Value)

    Writes one generated property by name.

  • setChild (object Value)

    The main child widget.

    • @p Value is the new property value.
    • @r None.
  • add_overlay (object widget)

    Adds @widget to @overlay. The widget will be stacked on top of the main widget added with [method@Gtk.Overlay.set_child]. The position at which

    • @widget is placed is determined from its [property@Gtk.Widget:halign] and [property@Gtk.Widget:valign] properties.
    • @p widget is a GtkWidget to be added to the container.
    • @r None.
  • get_child ()

    Gets the child widget of @overlay.

  • get_clip_overlay (object widget)

    Gets whether @widget should be clipped within the parent.

    • @p widget is an overlay child of GtkOverlay.
  • get_measure_overlay (object widget)

    Gets whether @widget's size is included in the measurement of @overlay.

    • @p widget is an overlay child of GtkOverlay.
  • remove_overlay (object widget)

    Removes an overlay that was added with gtk_overlay_add_overlay().

    • @p widget is a GtkWidget to be removed.
    • @r None.
  • set_child (object child)

    Sets the child widget of @overlay.

    • @p child is the child widget.
    • @r None.
  • set_clip_overlay (object widget, bool clip_overlay)

    Sets whether @widget should be clipped within the parent.

    • @p widget is an overlay child of GtkOverlay.
    • @p clip_overlay is whether the child should be clipped.
    • @r None.
  • set_measure_overlay (object widget, bool measure)

    Sets whether @widget is included in the measured size of @overlay. The overlay will request the size of the largest child that has this property set to %TRUE. Children who are not included may be drawn outside of

    • @overlay's allocation if they are too large.
    • @p widget is an overlay child of GtkOverlay.
    • @p measure is whether the child should be measured.
    • @r None.

class: OverlayMeta

[286:14] static extends: object

Generated metadata helpers for Overlay class surfaces.

Methods

  • properties ()

    Returns property metadata for Overlay.

    • @r A list.
  • signals ()

    Returns signal metadata for Overlay.

    • @r A list.