File: TextUndo.pod

package info (click to toggle)
perl-tk 1%3A800.025-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 18,444 kB
  • ctags: 19,081
  • sloc: ansic: 206,740; perl: 40,187; makefile: 4,371; sh: 2,373; yacc: 762
file content (73 lines) | stat: -rw-r--r-- 1,628 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73

=head1 NAME

Tk::TextUndo - perl/tk text widget with bindings to undo changes.

=for pm Tk/TextUndo.pm

=for category Derived Widgets

=head1 SYNOPSIS

S<    >B<use Tk::TextUndo;>

S<    >I<$testundo> = I<$parent>-E<gt>B<TextUndo>(?I<-option>=E<gt>I<value>, ...?);

=head1 DESCRIPTION

This IS-A text widget with an unlimited 'undo' history but without
a re'undo' capability.

=head2 Bindings

The C<TextUndo> widget has the same bindings as the L<Text|Tk::Text> widget.
In addition there are the following bindings:

=over 4

=item Event <L4> <<Undo>>

undo the last change.  Pressing <L4> several times undo
step by step the changes made to the text widget.

=back

=head2 Methods

The C<TextUndo> widget has the same methods as C<Text> widget.
Additional methods for the C<TextUndo> widget are:

=over 4

=item $text->Load($filename);

Loads the contents of the $filename into the text widget. Load()
delete the previous contents of the text widget as well as it's
undo history of the previous file.

=item $text->Save(?$otherfilename?)

Save contents of the text widget to a file. If the
$otherfilename is not specified, the text widget contents
writes the file of $filename used in the last Load()
call.  If no file was previously Load()'ed an error message
pops up.  The default filename of the last Load() call
is not overwriten by $otherfilename.

=item $text->FileName(?$otherfilename?)

If passed an argument sets the file name associated with the loaded
document. Returns the current file name associated with the document.

=back

=head1 KEYS

widget, text, undo

=head1 SEE ALSO

L<Tk::Text>, L<Tk::ROText>

=cut