gi-gtk-4.0.4: Gtk bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Gtk.Objects.BuilderListItemFactory

Description

BuilderListItemFactory is a ListItemFactory that creates widgets by instantiating Builder UI templates. The templates must be extending ListItem, and typically use GtkExpressions to obtain data from the items in the model.

Example: > > interface > class="GtkListItem" > name="child" > class="GtkLabel" > name="xalign"0/property > name="label" > name="name" type="SettingsKey" > name="item"GtkListItem/lookup > /lookup > /binding > /object > /property > /template > /interface

Synopsis

Exported types

class (GObject o, IsDescendantOf BuilderListItemFactory o) => IsBuilderListItemFactory o Source #

Type class for types which can be safely cast to BuilderListItemFactory, for instance with toBuilderListItemFactory.

Instances

Instances details
(GObject o, IsDescendantOf BuilderListItemFactory o) => IsBuilderListItemFactory o Source # 
Instance details

Defined in GI.Gtk.Objects.BuilderListItemFactory

toBuilderListItemFactory :: (MonadIO m, IsBuilderListItemFactory o) => o -> m BuilderListItemFactory Source #

Cast to BuilderListItemFactory, for types for which this is known to be safe. For general casts, use castTo.

Methods

getBytes

builderListItemFactoryGetBytes Source #

Arguments

:: (HasCallStack, MonadIO m, IsBuilderListItemFactory a) 
=> a

self: a BuilderListItemFactory

-> m Bytes

Returns: The GtkBuilder data

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

getResource

builderListItemFactoryGetResource Source #

Arguments

:: (HasCallStack, MonadIO m, IsBuilderListItemFactory a) 
=> a

self: a BuilderListItemFactory

-> m (Maybe Text)

Returns: The path to the resource or Nothing if none

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

getScope

builderListItemFactoryGetScope Source #

Arguments

:: (HasCallStack, MonadIO m, IsBuilderListItemFactory a) 
=> a

self: a BuilderListItemFactory

-> m (Maybe BuilderScope)

Returns: The scope used when constructing listitems

Gets the scope used when constructing listitems.

newFromBytes

builderListItemFactoryNewFromBytes Source #

Arguments

:: (HasCallStack, MonadIO m, IsBuilderScope a) 
=> Maybe a

scope: A scope to use when instantiating

-> Bytes

bytes: the bytes containing the ui file to instantiate

-> m BuilderListItemFactory

Returns: a new BuilderListItemFactory

Creates s new BuilderListItemFactory that instantiates widgets using bytes as the data to pass to Builder.

newFromResource

builderListItemFactoryNewFromResource Source #

Arguments

:: (HasCallStack, MonadIO m, IsBuilderScope a) 
=> Maybe a

scope: A scope to use when instantiating

-> Text

resourcePath: valid path to a resource that contains the data

-> m BuilderListItemFactory

Returns: a new BuilderListItemFactory

Creates s new BuilderListItemFactory that instantiates widgets using data read from the given resourcePath to pass to Builder.

Properties

bytes

bytes containing the UI definition

constructBuilderListItemFactoryBytes :: (IsBuilderListItemFactory o, MonadIO m) => Bytes -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “bytes” property. This is rarely needed directly, but it is used by new.

getBuilderListItemFactoryBytes :: (MonadIO m, IsBuilderListItemFactory o) => o -> m Bytes Source #

Get the value of the “bytes” property. When overloading is enabled, this is equivalent to

get builderListItemFactory #bytes

resource

resource containing the UI definition

constructBuilderListItemFactoryResource :: (IsBuilderListItemFactory o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “resource” property. This is rarely needed directly, but it is used by new.

getBuilderListItemFactoryResource :: (MonadIO m, IsBuilderListItemFactory o) => o -> m (Maybe Text) Source #

Get the value of the “resource” property. When overloading is enabled, this is equivalent to

get builderListItemFactory #resource

scope

scope to use when instantiating listitems

constructBuilderListItemFactoryScope :: (IsBuilderListItemFactory o, MonadIO m, IsBuilderScope a) => a -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “scope” property. This is rarely needed directly, but it is used by new.

getBuilderListItemFactoryScope :: (MonadIO m, IsBuilderListItemFactory o) => o -> m (Maybe BuilderScope) Source #

Get the value of the “scope” property. When overloading is enabled, this is equivalent to

get builderListItemFactory #scope