Creates widgets by instantiating GtkBuilder UI templates.
The templates must extend the class that the parent widget expects. For example, a factory provided to [propertyGtk.ListView:factory] must have a template that extends [classGtk.ListItem].
Templates typically use [classGtk.Expression] 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>
A common approach is to embed such templates as CDATA marked sections into a surrounding UI file. Note that if you use this approach, extracting translatable strings with xgettext will not work for strings inside the marked section.
Bytes_Property : constant Glib.Properties.Property_Boxed;
Type: GLib.Bytes GBytes containing the UI definition.
function Get_Bytes
(Self : not null access Gtk_Builder_List_Item_Factory_Record)
return Glib.Bytes.Gbytes
Gets the data used as the GtkBuilder UI template for constructing listitems.
The GtkBuilder data. Has transfer-ownership='none'.
function Get_Resource
(Self : not null access Gtk_Builder_List_Item_Factory_Record)
return UTF8_String
If the data references a resource, gets the path of that resource.
The path to the resource
function Get_Scope
(Self : not null access Gtk_Builder_List_Item_Factory_Record)
return Gtk.Builder_Scope.Gtk_Builder_Scope
Gets the scope used when constructing listitems.
The scope used when constructing listitems
function Get_Type return Glib.GType
type Gtk_Builder_List_Item_Factory is access all Gtk_Builder_List_Item_Factory_Record'Class;
function Gtk_Builder_List_Item_Factory_New_From_Bytes
(Scope : Gtk.Builder_Scope.Gtk_Builder_Scope;
Bytes : Glib.Bytes.Gbytes) return Gtk_Builder_List_Item_Factory
Creates a new GtkBuilderListItemFactory that instantiates widgets using Bytes as the data to pass to GtkBuilder.
A scope to use when instantiating
the GBytes containing the UI definition to instantiate
function Gtk_Builder_List_Item_Factory_New_From_Resource
(Scope : Gtk.Builder_Scope.Gtk_Builder_Scope;
Resource_Path : UTF8_String) return Gtk_Builder_List_Item_Factory
Creates a new GtkBuilderListItemFactory that instantiates widgets using data read from the given Resource_Path to pass to GtkBuilder.
A scope to use when instantiating
valid path to a resource that contains the UI definition
type Gtk_Builder_List_Item_Factory_Record is new Gtk_List_Item_Factory_Record with null record;
procedure Gtk_New_From_Bytes
(Self : out Gtk_Builder_List_Item_Factory;
Scope : Gtk.Builder_Scope.Gtk_Builder_Scope;
Bytes : Glib.Bytes.Gbytes)
Creates a new GtkBuilderListItemFactory that instantiates widgets using Bytes as the data to pass to GtkBuilder. Initialize_From_Bytes does nothing if the object was already created with another call to Initialize* or G_New.
A scope to use when instantiating
the GBytes containing the UI definition to instantiate
procedure Gtk_New_From_Resource
(Self : out Gtk_Builder_List_Item_Factory;
Scope : Gtk.Builder_Scope.Gtk_Builder_Scope;
Resource_Path : UTF8_String)
Creates a new GtkBuilderListItemFactory that instantiates widgets using data read from the given Resource_Path to pass to GtkBuilder. Initialize_From_Resource does nothing if the object was already created with another call to Initialize* or G_New.
A scope to use when instantiating
valid path to a resource that contains the UI definition
procedure Initialize_From_Bytes
(Self : not null access Gtk_Builder_List_Item_Factory_Record'Class;
Scope : Gtk.Builder_Scope.Gtk_Builder_Scope;
Bytes : Glib.Bytes.Gbytes)
Creates a new GtkBuilderListItemFactory that instantiates widgets using Bytes as the data to pass to GtkBuilder. Initialize_From_Bytes does nothing if the object was already created with another call to Initialize* or G_New.
A scope to use when instantiating
the GBytes containing the UI definition to instantiate
procedure Initialize_From_Resource
(Self : not null access Gtk_Builder_List_Item_Factory_Record'Class;
Scope : Gtk.Builder_Scope.Gtk_Builder_Scope;
Resource_Path : UTF8_String)
Creates a new GtkBuilderListItemFactory that instantiates widgets using data read from the given Resource_Path to pass to GtkBuilder. Initialize_From_Resource does nothing if the object was already created with another call to Initialize* or G_New.
A scope to use when instantiating
valid path to a resource that contains the UI definition
Resource_Property : constant Glib.Properties.Property_String;
Path of the resource containing the UI definition.
Scope_Property : constant Glib.Properties.Property_Interface;
Type: Gtk.Builder_Scope.Gtk_Builder_Scope GtkBuilderScope to use when instantiating listitems