Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: BuilderListItemFactoryMeta

[175:14] static extends: object

Generated metadata helpers for BuilderListItemFactory class surfaces.

Methods

  • properties ()

    Returns property metadata for BuilderListItemFactory.

    • @r A list.

class: BuilderListItemFactoryCtors

[153:14] static extends: object

Alternate constructors for BuilderListItemFactory. Usage: BuilderListItemFactoryCtors.<name>(...). The primary constructor lives directly on BuilderListItemFactory.

Methods

  • newFromResource (object scope, string resource_path)

    Creates a new GtkBuilderListItemFactory that instantiates widgets using data read from the given @resource_path to pass to GtkBuilder.

    • @p scope is A scope to use when instantiating.
    • @p resource_path is valid path to a resource that contains the UI definition.
    • @r A new BuilderListItemFactory.

class: BuilderListItemFactory

[24:7] extends: object

Creates widgets by instantiating GtkBuilder UI templates. The templates must extend the class that the parent widget expects. For example, a factory provided to [property@Gtk.ListView:factory] must have a template that extends [class@Gtk.ListItem]. Templates typically use [class@Gtk.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.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • BuilderListItemFactory (scope = null, bytes = null)

    Creates a new GtkBuilderListItemFactory that instantiates widgets using

    • @bytes as the data to pass to GtkBuilder.
    • @p scope is A scope to use when instantiating.
    • @p bytes is the GBytes containing the UI definition to instantiate.
  • toNativeHandle (Source)

    Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from fn.call(...), another generated wrapper exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • asListItemFactory ()

    Wraps this handle as ListItemFactory.

    • @r A ListItemFactory object.
  • get_bytes ()

    Gets the data used as the GtkBuilder UI template for constructing listitems.

  • get_resource ()

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

  • get_scope ()

    Gets the scope used when constructing listitems.