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

GI.Gtk.Objects.BuilderListItemFactory

Description

GtkBuilderListItemFactory is a GtkListItemFactory that creates widgets by instantiating GtkBuilder UI templates.

The templates must be extending GtkListItem, and typically use GtkExpressions to obtain data from the items in the model.

Example:

xml code

 <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>
Synopsis

Exported types

newtype BuilderListItemFactory Source #

Memory-managed wrapper type.

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 GtkBuilderListItemFactory

-> m Bytes

Returns: The GtkBuilder data

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

getResource

builderListItemFactoryGetResource Source #

Arguments

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

self: a GtkBuilderListItemFactory

-> m (Maybe Text)

Returns: The path to the resource

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

getScope

builderListItemFactoryGetScope Source #

Arguments

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

self: a GtkBuilderListItemFactory

-> 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 GBytes containing the ui file to instantiate

-> m BuilderListItemFactory

Returns: a new GtkBuilderListItemFactory

Creates a new GtkBuilderListItemFactory that instantiates widgets using bytes as the data to pass to GtkBuilder.

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 GtkBuilderListItemFactory

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

Properties

bytes

GBytes 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

Path of the 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

GtkBuilderScope 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