gtk.builder_list_item_factory

Module for BuilderListItemFactory class

Types 3

gtk.builder_list_item_factory.BuilderListItemFactory is a gtk.list_item_factory.ListItemFactory that creates widgets by instantiating gtk.builder.Builder UI templates.

The templates must be extending gtk.list_item.ListItem, and typically use gtk.expression.Expressions to obtain data from the items in the model.

Example:

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

Methods
GType _gType() @property
BuilderListItemFactory self()Returns `this`, for use in `with` statements.
BuilderListItemFactoryGidBuilder builder()Get builder for [gtk.builder_list_item_factory.BuilderListItemFactory] Returns: New builder object
glib.bytes.Bytes bytes() @propertyGet `bytes` property. Returns: [glib.bytes.Bytes] containing the UI definition.
string resource() @propertyGet `resource` property. Returns: Path of the resource containing the UI definition.
gtk.builder_scope.BuilderScope scope_() @propertyGet `scope_` property. Returns: [gtk.builder_scope.BuilderScope] to use when instantiating listitems
gtk.builder_list_item_factory.BuilderListItemFactory newFromBytes(gtk.builder_scope.BuilderScope scope_, glib.bytes.Bytes bytes)Creates a new [gtk.builder_list_item_factory.BuilderListItemFactory] that instantiates widgets using bytes as the data to pass to [gtk.builder.Builder].
gtk.builder_list_item_factory.BuilderListItemFactory newFromResource(gtk.builder_scope.BuilderScope scope_, string resourcePath)Creates a new [gtk.builder_list_item_factory.BuilderListItemFactory] that instantiates widgets using data read from the given resource_path to pass to [gtk.builder.Builder].
glib.bytes.Bytes getBytes()Gets the data used as the [gtk.builder.Builder] UI template for constructing listitems. Returns: The [gtk.builder.Builder] data
string getResource()If the data references a resource, gets the path of that resource. Returns: The path to the resource
gtk.builder_scope.BuilderScope getScope()Gets the scope used when constructing listitems. Returns: The scope used when constructing listitems
Constructors
this(void * ptr, Flag!"Take" take)

Fluent builder implementation template for gtk.builder_list_item_factory.BuilderListItemFactory

Methods
T bytes(glib.bytes.Bytes propval)Set `bytes` property. Params: propval = [glib.bytes.Bytes] containing the UI definition. Returns: Builder instance for fluent chaining
T resource(string propval)Set `resource` property. Params: propval = Path of the resource containing the UI definition. Returns: Builder instance for fluent chaining
T scope_(gtk.builder_scope.BuilderScope propval)Set `scope_` property. Params: propval = [gtk.builder_scope.BuilderScope] to use when instantiating listitems Returns: Builder instance for fluent chaining