next up previous contents index
Next: Common GUI Commands and Up: Graphics User Interface: Introduction Previous: Graphical forms


File Selection and input

Another often repeated operation is the selection of a file for input of data (or for other purposes). To facilitate this operation a ``file selection tool'' is used. This allows the directory tree to be searched as well as displaying available files. An example is shown in Figure 8.

Figure 8: The File Selection Tool
\includegraphics[height=220mm]{file_selection.ps}

At the top of the display is the ``prompt'' describing the type of file to be entered. The line underneath shows the current directory and this text will change if the directory is changed. Underneath, on the left hand side is the ``UP DIRECTORY'' button which allows the directory tree to be mounted. The sub-directories of the current directory, if any, are displayed in a region on the left of the window and any files are displayed on the right. Both, when present, are displayed in blue writing on a yellow background (i.e. active), and if more directories of files are present than can be displayed ``scroll'' buttons appear to allow the list to be scrolled. Clicking on a directory name will change the current directory, and a new list of sub-directories and files will be displayed.

As well as the directory and file selection regions, there is a region for text input. The text is displayed at the bottom of the window. Thus, rather than clicking on a displayed file name it is possible to enter file names from the keyboard. The <ENTER> (or $<$ RETURN$>$) key is used to complete entry of the name. If a valid file name is entered then this will be the selected file. If a valid directory name is entered, then the directory will be changed and a new set of files and sub-directories will be displayed. The $<$TAB$>$ key may be used for automatic file name completion. Pressing the $<$TAB$>$ key will search for possible completions of the entered text. If only one file or directory is possible, then this will be automatically selected. In case that more than one completion is possible then common characters will be automatically completed as far as possible. Immediately using the $<$TAB$>$ key again will update the lists of files and directories which are possible completions of the file name. (Note: when this file completion facility is used, any filters or type matching (see below) is ignored.)

Additionally the following buttons follow the directory list:

CANCEL To cancel the selection of a file. This will cancel the input and return to a menu.
? List of button commands and short explanatory text.
HELP Help information on the particular type of file required.
INFO Help information on the use of the file selection tool.
TYPES A sub-set of files may be selected and displayed by specifying only files of a certain file extension to be ``selectable''. By clicking on the TYPES button the require extension of the files may be entered. e.g. image may be entered to select only MarResearch image plate scanner files. When a file type has been defined it is displayed in the information box, to the right of the TYPES button. In the example no file types have been defined so the information box contains the text <ALL PERMITTED>.
FILTER A sub-set of files may be selected and displayed by defining a file ``filter''. The asterisk is used as a ``wild-card'' so that a pattern may be defined and only files matching the pattern will be displayed in the file window. e.g. If ``f*.dat'' is entered, then only files which start with lower case ``f'' and are of file extension ``dat'' will be selectable. Any active filter is displayed to the right of the ``FILTER'' button. In the example no file filter has been defined so the information box contains the text <NO FILTERING>. (It should be noted that both ``FILTER'' and ``TYPES'' will act together if they are both activated.)

Having selected a file FIT2D will try to use the file extension to determine the data format. If the file extension is of a number of ``known'' types the appropriate input code will automatically be tried. e.g. The Molecular Dynamics image plate scanners save files with the extension gel, so all such files are read in automatically. If a file type is unknown, then a menu of available input formats is displayed, and the user can click on the correct format, or the CANCEL button if none are suitable. (The BINARY input type allows a very wide range of file types to be input, so long as the user knows the basic details of the format.)


next up previous contents index
Next: Common GUI Commands and Up: Graphics User Interface: Introduction Previous: Graphical forms
Andrew Hammersley
2004-01-09