00001
00020 #ifndef DEBUGWIN_H
00021 #define DEBUGWIN_H
00022
00023 #include "host.h"
00024 #include "varable.h"
00025
00026 #ifdef __MAC__
00027 #include <lwindow.h>
00028 #include <lcommander.h>
00029 #endif
00030
00031
00032
00033 #define DEBUG_WIN_XPOS 50 //default position
00034 #define DEBUG_WIN_YPOS 30 //default position
00035 #define DEBUG_WIN_XSIZE 700 //default size
00036 #define DEBUG_WIN_YSIZE 300 //default size
00037
00038
00041
00042 extern DLLSYM INT_VAR_H (debug_lines, 256, "Number of lines in debug window");
00070 class DLLSYM DEBUG_WIN
00071 {
00072 public:
00073
00074 DEBUG_WIN (
00075 const char *title,
00076 INT32 xpos = DEBUG_WIN_XPOS,
00077 INT32 ypos = DEBUG_WIN_YPOS,
00078
00079 INT32 xsize = DEBUG_WIN_XSIZE,
00080
00081 INT32 ysize = DEBUG_WIN_YSIZE,
00082
00083 INT32 buflines = debug_lines);
00084
00085 ~DEBUG_WIN ();
00086
00087 void dprintf (
00088 const char *format, ...);
00089
00090 void await_destruction();
00091
00092 #ifdef __MAC__
00093 static void SetCommander(LCommander *pCommander);
00094 #endif
00095
00096 private:
00097
00098 #ifdef __MSW32__
00099 HWND handle;
00100 char *shm_mem;
00101 char *msg_end;
00102 HANDLE shm_hand;
00103 HANDLE dbg_process;
00104 HANDLE dbg_thread;
00105 #endif
00106 #ifdef __UNIX__
00107 FILE *fp;
00108 #endif
00109
00110 #ifdef __MAC__
00111 LWindow *pWindow;
00112 #endif
00113 };
00114 #endif