next up previous contents
Next: Bi- and Multimodal Up: Event Handling Architectures Previous: Within-application event loops:

Event-routine binding: Motif, Tcl/Tk

If the application grows, the event-handler will be more and more complex. Usually the application consists of many parts (menus, dialog boxes, etc.), while the event-handler has to process all events meant for all parts.

Both Motif and Tcl/Tk are libraries using X11. Because the event-loop is part of the library, it is now invisible for the application. Tables are kept internally which store a procedure pointer for each possible event, window, class, object, whatever. The application can read and write these tables any time, and therefore influence the behaviour of every event. This solution is called ``Event Binding''. Because every window keeps its own event binding table, it is easy for an application to serve many windows at the same time.

Esprit Project 8579/MIAMI (Schomaker et al., '95)
Thu May 18 16:00:17 MET DST 1995