The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Tk::XText - Extended Text widget

SYNOPSIS

 require Tk::XText;
 my $text= $window->XText(@options)->pack;

DESCRIPTION

Tk::XText inherits Tk::Text. It adds an advanced Undo/Redo stack, facilities for indenting and unindenting, commenting and uncommenting and autoindendation.

It's main purpose is to serve as the text widget in the Tk::CodeText mega widget.

The options and methods below are only documented if they are not available within the Tk::CodeText context. Otherwise see there.

OPTIONS

Name: autoIndent
Class: AutoIndent
Switch: -autoindent

.

Switch: -findandreplacecall

.

Name: indentStyle
Class: IndentStyle
Switch: -indentstyle

.

Switch: -logcall

.

Name: match
Class: Match
Switch: -match

.

Switch: -menuitems

.

Switch: -matchoptions

.

Switch: -mlcommentend

The end string of a multi line comment.

Switch: -mlcommentstart

The start string of a multi line comment.

Switch: -modifycall

This callback is called every time text is modified. used in Tk::Codetext for adjusting line numbers and triggering syntax highlighting/code folding.

Switch: -slcomment

The start string of a single line comment.

EVENTS AND KEYBINDINGS

Besides the events of l<Tk::Text>, this module responds to the following events and bindings:

 Event:         Key:
 <<Find>>       F8
 <<Replace>>    F9
 <<Indent>>     CONTROL+J
 <<UnIndent>>   CONTROL+SHIFT+J or CONTROL+TAB
 <<Comment>>    CONTROL+G
 <<UnComment>>  CONTROL+SHIFT+G
 <<Undo>>       CONTROL+Z
 <<Redo>>       CONTROL+SHIFT+Z

Further more, CONTROL+A selects all text.

METHODS

canUndo
canRedo
clear
comment
getFontInfo
goTo
indent
linenumber
load
log
redo
save
saveExport($file)
selectionExists
uncomment
undo
unindent
visualBegin
visualEnd

AUTHOR

Hans Jeuken (hanje at cpan dot org)

BUGS

Unknown. If you find any, please contact the author.

TODO

SEE ALSO