[comp.sys.atari.st] Text in a GEM Window

steve@thelake.UUCP (Steve Yelvington) (11/16/89)

In article <30200020@inmet>,
     hedger@inmet.inmet.com writes ... 

>
>While your at it.....how do you get text INTO a GEM window ?????
>

It's not as easy as it looks.

Get the source code for XXED, an ASCII/hexadecimal editor for binary files
written by Jim Charlton <charltn@ccm.umanitoba.ca> and distributed
recently in the comp.sources.atari.st newsgroup.

Kudos to Jim ... it's the first really substantial chunk of GEM C source
code I've seen.

   -- Steve Yelvington, up at the lake in Minnesota        
  ... pwcs.StPaul.GOV!stag!thelake!steve             (UUCP)   

MEGGIN@vm.epas.utoronto.ca (David Megginson) (11/30/89)

There are some fast and nasty shortcuts, but you _should_ put text in
a GEM window by calling v_gtext() (or something like that) _only_ in
your redraw function, or when you have to draw a new character in the
window. _Never_ draw to a window unless

         1) You check to make sure that it is the top window
         2) You walk through the wind_get() rectangle list, and clip
            to each of those rectangles while you redraw the window.

It's difficult. The AES will tell you when to redraw different areas
of your window, and you have to be ready to respond. Keep track of
the text in a separate array or linked list, so that you know what to
put in the window when redraw time arrives.

        David Megginson, Centre for Medieval Studies, Toronto