home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / System / Goodies / CDiagnostic.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-02  |  841 b   |  30 lines  |  [TEXT/KAHL]

  1. /*    Diagnostic printer. It's a director. */
  2.  
  3. #define _H_CDiagnostic
  4.  
  5. struct CDiagnostic: CDirector {
  6.     CScrollPane    *itsScrollPane;
  7.     CStaticText    *itsStaticText;
  8.     Handle        itsTextHan;
  9.     Size        itsTextInUse;
  10.     Boolean        needUpdate;
  11.  
  12.     NEW            void    IDiagnostic(void);
  13.     OVERRIDE    void    Dispose(void);
  14.  
  15.     OVERRIDE    void    UpdateMenus(void);
  16.  
  17.     PRIVATE        void    FlushLine(void);
  18.     PRIVATE        void    AppendText(char *text);    /*    text is a C string. */
  19.     NEW            void    Update(void);
  20.     NEW            void    Diagnose(char *text);    /*    C string. */
  21. };
  22.  
  23. /*    The only access to the diagnostic object is through vanilla procedure
  24.     calls. This is because it's not certain whether gDiagnostic is actually
  25.     present or not - it's disabled in the final application, and things may
  26.     happen before it's born or after it dies. */
  27.  
  28. extern void g_Diagnostic(char *format, ...);
  29. extern void g_UpdateDiags(void);
  30.