Class Overlay.Builder<B extends Overlay.Builder<B>>

Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
Accessible.Builder<B>, BuilderInterface
Enclosing class:
Overlay

public static class Overlay.Builder<B extends Overlay.Builder<B>> extends Widget.Builder<B> implements Accessible.Builder<B>
Inner class implementing a builder pattern to construct a GObject with properties.
  • Constructor Details

    • Builder

      protected Builder()
      Default constructor for a Builder object.
  • Method Details

    • build

      public Overlay build()
      Finish building the Overlay object. This will call GObject.withProperties(Type, String[], Value[]) to create a new GObject instance, which is then cast to Overlay.
      Overrides:
      build in class Widget.Builder<B extends Overlay.Builder<B>>
      Returns:
      a new instance of Overlay with the properties that were set in the Builder object.
    • setChild

      public B setChild(Widget child)
      The main child widget.
      Parameters:
      child - the value for the child property
      Returns:
      the Builder instance is returned, to allow method chaining
    • onGetChildPosition

      public B onGetChildPosition(Overlay.GetChildPositionCallback handler)

      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 Align.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.

      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      See Also: