[comp.archives] [xpert] Re: porting unstructured graphics code to X

gjc@mitech.com (03/01/91)

Archive-name: x11/terminal/decwindows-tek-vms/1991-02-28
Archive: bu.edu:/users/gjc/decwindows-tek-vms [128.197.2.6]
Original-posting-by: gjc@mitech.com
Original-subject: Re: porting unstructured graphics code to X
Reposted-by: emv@ox.com (Edward Vielmetti)

In article <1991Feb26.092358@wsl.dec.com>, klee@wsl.dec.com (Ken Lee) writes:
> In article <1991Feb25.212501.1776@yogi.fhhosp.ab.ca>, henry@yogi.fhhosp.ab.ca writes:
> |> Is there any easy way to port the code so that I can just draw into
> |> a window, and *not* have to worry about redrawing from Expose events?
> 
> Try using the X Toolkit, with the graphics encapsulated in a widget.
> The X Toolkit will manage your expose events for you.
> 

Which widget? If a simple drawing window widget you still have to
make PLOT-10 like emulation routes which keep a display list around
so that you can redraw on the expose event.

The *big* problem in this area may have nothing to do with
keeping track of the display list but instead have to do with
completely mangling the CONTROL-STRUCTURE of the program in question
in order to be able to fit into the XtMainLoop style event-driven model.

The simplest way out of that may be to handle X graphics in a subprocess.

One example of this is a TEKTRONICS 4010 emulator on top of XLIB,
that was designed specifically for running old PLOT-10 style code.

Anonymous FTP to BU.EDU, cd to users/gjc and get decwindows-tek-vms.
(Still has #ifdef Unix stuff in the code however).


-gjc