[comp.windows.x] Sharing widgets among programs.

phils@ATHENA.MIT.EDU (Philip Thompson) (12/19/89)

I have several mapping modules of a large Geographic Information System
(GIS) written with Xlib calls that send their graphics directly to a
shared window.  This graphics window is made in advance and its ID is
used  by the other programs using properties and atoms from the server.
 This works fine except for expose events which I won't worry abount now.

The problem is that I would like to rewrite this using the toolkit and
have widgets from several programs use a common window or "toplevel"
shell.  For example the legend drawing module would use uses label
widgets rather than simple XDrawFilled... commands. Is there a correct
way of going about this.  Do I put the "toplevel" id in the server and
make children from there?  Do I subclass all of my widets and change
their Realize proceedures to use a common window?  Other ideas?

Thanks,

Philip Thompson
Dept. of Architecture and Planning, MIT

asente@decwrl.dec.com (Paul Asente) (12/19/89)

Regarding sharing windows between applications and using the toolkit,

In article <8912181622.AA03299@MIES.MIT.EDU> phils@ATHENA.MIT.EDU (Philip Thompson) writes:
>Do I subclass all of my widets and change
>their Realize proceedures to use a common window?

Yep, that's the easiest way.  Add a new resource that is the widget's
window, and in the realize procedure assign the window into the widget
field and (possibly) reparent the window.  At least one window manager
does this.

	-paul asente
	    asente@decwrl.dec.com	decwrl!asente