steele@unc.cs.unc.edu (Oliver Steele) (03/10/88)
The TextEdit enhancements go a long way towards making a MacWrite-style interface easy. One thing I'd like to be able to do, however, is remove a style attribute from every style within the selection if, for instance, some runs in the selection have that attribute set to true (so that the item is checked in the "Style" menu) and the user chooses that item from "Style". TESetStyle() will OR a style into all the runs in a selection, or set them all to PLAIN, but I don't see that it will AND the COMPLEMENT of a style (unset all and only the bits I ask it too). Do I have to fiddle with the StyleHandle and StyleTable myself, or iterate over the runs in the selection range and call TEReplaceStyle() for each occurrence, or is there a call that respects the programmatic interface that will do what I want? ---------------------------------------------------------------------------- Oliver Steele ...!uunet!mcnc!unc!steele steele@cs.unc.edu "A sea urchin is the best way to comb the inside of a hairy tube." -- Peter Wolfenden