NAME

Tk::Text::SuperText - An improved text widget for perl/tk

SYNOPSIS

$super_text = $paren->SuperText(?options?);

STANDARD OPTIONS

-background -highlightbackground -insertontime -selectborderwidth -borderwidth -highlightcolor -insertwidth -selectforeground -cursor -highlightthickness -padx -setgrid -exportselection -insertbackground -pady -takefocus -font -insertborderwidth -relief -xscrollcommand -foreground -insertofftime -selectbackground -yscrollcommand

See Tk::options for details of the standard options.

-height -spacing1 -spacing2 -spacing3 -state -tabs -width -wrap

See Tk::Text for details of theis options.

WIDGET-SPECIFIC OPTIONS

Name: indentMode
Class: IndentMode
Switch: -indentmode

Specifies how to indent when a new line is inserted in the text. The possible modes are none for no indent at all or auto for positioning the insertion cursor right below the first non-white space character of the previous line.

Name: undoDepth
Class: UndoDepth
Switch: -undodepth

Sets the maximum depth for the undo buffer:a number specifies the numbers of insert or delete operations that can be stored in the buffer before the oldest one is poped out and forgotten;0 stops the undo feature,undef sets unlimited depth.

Name: redoDepth
Class: RedoDepth
Switch: -redodepth

Sets the maximum depth for the redo buffer:a number specifies the numbers of undo operations that can be stored in the buffer before the oldest one is poped out and forgotten;0 stops the redo feature,undef sets unlimited depth.

Name: showMatching
Class: ShowMatching
Switch: -showmatching

With a value of 1 activates the matching parentheses feature.0 deactivates it.

Name: matchForeground
Class: MatchForeground
Switch: -matchforeground

Set the foreground color for the char hilighted by the match-parentheses command.

Name: showMatching
Class: ShowMatching
Switch: -matchbackground

Set the background color for the char hilighted by the match-parentheses command.

Name: matchingCouples
Class: MatchingCouples
Switch: -matchingcouples

Sets the chars that are searched for a matching counterpart. The format is a simple string with matching chars coupled in left-right order; here's an example: {}[]()"" . For double couples ("") the match is done only on the forwarding chars.

Name: insertMode
Class: InsertMode
Switch: -insertmode

Sets the default insert mode: insert or overwrite .

DESCRIPTION

Tk::Text::SuperText implements many new features over the standard Tk::Text widget while supporting all it's standard features.Its used simply as the Tk::Text widget. New Features:

  • Unlimited undo/redo.

    So you can undo and redo whatever you deleted/inserted whenever you want. To reset the undo and redo buffers call this method: $w->resetUndo;

  • Rectangular selections.

    Rectangular text zones can be selected,copied,deleted,shifted with the mouse or with the keyboard.

  • Selection right/left char and tab shift.

    Text selections can be shifted left/right of one or more chars or a tabs.

  • Normal and 'inline' selection paste.

    The 'normal' paste is the normal text paste you know :

    Paste Buffer:

    line x

    line y

    Text Buffer:

    line 1

    line2

    Normal paste at line 1:

    line x

    line y

    line 1

    line 2

    The 'inline' paste work as this:
    Inline paste at line 1:

    line x line 1

    line y line 2

  • Parentheses matching.

    To help you inspect nested parentheses,brackets and other characters,SuperText has both an automatic parenthesis matching mode,and a find matching command. Automatic parenthesis matching is activated when you type or when you move the insertion cursor after a parenthesis.It momentarily highlightsthe matching character if that character is visible in the window.To find a matching character anywhere in the file,position the cursor after the it,and call the find matching command.

  • Autoindenting.

    When you press the Return or Enter key,spaces and tabs are inserted to line up the insert point under the start of the previous line.

  • Control codes insertion.

    You can directly insert a non printable control character in the text.

  • Commands are managed via virtual events.

    Every SuperText command is binded to a virtual event,so to call it or to bind it to a key sequence use the Tk::event functions. I used this format for key bind so there's no direct key-to-command bind,and this give me more flexibility;however you can use normal binds.

    Example: $w->eventAdd('Tk::Text::SuperText','<<SelectAll>>','<Control-a>');

    To set default events bindigs use this methos: $w->bindDefault;

  • Key bindings are sometimes redefined (not really a feature :).

    Virtual Event/Command Default Key Binding

    MouseSetInsert <Button1> MouseSelect <B1-Motion> MouseSelectWord <Double-1> MouseSelectLine <Triple-1> MouseSelectAdd <Shift-1> MouseSelectAddWord <Double-Shift-1> MouseSelectAddLine <Triple-Shift-1> MouseSelectAutoScan <B1-Leave> MouseSelectAutoScanStop <B1-Enter>,<ButtonRelease-1> MouseMoveInsert <Alt-1> MouseRectSelection <Control-B1-Motion> MouseMovePageTo <2> MouseMovePage <B2-Motion> MousePasteSelection <ButtonRelease-2>

    MoveLeft <Left> SelectLeft <Shift-Left> SelectRectLeft <Shift-Alt-Left> MoveLeftWord <Control-Left> SelectLeftWord <Shift-Control-Left> MoveRight <Right> SelectRight <Shift-Right> SelectRectRight <Shift-Alt-Right> MoveRightWord <Control-Right> SelectRightWord <Shift-Control-Right> MoveUp <Up> SelectUp <Shift-Up> SelectRectUp <Shift-Alt-Up> MoveUpParagraph <Control-Up> SelectUpParagraph <Shift-Control-Up> MoveDown <Down> SelectDown <Shift-Down> SelectRectDown <Shift-Alt-Down> MoveDownParagraph <Control-Down> SelectDownParagraph <Shift-Control-Down> MoveLineStart <Home> SelectToLineStart <Shift-Home> MoveTextStart <Control-Home> SelectToTextStart <Shift-Control-Home> MoveLineEnd <End> SelectToLineEnd <Shift-End> MoveTextEnd <Control-End> SelectToTextEnd <Shift-Control-End> MovePageUp <Prior> SelectToPageUp <Shift-Prior> MovePageLeft <Control-Prior> MovePageDown <Next> SelectToPageDown <Shift-Next> MovePageRight <Control-Next> SetSelectionMark <Control-space>,<Select> SelectToMark <Shift-Control-space>,<Shift-Select>

    SelectAll <Control-a> SelectionShiftLeft <Control-comma> SelectionShiftLeftTab <Control-Alt-comma> SelectionShiftRight <Control-period> SelectionShiftRightTab <Control-Alt-period>

    Insert <Insert> Return <Return> AutoIndentReturn <Control-Return> NoAutoindentReturn <Shift-Return> Delete <Delete> BackSpace <BackSpace> DeleteToWordStart <Shift-BackSpace> DeleteToWordEnd <Shift-Delete> DeleteToLineStart <Alt-BackSpace> DeleteToLineEnd <Alt-Delete> DeleteWord <Control-BackSpace> DeleteLine <Control-Delete>

    InsertControlCode <Control-Escape>

    FocusNext <Control-Tab> FocusPrev <Shift-Control-Tab>

    FlashMatchingChar <Control-b> FindMatchingChar <Control-j>

    Escape <Escape>

    Tab <Tab>

    LeftTab <Shift-Tab>

    Copy <Control-c>

    Cut <Control-x>

    Paste <Control-v>

    InlinePaste <Control-V>

    Undo <Control-z>

    Redo <Control-Z>

    Destroy <Destroy>

    MenuSelect <Alt-KeyPress>

AUTHOR

Alessandro Iob <alexiob@iname.com>.

SEE ALSO

Tk::Text Tk::ROText Tk::TextUndo

KEYWORDS

text, widget

1 POD Error

The following errors were encountered while parsing the POD:

Around line 1942:

You forgot a '=back' before '=head1'