Class LayoutChild

All Implemented Interfaces:
Proxy
Direct Known Subclasses:
ConstraintLayoutChild, FixedLayoutChild, GridLayoutChild, LayoutChild.LayoutChild$Impl, OverlayLayoutChild

@Generated("org.javagi.JavaGI") public abstract class LayoutChild extends GObject

The base class for objects that are meant to hold layout properties.

If a GtkLayoutManager has per-child properties, like their packing type, or the horizontal and vertical span, or the icon name, then the layout manager should use a GtkLayoutChild implementation to store those properties.

A GtkLayoutChild instance is only ever valid while a widget is part of a layout.

  • Constructor Details

    • LayoutChild

      public LayoutChild(MemorySegment address)
      Create a LayoutChild instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • LayoutChild

      public LayoutChild()
      Create a new LayoutChild.
  • Method Details

    • getType

      public static @Nullable Type getType()
      Get the GType of the LayoutChild class.
      Returns:
      the GType
    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • asParent

      protected LayoutChild asParent()
      Return this instance as if it were its parent type. Comparable to the Java super keyword, but ensures the parent typeclass is also used in native code.
      Overrides:
      asParent in class GObject
      Returns:
      the instance as if it were its parent type
    • getChildWidget

      public Widget getChildWidget()
      Retrieves the GtkWidget associated to the given layoutChild.
      Returns:
      a GtkWidget
    • getLayoutManager

      public LayoutManager getLayoutManager()
      Retrieves the GtkLayoutManager instance that created the given layoutChild.
      Returns:
      a GtkLayoutManager