thp@westhawk.UUCP ("Timothy H Panton.") (04/26/89)
We've just finished a bit of contract work that involved exactly this. The existing simulation (of a chemical plant) basically offers a command-line type interface on stdio (cf ed(1)). For various reasons it was decided that the best way to get the X version was to have a separate X process, thus: +-----------+ +----------+ +----------+ | Simulation|--->| Xfrontend|--->| X server | +-----------+ +----------+ +----------+ This means that the simulation is unchanged, the Xfrontend fields menu actions and turns them into messages to send to the simulation. Data from the simulation is interpreted and the displayed textually, or graphically as appropriate. Whilst this may not be ideal, it allows one to avoid changing working code and in some cases it adds flexiblity as the programs can all run on different machines. Mail me if you want to know more. Tim +----------------------------------------------------------------------------+ |Tim Panton, Westhawk Ltd. (Bright the hawk's flight on the empty sky.)| |Paper: Westhawk Ltd. 26 Rydal Grove, Helsby, Cheshire, WA6 OET. UK. | |Phone: +44 92822574 uucp : ..!mcvax!ukc!cam-cl!westhawk!thp | +----------------------------------------------------------------------------+