Tk::TextUndo - perl/tk text widget with bindings to undo changes. use Tk::TextUndo; $testundo = $parent->TextUndo(?-option=>value, ...?); This IS-A text widget with an unlimited 'undo' history but without a re'undo' capability.
Bindings The "TextUndo" widget has the same bindings as the Text widget. In addition there are the following bindings: undo the last change. Pressing <L4> several times undo step by step the changes made to the text widget.
Extended Methods The "TextUndo" widget is derived from and has the same methods as "Text" widget. In addition, the extended text widget methods as documented in "Mastering Perl/Tk" are included in this pod (with permission from the author, Steve Lidie). Displays a messageBox that says "Save Edits?". Returns 0 if yes or cancel, 1 if no. Displays a messageBox that says "Save Edits?". The widget is cleared if the reply is no. Destroys the widget if you answer yes. Creates a popup file browser to select a filename. Deletes string from the start of every selected line. Deletes all text and undo/redo information; undefs the filename. Optionally updates the current filename to pathName. Returns the current filename. Similar to Load, except it does not call EmptyDocument first. Inserts string at the start of every selected line. Loads the contents of pathName into the widget. Load() delete the previous contents of the widget as well as it's undo history. Returns the number of current undo operations. Redoes the previous operation. Deletes all undo and redo information. Saves the contents of the widget to a file. If pathName is not specified, the filename from the last Load call is used. If no file was previously loaded an error message pops up. The default filename of the last Load call is not overwriten by pathName. Returns the number of current redo operations. Undoes the previous operation. widget, text, undo Tk::Text, Tk::ROText