newText(n) 0.8 "Alternative Bindings for the Text Widget"

NAME

newText - Alternative Bindings for the Text Widget

SYNOPSIS

package require Tcl 8.5
package require Tk 8.5
package require newText ?0.8?

DESCRIPTION

The purpose of the newText package is to make the text widget behave more like other text-editing applications. It makes the text widget more useful for implementing a text editor, and makes it behave in a way that will be more familiar to most users.

The package provides a binding tag named newText for use by text widgets in place of the default Text binding tag.

Package newText 's functions and variables are contained entirely in the ::newText namespace; its other code is contained in the binding tag newText. newText has no exports to the global or other namespaces, and no new widget commands. It uses modified copies of the Tk code, leaving the original code, and the Text binding tag, unchanged.

The differences between the newText binding tag and the default Text binding tag are in three categories:

The remainder of this page describes the basic use and configuration of all three aspects of newText. For more detailed information on the different facilities of newText, see the pages newTextBindings , newTextIndent , and newTextWordBreak .

See Section EXAMPLE for how to apply the newText binding tag in place of the Text binding tag.

CONFIGURATION OPTIONS

newText provides alternatives to a number of behaviours of the classic Text binding tag. Where there is an option, the newText behaviour (except for display-line indentation) is switched on by default.

The behaviour of newText may be configured application-wide by setting the values of a number of namespace variables:

::newText::classicAnchor

::newText::classicExtras

::newText::classicMouseSelect

::newText::classicWordBreak

::newText::classicWrap

::newText::overwrite

EXAMPLE

To create a text widget .t and use the newText bindings:

 
package require newText
text .t
bindtags .t {.t newText . all}

See bindtags for more information.

SEE ALSO

bindtags, newTextBindings , newTextIndent , newTextWordBreak , re_syntax, regexp, text

KEYWORDS

bindtags, re_syntax, regexp, text