🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #13526

ZoomWindow Help Wanted

#13526
From: Jim Meiss
Date: Tue, 18 Nov 1986 01:23
93 lines
2469 bytes
References:



	I am a novitiate both to C and to MacIntosh programing, so
please pardon the question if it turns out to be trivail.
	I would like to implement the zoom box on a window using
Lightspeed C v. 1.05, MacPlus, etc. According to Tech Note #57 (the only
thing I have seen written on the subject) one uses a window of type 8, and
as far as I can tell, the following code fragment.
	This gets me a window that zooms out okay, but will not zoom in.
How come??? Perhaps my problem is in the definition of the functions TrackBox
and ZoomWindow...

	Another question: Can I set the size the window zooms to...say I don't
want it to be full screen?

-------------------------------------
/* Code Fragment for Zoom Windows */

enum {
	inDesk,
	inMenuBar,
	inSysWindow,
	inContent,
	inDrag,
	inGrow,
	inGoAway,
	inZoomIn,
	inZoomOut
};
.
.
pascal Boolean 		*TrackBox() = 0xA83B; 
pascal void 		*ZoomWindow() = 0xA83A;
.
.
.

main()
{

	WindowPtr		whichWindow;
	EventRecord		myEvent;
	
	InitGraf(&thePort);		
	InitFonts();
	InitWindows();
	InitMenus();
	TEInit();
	
	for(;;)  /* forever */
	{

	SystemTask();

	if (GetNextEvent(everyEvent, &myEvent)) 
	{
		switch(myEvent.what)
		{
		case mouseDown:
		switch (FindWindow( myEvent.where, &whichWindow ))
		{
		.
		.
			case inZoomIn:
			   if(TrackBox(whichWindow,myEvent.where,inZoomIn))
				ZoomWindow(whichWindow,inZoomOut,0);
			   break;
			case inZoomOut:
			   if(TrackBox(whichWindow,myEvent.where,inZoomOut))
				ZoomWindow(whichWindow,inZoomOut,0);
			   break;
			default: 
			   break;
		} /* end switch findwindow */
		break;
		.
		.
		default:
			break;
		}  /* end switch which event */
		.
		.
	} /* end if event */
	} /* end forever */
} /* end main */
-------------------------------------]

					Thanks for your help,

					Jim Meiss
					ut-npg!jdm
Technical Details
Message-ID: <4314@ut-ngp.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!ut-sally!ut-ngp!jdm

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!ut-sally!ut-ngp!jdm
From: jdm@ut-ngp.UUCP (Jim Meiss)
Newsgroups: comp.sys.mac
Subject: ZoomWindow Help Wanted
Message-ID: <4314@ut-ngp.UUCP>
Date: Mon, 17-Nov-86 20:23:59 EST
Article-I.D.: ut-ngp.4314
Posted: Mon Nov 17 20:23:59 1986
Date-Received: Mon, 17-Nov-86 23:03:28 EST
Reply-To: jdm@ngp.UUCP (James Meiss)
Organization: UTexas Computation Center, Austin, Texas
Lines: 90
Keywords: Lightspeed C, windows
Summary: Implementing ZoomWindow in Lightspeed C