upload tizen2.0 source
[framework/uifw/xorg/lib/libxaw.git] / specs / TextActions.xml
1 <sect2 id="Text_Widget_Actions">
2 <title>Text Widget Actions</title>
3 <para>
4 <!-- .LP -->
5 <!-- .IN "Text widget" "actions" -->
6 <!-- .XS -->
7 <!--      Actions Supported by all Text Widgets -->
8 <!-- .XE -->
9 <!-- .IN "Text widget" "actions" "@DEF@" -->
10
11 All editing functions are performed by translation manager actions that may
12 be specified through the <function>translations</function> resource in the Text widget.
13 </para>
14 <para>
15 <!-- .LP -->
16 <!-- .sp -->
17 <literallayout class="monospaced">
18 <!-- .TA .5i 2.5i 3i -->
19 <!-- .ta .5i 2.5i 3i -->
20 Insert Point Movement     Delete
21      forward-character         delete-next-character
22      backward-character        delete-previous-character
23      forward-word              delete-next-word
24      backward-word             delete-previous-word
25      forward-paragraph         delete-selection
26      backward-paragraph
27      beginning-of-line
28      end-of-line          Selection
29      next-line                 select-word
30      previous-line             select-all
31      next-page                 select-start
32      previous-page             select-adjust
33      beginning-of-file         select-end
34      end-of-file               extend-start
35      scroll-one-line-up        extend-adjust
36      scroll-one-line-down      extend-end
37                                insert-selection
38
39
40 Miscellaneous             New Line
41      redraw-display            newline-and-indent
42      insert-file               newline-and-backup
43      insert-char               newline
44      insert-string
45      display-caret
46      focus-in             Kill
47      focus-in                  kill-word
48      search                    backward-kill-word
49      multiply                  kill-selection
50      form-paragraph            kill-to-end-of-line
51      transpose-characters      kill-paragraph
52      no-op                     kill-to-end-of-paragraph
53      XawWMProtocols
54      reconnect-im
55 </literallayout>
56 <!-- .sp -->
57 </para>
58 <para>
59 <!-- .LP -->
60 Most of the actions take no arguments, and unless otherwise noted you
61 may assume this to be the case.
62 </para>
63 <para>
64 <!-- .LP -->
65 </para>
66 <sect3 id='Cursor_Movement_Actions'>
67 <title>Cursor Movement Actions\fP</title>
68 <para>
69 <!-- .LP -->
70 <!-- .sp -->
71 <variablelist>
72   <varlistentry>
73     <term>
74       forward-character()
75     </term>
76     <listitem>
77       <para>
78 <!-- .br -->
79 <!-- .ns -->
80       </para>
81     </listitem>
82   </varlistentry>
83   <varlistentry>
84     <term>
85       backward-character()
86     </term>
87     <listitem>
88       <para>
89 These actions move the insert point forward or backward one character in
90 the buffer.  If the insert point is at the end or beginning of a line
91 this action will move the insert point to the next (or previous) line.
92       </para>
93     </listitem>
94   </varlistentry>
95   <varlistentry>
96     <term>
97       forward-word()
98     </term>
99     <listitem>
100       <para>
101 <!-- .br -->
102 <!-- .ns -->
103       </para>
104     </listitem>
105   </varlistentry>
106   <varlistentry>
107     <term>
108       backward-word()
109     </term>
110     <listitem>
111       <para>
112 These actions move the insert point to the next or previous word boundary.
113 A word boundary is defined as a Space, Tab or Carriage Return.
114       </para>
115     </listitem>
116   </varlistentry>
117   <varlistentry>
118     <term>
119       forward-paragraph()
120     </term>
121     <listitem>
122       <para>
123 <!-- .br -->
124 <!-- .ns -->
125       </para>
126     </listitem>
127   </varlistentry>
128   <varlistentry>
129     <term>
130       backward-paragraph()
131     </term>
132     <listitem>
133       <para>
134 These actions move the insert point to the next or previous paragraph boundary.
135 A paragraph boundary is defined as two Carriage Returns in a row with only
136 Spaces or Tabs between them.
137       </para>
138     </listitem>
139   </varlistentry>
140   <varlistentry>
141     <term>
142       beginning-of-line()
143     </term>
144     <listitem>
145       <para>
146 <!-- .br -->
147 <!-- .ns -->
148       </para>
149     </listitem>
150   </varlistentry>
151   <varlistentry>
152     <term>
153       end-of-line()
154     </term>
155     <listitem>
156       <para>
157 These actions move to the beginning or end of the current line.  If the
158 insert point is already at the end or beginning of the line then no action is taken.
159       </para>
160     </listitem>
161   </varlistentry>
162   <varlistentry>
163     <term>
164       next-line()
165     </term>
166     <listitem>
167       <para>
168 <!-- .br -->
169 <!-- .ns -->
170       </para>
171     </listitem>
172   </varlistentry>
173   <varlistentry>
174     <term>
175       previous-line()
176     </term>
177     <listitem>
178       <para>
179 These actions move the insert point up or down one line.  If the insert
180 point is currently N characters from the beginning of the line then it
181 will be N characters from the beginning of the next or previous line.
182 If N is past the end of the line, the insert point is placed at the end
183 of the line.
184       </para>
185     </listitem>
186   </varlistentry>
187   <varlistentry>
188     <term>
189       next-page()
190     </term>
191     <listitem>
192       <para>
193 <!-- .br -->
194 <!-- .ns -->
195       </para>
196     </listitem>
197   </varlistentry>
198   <varlistentry>
199     <term>
200       previous-page()
201     </term>
202     <listitem>
203       <para>
204 These actions move the insert point up or down one page in the file.
205 One page is defined as the current height of the text widget.  The
206 insert point is always placed at the first character of the top line by
207 this action.
208       </para>
209     </listitem>
210   </varlistentry>
211   <varlistentry>
212     <term>
213       beginning-of-file()
214     </term>
215     <listitem>
216       <para>
217 <!-- .br -->
218 <!-- .ns -->
219       </para>
220     </listitem>
221   </varlistentry>
222   <varlistentry>
223     <term>
224       end-of-file()
225     </term>
226     <listitem>
227       <para>
228 These actions place the insert point at the beginning or end of the
229 current text buffer.  The text widget is then scrolled the minimum
230 amount necessary to make the new insert point location visible.
231       </para>
232     </listitem>
233   </varlistentry>
234   <varlistentry>
235     <term>
236       scroll-one-line-up()
237     </term>
238     <listitem>
239       <para>
240 <!-- .br -->
241 <!-- .ns -->
242       </para>
243     </listitem>
244   </varlistentry>
245   <varlistentry>
246     <term>
247       scroll-one-line-down()
248     </term>
249     <listitem>
250       <para>
251 These actions scroll the current text field up or down by one line.
252 They do not move the insert point.  Other than the scrollbars this is
253 the only way that the insert point may be moved off of the visible text
254 area.  The widget will be scrolled so that the insert point is back on
255 the screen as soon as some other action is executed.
256     </para>
257   </listitem>
258   </varlistentry>
259 </variablelist>
260 </para>
261 </sect3>
262 <sect3 id="Delete_Actions">
263 <title>Delete Actions</title>
264 <para>
265 <!-- .LP -->
266 <!-- .sp -->
267 <variablelist>
268   <varlistentry>
269     <term>
270       delete-next-character()
271     </term>
272     <listitem>
273       <para>
274 <!-- .br -->
275 <!-- .ns -->
276       </para>
277     </listitem>
278   </varlistentry>
279   <varlistentry>
280     <term>
281       delete-previous-character()
282     </term>
283     <listitem>
284       <para>
285 These actions remove the character immediately before or after the
286 insert point.  If a Carriage Return is removed then the next line is
287 appended to the end of the current line.
288       </para>
289     </listitem>
290   </varlistentry>
291   <varlistentry>
292     <term>
293       delete-next-word()
294     </term>
295     <listitem>
296       <para>
297 <!-- .br -->
298 <!-- .ns -->
299       </para>
300     </listitem>
301   </varlistentry>
302   <varlistentry>
303     <term>
304       delete-previous-word()
305     </term>
306     <listitem>
307       <para>
308 These actions remove all characters between the insert point location and
309 the next word boundary.  A word boundary is defined as a Space, Tab or
310 Carriage Return.
311       </para>
312     </listitem>
313   </varlistentry>
314   <varlistentry>
315     <term>
316       delete-selection()
317     </term>
318     <listitem>
319       <para>
320 This action removes all characters in the current selection.
321 The selection can be set with the selection actions.
322     </para>
323   </listitem>
324   </varlistentry>
325 </variablelist>
326 </para>
327 </sect3>
328 <sect3 id="Selection_Actions">
329 <title>Selection Actions</title>
330 <para>
331 <!-- .LP -->
332 <!-- .sp -->
333 <variablelist>
334   <varlistentry>
335     <term>
336       select-word()
337     </term>
338     <listitem>
339       <para>
340 This action selects the word in which the insert point is currently located.
341 If the insert point is between words then it will select the previous word.
342       </para>
343     </listitem>
344   </varlistentry>
345   <varlistentry>
346     <term>
347       select-all()
348     </term>
349     <listitem>
350       <para>
351 This action selects the entire text buffer.
352       </para>
353     </listitem>
354   </varlistentry>
355   <varlistentry>
356     <term>
357       select-start()
358     </term>
359     <listitem>
360       <para>
361 This action sets the insert point to the current pointer location (if
362 triggered by a button event) or text cursor location (if triggered by
363 a key event).  It
364 will then begin a selection at this location.  If many of these
365 selection actions occur quickly in succession then the selection count
366 mechanism will be invoked (see the section titled \fBText Selections for
367 Application Programmers\fP for details).  <!-- xref -->
368       </para>
369     </listitem>
370   </varlistentry>
371   <varlistentry>
372     <term>
373       select-adjust()
374     </term>
375     <listitem>
376       <para>
377 This action allows a selection started with the <emphasis remap='I'>select-start</emphasis>
378 action to be modified, as described above.
379       </para>
380     </listitem>
381   </varlistentry>
382   <varlistentry>
383     <term>
384       select-end(<emphasis remap='I'>name</emphasis>[,<emphasis remap='I'>name</emphasis>,...])
385     </term>
386     <listitem>
387       <para>
388 This action ends a text selection that began with the <emphasis remap='I'>select-start</emphasis>
389 action, and asserts ownership of the selection or selections specified.
390 A <emphasis remap='I'>name</emphasis> can be a selection (e.g., <function>PRIMARY</function>) or a cut buffer
391 (e.g., <function>CUT_BUFFER0</function>).  Note that case is important.  If no
392 <emphasis remap='I'>names</emphasis> are specified, <function>PRIMARY</function> is asserted.
393       </para>
394     </listitem>
395   </varlistentry>
396   <varlistentry>
397     <term>
398       extend-start()
399     </term>
400     <listitem>
401       <para>
402 This action finds the nearest end of the current selection, and moves it
403 to the current pointer location (if triggered by a button event) or text
404 cursor location (if triggered by a key event).
405       </para>
406     </listitem>
407   </varlistentry>
408   <varlistentry>
409     <term>
410       extend-adjust()
411     </term>
412     <listitem>
413       <para>
414 This action allows a selection started with an <emphasis remap='I'>extend-start</emphasis> action
415 to be modified.
416       </para>
417     </listitem>
418   </varlistentry>
419   <varlistentry>
420     <term>
421       extend-end(<emphasis remap='I'>name</emphasis>[,<emphasis remap='I'>name</emphasis>,...])
422     </term>
423     <listitem>
424       <para>
425 This action ends a text selection that began with the <emphasis remap='I'>extend-start</emphasis>
426 action, and asserts ownership of the selection or selections specified.
427 A <emphasis remap='I'>name</emphasis> can be a selection (e.g. <function>PRIMARY</function>) or a cut buffer
428 (e.g <function>CUT_BUFFER0</function>).  Note that case is important.  If no names are
429 given, <function>PRIMARY</function> is asserted.
430       </para>
431     </listitem>
432   </varlistentry>
433   <varlistentry>
434     <term>
435       insert-selection(<emphasis remap='I'>name</emphasis>[,<emphasis remap='I'>name</emphasis>,...])
436     </term>
437     <listitem>
438       <para>
439 This action retrieves the value of the first (left-most) named selection
440 that exists or the cut buffer that is not empty and inserts it into the
441 Text widget at the current insert point location. A <emphasis remap='I'>name</emphasis> can be a
442 selection (e.g. <function>PRIMARY</function>) or a cut buffer (e.g <function>CUT_BUFFER0</function>).
443 Note that case is important.
444     </para>
445   </listitem>
446   </varlistentry>
447 </variablelist>
448 </para>
449 </sect3>
450 <sect3 id="The_New_Line_Actions">
451 <title>The New Line Actions</title>
452 <para>
453 <!-- .LP -->
454 <!-- .sp -->
455 <variablelist>
456   <varlistentry>
457     <term>
458       newline-and-indent()
459     </term>
460     <listitem>
461       <para>
462 This action inserts a newline into the text and adds spaces to
463 that line to indent it to match the previous line.
464       </para>
465     </listitem>
466   </varlistentry>
467   <varlistentry>
468     <term>
469       newline-and-backup()
470     </term>
471     <listitem>
472       <para>
473 This action inserts a newline into the text <emphasis remap='I'>after</emphasis> the insert point.
474       </para>
475     </listitem>
476   </varlistentry>
477   <varlistentry>
478     <term>
479       newline()
480     </term>
481     <listitem>
482       <para>
483 This action inserts a newline into the text <emphasis remap='I'>before</emphasis> the insert point.
484     </para>
485   </listitem>
486   </varlistentry>
487 </variablelist>
488 </para>
489 </sect3>
490 <sect3 id="Kill_and_Actions">
491 <title>Kill and Actions</title>
492 <para>
493 <!-- .LP -->
494 <!-- .sp -->
495 <variablelist>
496   <varlistentry>
497     <term>
498       kill-word()
499     </term>
500     <listitem>
501       <para>
502 <!-- .br -->
503 <!-- .ns -->
504       </para>
505     </listitem>
506   </varlistentry>
507   <varlistentry>
508     <term>
509       backward-kill-word()
510     </term>
511     <listitem>
512       <para>
513 These actions act exactly like the <emphasis remap='I'>delete-next-word</emphasis> and
514 <emphasis remap='I'>delete-previous-word</emphasis> actions, but they stuff the word that was
515 killed into the kill buffer (<function>CUT_BUFFER_1</function>).
516       </para>
517     </listitem>
518   </varlistentry>
519   <varlistentry>
520     <term>
521       kill-selection()
522     </term>
523     <listitem>
524       <para>
525 This action deletes the current selection and stuffs the deleted text into
526 the kill buffer (<function>CUT_BUFFER_1</function>).
527       </para>
528     </listitem>
529   </varlistentry>
530   <varlistentry>
531     <term>
532       kill-to-end-of-line()
533     </term>
534     <listitem>
535       <para>
536 This action deletes the entire line to the right of the insert point position,
537 and stuffs the deleted text into the kill buffer (<function>CUT_BUFFER_1</function>).
538       </para>
539     </listitem>
540   </varlistentry>
541   <varlistentry>
542     <term>
543       kill-paragraph()
544     </term>
545     <listitem>
546       <para>
547 This action deletes the current paragraph, if between paragraphs it deletes
548 the paragraph above the insert point, and stuffs the deleted text into
549 the kill buffer (<function>CUT_BUFFER_1</function>).
550       </para>
551     </listitem>
552   </varlistentry>
553   <varlistentry>
554     <term>
555       kill-to-end-of-paragraph()
556     </term>
557     <listitem>
558       <para>
559 This action deletes everything between the current insert point location and
560 the next paragraph boundary, and stuffs the deleted text into the kill
561 buffer (<function>CUT_BUFFER_1</function>).
562     </para>
563   </listitem>
564   </varlistentry>
565 </variablelist>
566 </para>
567 </sect3>
568 <sect3 id="Miscellaneous_Actions">
569 <title>Miscellaneous Actions</title>
570 <para>
571 <!-- .LP -->
572 <!-- .sp 1 -->
573 <variablelist>
574   <varlistentry>
575     <term>
576       redraw-display()
577     </term>
578     <listitem>
579       <para>
580 This action recomputes the location of all the text lines on the
581 display, scrolls the text to vertically center the line containing the insert point
582 on the screen, clears the entire screen, and redisplays it.
583       </para>
584     </listitem>
585   </varlistentry>
586   <varlistentry>
587     <term>
588       insert-file([<emphasis remap='I'>filename</emphasis>])
589     </term>
590     <listitem>
591       <para>
592 This action activates the insert file popup.  The <emphasis remap='I'>filename</emphasis>
593 option specifies the default filename to put in the filename buffer of
594 the popup.  If no <emphasis remap='I'>filename</emphasis> is specified the buffer is empty
595 at startup.
596       </para>
597     </listitem>
598   </varlistentry>
599   <varlistentry>
600     <term>
601       insert-char()
602     </term>
603     <listitem>
604       <para>
605 This action may only be attached to a key event. When the
606 <function>international</function> resource is <function>false</function>, this action
607 calls XLookupString to translate the event into a (rebindable) Latin-1
608 character (sequence) and inserts it into the text at the
609 insert point.  When the <function>international</function> resource is <function>true</function>,
610 characters are passed to the input method via XwcLookupString, and any
611 committed string returned is inserted into the text at the insert point.
612       </para>
613     </listitem>
614   </varlistentry>
615   <varlistentry>
616     <term>
617       insert-string(<emphasis remap='I'>string</emphasis>[,<emphasis remap='I'>string</emphasis>,...])
618     </term>
619     <listitem>
620       <para>
621 This action inserts each <emphasis remap='I'>string</emphasis> into the text
622 at the insert point location.  Any <emphasis remap='I'>string</emphasis>
623 beginning with the characters "0x" followed by an even
624 number of hexadecimal digits is
625 interpreted as a hexadecimal constant and the
626 corresponding string is inserted instead.  This
627 hexadecimal string may represent up to 50 8-bit characters.
628  When the<function>international</function> resource is
629 <function>true</function>, a hexadecimal string is intrepeted as
630 being in a multi-byte encoding, and a hexadecimal
631 or regular string will result in an error message
632 if it is not legal in the current locale.
633       </para>
634     </listitem>
635   </varlistentry>
636   <varlistentry>
637     <term>
638       display-caret(<emphasis remap='I'>state</emphasis>,<emphasis remap='I'>when</emphasis>)
639     </term>
640     <listitem>
641       <para>
642 This action allows the insert point to be turned on and off.
643 The <emphasis remap='I'>state</emphasis> argument specifies the desired state of the insert point.
644 This value may be any of the string
645 values accepted for Boolean resources (e.g. <function>on</function>, <function>True</function>,
646 <function>off</function>, <function>False</function>, etc.).  If no arguments are specified, the
647 default value is <function>True</function>.
648 The <emphasis remap='I'>when</emphasis> argument specifies, for <function>EnterNotify</function> or <function>LeaveNotify</function>
649 events whether or not the focus field in the event is to be examined.
650 If the second argument is not specified, or specified as something other
651 than <function>always</function> then if the action is bound to an  <function>EnterNotify</function>
652 or <function>LeaveNotify</function> event, the action will be taken only if the focus
653 field is <function>True</function>.  An augmented binding that might be useful is:
654     </para>
655   </listitem>
656   </varlistentry>
657 </variablelist>
658 </para>
659 <para>
660 <!-- .LP -->
661 <literallayout class="monospaced">
662 <!-- .TA 2.0i 2.5i 4.0i -->
663 <!-- .ta 2.0i 2.5i 4.0i -->
664      *Text.Translations: #override \\
665           &lt;FocusIn&gt;:     display-caret(on) \\n\\
666           &lt;FocusOut&gt;:     display-caret(off)
667 </literallayout>
668 <variablelist>
669   <varlistentry>
670     <term>
671       focus-in()
672     </term>
673     <listitem>
674       <para>
675 <!-- .br -->
676 <!-- .ns -->
677       </para>
678     </listitem>
679   </varlistentry>
680   <varlistentry>
681     <term>
682       focus-out()
683     </term>
684     <listitem>
685       <para>
686 These actions do not currently do anything.
687       </para>
688     </listitem>
689   </varlistentry>
690   <varlistentry>
691     <term>
692       search(<emphasis remap='I'>direction</emphasis>,[<emphasis remap='I'>string</emphasis>])
693     </term>
694     <listitem>
695       <para>
696 This action activates the search popup.  The <emphasis remap='I'>direction</emphasis> must be
697 specified as either <function>forward</function> or <function>backward</function>.  The string is
698 optional and is used as an initial value for the <emphasis remap='I'>Search for</emphasis>: string.
699 For further explanation of the search widget see the section on
700 <function>Text Searches</function>.
701       </para>
702     </listitem>
703   </varlistentry>
704   <varlistentry>
705     <term>
706       multiply(<emphasis remap='I'>value</emphasis>)
707     </term>
708     <listitem>
709       <para>
710 The multiply action allows the user to multiply the effects of many of
711 the text actions.  Thus the following action sequence
712 <emphasis remap='I'>multiply(10) delete-next-word()</emphasis> will delete 10 words.  It does not
713 matter whether these actions take place in one event or many events.
714 Using the default translations the key sequence \fIControl-u,
715 Control-d\fP will delete 4 characters.
716 Multiply actions can be chained, thus \fImultiply(5)
717 multiply(5)\fP is the same as <emphasis remap='I'>multiply(25)</emphasis>.  If the string
718 <function>reset</function> is passed to the multiply action the effects of all previous
719 multiplies are removed and a beep is sent to the display.
720       </para>
721     </listitem>
722   </varlistentry>
723   <varlistentry>
724     <term>
725       form-paragraph()
726     </term>
727     <listitem>
728       <para>
729 This action removes all the Carriage Returns from the current
730 paragraph and reinserts them so that each line is as long as possible, while
731 still fitting on the current screen.  Lines are broken at word boundaries if
732 at all possible.  This action currently works only on Text widgets
733 that use ASCII text.
734       </para>
735     </listitem>
736   </varlistentry>
737   <varlistentry>
738     <term>
739       transpose-characters()
740     </term>
741     <listitem>
742       <para>
743 This action will swap the position of the character to the left of the
744 insert point with the character to the right of the insert point.  The insert point will then
745 be advanced one character.
746       </para>
747     </listitem>
748   </varlistentry>
749   <varlistentry>
750     <term>
751       no-op([<emphasis remap='I'>action</emphasis>])
752     </term>
753     <listitem>
754       <para>
755 The no-op action makes no change to the text widget, and is mainly used
756 to override translations.  This action takes one optional argument.  If
757 this argument is <emphasis remap='I'>RingBell</emphasis> then a beep is sent to the display.
758       </para>
759     </listitem>
760   </varlistentry>
761   <varlistentry>
762     <term>
763       XawWMProtocols([<emphasis remap='I'>wm_protocol_name</emphasis>])
764     </term>
765     <listitem>
766       <para>
767 <!-- .IN "XawWMProtocols" -->
768 <!-- .sp -->
769 This action is written specifically for the file insertion and the search
770 and replace
771 dialog boxes.  This action is attached to those shells by the Text widget,
772 in order to handle ClientMessage events with the WM_PROTOCOLS atom in the
773 detail field.  This action supports WM_DELETE_WINDOW on the Text widget
774 popups, and may support other window manager protocols if necessary in
775 the future.  The popup will be dismissed if the window manager sends
776 a WM_DELETE_WINDOW request and there are no parameters in the action
777 call, which is the default.  The popup will also be dismissed if the
778 parameters include the string ``wm_delete_window,'' and the event is a
779 ClientMessage event requesting dismissal or is not a ClientMessage event.
780 This action is not sensitive to the case of the strings passed as parameters.
781       </para>
782     </listitem>
783   </varlistentry>
784   <varlistentry>
785     <term>
786       reconnect-im()
787     </term>
788     <listitem>
789       <para>
790 <!-- .IN "Input Method" -->
791 When the <function>international</function> resource is <function>true</function>,
792 input is usually passed to an input method, a separate
793 process, for composing.  Sometimes the connection to
794 this process gets severed; this action will attempt to
795 reconnect it.  Causes for severage include network
796 trouble, and the user explicitly killing one input
797 method and starting a new one.  This action may also
798 establish first connection when the application is
799 started before the input method.
800     </para>
801   </listitem>
802   </varlistentry>
803 </variablelist>
804 </para>
805 </sect3>
806 <sect3 id="Text_Selections_for_Application_Programmers">
807 <title>Text Selections for Application Programmers</title>
808 <!-- .IN "Text widget" "Text Selections for Application Programmers" -->
809 <para>
810 <!-- .LP -->
811 The default behavior of the text selection array is described in the
812 section called <function>Text Selections for Users</function>.  To modify the selections
813 a programmer must construct a <function>XawTextSelectType</function> array (called the
814 selection array), containing the selections desired, and pass this as
815 the new value for the <function>selectionTypes</function> resource.  The selection
816 array may also be modified using the <xref linkend='XawTextSetSelectionArray' xrefstyle='select: title'/>
817 <!-- .IN "XawTextSetSelectionArray" "" -->
818 function.  All selection arrays must end with the value
819 <function>XawselectNull</function>.  The <function>selectionTypes</function> resource has no converter
820 registered and cannot be modified through the resource manager.
821 </para>
822 <para>
823 <!-- .LP -->
824 The array contains a list of entries that will be called when the user
825 attempts to select text in rapid succession with the <emphasis remap='I'>select-start</emphasis>
826 action (usually by clicking a pointer button).  The first entry in the
827 selection array will be used when the <emphasis remap='I'>select-start</emphasis> action is
828 initially called.  The next entry will be used when <emphasis remap='I'>select-start</emphasis>
829 is called again, and so on.  If a timeout value (1/10 of a second) is
830 exceeded, the the next <emphasis remap='I'>select-start</emphasis> action will begin at the top
831 of the selection array.  When <function>XawselectNull</function> is reached the array
832 is recycled beginning with the first element.
833
834 <informaltable>
835   <tgroup cols='2' align='center'>
836   <colspec colname='c1'/>
837   <colspec colname='c2'/>
838   <tbody>
839     <row>
840       <entry><function>XawselectAll</function></entry>
841       <entry>Selects the contents of the entire buffer.</entry>
842     </row>
843     <row>
844       <entry><function>XawselectChar</function></entry>
845       <entry>Selects text characters as the pointer moves over them.</entry>
846     </row>
847     <row>
848       <entry><function>XawselectLine</function></entry>
849       <entry>Selects the entire line.</entry>
850     </row>
851     <row>
852       <entry><function>XawselectNull</function></entry>
853       <entry>Indicates the end of the selection array.</entry>
854     </row>
855     <row>
856       <entry><function>XawselectParagraph</function></entry>
857       <entry>Selects the entire paragraph.</entry>
858     </row>
859     <row>
860       <entry><function>XawselectPosition</function></entry>
861       <entry>Selects the current pointer position.</entry>
862     </row>
863     <row>
864       <entry><function>XawselectWord</function></entry>
865       <entry>Selects whole words as the pointer moves onto them.</entry>
866     </row>
867   </tbody>
868   </tgroup>
869 </informaltable>
870 </para>
871 <para>
872 <!-- .LP -->
873 The default selectType array is:
874 </para>
875 <para>
876 <!-- .LP -->
877 <!-- .sp -->
878 <literallayout class="monospaced">
879 {XawselectPosition, XawselectWord, XawselectLine, XawselectParagraph, XawselectAll, XawselectNull}
880 </literallayout>
881 <!-- .sp -->
882 </para>
883 <para>
884 <!-- .LP -->
885 The selection array is not copied by the text widgets.  The
886 application must allocate space for the array and cannot deallocate or
887 change it until the text widget is destroyed or until a new selection
888 array is set.
889 </para>
890 </sect3>
891 </sect2>
892 <sect2 id="Default_Translation_Bindings">
893 <title>Default Translation Bindings</title>
894 <para>
895 <!-- .LP -->
896 <!-- .XS -->
897 <!--      Default Translation Bindings -->
898 <!-- .XE -->
899 <!-- .IN "Text widget" "default translations" -->
900 The following translations are defaults built into every Text widget.
901 They can be overridden, or replaced by specifying a new value for the
902 Text widget's <function>translations</function> resource.
903 </para>
904 <para>
905 <!-- .LP -->
906 <!-- .sp -->
907 <literallayout class="monospaced">
908 <!-- .TA .5i 2.5i -->
909 <!-- .ta .5i 2.5i -->
910      Ctrl&lt;Key&gt;A:     beginning-of-line() \\n\\
911      Ctrl&lt;Key&gt;B:     backward-character() \\n\\
912      Ctrl&lt;Key&gt;D:     delete-next-character() \\n\\
913      Ctrl&lt;Key&gt;E:     end-of-line() \\n\\
914      Ctrl&lt;Key&gt;F:     forward-character() \\n\\
915      Ctrl&lt;Key&gt;G:     multiply(Reset) \\n\\
916      Ctrl&lt;Key&gt;H:     delete-previous-character() \\n\\
917      Ctrl&lt;Key&gt;J:     newline-and-indent() \\n\\
918      Ctrl&lt;Key&gt;K:     kill-to-end-of-line() \\n\\
919      Ctrl&lt;Key&gt;L:     redraw-display() \\n\\
920      Ctrl&lt;Key&gt;M:     newline() \\n\\
921      Ctrl&lt;Key&gt;N:     next-line() \\n\\
922      Ctrl&lt;Key&gt;O:     newline-and-backup() \\n\\
923      Ctrl&lt;Key&gt;P:     previous-line() \\n\\
924      Ctrl&lt;Key&gt;R:     search(backward) \\n\\
925      Ctrl&lt;Key&gt;S:     search(forward) \\n\\
926      Ctrl&lt;Key&gt;T:     transpose-characters() \\n\\
927      Ctrl&lt;Key&gt;U:     multiply(4) \\n\\
928      Ctrl&lt;Key&gt;V:     next-page() \\n\\
929      Ctrl&lt;Key&gt;W:     kill-selection() \\n\\
930      Ctrl&lt;Key&gt;Y:     insert-selection(CUT_BUFFER1) \\n\\
931      Ctrl&lt;Key&gt;Z:     scroll-one-line-up() \\n\\
932      Ctrl&lt;Key&gt;\\:     reconnect-im() \\n\\
933      Meta&lt;Key&gt;B:     backward-word() \\n\\
934      Meta&lt;Key&gt;F:     forward-word() \\n\\
935      Meta&lt;Key&gt;I:     insert-file() \\n\\
936      Meta&lt;Key&gt;K:     kill-to-end-of-paragraph() \\n\\
937      Meta&lt;Key&gt;Q:     form-paragraph() \\n\\
938      Meta&lt;Key&gt;V:     previous-page() \\n\\
939      Meta&lt;Key&gt;Y:     insert-selection(PRIMARY, CUT_BUFFER0) \\n\\
940      Meta&lt;Key&gt;Z:     scroll-one-line-down() \\n\\
941      :Meta&lt;Key&gt;d:     delete-next-word() \\n\\
942      :Meta&lt;Key&gt;D:     kill-word() \\n\\
943      :Meta&lt;Key&gt;h:     delete-previous-word() \\n\\
944      :Meta&lt;Key&gt;H:     backward-kill-word() \\n\\
945      :Meta&lt;Key&gt;\\&lt;:     beginning-of-file() \\n\\
946      :Meta&lt;Key&gt;\\&gt;:     end-of-file() \\n\\
947      :Meta&lt;Key&gt;]:     forward-paragraph() \\n\\
948      :Meta&lt;Key&gt;[:     backward-paragraph() \\n\\
949      ~Shift Meta&lt;Key&gt;Delete:          delete-previous-word() \\n\\
950      \ Shift Meta&lt;Key&gt;Delete:          backward-kill-word() \\n\\
951      ~Shift Meta&lt;Key&gt;Backspace:     delete-previous-word() \\n\\
952      \ Shift Meta&lt;Key&gt;Backspace:     backward-kill-word() \\n\\
953      &lt;Key&gt;Right:     forward-character() \\n\\
954      &lt;Key&gt;Left:     backward-character() \\n\\
955      &lt;Key&gt;Down:     next-line() \\n\\
956      &lt;Key&gt;Up:     previous-line() \\n\\
957      &lt;Key&gt;Delete:     delete-previous-character() \\n\\
958      &lt;Key&gt;BackSpace:     delete-previous-character() \\n\\
959      &lt;Key&gt;Linefeed:     newline-and-indent() \\n\\
960      &lt;Key&gt;Return:     newline() \\n\\
961      &lt;Key&gt;:          insert-char() \\n\\
962      &lt;Key&gt;Kanji:     reconnect-im() \\n\\
963      &lt;FocusIn&gt;:     focus-in() \\n\\
964      &lt;FocusOut&gt;:     focus-out() \\n\\
965      &lt;Btn1Down&gt;:     select-start() \\n\\
966      &lt;Btn1Motion&gt;:     extend-adjust() \\n\\
967      &lt;Btn1Up&gt;:     extend-end(PRIMARY, CUT_BUFFER0) \\n\\
968      &lt;Btn2Down&gt;:     insert-selection(PRIMARY, CUT_BUFFER0) \\n\\
969      &lt;Btn3Down&gt;:     extend-start() \\n\\
970      &lt;Btn3Motion&gt;:     extend-adjust() \\n\\
971      &lt;Btn3Up&gt;:     extend-end(PRIMARY, CUT_BUFFER0) \\n
972 </literallayout>
973
974
975 </para>
976 </sect2>