Does anyone know how to get the user-selected values from a GtkMultiSelection in Gtk4.jl? I am trying the example code found here and shown below. I can’t seem to find any documentation on how to do it.
using Gtk4
model = GtkStringList(string.(names(Gtk4)))
selmodel = GtkSelectionModel(GtkMultiSelection(GListModel(model)))
function setup_cb(f, list_item) # here `f` is the item factory
set_child(list_item, GtkLabel(""))
end
function bind_cb(f, list_item)
text = list_item[].string
label = get_child(list_item)
label.label = text
end
factory = GtkSignalListItemFactory(setup_cb, bind_cb)
list = GtkListView(selmodel, factory)
win = GtkWindow("Listview demo", 250, 800)
sw = GtkScrolledWindow()
win[] = sw
sw[] = list