FOXEA@VTCC1.BITNET (10/24/89)
From: VTCC1::RAMAKRISH 23-OCT-1989 15:40:59.86 To: FOXEA CC: RAMAKRISH Subj: PROBLEMS WITH WIDGETS - DOCUMENTATION. Subject : PROBLEMS WITH X-WINDOWS. * Submitted by : RAMAKRISHNAN S and NAGANAND DORASWAMY. * Problem ONE : 1) We require to use a widget upon which we can draw graphics pictures. 2) We also need to make scrolling possible: one elegant way to do this is by making the 'graphics' widget the child of a VIEWPORT widget (widget automatically provides scrollbars if its child were larger than its frame). 3) None of the widgets provided by X11 seem fit for this purpose: COMMAND widget : For panel buttons. LABEL widget : Uneditable messages. DIALOG widget : For accepting strings. BOX widget : A frame for enclosing other widgets. FORM widget : Same as BOX except that it provides an ordering for placement. GRIP widget : Handling pointer events. VPaned : A more sophisticated framework tha n BOX & FORM for holding other subwindows. TEXT (string): To display EDITABLE (optional)/ APPENDABLE string information. TEXT (file) : To display a file with options to edit/append. We just need a widget on which we can paint using the XDraw... functions of X11. We know how to take care of scrolling. We tried to come over the problem by extracting the window of a widget (say the BOX widget) and drawing on this window (this window becomes the 'Drawable' required by the XDraw... functions) : we got some funny results; the drawing never appears and at times the even the widget itself doesn't appear. The X11 manual on widgets does say that widgets can be used for graphics purposes : doesn't say which. I hope I've made the problem clear. (essentially the stmnt #1 of the problem summarizes the problem). Problem TWO : There's another\ minor problem : At times,instantiations of widgets seem to completely ignore the argument values specified by the widget defn given by the program : the default values from the resource database are then consulted. We have seen this happening esp with creation of : 1) Viewports with scrollbars (forcing the scrollbar creation is completely ignored). 2) Shell widgets for popups : although we specify the XtNminHeight, XtNmaxHeight, XtNminwidth and XtNmaxwidth values in the program (we do this very correctly , as per the X11 syntax : I assure you) , at the time of widget realization, the dimensions remain zero , so that a runtime occurs. Since we 're interested in participating in the demo, and since the problem #1 is essentially blocking our progress, I am very eager to find a soln for this ASAP. Thank You. Ramakrishnan S. Naganand Doraswamy. Date : 23-Oct.