home *** CD-ROM | disk | FTP | other *** search
- /*
- File: WriteLineWindow.h
-
- Copyright: © 1991-1994 by Apple Computer, Inc.
- All rights reserved.
-
- Part of the AOCE Sample SMSAM Package. Consult the license
- which came with this software for your specific legal rights.
-
- */
-
-
-
- #ifndef __EVENTS__
- #include <Events.h>
- #endif
-
- #ifndef __FILES__
- #include "Files.h"
- #endif
-
- /* All public procedure begin with WW (for WritelnWindow)*/
-
- // Call this to initialize the WW globals
- extern pascal void WWInit(short numLines, short numCharsPerLine);
-
- // Call this to create a 'default' window, located on the main screen and
- // small enough to fit on a Mac SE sized screen.
- extern pascal void WWNewDefault(void);
-
- // Call this to treate a new window, with the given parameters.
- extern pascal void WWNew(Rect *bounds, Str255 windowTitle, Boolean goAway, Boolean visible,
- short outputFont, short outputSize);
-
- // Pass this routine an event, and it will check whether that event
- // 'belongs' to this debug window. If it does, then it will handle the
- // event and return true; otherwise it will return false.
- extern pascal Boolean WWEvent(EventRecord *anEvent);
-
- // If you call this, then subsequent writelns will be sent to the indicated file. (Assuming
- // writing to the file is enabled. Pass '' for the fileName to close any open file.
- extern pascal OSErr WWRedirect(short vRefnum, long dirID, Str255 fileName);
-
- // This uses the FSSpec record introduced with MPW 3.2. A special case is that, if the vRefNum and
- // the parID of the redirectFile are 0, then the file will be created in the current System Folder.
- extern pascal OSErr WWFSpRedirect (FSSpec *redirectFile, Boolean appendToExistingFile);
-
- extern pascal void WWShowWindow (void);
-
- // Since it is now possible that one part of the program disables writelns to the window, you
- // might want to guarantee that certain writelns appear in the window. WWForceOutput saves
- // the values of gWrToWindow & gWrToFile on a stack (depth = kForceDepth), and sets
- // these values according to the parameters. WWEndForce simply pops the stack.
- extern pascal void WWForceOutput(short wrToWindow, short wrToFile);
- extern pascal void WWEndForce();
-
-
-
- extern pascal void WWAddText(Ptr textBuf, long byteCount);
-
- /* Call before SizeWindow if you need to resize the debug window programmatically*/
- extern pascal void WWInvalGrowBox();
-
- /* Call after SizeWindow if you need to resize the debug window programmatically*/
- extern pascal void WWGrown();
-
- // Call the following procedures in response to events for the WriteLnWindow.
- // (Test the window receiving the event against gDebugWindowPtr.
-
- extern pascal void WWActivateEvent(short modifiers);
- extern pascal void WWMouseDown(short where, Point pt, short modifiers);
- extern pascal void WWUpdateEvent();
- extern pascal void WWScroll(short howManyLines); /* for UTrace use; negative arg scrolls backwards*/
-
- extern pascal void IDUWritelnWindow(); /* Writeln UWritelnWindow's compile time.*/
-
- extern pascal void WWFlushOutputFile(void);
-
-