Path: utzoo!attcan!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!bloom-beacon!decwin.DEC.COM!fisher From: fisher@decwin.DEC.COM (VMS DECwindows Engineering, 381-1466) Newsgroups: comp.windows.x Subject: RE: XUI Message-ID: <8904251545.AA08898@decwrl.dec.com> Date: 25 Apr 89 15:44:00 GMT Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 68 (I don't know diddly about XUI, but I forwarded ssr's questions on to someone who does. This is his answer:) ----------------------------------------------------- Burns, You can post this. Mike >Is anyone out there using the DEC User Interface Language and the >associated toolkits? I am trying to do something that ought to be >simple. Yes, lots of people are >I just want to put up a window and be able to use Xlib routines on it. >None of the examples they send do this, and none of the documentation >mentions it. Now, I know how to do this with Athena widgets -- use >XtWindow(widget) to get a window and related calls to set up a graphics >context and so on. The Window Widget in the XUI Toolkit is for exactly this purpose. It is a widget which really does nothing except have an expose callback. The callback routine is responsible for all drawing in the widget's window. You are correct that the window is obtained by using XtWindow (window_widget). >When I try this on a variety of widgets in the X >User Interface (XUI) it just screams and dies. Don't know what this means, but I have used this in numerous instances, Mandelbrot sets, differential equation plotters... >Has anybody seen how to do this? Is there something special I need to >do? Does anybody have an example of how to do this? Not talked about because it won't work. See below. >Is this an effect >of the crosstalk between Xt and Xaw that people have been mentioning >lately? Can't comment on this. >More generally, in the athena widgets, the HP widgets and now the DEC >widgets, no mention is ever made in the documentation of how to use the >Xlib routines in widgets. You should not draw into windows of other widgets since the widget thinks it owns the window and will not tell you about exposes or other things it's doing. The number of things a widget does to it's window, and the circumstance under which this happens is guite large and supposed to be opaque to the user. Hence without explicit linkage, such as an expose callback, an application can not reliably 'add' graphics to a widget's window. >Do the designers of the widgets think this is >such a rare thing to do that it is not worth explaining how to draw a >line from point A to point B in a widget? Let me take this opportunity >to say that I don't think it is, and that it would be so easy to include >a very simple example or two in the documentaton to relieve a great deal >of frustration for the people using these systems. It's not a rare thing, it's just not possible unless the widget is accomodating you. So the widgets that do accomodate will have an expose callback, the others don't mention it because you can't do it. Michael D. Collins