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

AUTHOR

462       Current maintainer is Alexander Becker, "c a p f a n -at- g m x %dot% d
463       e".
464
465       Originally written by Alessandro Iob.
466

LICENSE

468       This program is free software; you can redistribute it and/or modify it
469       under the same terms as Perl itself.
470

SEE ALSO

472       Tk::Text Tk::ROText Tk::TextUndo
473

KEYWORDS

475       text, widget
476
477
478
479perl v5.28.0                      2016-03-23            Tk::Text::SuperText(3)
Impressum