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 _getGType() static nothrow
GType _gType() @property nothrow
BuilderListItemFactory self() nothrowReturns `this`, for use in `with` statements.
BuilderListItemFactoryGidBuilder builder() static nothrowGet builder for [gtk.builder_list_item_factory.BuilderListItemFactory] Returns: New builder object
glib.bytes.Bytes bytes() @property nothrowGet `bytes` property. Returns: [glib.bytes.Bytes] containing the UI definition.
string resource() @property nothrowGet `resource` property. Returns: Path of the resource containing the UI definition.
gtk.builder_scope.BuilderScope scope_() @property nothrowGet `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) static nothrowCreates 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) static nothrowCreates 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() nothrowGets the data used as the [gtk.builder.Builder] UI template for constructing listitems. Returns: The [gtk.builder.Builder] data
string getResource() nothrowIf the data references a resource, gets the path of that resource. Returns: The path to the resource
gtk.builder_scope.BuilderScope getScope() nothrowGets 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) nothrowSet `bytes` property. Params: propval = [glib.bytes.Bytes] containing the UI definition. Returns: Builder instance for fluent chaining
T resource(string propval) nothrowSet `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) nothrowSet `scope_` property. Params: propval = [gtk.builder_scope.BuilderScope] to use when instantiating listitems Returns: Builder instance for fluent chaining