MyModalFilter
A modal-dialog filter function whose address is passed toCustomGetFilePreviewshould have the following form:
pascal Boolean MyModalFilter (DialogPtr theDialog, EventRecord *theEvent, short itemHit, Ptr myDataPtr);
theDialog- A pointer to the dialog structure of the dialog box.
theEvent- A pointer to the event structure for the event.
itemHit- The number of the item selected.
myDataPtr- A pointer to the optional data whose address is passed to
CustomGetFilePreview.DESCRIPTION
Your modal-dialog filter function determines how the Dialog Manager'sModalDialogroutine filters events. TheModalDialogroutine retrieves events by calling the Event Manager'sGetNextEventroutine. The Standard File Package contains an internal filter function that performs some preliminary processing on each event it receives. If you provide a modal-dialog filter function,ModalDialogcalls your filter function after it calls the internal Standard File Package filter function and before it sends the event to your dialog hook function.Your modal-dialog filter function returns a Boolean value that reports whether it handled the event. If your function returns a value of
false,ModalDialogprocesses the event through its own filters. If your function returns a value oftrue,ModalDialogreturns with no further action.SEE ALSO
See Inside Macintosh: Files for another sample modal-dialog filter function.