🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.atari.st
Article #6958

Re: GEM windows programming problem

#6958
From: Derek Mui
Date: Fri, 12 Jan 1990 19:59
75 lines
2784 bytes
in article <11830069@hpldola.HP.COM>, jg@hpldola.HP.COM (Joe Gilray) says:
> 
> 
> Here is a GEM programming problem:
> 
> I've written a multiwindow GEM application, everything was fine until I
> added a "feature" that allows users to edit window data in a dialog box.
> The dialog box editing function allows the user to edit data that may
> appear in several windows that are currently open on the screen.
> 
> Here's the difficulty, when the dialog box closes, the window(s) receive
> a WM_REDRAW message which is fine, but data may have changed in an area
> of a window (or two, or three) that is not covered by the dialog box and
> therefore does not appear on the redraw rectangle list.  When the uncovered
> part of the window(s) is redrawn the window data looks wrong because the
> part of the window that was not covered is old.
> 

	Here's my $0.02

	Inside the same function do the following:

		Immediately after the dialogue box is closed, do a 
	evnt_multi of Timer Zero and Messages wait. You should receive
	a redraw message with a rectangle that covered the windows, and 
	then do the normal window redraw.

		After you have done all these, do your internal data update. 
	Then do a window redraw with a big rectangle ( full desktop size )
	to each of the windows. 

		The code should look like:

	foo( )
	{
	  ......;
	  ......;		
	  form_do( ... );
	  form_dial( 3, ... );
	  	   	
	  event = evnt_multi( MU_TIMER|MU_MESAG, ..., msgbuff, .... );

	  if ( event & MU_MESAG )
	  {			/* do your own window redraw	*/
	    do_redraw( msgbuff[3], &msgbuff[4] );	
		     /* window handle, rectangle */
	  }		
	  
	  update_windowdate( );	/* update your windows' data */
	  
	  handle = firstwin( );	/* get your first window's handle */


	  loop
	  {				  
				/* rectangle = desktop rectangle area */
	     do_redraw( handle, rectangle ); 		     	
	     handle = nextwin;	/* get your next window's handle  */	

	  }while( handle >= 0 );

	}


	Hope this helps and works!	

==================================================================
Derek Mui, Atari Corp, 1196 Borregas Ave, Sunnyvale, CA 94086

UUCP: {..ames!atari!mui}
 FAX: 408-745-5179

Disclaimer: Opinions expressed here are my own and they may be 
	    hazardous to your mind.
==================================================================
Technical Details
Message-ID: <1958@atari.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!wuarchive!zaphod.mps.ohio-state.edu!samsung!cs.utexas.edu!sun-barr!newstop!sun!imagen!atari!mui
References: <11830069@hpldola.HP.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!wuarchive!zaphod.mps.ohio-state.edu!samsung!cs.utexas.edu!sun-barr!newstop!sun!imagen!atari!mui
From: mui@atari.UUCP (Derek Mui)
Newsgroups: comp.sys.atari.st
Subject: Re: GEM windows programming problem
Message-ID: <1958@atari.UUCP>
Date: 12 Jan 90 19:59:32 GMT
References: <11830069@hpldola.HP.COM>
Organization: Atari Corp., Sunnyvale CA
Lines: 75