HandleEvent
TheHandleEventmethod should attempt to handle the specified user event.
ODBoolean HandleEvent (inout ODEventData event, in ODFrame frame, in ODFacet facet, inout ODEventInfo eventInfo);
event- A platform-specific structure representing an event. On return, the fields of the structure may have been modified. On the Mac OS platform, the structure is defined as a Mac OS event record.
frame- A reference to a display frame in which the event occurred.
facet- A reference to a facet in which the event occurred, or
kODNULLfor events not based on geometry (for example, keyboard events) or events outside a modal focus.eventInfo- A platform-specific structure that contains additional event information. On return, the relevant fields of the structure are filled in if the event was handled.
- return value
kODTrueif this part handled the event, otherwisekODFalse.DISCUSSION
OpenDoc calls this method to pass user events to this part.The
eventInfostructure contains the following information:
If this part has set the
- a reference to an embedded frame and an embedded facet of this part (for event types
kODEvtMouseDownEmbedded,kODEvtMouseUpEmbedded, orkODEvtMouseDownBorder)- an
ODPointvalue describing the location of the event, expressed in frame coordinates- a Boolean value that indicates whether an embedded part propagated an event to this part
doesPropagateEventsflag for any of its embedded frames (by calling the embedded frame'sSetPropagateEventsmethod), this part then receives any event not handled by an embedded frame in addition to it own events.OVERRIDING
When you subclassODPart, you must override this method. Your override method must not call its inherited method; that is, your override method must implement this method's functionality completely.EXCEPTIONS
kODErrInvalidFacet- The specified facet is not a facet of this part.
kODErrInvalidFrame- The specified frame is not a display frame of this part.
SEE ALSO
TheODEventDatatype (page 890).
TheODEventInfotype (page 891).
TheODFrame::SetPropagateEventsmethod (page 337).
"The HandleEvent Method" on page 78 in OpenDoc Cookbook.
Table 2-1 on page 89 in OpenDoc Programmer's Guide.
"Mouse Events" on page 190 in OpenDoc Programmer's Guide.
"The HandleEvent Method of Your Part Editor" on page 196 in OpenDoc Programmer's Guide.
"Acquiring and Relinquishing the Modal Focus" on page 232 in OpenDoc Programmer's Guide.
"Acquiring and Relinquishing the Clipboard Focus" on page 352 in OpenDoc Programmer's Guide.
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help