# $XConsortium: FileSelect1a.scr /main/4 1995/07/17 20:37:49 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
# #) 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 left of both lists.
# f) a Selection label.
# g) a text input field.
# h) a separator.
# i) four pushButtons (Help, Cancel, Filter, Ok).
CompareVisual FileSelectionBox1
# C)
Continue
# #) Press and hold MB1 on horizontal scrollbar slider of the Directories list.
# Move scrollbar slider far to the right. 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 right arrow of the horizontal scrollbar of the File
# s
# list. The slider should move to the right. The list should scroll to
# the right. 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 refresh
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
# 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