const Lang = imports.lang;
const Gio = imports.gi.Gio;
const Gtk = imports.gi.Gtk;

Gtk.init(null, 0);

let window = new Gtk.Window({
    title: "Hello World"
});

let flowbox = new Gtk.FlowBox ();
let model = new Gio.ListStore ();
flowbox.bind_model (model, Lang.bind (this, function (item) {
    log (item.get_label ());

    let child = new Gtk.FlowBoxChild ();
    child.add (item);

    return child;
}));

let item = new Gtk.Label ({
    label: "lala"
});
model.append (item);

window.add (flowbox);
window.show_all();

Gtk.main();
