[comp.lang.smalltalk] Text question for st80 2.5

ghazi@caip.rutgers.edu (Kaveh R. Ghazi) (09/12/90)

	I've subclassed off the Text* classes so that smalltalk-80 2.5 will
display symbols built from objects stored in the runs array rather than
interpreting an integer emphasis and using fixed fonts.  This was primarily
done to create an equation editor which can display dynamically created math
symbols.  For example, a differential equation (i.e. d3u/dx3) would store the
order and differentiated variable (i.e. '3' and 'u') and each time it needs to
be displayed it would create the correct screen form from that information.
This removes the necessity of creating a character form for every combination
of variable and order.  That would be 26*10 forms just for that type of symbol.
With integrals we would have another form creation nightmare.  Dynamic
creation solves this.

	The problem I've run into is in the "select-region" function of the
red button.  I've included the editing features of ParagraphEditor but I can't
find out where the character width is calculated for reversing the displayed
selected region.  When I tried to cut and paste, the selected region widths
were all wrong.  In order to fix that I had to hard code in a width for the
differential equation form but this defeats my dynamic creation philosophy.
I don't want to have a "dummy strike font" with each type of symbol having its
width stored in the Xtable. (This is what I had to do so far.)  It will come
back to haunt me when I want to have variable components rather than one or
two fixed letters.  I tried to track down where this stuff gets done but I got
lost somewhere in TextCharacterBlockScanner-buildCharactgerBlockIn:.

	Anyone have an idea?  Please be as specific as possible!
		Thanks,
		--Kaveh
-- 
Kaveh R. Ghazi			CAIP Center, Rutgers University.
ghazi@caip.rutgers.edu		rutgers!caip.rutgers.edu!ghazi