Package: gtk

Class gtk:map-list-model

Superclasses

gio:list-model, gtk:section-model, gobject:object, common-lisp:standard-object, common-lisp:t

Documented Subclasses

None

Direct Slots

has-map
The has-map property of type :boolean (Read)
Whether a map function is set for this model.
Default value: false
item-type
The item-type property of type g:type-t (Read)
The type of items. Since 4.8
model
The model property of type g:list-model (Read / Write / Construct only)
The model being mapped.
n-items
The n-items property of type :uint (Read / Write)
The number of items. Since 4.8
Default value: 0

Details

The gtk:map-list-model object is a list model that takes a list model and maps the items in that model to different items according to a gtk:map-list-model-map-func callback function.

Examples

Create a list of gtk:event-controller objects.
(let* (...
       (widgets (gtk:widget-observe-children widget))
       (controllers (gtk:map-list-model-new widgets
                           (lambda (item)
                             (gtk:widget-observe-controllers item))))
       (model (gtk:flatten-list-model-new controllers)))
  ... )    
The gtk:map-list-model object will attempt to discard the mapped objects as soon as they are no longer needed and recreate them if necessary.
 

Returned by

Slot Access Functions

Inherited Slot Access Functions

See also

2024-12-15