With acknowledgements to David Collins. The Event Model Events, generated by devices or event handlers. In OO terms these are messages to objects Event queues distribute events to event handlers. The destination for an event may be determined by a state variable such a mouse location or by an event handler having registered itself as a recipient for the particular event. Event handlers that receive and process events.
Event handlers correspond to objects, and the processing routines to methods or members functions.
Event handlers can generate further events. Templates describe the behaviour of event handlers. Event handlers can be specified using a combination of text and graphics. The text describes the object and its attributes and the graphics form a state diagram showing the event handler transitions. As we shall see the process of writing a GUI program is inherently more complex that that for a tty interface.