Developer

API Reference

ITRIGMLELEMENT_InsertHandler()

deprecated
Items marked as deprecated have been replaced by a more powerful, alternative feature. Deprecated interfaces include a reference to the replacement interface, which should be used for all new application development. Deprecated features are still supported for backward compatibility, but should be avoided when developing new applications.
Brew Release
Brew MP 1.0.2
See Also
ITRIGMLELEMENT_GetHandler() ITRIGMLELEMENT_RemoveHandler() ITRIGMLELEMENT_HandleEvent()
Description
Attaches an event handler to a Trigml element.
Parameters
  • po
    []:
    The element on which to register the event handler.
  • classId
    []:
    An AEECLASSID which is used to identify the event handler in calls to ITRIGMLELEMENT_GetHandler().
  • handler
    []:
    A pointer to an implementation of ITrigmlEventHandler.
  • prepend
    []:
    If TRUE, insert this event handler at the start of the element's event handler list, so that it will receive incoming events before the other handlers. Otherwise, insert it at the end.
Interface
ITRIGMLELEMENT
Prototype
   int ITRIGMLELEMENT_InsertHandler(ITrigmlElement* po, AEECLSID classId, ITrigmlEventHandler* handler, boolean prepend);
Return
   SUCCESS if the event handler was successfully inserted.
Side Effect
None
Comment
This methods adds an event handler to a Trigml element. The core extension provides default event routing for all visible elements and listening elements. You will therefore only need to add an event handler if you have event handling requirements that are beyond what the core extension provides. See ITRIGMLELEMENT_HandleEvent() for a description of the event handling provided by the core extension.
The element will addref the event handler. It will be released when the element is destroyed, or if explicitly removed with ITRIGMLELEMENT_RemoveHandler().
  • Follow