TextActions.xml revision 994689c1
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 11All editing functions are performed by translation manager actions that may 12be 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 --> 20Insert 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 40Miscellaneous 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 --> 60Most of the actions take no arguments, and unless otherwise noted you 61may assume this to be the case. 62</para> 63<para> 64<!-- .LP --> 65</para> 66<sect3 id="Cursor_Movement_Actions_fP"> 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> 89These actions move the insert point forward or backward one character in 90the buffer. If the insert point is at the end or beginning of a line 91this 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> 112These actions move the insert point to the next or previous word boundary. 113A 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> 134These actions move the insert point to the next or previous paragraph boundary. 135A paragraph boundary is defined as two Carriage Returns in a row with only 136Spaces 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> 157These actions move to the beginning or end of the current line. If the 158insert 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> 179These actions move the insert point up or down one line. If the insert 180point is currently N characters from the beginning of the line then it 181will be N characters from the beginning of the next or previous line. 182If N is past the end of the line, the insert point is placed at the end 183of 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> 204These actions move the insert point up or down one page in the file. 205One page is defined as the current height of the text widget. The 206insert point is always placed at the first character of the top line by 207this 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> 228These actions place the insert point at the beginning or end of the 229current text buffer. The text widget is then scrolled the minimum 230amount 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> 251These actions scroll the current text field up or down by one line. 252They do not move the insert point. Other than the scrollbars this is 253the only way that the insert point may be moved off of the visible text 254area. The widget will be scrolled so that the insert point is back on 255the 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> 285These actions remove the character immediately before or after the 286insert point. If a Carriage Return is removed then the next line is 287appended 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> 308These actions remove all characters between the insert point location and 309the next word boundary. A word boundary is defined as a Space, Tab or 310Carriage Return. 311 </para> 312 </listitem> 313 </varlistentry> 314 <varlistentry> 315 <term> 316 delete-selection() 317 </term> 318 <listitem> 319 <para> 320This action removes all characters in the current selection. 321The 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> 340This action selects the word in which the insert point is currently located. 341If 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> 351This 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> 361This action sets the insert point to the current pointer location (if 362triggered by a button event) or text cursor location (if triggered by 363a key event). It 364will then begin a selection at this location. If many of these 365selection actions occur quickly in succession then the selection count 366mechanism will be invoked (see the section titled \fBText Selections for 367Application Programmers\fP for details). <!-- xref --> 368 </para> 369 </listitem> 370 </varlistentry> 371 <varlistentry> 372 <term> 373 select-adjust() 374 </term> 375 <listitem> 376 <para> 377This action allows a selection started with the <emphasis remap='I'>select-start</emphasis> 378action 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> 388This action ends a text selection that began with the <emphasis remap='I'>select-start</emphasis> 389action, and asserts ownership of the selection or selections specified. 390A <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> 402This action finds the nearest end of the current selection, and moves it 403to the current pointer location (if triggered by a button event) or text 404cursor 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> 414This action allows a selection started with an <emphasis remap='I'>extend-start</emphasis> action 415to 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> 425This action ends a text selection that began with the <emphasis remap='I'>extend-start</emphasis> 426action, and asserts ownership of the selection or selections specified. 427A <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 429given, <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> 439This action retrieves the value of the first (left-most) named selection 440that exists or the cut buffer that is not empty and inserts it into the 441Text widget at the current insert point location. A <emphasis remap='I'>name</emphasis> can be a 442selection (e.g. <function>PRIMARY</function>) or a cut buffer (e.g <function>CUT_BUFFER0</function>). 443Note 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> 462This action inserts a newline into the text and adds spaces to 463that 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> 473This 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> 483This 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> 513These 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 515killed 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> 525This action deletes the current selection and stuffs the deleted text into 526the 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> 536This action deletes the entire line to the right of the insert point position, 537and 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> 547This action deletes the current paragraph, if between paragraphs it deletes 548the paragraph above the insert point, and stuffs the deleted text into 549the 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> 559This action deletes everything between the current insert point location and 560the next paragraph boundary, and stuffs the deleted text into the kill 561buffer (<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> 580This action recomputes the location of all the text lines on the 581display, scrolls the text to vertically center the line containing the insert point 582on 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> 592This action activates the insert file popup. The <emphasis remap='I'>filename</emphasis> 593option specifies the default filename to put in the filename buffer of 594the popup. If no <emphasis remap='I'>filename</emphasis> is specified the buffer is empty 595at startup. 596 </para> 597 </listitem> 598 </varlistentry> 599 <varlistentry> 600 <term> 601 insert-char() 602 </term> 603 <listitem> 604 <para> 605This action may only be attached to a key event. When the 606<function>international</function> resource is <function>false</function>, this action 607calls XLookupString to translate the event into a (rebindable) Latin-1 608character (sequence) and inserts it into the text at the 609insert point. When the <function>international</function> resource is <function>true</function>, 610characters are passed to the input method via XwcLookupString, and any 611committed 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> 621This action inserts each <emphasis remap='I'>string</emphasis> into the text 622at the insert point location. Any <emphasis remap='I'>string</emphasis> 623beginning with the characters "0x" followed by an even 624number of hexadecimal digits is 625interpreted as a hexadecimal constant and the 626corresponding string is inserted instead. This 627hexadecimal 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 630being in a multi-byte encoding, and a hexadecimal 631or regular string will result in an error message 632if 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> 642This action allows the insert point to be turned on and off. 643The <emphasis remap='I'>state</emphasis> argument specifies the desired state of the insert point. 644This value may be any of the string 645values 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 647default value is <function>True</function>. 648The <emphasis remap='I'>when</emphasis> argument specifies, for <function>EnterNotify</function> or <function>LeaveNotify</function> 649events whether or not the focus field in the event is to be examined. 650If the second argument is not specified, or specified as something other 651than <function>always</function> then if the action is bound to an <function>EnterNotify</function> 652or <function>LeaveNotify</function> event, the action will be taken only if the focus 653field 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 <FocusIn>: display-caret(on) \\n\\ 666 <FocusOut>: 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> 686These 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> 696This action activates the search popup. The <emphasis remap='I'>direction</emphasis> must be 697specified as either <function>forward</function> or <function>backward</function>. The string is 698optional and is used as an initial value for the <emphasis remap='I'>Search for</emphasis>: string. 699For 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> 710The multiply action allows the user to multiply the effects of many of 711the text actions. Thus the following action sequence 712<emphasis remap='I'>multiply(10) delete-next-word()</emphasis> will delete 10 words. It does not 713matter whether these actions take place in one event or many events. 714Using the default translations the key sequence \fIControl-u, 715Control-d\fP will delete 4 characters. 716Multiply actions can be chained, thus \fImultiply(5) 717multiply(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 719multiplies 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> 729This action removes all the Carriage Returns from the current 730paragraph and reinserts them so that each line is as long as possible, while 731still fitting on the current screen. Lines are broken at word boundaries if 732at all possible. This action currently works only on Text widgets 733that use ASCII text. 734 </para> 735 </listitem> 736 </varlistentry> 737 <varlistentry> 738 <term> 739 transpose-characters() 740 </term> 741 <listitem> 742 <para> 743This action will swap the position of the character to the left of the 744insert point with the character to the right of the insert point. The insert point will then 745be 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> 755The no-op action makes no change to the text widget, and is mainly used 756to override translations. This action takes one optional argument. If 757this 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 --> 769This action is written specifically for the file insertion and the search 770and replace 771dialog boxes. This action is attached to those shells by the Text widget, 772in order to handle ClientMessage events with the WM_PROTOCOLS atom in the 773detail field. This action supports WM_DELETE_WINDOW on the Text widget 774popups, and may support other window manager protocols if necessary in 775the future. The popup will be dismissed if the window manager sends 776a WM_DELETE_WINDOW request and there are no parameters in the action 777call, which is the default. The popup will also be dismissed if the 778parameters include the string ``wm_delete_window,'' and the event is a 779ClientMessage event requesting dismissal or is not a ClientMessage event. 780This 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" --> 791When the <function>international</function> resource is <function>true</function>, 792input is usually passed to an input method, a separate 793process, for composing. Sometimes the connection to 794this process gets severed; this action will attempt to 795reconnect it. Causes for severage include network 796trouble, and the user explicitly killing one input 797method and starting a new one. This action may also 798establish first connection when the application is 799started 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 --> 811The default behavior of the text selection array is described in the 812section called <function>Text Selections for Users</function>. To modify the selections 813a programmer must construct a <function>XawTextSelectType</function> array (called the 814selection array), containing the selections desired, and pass this as 815the new value for the <function>selectionTypes</function> resource. The selection 816array may also be modified using the <function>XawTextSetSelectionArray</function> 817<!-- .IN "XawTextSetSelectionArray" "" --> 818function. All selection arrays must end with the value 819<function>XawselectNull</function>. The <function>selectionTypes</function> resource has no converter 820registered and cannot be modified through the resource manager. 821</para> 822<para> 823<!-- .LP --> 824The array contains a list of entries that will be called when the user 825attempts to select text in rapid succession with the <emphasis remap='I'>select-start</emphasis> 826action (usually by clicking a pointer button). The first entry in the 827selection array will be used when the <emphasis remap='I'>select-start</emphasis> action is 828initially called. The next entry will be used when <emphasis remap='I'>select-start</emphasis> 829is called again, and so on. If a timeout value (1/10 of a second) is 830exceeded, the the next <emphasis remap='I'>select-start</emphasis> action will begin at the top 831of the selection array. When <function>XawselectNull</function> is reached the array 832is 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 --> 873The 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 --> 885The selection array is not copied by the text widgets. The 886application must allocate space for the array and cannot deallocate or 887change it until the text widget is destroyed or until a new selection 888array 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" --> 900The following translations are defaults built into every Text widget. 901They can be overridden, or replaced by specifying a new value for the 902Text 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<Key>A: beginning-of-line() \\n\\ 911 Ctrl<Key>B: backward-character() \\n\\ 912 Ctrl<Key>D: delete-next-character() \\n\\ 913 Ctrl<Key>E: end-of-line() \\n\\ 914 Ctrl<Key>F: forward-character() \\n\\ 915 Ctrl<Key>G: multiply(Reset) \\n\\ 916 Ctrl<Key>H: delete-previous-character() \\n\\ 917 Ctrl<Key>J: newline-and-indent() \\n\\ 918 Ctrl<Key>K: kill-to-end-of-line() \\n\\ 919 Ctrl<Key>L: redraw-display() \\n\\ 920 Ctrl<Key>M: newline() \\n\\ 921 Ctrl<Key>N: next-line() \\n\\ 922 Ctrl<Key>O: newline-and-backup() \\n\\ 923 Ctrl<Key>P: previous-line() \\n\\ 924 Ctrl<Key>R: search(backward) \\n\\ 925 Ctrl<Key>S: search(forward) \\n\\ 926 Ctrl<Key>T: transpose-characters() \\n\\ 927 Ctrl<Key>U: multiply(4) \\n\\ 928 Ctrl<Key>V: next-page() \\n\\ 929 Ctrl<Key>W: kill-selection() \\n\\ 930 Ctrl<Key>Y: insert-selection(CUT_BUFFER1) \\n\\ 931 Ctrl<Key>Z: scroll-one-line-up() \\n\\ 932 Ctrl<Key>\\: reconnect-im() \\n\\ 933 Meta<Key>B: backward-word() \\n\\ 934 Meta<Key>F: forward-word() \\n\\ 935 Meta<Key>I: insert-file() \\n\\ 936 Meta<Key>K: kill-to-end-of-paragraph() \\n\\ 937 Meta<Key>Q: form-paragraph() \\n\\ 938 Meta<Key>V: previous-page() \\n\\ 939 Meta<Key>Y: insert-selection(PRIMARY, CUT_BUFFER0) \\n\\ 940 Meta<Key>Z: scroll-one-line-down() \\n\\ 941 :Meta<Key>d: delete-next-word() \\n\\ 942 :Meta<Key>D: kill-word() \\n\\ 943 :Meta<Key>h: delete-previous-word() \\n\\ 944 :Meta<Key>H: backward-kill-word() \\n\\ 945 :Meta<Key>\\<: beginning-of-file() \\n\\ 946 :Meta<Key>\\>: end-of-file() \\n\\ 947 :Meta<Key>]: forward-paragraph() \\n\\ 948 :Meta<Key>[: backward-paragraph() \\n\\ 949 ~Shift Meta<Key>Delete: delete-previous-word() \\n\\ 950 \ Shift Meta<Key>Delete: backward-kill-word() \\n\\ 951 ~Shift Meta<Key>Backspace: delete-previous-word() \\n\\ 952 \ Shift Meta<Key>Backspace: backward-kill-word() \\n\\ 953 <Key>Right: forward-character() \\n\\ 954 <Key>Left: backward-character() \\n\\ 955 <Key>Down: next-line() \\n\\ 956 <Key>Up: previous-line() \\n\\ 957 <Key>Delete: delete-previous-character() \\n\\ 958 <Key>BackSpace: delete-previous-character() \\n\\ 959 <Key>Linefeed: newline-and-indent() \\n\\ 960 <Key>Return: newline() \\n\\ 961 <Key>: insert-char() \\n\\ 962 <Key>Kanji: reconnect-im() \\n\\ 963 <FocusIn>: focus-in() \\n\\ 964 <FocusOut>: focus-out() \\n\\ 965 <Btn1Down>: select-start() \\n\\ 966 <Btn1Motion>: extend-adjust() \\n\\ 967 <Btn1Up>: extend-end(PRIMARY, CUT_BUFFER0) \\n\\ 968 <Btn2Down>: insert-selection(PRIMARY, CUT_BUFFER0) \\n\\ 969 <Btn3Down>: extend-start() \\n\\ 970 <Btn3Motion>: extend-adjust() \\n\\ 971 <Btn3Up>: extend-end(PRIMARY, CUT_BUFFER0) \\n 972</literallayout> 973 974 975</para> 976</sect2> 977