# $XConsortium: FileSelect1.scr /main/8 1995/07/17 20:37:42 drk $ # # @OPENGROUP_COPYRIGHT@ # COPYRIGHT NOTICE # Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc. # Copyright (c) 1996, 1997, 1998, 1999, 2000 The Open Group # ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for # the full copyright text. # # This software is subject to an open license. It may only be # used on, with or for operating systems which are themselves open # source systems. You must contact The Open Group for a license # allowing distribution and sublicensing of this software on, with, # or for operating systems which are not Open Source programs. # # See http://www.opengroup.org/openmotif/license for full # details of the license agreement. Any use, reproduction, or # distribution of the program constitutes recipient's acceptance of # this agreement. # # EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS # PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY # WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY # OR FITNESS FOR A PARTICULAR PURPOSE # # EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT # NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED # AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN # ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE # EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGES. # # # 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 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 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 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 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