#!/usr/local/bin/wish -f

source new.tcl
source textundo.tcl

pack [text .t -width 40 -height 5]
set id [new textUndoer .t]

pack\
    [button .insert -text Insert -command {.t insert insert "some text" t " inserted through insert command"}]\
    [button .undo -text "Undo (or ^U)" -command "textUndoer--undo $id"]\
    [button .reset -text Reset -command "textUndoer--reset $id"]\
    -side left
pack [button .d -text Delete -command "delete textUndoer $id"]
