jonm@syma.sussex.ac.uk (Jonathan Meyer) (12/21/89)
1. Question - I want to make slots in a GC Values structure available as resources. I could add an XGCValues structure to the instance part of the widget and treat it as a subresource. That seems excessive since many widgets share graphics contexts, and I don't want all of the slots anyway. I could also add just the slots I want to the instance part of the widget, but this involves the overhead of making sure that these slots agree with the XGCValues slots. Can anyone suggest the best way of doing this? I must admit that I was surprised that there is so little support for GC's in the toolkit, since all widgets use them. 2. I have spoken to the people in charge here, and they have agreed to let me make my Graphics Widget public domain. In fact, the widget is part of a set of widgets. Here is an outline: PopCore - like Core widget but with a few more resources, and a callback list that is activated through an action. ( ie. you can specify the events that the callback is activated on). PopPixmap - Subclass of PopCore. Not really a widget. Instead it is a way of creating Pixmaps using the facilities (eg. resources) of Xt. used by: PopGraphic - A subclass of PopPixmap. It is just a window that you can perform graphics/text operations on. It duplicates the operations on a pixmap, and uses the pixmap to restore the window after exposure events. Also uses callbacks to notify programs of events. PopScrollText - A subclass of PopCore. This is a low level text widget. This provides the programmer with the ability to write text on a window, and scroll it about. The widget also notifies the application of events, so that the program can redraw the text, process input etc. PopComposite - A subclass of Composite. It is similar in functionality to PopCore, in that it adds a callback to the Composite widget, and uses it to notify applications when events (like adding children, or resizing) occur. PopText - A subclass of AsciiString. Similar to PopCore and PopComposite in that it adds a callback action so that the programmer can trap keyboard and mouse events using callbacks. A tree would look like: Text ----- AsciiString ----- PopText / PopComposite / Core ----- \ / PopPixmap ---------- PopGraphic PopCore -------- \ PopScrollText I will be tidying up, and documenting for the rest of this week. I will make them available at the beginning of next year. Meanwhile, does anyone have suggestions or hints? Jon.