BuilderListItemFactory

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.

Members

Functions

getBytes
glib.bytes.Bytes getBytes()

Gets the data used as the gtk.builder.Builder UI template for constructing listitems.

getResource
string getResource()

If the data references a resource, gets the path of that resource.

getScope
gtk.builder_scope.BuilderScope getScope()

Gets the scope used when constructing listitems.

Static functions

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

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

Examples

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