dba+@ANDREW.CMU.EDU (David Anderson) (05/22/91)
Excerpts from internet.info-andrew: 20-May-91 Is "ez" available as a widg.. Nils Davis@garlic.intell (823) > I don't read this list and haven't looked at Andrew for 1.5 years, so > please excuse my ignorance. No problem. > I have an application where I'd like to display some text, with > different sorts of properties on the text like bolding and > italicizing, and I'd like the user to be able to click on a boldfaced > word and have something happen. I was wondering if the Andrew toolkit > could help me out with this. Sure, this would be straightforward to do by either using or subclassing the ATK text object. The chlist object (in andrew/atk/champ/) does something similar to what you're looking for. > At this point I don't know anything about Andrew, and before I > downloaded the whole thing, I thought I'd find out if my idea is > feasible. Is Andrew based on Xt? No. > Can I combine Andrew widgets with > those from other Xt-based toolkits? No. There has been some talk at times about writing a wrapper that would allow ATK objects to stand in as Xt or motif widgets, but it hasn't happened yet. > Is there an Andrew interface > builder? Yes. (It's called ADEW, and it is part of our distribution.) > Please reply by mail -- I don't subscribe to info-andrew. --david
janssen@parc.xerox.com (Bill Janssen) (05/23/91)
Excerpts from ext.andrew: 21-May-91 Re: Is "ez" available as a .. David Anderson@andrew.cm (1296) > > I have an application where I'd like to display some text, with > > different sorts of properties on the text like bolding and > > italicizing, and I'd like the user to be able to click on a boldfaced > > word and have something happen. I was wondering if the Andrew toolkit > > could help me out with this. > Sure, this would be straightforward to do by either using or subclassing > the ATK text object. The chlist object (in andrew/atk/champ/) does > something similar to what you're looking for. Actually, it's almost trivial to do as a subclass/version of the 'panel' object (which is a subclass of the 'text' object that looks like a list of text items). Override panel_Add() with a version that calls super_Add(), gets back the panel_Entry (which includes the position and length of the item label), then applies the appropriate formatting to that text. Also note that panel entry labels can be multi-line, and can contain embedded objects, such as bitmaps or animations. The potential drawback is that the panel object inserts newlines between panel entries, so that you wind up with a list, rather than straight text. If you want to remove that bit of formatting (again trivial; just get rid of the single line that inserts the newline, and any (< 3) length calculations that assume it's there), it's easiest to make a "version" of panel, rather than a simple subclass. Bill