Newsgroups: comp.sys.atari.st.tech
Path: utzoo!censor!geac!maccs!johns
From: johns@maccs.dcss.mcmaster.ca (Conan the Barbarian)
Subject: Re: Closing AES boxes interfering with VDI drawing
Message-ID: <27569349.8114@maccs.dcss.mcmaster.ca>
Keywords: redraw timing
Organization: McMaster University, Hamilton, Ontario, Canada
References: <9267@ncar.ucar.edu> <1990Nov29.145734.1059@chinet.chi.il.us>
Date: Fri, 30 Nov 90 17:13:43 GMT

In article <1990Nov29.145734.1059@chinet.chi.il.us> saj@chinet.chi.il.us (Stephen Jacobs) writes:
>In article <9267@ncar.ucar.edu> moses@hao.ucar.edu (Julie Moses) writes:
>>
>>[ has a problem with dialog boxes ]
>>
>[ replies mentioning evnt_multi() and evnt_timer() and even VBL ]

	From my experience, the sequence goes like this.

1. Build the dialog box via a RCS-like prog or by hand
2. Center it on the screen with form_center() [ or if you want to, fill in
   the x,y,w,h fields in the structure manually ]
3. Call form_dial( FMD_START, ... ) to reserve some screen space
4. Call form_dial( FMD_GROW, ... ) to draw a growing box [ optional ]
5. Call objc_draw( ) to actually draw it on the screen
6. Call form_do( ) to let the AES handle the dialog.  
7. When you get control back again, call form_dial( FMD_SHRINK, ... )
8. Call form_dial( FMD_FINISH, ... ) to free up screen space

	This last step sends a WM_REDRAW message to the application that
owns the screen space where the dialog box was drawn before.  If it is the
desktop, then it just gets paster over with green (or whatever colour).  If
it is your application, then it is up to you to react on on the redraw
message to redraw your screen space (window etc) before you do other stuff.

	This is more work than I was expecting before I learned a little
of GEM, but I find it inuitive now, and I like programming this way.

	If what I do is in any way incorrect, I'd love to hear about
it.  I don't mind learning at all.  BTW, isn't Lattice C 5 a pretty good
development environment?  What do you use instead of make?


-- 
John Schmitt
johns@maccs.dcss.mcmaster.ca
...!unet!utai!utgpu!maccs!johns
