[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: changing the insertion point shape
- To: email@example.com
- Subject: Re: changing the insertion point shape
- From: firstname.lastname@example.org (Michael Korcuska)
- Date: Fri, 10 Feb 1995 09:12:53 -0600
- Organization: Institute for the Learning Sciences
- References: <email@example.com>
- Sender: firstname.lastname@example.org
In article <email@example.com>, firstname.lastname@example.org
(David S. April) wrote:
> How can I change the shape of the insertion point (not the cursor...) to,
> say, a horizontal bar instead of a vertical bar?
More complicated than you think. In mac lingo the insertion bar is called
a "caret". There's a "carethook" field in all textedit records which can
contain a pointer to a user supplied procedure for drawing the caret. I
tried to use this the other day and crashed my mac badly. And it isn't
entirely clear to me that you can change the bounding rectangle of the
caret easily without clobbering adjacent text.
The only example code for this I've seen is in assembly language. You
have to get some stuff off the stack and save & restore some registers.
Silly me for thinking that the defpascal function call would do this stuff
for me correctly. If anybody wants to explain this to me, I'd be
PS. I've been fooling with this stuff to make a simple "hyper-text" te-dialog-item. It seems to work. Along with the usual stuff for a te-dim, you pass in a set of "hotwords" and a font to display them in. They hilite when clicked and you can supply a function to be called when one is clicked on. Send me mail if you're interested in using it and I'll see if I can clean it up a bit.