adamc@916: fun draggableList title items =
adamc@916: itemSources <- List.mapM source items;
adamc@916: draggingItem <- source None;
adamc@916: return
adamc@916: Great {[title]}
adamc@916:
adamc@916: {List.mapX (fn itemSource =>
adamc@916: return ()
adamc@917: | Some di => original <- get di;
adamc@917: movedOver <- get itemSource;
adamc@917: set di movedOver;
adamc@917: set itemSource original;
adamc@917: set draggingItem (Some itemSource)}>
adamc@918:
adamc@916: ) itemSources}
adamc@916:
adamc@916:
adamc@916:
adamc@916: fun main () =
adamc@916: bears <- draggableList "Bears" ("Pooh" :: "Paddington" :: "Rupert" :: "Edward" :: []);
adamc@916: beers <- draggableList "Beers" ("Budvar" :: "Delirium Tremens" :: "Deuchars" :: []);
adamc@916: boars <- draggableList "Boars" ("Sus scrofa scrofa"
adamc@916: :: "Sus scrofa ussuricus"
adamc@916: :: "Sus scrofa cristatus"
adamc@916: :: "Sus scrofa taiwanus" :: []);
adamc@917: return
adamc@917:
adamc@917:
adamc@917:
adamc@917:
adamc@917: {bears}
adamc@917: {beers}
adamc@917: {boars}
adamc@917:
adamc@917: