1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166
|
# $XConsortium: Text2.scr /main/6 1995/07/17 20:41:44 drk $
#
# Motif
#
# Copyright (c) 1987-2012, The Open Group. All rights reserved.
#
# These libraries and programs are free software; you can
# redistribute them and/or modify them under the terms of the GNU
# Lesser General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option)
# any later version.
#
# These libraries and programs are distributed in the hope that
# they will be useful, but WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU Lesser General Public License for more
# details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with these librararies and programs; if not, write
# to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
# Floor, Boston, MA 02110-1301 USA
#
#
# HISTORY
#
# #) This text widget has defined a number of different translations, which are
# listed below. Try each translation and verify that the correct action is
# performed. The fontList for this text widget is variable. If you
# need to add more text to the example, do so.
LocatePointer Text1 RTextChar 20
ClickMB Btn1
# !)
# Ctrl<Key>g beep
ClickKey <Ctrl> Kg
# Ctrl<Key>i insert string "newstring"
ClickKey <Ctrl> Ki
CompareVisual Text1
# Ctrl<Key>right bracket forward a paragraph
ClickKey <Ctrl> KBracketRight
CompareVisual Text1
# Ctrl<Key>left bracket back a paragraph
ClickKey <Ctrl> KBracketLeft
CompareVisual Text1
# Meta<Key>u scroll one line up
ClickKey <Meta> Ku
CompareVisual Text1
# Meta<Key>d scroll down one line
ClickKey <Meta> Kd
CompareVisual Text1
# Ctrl<Key>f next page
ClickKey <Ctrl> Kf
CompareVisual Text1
# Ctrl<Key>b previous page
ClickKey <Ctrl> Kb
CompareVisual Text1
# <Key>BackSpace kill previous character
LocatePointer Text1 RTextChar 20
ClickMB Btn1
ClickKey KBackSpace
CompareVisual Text1
# Ctrl<Key>s kill selection
LocatePointer Text1 RTextChar 20
ClickMB Btn1
DragComponent Text1 RTextChar 35
ClickKey <Ctrl> Ks
CompareVisual Text1
# Ctrl<Key>k kill next word
ClickKey <Ctrl> Kk
CompareVisual Text1
# Meta<Key>k kill previous word
ClickKey <Meta> Kk
CompareVisual Text1
# Ctrl<Key>u unkill
ClickKey <Ctrl> Ku
CompareVisual Text1
# Ctrl<Key>r delete previous word
ClickKey <Ctrl> Kr
CompareVisual Text1
# Meta<Key>r delete next word.
ClickKey <Meta> Kr
CompareVisual Text1
# Ctrl<Key>c cut primary selection
LocatePointer Text1 RTextChar 5
ClickMB Btn1
DragComponent Text1 RTextChar 10
ClickKey <Ctrl> Kc
CompareVisual Text1
# C)
Continue
# /* test case for PIR 3520 */
# This PIR was closed, test is no longer valid.
# # #) Select any word in the text by double clicking MB1 on it.
# LocatePointer Text1 RTextChar 25
# ClickMB Btn1 2
#
# # #) Press the Backspace key to kill the selection.
# ClickKey KBackSpace
# CompareVisual Text1
#
# # #) Click MB1 somewhere else in the text.
# LocatePointer Text1 RTextChar 40
#
# # #) Press Ctrl<Key>u to unkill the selection and paste it at the
# # insertion cursor position.
# ClickKey <Ctrl> Ku
# CompareVisual Text1
#
# # #) Perform the same sequence of select word, kill and unkill using
# # the kill-next-word ( Ctrl<Key>k ) action.
# LocatePointer Text1 RTextChar 15
# ClickMB Btn1 2
# ClickKey <Ctrl> Kk
# LocatePointer Text1 RTextChar 30
# ClickKey <Ctrl> Ku
# CompareVisual Text1
#
# # #) Once again, perform the sequence using the kill-previous-word
# # ( Meta<Key>k ) action.
# LocatePointer Text1 RTextChar 20
# ClickMB Btn1 2
# ClickKey <Meta> Kk
# LocatePointer Text1 RTextChar 45
# ClickKey <Ctrl> Ku
# CompareVisual Text1
#
# # C)
# Continue
#
# /* end of test case for PIR 3520 */
# Test case for CR 8029 - should not get an infinite loop
LocatePointer Text1
ClickMB Btn1
ClickKey KBeginData
InputString " A paragraph that starts\nwith whitespace\n\n"
ClickKey KBeginData
# Ctrl<Key>right bracket forward a paragraph
ClickKey <Ctrl> KBracketRight
# C)
Continue
# E)
Exit
|