1SuperText(3)          User Contributed Perl Documentation         SuperText(3)
2
3
4

NAME

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

SYNOPSIS

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

STANDARD OPTIONS

12       -background    -highlightbackground     -insertontime  -selectborderwidth
13       -borderwidth   -highlightcolor     -insertwidth   -selectforeground
14       -cursor   -highlightthickness -padx     -setgrid
15       -exportselection    -insertbackground   -pady     -takefocus
16       -font     -insertborderwidth  -relief   -xscrollcommand
17       -foreground    -insertofftime -selectbackground   -yscrollcommand
18       -ansicolor
19
20       See Tk::options for details of the standard options.
21
22       -height   -spacing1 -spacing2 -spacing3
23       -state    -tabs     -width    -wrap
24
25       See Tk::Text for details of theis options.
26

WIDGET-SPECIFIC OPTIONS

28       Name:     indentMode
29       Class:    IndentMode
30       Switch:   -indentmode
31           Specifies how to indent when a new line is inserted in the text.
32           The possible modes are none for no indent at all or auto for
33           positioning the insertion cursor right below the first non-white
34           space character of the previous line.
35
36       Name:     undoDepth
37       Class:    UndoDepth
38       Switch:   -undodepth
39           Sets the maximum depth for the undo buffer:a number specifies the
40           numbers of insert or delete operations that can be stored in the
41           buffer before the oldest one is poped out and forgotten;0 stops the
42           undo feature,undef sets unlimited depth.
43
44       Name:     redoDepth
45       Class:    RedoDepth
46       Switch:   -redodepth
47           Sets the maximum depth for the redo buffer:a number specifies the
48           numbers of undo operations that can be stored in the buffer before
49           the oldest one is poped out and forgotten;0 stops the redo
50           feature,undef sets unlimited depth.
51
52       Name:     showMatching
53       Class:    ShowMatching
54       Switch:   -showmatching
55           With a value of 1 activates the matching parentheses feature.0
56           deactivates it.
57
58       Name:     matchHighlightTime
59       Class:    MatchHighlightTime
60       Switch:   -matchhighlighttime
61           Sets the number of milliseconds the match highlight stays visible;
62           with a value of 0 the highlight stays on till next match.
63
64       Name:     matchForeground
65       Class:    MatchForeground
66       Switch:   -matchforeground
67           Set the foreground color for the char hilighted by the match-
68           parentheses command.
69
70       Name:     matchBackground
71       Class:    MatchBackground
72       Switch:   -matchbackground
73           Set the background color for the char hilighted by the match-
74           parentheses command.
75
76       Name:     matchingCouples
77       Class:    MatchingCouples
78       Switch:   -matchingcouples
79           Sets the chars that are searched for a matching counterpart.  The
80           format is a simple string with matching chars coupled in left-right
81           order; here's an example: {}[]()"" .  For double couples ("") the
82           match is done only on the forwarding chars.
83
84       Name:     insertMode
85       Class:    InsertMode
86       Switch:   -insertmode
87           Sets the default insert mode: insert or overwrite .
88
89       Name:     ansiColor
90       Class:    AnsiColor
91       Switch:   -ansicolor
92           Enables or disables use of Tk-TextANSIColor module (by Tim Jenness
93           <t.jenness@jach.hawaii.edu>).  This option was implemented by Jim
94           Turner <turnerjw2@netscape.net> (THANKS for the support!)
95

DESCRIPTION

97       Tk::Text::SuperText implements many new features over the standard
98       Tk::Text widget while supporting all it's standard features.Its used
99       simply as the Tk::Text widget.  New Features:
100
101       ·   Unlimited undo/redo.
102
103           So you can undo and redo whatever you deleted/inserted whenever you
104           want.  To reset the undo and redo buffers call this method:
105           $w->resetUndo;
106
107       ·   Rectangular selections.
108
109           Rectangular text zones can be selected,copied,deleted,shifted with
110           the mouse or with the keyboard.
111
112       ·   Selection right/left char and tab shift.
113
114           Text selections can be shifted left/right of  one or more chars or
115           a tabs.
116
117       ·   Normal and 'inline' selection paste.
118
119           The 'normal' paste is the normal text paste you know :
120
121           Paste Buffer:
122               line x
123
124               line y
125
126           Text Buffer:
127               line 1
128
129               line2
130
131           Normal paste at line 1:
132               line x
133
134               line y
135
136               line 1
137
138               line 2
139
140           The 'inline' paste work as this:
141           Inline paste at line 1:
142               line x line 1
143
144               line y line 2
145
146       ·   Parentheses matching.
147
148           To help you inspect nested parentheses,brackets and other
149           characters,SuperText has both an automatic parenthesis matching
150           mode,and a find matching command.  Automatic parenthesis matching
151           is activated when you type or when you move the insertion cursor
152           after a parenthesis.It momentarily highlightsthe matching character
153           if that character is visible in the window.To find a matching
154           character anywhere in the file,position the cursor after the it,and
155           call the find matching command.
156
157       ·   Autoindenting.
158
159           When you press the Return or Enter key,spaces and tabs are inserted
160           to line up the insert point under the start of the previous line.
161
162       ·   Control codes insertion.
163
164           You can directly insert a non printable control character in the
165           text.
166
167       ·   Commands are managed via virtual events.
168
169           Every SuperText command is binded to a virtual event,so to call it
170           or to bind it to a key sequence use the Tk::event functions.  I
171           used this format for key bind so there's no direct key-to-command
172           bind,and this give me more flexibility;however you can use normal
173           binds.
174
175           Example:
176           $w->eventAdd('Tk::Text::SuperText','<<SelectAll>>','<Control-a>');
177
178           To set default events bindigs use this methos: $w->bindDefault;
179
180       ·   Default key bindings are redefined (not really a feature :).
181
182           Every virtual event has an associated public method with the same
183           name of the event but with the firts char in lower case (eg:
184           <<MouseSelect>> event has a corresponding  $super_text->mouseSelect
185           method).
186
187           Virtual Event/Command         Default Key Binding
188
189           MouseSetInsert           <Button1>
190           MouseSelect              <B1-Motion>
191           MouseSelectWord          <Double-1>
192           MouseSelectLine          <Triple-1>
193           MouseSelectAdd           <Shift-1>
194           MouseSelectAddWord       <Double-Shift-1>
195           MouseSelectAddLine       <Triple-Shift-1>
196           MouseSelectAutoScan      <B1-Leave>
197           MouseSelectAutoScanStop  <B1-Enter>,<ButtonRelease-1>
198           MouseMoveInsert          <Alt-1>
199           MouseRectSelection       <Control-B1-Motion>
200           MouseMovePageTo          <2> MouseMovePage            <B2-Motion>
201           MousePasteSelection      <ButtonRelease-2>
202
203           MoveLeft                 <Left>
204           SelectLeft               <Shift-Left>
205           SelectRectLeft           <Shift-Alt-Left>
206           MoveLeftWord             <Control-Left>
207           SelectLeftWord           <Shift-Control-Left>
208           MoveRight                <Right>
209           SelectRight              <Shift-Right>
210           SelectRectRight          <Shift-Alt-Right>
211           MoveRightWord            <Control-Right>
212           SelectRightWord          <Shift-Control-Right>
213           MoveUp                   <Up> SelectUp                 <Shift-Up>
214           SelectRectUp             <Shift-Alt-Up>
215           MoveUpParagraph          <Control-Up>
216           SelectUpParagraph        <Shift-Control-Up>
217           MoveDown                 <Down>
218           SelectDown               <Shift-Down>
219           SelectRectDown           <Shift-Alt-Down>
220           MoveDownParagraph        <Control-Down>
221           SelectDownParagraph      <Shift-Control-Down>
222           MoveLineStart            <Home>
223           SelectToLineStart        <Shift-Home>
224           MoveTextStart            <Control-Home>
225           SelectToTextStart        <Shift-Control-Home>
226           MoveLineEnd              <End> SelectToLineEnd          <Shift-End>
227           MoveTextEnd              <Control-End>
228           SelectToTextEnd          <Shift-Control-End>
229           MovePageUp               <Prior>
230           SelectToPageUp           <Shift-Prior>
231           MovePageLeft             <Control-Prior>
232           MovePageDown             <Next>
233           SelectToPageDown         <Shift-Next>
234           MovePageRight            <Control-Next>
235           SetSelectionMark         <Control-space>,<Select>
236           SelectToMark             <Shift-Control-space>,<Shift-Select>
237
238           SelectAll                <Control-a>
239           SelectionShiftLeft       <Control-comma>
240           SelectionShiftLeftTab    <Control-Alt-comma>
241           SelectionShiftRight      <Control-period>
242           SelectionShiftRightTab   <Control-Alt-period>
243
244           Ins                      <Insert> Enter                    <Return>
245           AutoIndentEnter          <Control-Return>
246           NoAutoindentEnter        <Shift-Return>
247           Del                      <Delete>
248           BackSpace                <BackSpace>
249           DeleteToWordStart        <Shift-BackSpace>
250           DeleteToWordEnd          <Shift-Delete>
251           DeleteToLineStart        <Alt-BackSpace>
252           DeleteToLineEnd          <Alt-Delete>
253           DeleteWord               <Control-BackSpace>
254           DeleteLine               <Control-Delete>
255
256           InsertControlCode        <Control-Escape>
257
258           FocusNext                <Control-Tab>
259           FocusPrev                <Shift-Control-Tab>
260
261           FlashMatchingChar        <Control-b>
262           RemoveMatch              <Control-B>
263           FindMatchingChar         <Control-j>
264           JumpToMatchingChar       <Control-J>
265
266           Escape                   <Escape>
267
268           Tab                      <Tab>
269
270           LeftTab                  <Shift-Tab>
271
272           Copy                     <Control-c>
273
274           Cut                      <Control-x>
275
276           Paste                    <Control-v>
277
278           InlinePaste              <Control-V>
279
280           Undo                     <Control-z>
281
282           Redo                     <Control-Z>
283
284           Destroy                  <Destroy>
285
286           MenuSelect               <Alt-KeyPress>
287
288       ·   Public methods.
289
290           $widget->mouseSetInsert
291
292           $widget->museSelect
293
294           $widget->mouseSelectWord
295
296           $widget->mouseSelectLine
297
298           $widget->mouseSelectAdd
299
300           $widget->mouseSelectAddWord
301
302           $widget->mouseSelectAddLine
303
304           $widget->mouseSelectAutoScan
305
306           $widget->mouseSelectAutoScanStop
307
308           $widget->mouseMoveInsert
309
310           $widget->mouseRectSelection
311
312           $widget->mouseMovePageTo
313
314           $widget->mouseMovePage
315
316           $widget->mousePasteSelection
317
318           $widget->moveLeft
319
320           $widget->selectLeft
321
322           $widget->selectRectLeft
323
324           $widget->moveLeftWord
325
326           $widget->selectLeftWord
327
328           $widget->moveRight
329
330           $widget->selectRight
331
332           $widget->selectRectRight
333
334           $widget->moveRightWord
335
336           $widget->selectRightWord
337
338           $widget->moveUp
339
340           $widget->selectUp
341
342           $widget->selectRectUp
343
344           $widget->moveUpParagraph
345
346           $widget->selectUpParagraph
347
348           $widget->moveDown
349
350           $widget->selectDown
351
352           $widget->selectRectDown
353
354           $widget->moveDownParagraph
355
356           $widget->selectDownParagraph
357
358           $widget->moveLineStart
359
360           $widget->selectToLineStart
361
362           $widget->moveTextStart
363
364           $widget->selectToTextStart
365
366           $widget->moveLineEnd
367
368           $widget->selectToLineEnd
369
370           $widget->moveTextEnd
371
372           $widget->selectToTextEnd
373
374           $widget->movePageUp
375
376           $widget->selectToPageUp
377
378           $widget->movePageLeft
379
380           $widget->movePageDown
381
382           $widget->selectToPageDown
383
384           $widget->movePageRight
385
386           $widget->setSelectionMark
387
388           $widget->selectToMark
389
390           $widget->selectAll
391
392           $widget->selectionShiftLeft
393
394           $widget->selectionShiftLeftTab
395
396           $widget->selectionShiftRight
397
398           $widget->selectionShiftRightTab
399
400           $widget->ins
401
402           $widget->enter
403
404           $widget->autoIndentEnter
405
406           $widget-> noAutoindentEnter
407
408           $widget->del
409
410           $widget->backSpace
411
412           $widget->deleteToWordStart
413
414           $widget->deleteToWordEnd
415
416           $widget->deleteToLineStart
417
418           $widget->deleteToLineEnd
419
420           $widget->deleteWord
421
422           $widget->deleteLine
423
424           $widget->insertControlCode
425
426           $widget->focusNext
427
428           $widget->focusPrev
429
430           $widget->flashMatchingChar
431
432           $widget->removeMatch
433
434           $widget->findMatchingChar
435
436           $widget->jumpToMatchingChar
437
438           $widget->escape
439
440           $widget->tab
441
442           $widget->leftTab
443
444           $widget->copy
445
446           $widget->cut
447
448           $widget->paste
449
450           $widget->inlinePaste
451
452           $widget->undo
453
454           $widget->redo
455
456           $widget->destroy
457
458           $widget->menuSelect
459

AUTHOR

461       Alessandro Iob <alexiob@dlevel.com>.
462

SEE ALSO

464       Tk::Text Tk::ROText Tk::TextUndo
465

KEYWORDS

467       text, widget
468

POD ERRORS

470       Hey! The above document had some coding errors, which are explained
471       below:
472
473       Around line 2549:
474           You forgot a '=back' before '=head1'
475
476
477
478perl v5.12.2                      2010-11-05                      SuperText(3)
Impressum