MyModalFilter
TheSGSettingsDialogfunction causes the sequence grabber to present its settings dialog box to the user. This is a movable modal dialog box, so you must provide a filter function to handle update events in your window. You specify your filter function with theprocparameter.A modal-dialog filter function whose address is passed to
SGSettingsDialogshould support the following interface:
pascal Boolean MyModalFilter (DialogPtr theDialog, EventRecord *theEvent, short *itemHit, long refCon);
theDialog- Points to the settings dialog box's dialog structure.
theEvent- Contains a pointer to an event structure. This event structure contains information identifying the nature of the event.
itemHit- Contains a pointer to a field that contains the item selected by the user. If you handle the event, you should update this field to reflect the item number of the selected item.
refCon- Contains a reference constant. You provide this reference constant to the sequence grabber in the
procRefNumparameter of theSGSettingsDialogfunction, which is described on page 5-45.DESCRIPTION
Your modal-dialog filter function returns a Boolean value that indicates whether you handled the event. Set this value totrueif you handled the event; otherwise, set it tofalse. If you handle the event, be sure to update the value of the field referred to by theitemHitparameter.SEE ALSO
See Inside Macintosh: Files for a sample modal-dialog filter function.