[comp.sys.atari.st] A cursor in windows

dnewton@carroll1.UUCP (Dave 'Yes, I'm weird' Newton) (10/05/89)

   Does anyone know how to put a cursor in a GEM window?  I finally figured
out a bunch of fun text-to-GEM-window routines, just pass in the window
handle, an x and y, and a string, it'll stick it to the window (or at least
in the clipping region)...

   But!!!  I need to build a really simple text editor really really really
quickly and am having trouble doing a cursor.  there's no good way to save
what's underneath a character (i mean, a good fast way w/o resorting to
assembler, and i don't know assembler on an ST too well) so i need help in
a big way.

   Thanx in advance.

-- 
David L. Newton       |      dnewton@carroll1.UUCP     | Quote courtesy of
(414) 524-7343 (work) |     dnewton@carroll1.cc.edu    | Marie Niechwiadowicz,
(414) 524-6809 (home) | 100 NE Ave, Waukesha, WI 53186 | Boston College.
[Q]: How many surrealists does it take to screw in a light bulb? [A]: The fish. 

n62@nikhefh.nikhef.nl (Klamer Schutte) (10/05/89)

In article <715@carroll1.UUCP> dnewton@carroll1.cc.edu (Dave 'Yes, I'm weird' Newton) writes:
#>
#>   Does anyone know how to put a cursor in a GEM window?  I finally figured
#>out a bunch of fun text-to-GEM-window routines, just pass in the window
  Post these routines, please. Every one find this difficult;
  examples help a lot.
#>handle, an x and y, and a string, it'll stick it to the window (or at least
#>in the clipping region)...
#>
#>   But!!!  I need to build a really simple text editor really really really
#>quickly and am having trouble doing a cursor.  there's no good way to save
#>what's underneath a character (i mean, a good fast way w/o resorting to
#>assembler, and i don't know assembler on an ST too well) so i need help in
#>a big way.
  There are (i think) three ways:
	1 When the cursor type is not important, write the cursor in XOR mode.
	  delete him by writing in XOR mode again.
	2 do a blit-operation to get the current character.
	3 do it the "right" way: just put your cursor, and give an update event
	  if you want to delete him.
#>
#>   Thanx in advance.
  Hope this helps.
#>
#>-- 
#>David L. Newton       |      dnewton@carroll1.UUCP     | Quote courtesy of
#>(414) 524-7343 (work) |     dnewton@carroll1.cc.edu    | Marie Niechwiadowicz,
#>(414) 524-6809 (home) | 100 NE Ave, Waukesha, WI 53186 | Boston College.
#>[Q]: How many surrealists does it take to screw in a light bulb? [A]: The fish. 

Klamer.
-- 
_____________________Yes, mail address changed again :-(________________________
Klamer Schutte        mcvax!nikhefh!{n62,Schutte}        {Schutte,n62}@nikhef.nl

esp_05@jhunix.HCF.JHU.EDU (Stdnt 05) (10/09/89)

How to draw a cursor:

Cursors are real easy.  All you have to do is draw them in with v_bar,
but first set the write mode to XOR ( vswr_mode(handle,3) ) so that
you wind up with a black cursor over a white letter.  When you're
ready to undraw the cursor, just set the write mode back to XOR (if
you changed it in the first place) and draw the same box over again.

EMR