Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!sun-barr!newstop!texsun!vector!egsner!mic!convex!rosenkra From: rosenkra@convex.com (William Rosencranz) Newsgroups: comp.sys.atari.st.tech Subject: Re: Closing AES boxes interfering with VDI drawing Keywords: redraw timing Message-ID: <111330@convex.convex.com> Date: 15 Dec 90 04:46:29 GMT References: <9267@ncar.ucar.edu> <1990Nov29.145734.1059@chinet.chi.il.us> <27569349.8114@maccs.dcss.mcmaster.ca> Sender: news@convex.com Organization: Convex Computer Corporation; Richardson, TX Lines: 46 In article <27569349.8114@maccs.dcss.mcmaster.ca> johns@maccs.dcss.mcmaster.ca (Conan the Barbarian) writes: >>>[ has a problem with dialog boxes ] > > 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 is the "normal" way of doing it, but it does have limitations. i think the max dialog size is 1/4 the screen as that is all the memory form_dial deals with. i may be wrong here, though... there is a better way, at least i use it: 1) as above 2) save ALL the screen to a 32000 byte buffer 3) objc_draw anywhere u like 4) form_do as above, in a loop while (!exit_condition) 5) on exit, restore the entire screen from the buffer you don't get the (silly?) growbox/shrink box (my beta testers told me to ax them on some code i produced a while back). this allows you to draw dialogs as big as the screen. the screen save/redraw is virtually instantaneous. users have the need for speed. u can also draw the dialog anywhere (on the screen makes most sense, though i think it is possible to draw it off screen and clip to the screen - i actually think i needed to do this once, but don't quote me). u get the screen location from Physbase or Logbase calls (forget which). i think vro_cpyfm is what i use to copy the screen, though tight loop copying longs should work, too. jeez, it's been a while... -bill rosenkra@convex.com -- Bill Rosenkranz |UUCP: {uunet,texsun}!convex!c1yankee!rosenkra Convex Computer Corp. |ARPA: rosenkra%c1yankee@convex.com