🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.soft-sys.andrew
Article #1844

Re: Is "ez" available as a widget in Andrew?

#1844
From: Bill Janssen
Date: Wed, 22 May 1991 19:01
29 lines
2043 bytes
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
Technical Details
Message-ID: <4cCg0bEB0KGW50cvgJ@holmes.parc.xerox.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!ucbvax!parc.xerox.com!janssen
References: <scCMDEC00VsAM0e=ll@andrew.cmu.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!ucbvax!parc.xerox.com!janssen
From: janssen@parc.xerox.com (Bill Janssen)
Newsgroups: comp.soft-sys.andrew
Subject: Re: Is "ez" available as a widget in Andrew?
Message-ID: <4cCg0bEB0KGW50cvgJ@holmes.parc.xerox.com>
Date: 22 May 91 19:01:59 GMT
References: <scCMDEC00VsAM0e=ll@andrew.cmu.edu>
Sender: daemon@ucbvax.BERKELEY.EDU
Organization: The Internet
Lines: 29