SGPanelEvent
YourSGPanelEventfunction allows your component to receive and process dialog events. This function is similar to a modal-dialog filter function.
pascal ComponentResult SGPanelEvent (SeqGrabPanelComponent s, SGChannel c, DialogPtr d, short itemOffset, EventRecord *theEvent, short *itemHit, Boolean *handled);
s- Identifies the sequence grabber component's connection to your panel component.
c- Identifies a connection to the sequence grabber channel associated with your panel component.
d- Contains a dialog pointer identifying the settings dialog box.
itemOffset- Specifies the offset to your panel's first item in the dialog box.
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 is to receive the item number in cases where your component handles the event. The number returned is an absolute, not a relative number, so it must be offset by the
itemOffsetparameter.handled- Contains a pointer to a Boolean value. Set this Boolean value to indicate whether your component handles the event: set it to
trueif you handle the event; set it tofalseif you do not.DESCRIPTION
A sequence grabber component calls yourSGPanelEventfunction whenever an event occurs in the settings dialog box. YourSGPanelEventfunction is similar to a modal- dialog filter function. The main difference is that, rather than returning a Boolean value to indicate whether you handled the event, yourSGPanelEventfunction sets a Boolean value that is provided by the calling function. If you handle the event, be sure to update the field referred to by theitemHitparameter.SEE ALSO
Your component can process mouse clicks with yourSGPanelItemfunction. This function is discussed on page 7-21.