About my projects, examples and tutorials
Gnome::Gtk4::BuilderListItemFactory

Gnome::Gtk4::BuilderListItemFactory

Description§

Gnome::Gtk4::BuilderListItemFactory is a Gnome::Gtk4::ListItemFactory that creates widgets by instantiating Gnome::Gtk4::Builder UI templates.

The templates must be extending Gnome::Gtk4::ListItem, and typically use Gnome::Gtk4::Expressions to obtain data from the items in the model.

Example:

Uml Diagram§

UNKNOWN image§

=for image :class<inline> :src<asset_files/images/plantuml/BuilderListItemFactory.png> :width<70\%>

Class initialization§

new§

:native-object§

Create an object using a native object from an object of the same type found elsewhere. See also Gnome::N::TopLevelSupportClass.

multi method new ( N-Object() :$native-object! )
Code

new-from-bytes§

Creates a new Gnome::Gtk4::BuilderListItemFactory that instantiates widgets using $bytes as the data to pass to Gnome::Gtk4::Builder.

method new-from-bytes ( N-Object() $scope, N-Object $bytes --> Gnome::Gtk4::BuilderListItemFactory )
Code
  • $scope; A scope to use when instantiating.
  • $bytes; the Gnome::Glib::N-Bytes containing the ui file to instantiate

new-from-resource§

Creates a new Gnome::Gtk4::BuilderListItemFactory that instantiates widgets using data read from the given $resource-path to pass to Gnome::Gtk4::Builder.

method new-from-resource ( N-Object() $scope, Str $resource-path --> Gnome::Gtk4::BuilderListItemFactory )
Code
  • $scope; A scope to use when instantiating.
  • $resource-path; valid path to a resource that contains the data.

Methods§

get-bytes§

Gets the data used as the Gnome::Gtk4::Builder UI template for constructing listitems.

method get-bytes (--> N-Object )
Code

Return value; The Gnome::Gtk4::Builder data.

get-resource§

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

method get-resource (--> Str )
Code

Return value; The path to the resource.

get-scope§

Gets the scope used when constructing listitems.

method get-scope (--> N-Object )
Code

Return value; The scope used when constructing listitems.