/usr/share/doc/tklib/html/ntext.html is in tklib 0.6-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | <html><head>
<title>ntext - Alternative Bindings for the Text Widget</title>
<style type="text/css"><!--
HTML {
background: #FFFFFF;
color: black;
}
BODY {
background: #FFFFFF;
color: black;
}
DIV.doctools {
margin-left: 10%;
margin-right: 10%;
}
DIV.doctools H1,DIV.doctools H2 {
margin-left: -5%;
}
H1, H2, H3, H4 {
margin-top: 1em;
font-family: sans-serif;
font-size: large;
color: #005A9C;
background: transparent;
text-align: left;
}
H1.title {
text-align: center;
}
UL,OL {
margin-right: 0em;
margin-top: 3pt;
margin-bottom: 3pt;
}
UL LI {
list-style: disc;
}
OL LI {
list-style: decimal;
}
DT {
padding-top: 1ex;
}
UL.toc,UL.toc UL, UL.toc UL UL {
font: normal 12pt/14pt sans-serif;
list-style: none;
}
LI.section, LI.subsection {
list-style: none;
margin-left: 0em;
text-indent: 0em;
padding: 0em;
}
PRE {
display: block;
font-family: monospace;
white-space: pre;
margin: 0%;
padding-top: 0.5ex;
padding-bottom: 0.5ex;
padding-left: 1ex;
padding-right: 1ex;
width: 100%;
}
PRE.example {
color: black;
background: #f5dcb3;
border: 1px solid black;
}
UL.requirements LI, UL.syntax LI {
list-style: none;
margin-left: 0em;
text-indent: 0em;
padding: 0em;
}
DIV.synopsis {
color: black;
background: #80ffff;
border: 1px solid black;
font-family: serif;
margin-top: 1em;
margin-bottom: 1em;
}
UL.syntax {
margin-top: 1em;
border-top: 1px solid black;
}
UL.requirements {
margin-bottom: 1em;
border-bottom: 1px solid black;
}
--></style>
</head>
<! -- Generated from file 'ntext.man' by tcllib/doctools with format 'html'
-->
<! -- CVS: $Id$ ntext.n
-->
<body><div class="doctools">
<h1 class="title">ntext(3tk) 0.81 ntext "Alternative Bindings for the Text Widget"</h1>
<div id="name" class="section"><h2><a name="name">Name</a></h2>
<p>ntext - Alternative Bindings for the Text Widget</p>
</div>
<div id="toc" class="section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="toc">
<li class="section"><a href="#toc">Table Of Contents</a></li>
<li class="section"><a href="#synopsis">Synopsis</a></li>
<li class="section"><a href="#section1">Description</a></li>
<li class="section"><a href="#section2">CONFIGURATION OPTIONS</a></li>
<li class="section"><a href="#section3">EXAMPLE</a></li>
<li class="section"><a href="#see-also">See Also</a></li>
<li class="section"><a href="#keywords">Keywords</a></li>
</ul>
</div>
<div id="synopsis" class="section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="synopsis">
<ul class="requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">Tk 8.5</b></li>
<li>package require <b class="pkgname">ntext <span class="opt">?0.81?</span></b></li>
</ul>
</div>
</div>
<div id="section1" class="section"><h2><a name="section1">Description</a></h2>
<p>The purpose of the <b class="package">ntext</b> 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.</p>
<p>The package provides a binding tag named <em>Ntext</em> for use by text widgets in place of the default <em>Text</em> binding tag.</p>
<p>Package <b class="package">ntext</b> 's functions and variables are contained entirely in the <b class="variable">::ntext</b> namespace; its other code is contained in the binding tag <em>Ntext</em>. <b class="package">ntext</b> 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 <em>Text</em> binding tag, unchanged.</p>
<p>The differences between the <em>Ntext</em> binding tag and the default <em>Text</em> binding tag are in three categories:</p>
<ul class="itemized">
<li><p>Some <em>Text</em> bindings behave differently from most text-editing applications. <em>Ntext</em> gives these bindings more familiar behaviour. For details see <i class="term">ntextBindings</i>.</p></li>
<li><p>When a logical line with leading whitespace is word-wrapped onto more than one display line, the wrapped display lines begin further to the left than the first display line, which can make the text layout untidy and difficult to read. <em>Ntext</em> can indent the wrapped lines to match the leading whitespace of the first display line (this facility is switched off by default). For details see <i class="term">ntextIndent</i>.</p></li>
<li><p>When the user navigates or selects text, Tcl/Tk sometimes needs to detect word boundaries. <em>Ntext</em> provides improved rules for word boundary detection. For details see <i class="term">ntextWordBreak</i>.</p></li>
</ul>
<p>The remainder of this page describes the basic use and configuration of all three aspects of <em>Ntext</em>. For more detailed information on the different facilities of <em>Ntext</em>, see the pages <i class="term">ntextBindings</i>, <i class="term">ntextIndent</i>, and <i class="term">ntextWordBreak</i>.</p>
<p>See Section <span class="sectref"><a href="#section3">EXAMPLE</a></span> for how to apply the <em>Ntext</em> binding tag in place of the <em>Text</em> binding tag.</p>
</div>
<div id="section2" class="section"><h2><a name="section2">CONFIGURATION OPTIONS</a></h2>
<p><em>Ntext</em> provides alternatives to a number of behaviours of the classic <em>Text</em> binding tag. Where there is an option, the <em>Ntext</em> behaviour (except for display-line indentation) is switched on by default.</p>
<p>The behaviour of <em>Ntext</em> may be configured application-wide by setting the values of a number of namespace variables:</p>
<p><b class="variable">::ntext::classicAnchor</b></p>
<ul class="itemized">
<li><p><b class="const">0</b> - (default value) selects <em>Ntext</em> behaviour, i.e. the anchor point is fixed</p></li>
<li><p><b class="const">1</b> - selects classic <em>Text</em> behaviour, i.e. the anchor point is variable</p></li>
</ul>
<p><b class="variable">::ntext::classicExtras</b></p>
<ul class="itemized">
<li><p><b class="const">0</b> - (default value) selects <em>Ntext</em> behaviour, i.e. several traditional <em>Text</em> bindings are de-activated</p></li>
<li><p><b class="const">1</b> - selects classic <em>Text</em> behaviour, i.e. all <em>Text</em> bindings are activated</p></li>
</ul>
<p><b class="variable">::ntext::classicMouseSelect</b></p>
<ul class="itemized">
<li><p><b class="const">0</b> - (default value) selects <em>Ntext</em> behaviour, i.e. the anchor point for mouse selection operations is moved by keyboard navigation</p></li>
<li><p><b class="const">1</b> - selects classic <em>Text</em> behaviour</p></li>
</ul>
<p><b class="variable">::ntext::classicWordBreak</b></p>
<ul class="itemized">
<li><p><b class="const">0</b> - (default value) selects <em>Ntext</em> behaviour, i.e. platform-independent, two classes of word characters and one class of non-word characters.</p></li>
<li><p><b class="const">1</b> - selects classic <em>Text</em> behaviour, i.e. platform-dependent, one class of word characters and one class of non-word characters</p></li>
<li><p>After changing this value, the matching patterns should be recalculated. See <i class="term">ntextWordBreak</i> for details and advanced configuration options.</p></li>
</ul>
<p><b class="variable">::ntext::classicWrap</b></p>
<ul class="itemized">
<li><p><b class="const">0</b> - selects <em>Ntext</em> behaviour, i.e. display lines of text widgets in <i class="arg">-wrap</i> <i class="arg">word</i> mode are indented to match the initial whitespace of the first display line of a logical line. If the widget already holds text when this value is set, a function call may be necessary. See <i class="term">ntextIndent</i> for detailed instructions on the use of <em>Ntext</em> 's indentation.</p></li>
<li><p><b class="const">1</b> - (default value) selects classic <em>Text</em> behaviour, i.e. no indentation</p></li>
</ul>
<p><b class="variable">::ntext::overwrite</b></p>
<ul class="itemized">
<li><p><b class="const">0</b> - (initial value) text typed at the keyboard is inserted into the widget</p></li>
<li><p><b class="const">1</b> - text typed at the keyboard overwrites text already in the widget</p></li>
<li><p>The value is toggled by the <em>Insert</em> key.</p></li>
</ul>
</div>
<div id="section3" class="section"><h2><a name="section3">EXAMPLE</a></h2>
<p>To create a text widget .t and use the <em>Ntext</em> bindings:</p>
<pre class="example">
package require ntext
text .t
bindtags .t {.t Ntext . all}
</pre>
<p>See bindtags for more information.</p>
</div>
<div id="see-also" class="section"><h2><a name="see-also">See Also</a></h2>
<p>bindtags, ntextBindings, ntextIndent, ntextWordBreak, re_syntax, regexp, text</p>
</div>
<div id="keywords" class="section"><h2><a name="keywords">Keywords</a></h2>
<p>bindtags, re_syntax, regexp, text</p>
</div>
</div></body></html>
|