home *** CD-ROM | disk | FTP | other *** search
- /*
- * Debug.c - debug window
- */
-
- # include "TransSkel.h"
- # include "TransDisplay.h"
- # include "Debug.h"
-
-
- static WindowPtr dWind = (WindowPtr) nil;
-
- /*
- * Initialize debug window, taking care not to disturb the current port
- */
-
- void
- SetupDebugWindow (void)
- {
- Rect bounds;
- GrafPtr oldPort;
- GrafPtr port;
-
- GetPort (&oldPort);
- SetRect (&bounds, 0, 0, 350, 150);
- dWind = NewDWindow (&bounds, (StringPtr) "\pDebug", false, nil, true, 0L);
- if (dWind != (WindowPtr) nil)
- {
- SetDWindowStyle (dWind, 0, 0, false, teJustLeft);
- GetWMgrPort (&port);
- MoveWindow (dWind,
- port->portRect.right - 4 - bounds.right,
- port->portRect.bottom - 4 - bounds.bottom,
- false);
- }
- SetPort (oldPort);
- }
-
-
- void
- ShowDebugWindow (void)
- {
- if (dWind != (WindowPtr) nil)
- {
- SelectWindow (dWind);
- ShowWindow (dWind);
- SkelDoUpdates ();
- }
- }
-