CustomGetFile
where, dlgHook, filterProc , activeList,
activateProc, yourDataPtr );
FileFilterYDProcPtr fileFilter ; an optional file filter function
short numTypes ; number of file types to be displayed.
SFTypeList typeList ; list of types to be displayed short dlgID ; resource ID of a customized dialog
template
Point where ; coordinates for top left of dialog window DlgHookYDProcPtr dlgHook ; NIL= standard; else=addr of custom
routine
ModalFilterYDProcPtr filterProc; filters filenames; NIL= standard filtering
short *activeList ; 0 or -1=all types; else=number of
elements in typeList
ActivateYDProcPtr activateProc ; all items in the dialog box that can be
activated
void *yourDataPtr:; optional data supplied by your
application.
Call the CustomGetFile procedure when your application requires more control over the Open dialog box. fileFilter points to an optional file filter function.
If you provide a filter function, CustomGetFile passes it both the pointer to the catalog entry for each file to be processed and also a
pointer to the optional data passed by your application in its call to
myDataPtr);
numTypes specifies the number of file types to be displayed. You can specify
one or more types. If you specify a value of -1 in the numTypes
function all files and folders at the current level of the display
hierarchy, not just the files.
typeList is the list of types to be displayed
returning.
dlgID is the resource ID of a customized dialog template. To use the
standard template, set this parameter to 0.
where specifies the upper-left corner of the dialog box in global automatically centers the dialog box on the screen.
dlgHook points to your dialog hook function, which handles item hits received
added any items to the dialog box and want the standard items handled
in the standard ways. See Callback Routines under the section
dialog hook function, which uses this syntax:
pascal short MyDlgHook( short item, DialogPtr theDialog, void *myDataPtr);
filterProc points to your modal-dialog filter function, which determines how
Specify a value of NIL if you are not supplying your own function. See
description of the modal-dialog filter function, which uses this
syntax:
* theEvent, short * itemHit, void *myDataPtr);
activeList points to a list of all items in the dialog box that can be
activated-that is, made the target of keyboard input. The list is stored
as an array of 16-bit integers. The first integer is the number of
items in the list. The remaining integers are the item numbers of all
possible keyboard targets, in the order that they are activated by the
Tab key. If you supply an activeList parameter of NIL,
activateProc points to your activation procedure, which controls the
high-lighting of dialog items that are defined by your application and
that can receive keyboard input. See Callback Routines under the
the activation procedure, which uses this syntax:
pascal void MyActivateProc(DialogPtr theDialog, short itemNo, Boolean activating, void *myDataPtr); yourDataPtr points to optional data supplied by your application. When CustomGetFile calls any of your callback routines, it pushes this parameter on the stack, making the data available to your callback
routines. If you are not supplying any data of your own, you can
specify a value of NIL.
display a customized Open dialog box or handle the default dialog box in a customized way.