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 167 168
|
# $XConsortium: Text1.scr /main/6 1995/07/17 20:41:14 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
#
# @) The text widget's contents read "Some Text." If Adobe fonts are
# installed on your system, then the text widget
# will use the Adobe courier 14 font.
# Otherwise the default font will be used.
# #) Select a few letters in the middle of the text by dragging
# MB1. Now, cut the selection using by pressing the osfCut key.
# The remaining text should be free of any garbage pixels in
# the area where the selection was.
LocatePointer Text1 RTextChar 1
DragComponent Text1 RTextChar 5 Btn1
ClickKey KCut
CompareVisual Text1
# C)
Continue
# #) Move the pointer into the client window after the text already
# present and click MB1. Next, type Return and the following:
# !)
# Humpty Dumpty sat on a wall.<CR>
# Humpty Dumpty had a great fall.<CR>
LocatePointer Text1 RTextChar Max
ClickMB Btn1
ClickKey KReturn
InputString "Humpty Dumpty sat on a wall.\nHumpty Dumpty had a great fall.\n"
# #) Type the next line, and note that after the horizontal scrollbar
# slider reaches the right side of its trough, it becomes smaller
# with each additional keystroke:
# !)
# All the king's horses and all the king's men.
InputString "All the king's horses and all the king's men."
CompareVisual Text1
# #) Again, move the pointer into the client window after the last
# sentence you just typed and type Return. Note that the vertical
# scrollbar slider gets smaller.
LocatePointer Text1 RTextChar Max
ClickMB Btn1
ClickKey KReturn
CompareVisual Text1
# C)
Continue
# #) Move the vertical scrollbar's slider all the way up to the top.
LocatePointer Text1 RVertScrollBarSlider
DragSliderValue Up Min
# #) Resize the window much larger. The scrollbar sliders should fill
# the troughs again.
WindowResize Shell1 SouthEast 450 150
CompareVisual Text1
# #) Move the cursor into the client window and verify that the I-beam is
# visible in the newly exposed text areas.
LocatePointer Text1 RTextChar Max
CompareVisual Text1
# C)
Continue
# #) Try the following MB1 multiple-click tests,
# and verify the selections:
# !)
# Single click -- places insertion cursor.
WindowRaise Shell1
LocatePointer Text1 RTextChar 50
ClickMB Btn1
CompareVisual Text1
Wait 1
# Double click -- selects word.
ClickMB Btn1 2
CompareVisual Text1
Wait 1
# Triple click -- selects line.
ClickMB Btn1 3
CompareVisual Text1
Wait 1
# Quadruple click -- selects all the text.
ClickMB Btn1 4
CompareVisual Text1
# C)
Continue
#
# @) The following test is concerned about using MCtrlKUp and MCtrlKDown
# to move the cursor back and forth between paragraphs, which was
# reported as a bug (# 3145).
# !)
# #) Move the cursor to the end of the line. Enlarge the window in order
# to see ten or more lines. Type the following lines, typing a space
# where the instructions indicate \"_\".
LocatePointer Text1 RTextChar Max
ClickMB Btn1
InputString "\n\na\n\n x \nb"
# #) With the cursor located after the letter \"b\", press <Ctrl> KUp.
# The cursor should move to the position before the letter \"x\".
ClickKey <Ctrl>KUp
CompareVisual Text1
# Press <Ctrl> KUp again. The cursor should now be located
# before the letter \"a\".
ClickKey <Ctrl>KUp
CompareVisual Text1
# Pressing <Ctrl> KDown should move the cursor back in front of
# the letter \"x\".
ClickKey <Ctrl>KDown
CompareVisual Text1
# Pressing <Ctrl> KDown again should move the cursor after the
# letter \"b\".
ClickKey <Ctrl>KDown
CompareVisual Text1
# C)
Continue
# @) The following two panels are a test case for CR 5166.
# #) The text widget should now have two lines of text displayed.
# Move the vertical scrollbar down to the bottom of the trough.
LocatePointer Text1 RVertScrollBarSlider
DragSliderValue Down Max
# C)
Continue
#) The text \"Spider Lives!" should now be displayed.
CompareVisual Text1
# C)
Continue
# E)
Exit
|