Class BuilderListItemFactory

All Implemented Interfaces:
PointerInterface

public class BuilderListItemFactory extends ListItemFactory
`GtkBuilderListItemFactory` is a `GtkListItemFactory` that creates
widgets by instantiating `GtkBuilder` UI templates.

The templates must be extending `GtkListItem`, and typically use
`GtkExpression`s to obtain data from the items in the model.

Example:
```xml
<interface>
<template class="GtkListItem">
<property name="child">
<object class="GtkLabel">
<property name="xalign">0</property>
<binding name="label">
<lookup name="name" type="SettingsKey">
<lookup name="item">GtkListItem</lookup>
</lookup>
</binding>
</object>
</property>
</template>
</interface>
```

https://docs.gtk.org/gtk4/class.BuilderListItemFactory.html

  • Constructor Details

    • BuilderListItemFactory

      public BuilderListItemFactory(PointerContainer pointer)
  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • newFromBytesBuilderListItemFactory

      public static BuilderListItemFactory newFromBytesBuilderListItemFactory(@Nullable BuilderScope scope, @Nonnull Bytes bytes)
      Creates a new `GtkBuilderListItemFactory` that instantiates widgets
      using @bytes as the data to pass to `GtkBuilder`.
      Parameters:
      scope - A scope to use when instantiating
      bytes - the `GBytes` containing the ui file to instantiate
      Returns:
      a new `GtkBuilderListItemFactory`
    • newFromResourceBuilderListItemFactory

      public static BuilderListItemFactory newFromResourceBuilderListItemFactory(@Nullable BuilderScope scope, @Nonnull Str resource_path)
      Creates a new `GtkBuilderListItemFactory` that instantiates widgets
      using data read from the given @resource_path to pass to `GtkBuilder`.
      Parameters:
      scope - A scope to use when instantiating
      resource_path - valid path to a resource that contains the data
      Returns:
      a new `GtkBuilderListItemFactory`
    • newFromResourceBuilderListItemFactory

      public static BuilderListItemFactory newFromResourceBuilderListItemFactory(@Nullable BuilderScope scope, String resource_path)
      Creates a new `GtkBuilderListItemFactory` that instantiates widgets
      using data read from the given @resource_path to pass to `GtkBuilder`.
      Parameters:
      scope - A scope to use when instantiating
      resource_path - valid path to a resource that contains the data
      Returns:
      a new `GtkBuilderListItemFactory`
    • getBytes

      public Bytes getBytes()
      Gets the data used as the `GtkBuilder` UI template for constructing
      listitems.
      Returns:
      The `GtkBuilder` data
    • getResource

      public Str getResource()
      If the data references a resource, gets the path of that resource.
      Returns:
      The path to the resource
    • getScope

      public BuilderScope getScope()
      Gets the scope used when constructing listitems.
      Returns:
      The scope used when constructing listitems
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()