All data for the graphic windows is stored in a linear linked list. Valid for all these windows are the following event types: GraphicExpose, ButtonPress, ButtonRelease, KeyPress, MotionNotify, EnterNotify, LeaveNotify, MapNotify, UnmapNotify, and StructureNotify.
There is no background storage for the graphic output, because it would be too memory intensive. The drawback is a longer screen setup time which depends mainly on the number and kind of link options that are displayed.
For simplicity reasons, all displays use the same graphic context ui_gc (see [You89], p. 184 for reference).
The events for all graphic windows are processed with the three event handlers ui_KEvent() for KeyPress events, ui_can_MWEvent() for mouse and window events and ui_can_MapEvent() for window mapping events. These functions are installed for each window with XtAddEventHandler. They determine in which window the event has occurred. This information is needed to determine subnet number and grid position because of the different origins in the various displays.
Input to the windows are all keyboard events, mouse events, and window events. A window is always active, if it has last sent an EnterNotify event (the mouse has been moved into the window) and is not closed. Thereby, the editor becomes independent from the windows.
The processing of graphical output is more complicated, since some operations affect only one (e.g. a refresh; UI_LOCAL), others all open windows (e.g. a change in the network; UI_GLOBAL). A simple approach would just draw a new network in every display. This, however, would take much more time than the solution found in SNNS-XGUI, where the editor determines whether it is better to re-draw the whole network or only the updates. This approach leaves some pixels white on each update, which slowly spoils the picture.
X refreshes the displays with a call to ui_refresh after each GraphicExpose event, if the count component of the event is 0 (see also [You89], p. 118). This routine is also defined as a callback function for expose events on the generation of a display.