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 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281
|
# $XConsortium: FileSelect1.scr /main/8 1995/07/17 20:37:42 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
#
# OSF/Motif: @(#)FileSelect1.scr 1.4 92/02/14
# A client window with a FileSelectionBox will appear. The FileSelectionBox
# will have the following items:
#!)
# a) a <Look For> Label.
# b) a directory mask input field.
# c) a Files list (with files beginning with the
# letter b).
# d) a Directories list (with all directories in the
# current directory).
# e) scrollbars below and to the right of both lists.
# f) a Selection label.
# g) a text input field.
# h) a separator.
# i) four pushButtons (OK, Filter, Cancel, Help).
CompareVisual FileSelectionBox1
# C)
Continue
# Press and hold MB1 on horizontal scrollbar slider of the Directories list.
# Move scrollbar slider far to the left. The list should scroll horizontally
# allowing the user to see the full directory path. Release MB1.
LocatePointer FileSelectionBox1 RDirListHorizScrollBarSlider
DragSliderValue Left Min
CompareVisual FileSelectionBox1
# Press and hold MB1 on the left arrow of the horizontal scrollbar of the Files
# list. The slider should move to the left. The list should scroll to
# the left. Release MB1
LocatePointer FileSelectionBox1 RFileListHorizScrollBarLeftArrow
ClickMB Btn1
ClickMB Btn1
ClickMB Btn1
LocatePointer FileSelectionBox1 RFileListHorizScrollBarRightArrow
ClickMB Btn1
ClickMB Btn1
ClickMB Btn1
CompareVisual FileSelectionBox1
# C)
Continue
# Click MB1 on a filename from the Files list. The selected filename (with
# full pathname) should invert colors and appear in the 'Selection' field.
LocatePointer FileSelectionBox1 RFileListItem 0
ClickMB Btn1
CompareVisual FileSelectionBox1
# Resize the client window.
WindowResize Shell1 SouthEast 400 400
# Iconify the client window.
WindowIconify Shell1
# Normalize the client window.
WindowDeiconify Shell1
# Move the client window.
WindowMove Shell1 50 50
# Click MB1 on all pushButtons except cancel. When filter button is pressed,
# the Files list will refresh and the File Selection Box will resize to
# it original size.
LocatePointer FileSelectionBox1 RHelpButton
ClickMB Btn1
LocatePointer FileSelectionBox1 ROkButton
ClickMB Btn1
LocatePointer FileSelectionBox1 RFilterButton
ClickMB Btn1
CompareVisual FileSelectionBox1
# C)
Continue
# Change <Look for> pattern so that the \"b*\" at the end of the directory
# mask is now \"m*\".
LocatePointer FileSelectionBox1 RFileFilterTextChar Max
ClickMB Btn1
ClickKey KBackSpace
ClickKey KBackSpace
InputString "m*"
# Click MB1 on Filter button. The Files list should change so that only
# files that start with the letter m are displayed.
LocatePointer FileSelectionBox1 RFilterButton
ClickMB Btn1
CompareVisual FileSelectionBox1
# Use the vertical scrollbar to scroll through the Files list. Verify that
# only files that begin with the letter m should be visible.
LocatePointer FileSelectionBox1 RFileListVertScrollBarSlider
DragSliderValue Down Max
DragSliderValue Up Min
CompareVisual FileSelectionBox1
# C)
Continue
# Change <Look for> pattern so that the \"m*\" at the end of the directory
# mask is now \"b*\".
LocatePointer FileSelectionBox1 RFileFilterTextChar Max
ClickMB Btn1
ClickKey KBackSpace
ClickKey KBackSpace
InputString "b*"
# While focus is in the text widget, hit the return key. This should depress
# the Filter button, and the Files list should redisplay with files that
# begin with the letter b.
ClickKey KReturn
CompareVisual FileSelectionBox1
# The vertical scrollbar should have filled on the last operation.
# Move client window so that it partially obscures the term window.
# Raise the term window. Raise the client window.
WindowFocus Shell1
# Change <Look for> pattern so that the \"b*\" at the end of the directory
# mask is now \"d*\".
LocatePointer FileSelectionBox1 RFileFilterTextChar Max
ClickMB Btn1
ClickKey KBackSpace
ClickKey KBackSpace
InputString "d*"
# While focus is in the text widget, hit the return key. This should depress
# the Filter button, and the Files list should redisplay with files that
# begin with the letter d.
ClickKey KReturn
CompareVisual FileSelectionBox1
# Use the vertical scrollbar to scroll through the Files list. Verify that
# only files that begin with the letter d should be visible.
LocatePointer FileSelectionBox1 RFileListVertScrollBarSlider
DragSliderValue Down Max
DragSliderValue Up Min
CompareVisual FileSelectionBox1
# C)
Continue
# Move to the Files list and click MB on item \"decor00\". This item should
# invert and appear in the \'Selection\' field (with full pathname).
LocatePointer FileSelectionBox1 RFileListItem 0
ClickMB Btn1
# Press the return Key. A OK callback message will appear in the term window.
ClickKey KReturn
CompareVisual FileSelectionBox1
# Click MB1 on the Help Button. A Help callback message will appear in the
# term window.
LocatePointer FileSelectionBox1 RHelpButton
ClickMB Btn1
# Click MB1 on the Filter Button. An Apply callback message will appear in the
# term window. The Files list will refresh.
LocatePointer FileSelectionBox1 RFilterButton
ClickMB Btn1
CompareVisual FileSelectionBox1
# C)
Continue
# Test for memory leaks. Click on a file name then press the up
# or down key.
LocatePointer FileSelectionBox1 RFileListItem 1
ClickKey KDown
ClickKey KUp
Continue
# Try clicking (single and double) in the \"[\ \ \ ]\" entry in the
# Files list.
LocatePointer FileSelectionBox1 RFileListItem 0
ClickMB Btn1
ClickMB Btn1 2
CompareVisual FileSelectionBox1
# You should not be able to select this element. You should not
# receive any callbacks.
# C)
Continue
# Move the pointer into the directories list. The Default button should
# be the Filter button. Now move off the directories list to the background
# of the FileSelectionBox. The Default button should NOT change, it should
# still be on the Filter button.
LocatePointer FileSelectionBox1 RDirList
CompareVisual FileSelectionBox1
LocatePointer FileSelectionBox1
CompareVisual FileSelectionBox1
# Click MB1 on Cancel pushButton. The FileSelectionBox will be destroyed and
# an empty shell will be left.
LocatePointer FileSelectionBox1 RCancelButton
ClickMB Btn1
# E)
Exit
|