ssroy@phoenix.Princeton.EDU (Steve Scot Roy) (04/25/89)
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. 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. When I try this on a variety of widgets in the X User Interface (XUI) it just screams and dies. 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? Is this an effect of the crosstalk between Xt and Xaw that people have been mentioning lately? Thanks in advance. 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. 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. steve roy ssr@courant.princeton.edu
fisher@decwin.DEC.COM (VMS DECwindows Engineering, 381-1466) (04/25/89)
(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
ben@hpcvlx.HP.COM (Benjamin Ellsworth) (04/26/89)
> 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. 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? I cannot presume to speak for project Athena nor DEC, but as one of the "designers of the widgets" I can say that we *definitely* expected widget users to do such a thing. This was the primary rationale for the inclusion of the WorkArea widget in the HP widget set. Perhaps it was poorly explained, but we did try to provide any easy way to do just that. > Let me take this opportunity to say that I don't think it is... Ok, now do you feel better? > ...and that it would be so easy to ... No, it's only easy to assume that it's easy. Anybody in technical documentation will tell you how hard it is to get it right the first time out. I will spare you the grisly details about the constraints imposed on the development of "freely available to the public" code by a for-profit corporation > steve roy > ssr@courant.princeton.edu ----------------------------------------------------------------------- Benjamin Ellsworth | ben@cv.hp.com | INTERNET Hewlett-Packard Company | {backbone}!hplabs!hp-pcd!ben | UUCP 1000 N.E. Circle | (USA) (503) 750-4980 | FAX Corvallis, OR 97330 | (USA) (503) 757-2000 | VOICE ----------------------------------------------------------------------- All relevant disclaimers apply. -----------------------------------------------------------------------