Package ch.bailu.gtk.gtk
Class BuilderListItemFactory
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.gobject.Object
ch.bailu.gtk.gtk.ListItemFactory
ch.bailu.gtk.gtk.BuilderListItemFactory
- All Implemented Interfaces:
PointerInterface
`GtkBuilderListItemFactory` is a `GtkListItemFactory` that creates
widgets by instantiating `GtkBuilder` UI templates.
The templates must be extending `GtkListItem`, and typically use
`GtkExpression`s 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>
```
widgets by instantiating `GtkBuilder` UI templates.
The templates must be extending `GtkListItem`, and typically use
`GtkExpression`s 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>
```
-
Nested Class Summary
Nested classes/interfaces inherited from class ch.bailu.gtk.gobject.Object
Object.OnBindingTransformFunc, Object.OnDestroyNotify, Object.OnDuplicateFunc, Object.OnNotify, Object.OnToggleNotify, Object.OnWeakNotify
-
Field Summary
Fields inherited from class ch.bailu.gtk.gobject.Object
SIGNAL_ON_NOTIFY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetBytes()
Gets the data used as the `GtkBuilder` UI template for constructing
listitems.static ClassHandler
static int
static long
static TypeSystem.TypeSize
If the data references a resource, gets the path of that resource.getScope()
Gets the scope used when constructing listitems.static long
static TypeSystem.TypeSize
static BuilderListItemFactory
newFromBytesBuilderListItemFactory
(BuilderScope scope, Bytes bytes) Creates a new `GtkBuilderListItemFactory` that instantiates widgets
using @bytes as the data to pass to `GtkBuilder`.static BuilderListItemFactory
newFromResourceBuilderListItemFactory
(BuilderScope scope, Str resource_path) Creates a new `GtkBuilderListItemFactory` that instantiates widgets
using data read from the given @resource_path to pass to `GtkBuilder`.static BuilderListItemFactory
newFromResourceBuilderListItemFactory
(BuilderScope scope, String resource_path) Creates a new `GtkBuilderListItemFactory` that instantiates widgets
using data read from the given @resource_path to pass to `GtkBuilder`.Methods inherited from class ch.bailu.gtk.gobject.Object
addToggleRef, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, disconnect, disconnect, dupData, dupData, dupQdata, forceFloating, freezeNotify, get, get, getData, getData, getProperty, getProperty, getQdata, interfaceFindProperty, interfaceInstallProperty, isFloating, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, replaceData, replaceData, replaceQdata, runDispose, set, set, setData, setData, setDataFull, setDataFull, setProperty, setProperty, setQdata, setQdataFull, stealData, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref
Methods inherited from class ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Methods inherited from class ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Constructor Details
-
BuilderListItemFactory
-
-
Method Details
-
getClassHandler
-
newFromBytesBuilderListItemFactory
public static BuilderListItemFactory newFromBytesBuilderListItemFactory(@Nullable BuilderScope scope, @Nonnull Bytes bytes) Creates a new `GtkBuilderListItemFactory` that instantiates widgets
using @bytes as the data to pass to `GtkBuilder`.- Parameters:
scope
- A scope to use when instantiatingbytes
- the `GBytes` containing the ui file to instantiate- Returns:
- a new `GtkBuilderListItemFactory`
-
newFromResourceBuilderListItemFactory
public static BuilderListItemFactory newFromResourceBuilderListItemFactory(@Nullable BuilderScope scope, @Nonnull Str resource_path) Creates a new `GtkBuilderListItemFactory` that instantiates widgets
using data read from the given @resource_path to pass to `GtkBuilder`.- Parameters:
scope
- A scope to use when instantiatingresource_path
- valid path to a resource that contains the data- Returns:
- a new `GtkBuilderListItemFactory`
-
newFromResourceBuilderListItemFactory
public static BuilderListItemFactory newFromResourceBuilderListItemFactory(@Nullable BuilderScope scope, String resource_path) Creates a new `GtkBuilderListItemFactory` that instantiates widgets
using data read from the given @resource_path to pass to `GtkBuilder`.- Parameters:
scope
- A scope to use when instantiatingresource_path
- valid path to a resource that contains the data- Returns:
- a new `GtkBuilderListItemFactory`
-
getBytes
Gets the data used as the `GtkBuilder` UI template for constructing
listitems.- Returns:
- The `GtkBuilder` data
-
getResource
If the data references a resource, gets the path of that resource.- Returns:
- The path to the resource
-
getScope
Gets the scope used when constructing listitems.- Returns:
- The scope used when constructing listitems
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-