home *** CD-ROM | disk | FTP | other *** search
/ Mac Expert 1995 Winter / Mac Expert - Winter 95.iso / Les fichiers / Communications / Divers / DinkClass ƒ / DinkClass / DObject.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-12-31  |  2.6 KB  |  106 lines  |  [TEXT/KAHL]

  1. /*
  2.     File:        DObject.h
  3.  
  4.     Contains:    xxx put contents here xxx
  5.  
  6.     Written by:    Mark Gross
  7.  
  8.     Copyright:    © 1992 by Applied Technical Software, all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.          <4>    12/31/92    MTG        fixing typeo
  13.          <3>    12/31/92    MTG        making the code conditionaly compiled so         that I am
  14.                                     always working with a current         version in either think c
  15.                                     or MPW C++
  16.          <2>     9/20/92    MTG        Bringing the C++ version up to date with the THINK C version
  17.  
  18.     To Do:
  19. */
  20.  
  21. #ifndef __DOBJECT__
  22. #define __DOBJECT__
  23. #ifdef THINK_C
  24.     #include <oops.h>
  25. #else
  26.     //for MPW
  27.     #include <Types.h>
  28.     #include <Events.h>
  29.     #include <Quickdraw.h>
  30.     #include <Menus.h>
  31.     #include <Memory.h>
  32.     #include <Desk.h>
  33.     #include <Scrap.h>
  34.     #include <AppleEvents.h>
  35.     #include <DiskInit.h>
  36.     #include <Errors.h>
  37.     #include <OSEvents.h>
  38.     #include <Quickdraw.h>
  39.     #include <Fonts.h>
  40.     #include <ToolUtils.h>
  41.     #include <Dialogs.h>
  42.     #include <Strings.h>
  43.     #include <Sysequ.h>
  44.     
  45.     #define CtoPstr c2pstr
  46.     
  47.     #define FALSE false
  48.     #define TRUE true
  49. #endif
  50.  
  51. // This is the class declaration for the root Class of my class
  52. // Library,  It has global warning and debug functions in it.
  53. // I provides on convieniant place to but this kind of stuff.
  54.  
  55. // More usefull member fucntions will be added as the use of the
  56. // class library provides more experiance, especialy with respect 
  57. // to th MacsBug (MB) realated functions.
  58.  
  59. #ifdef THINK_C
  60.     class DObject 
  61. #else
  62.     class DObject  : public PascalObject
  63. #endif    
  64. public :
  65.     
  66.     void    ErrorAlert(short stringsID, short theError);
  67.         // brings up a dialog box loaded from the Resource file
  68.         // and dissmisses with out doing anything else.
  69.     
  70.     void    Beep(int times);
  71.         // Just beep so many times, calls sysbeep.
  72.  
  73.     void     EnterMB(void);
  74.             // simply calls the Debugger trap
  75.     
  76.     void    EnterMBStr(char *theString);
  77.             // converts theString (in PLACE) into a Pstring and calls
  78.             // the DebugStr trap.
  79.  
  80.     void MakeMBAlias(char* alias, void* address);
  81.             // uses DebugStr to define an alias macro for the
  82.             // addres passed to the ruteen.  Us this to look at
  83.             // local variables or other runtime memory items.
  84.             // I like to use it to SS an array bounds or something 
  85.             // like that.
  86.             
  87.     pascal void SetZero(void);
  88.             // A debuging trick taken from MacsBugReference and Debugging
  89.             // guid, Call this funciton from the main event loop to
  90.             // catch the derefrencing of an NULL Handle
  91.  
  92.     Boolean HasColorQD(void);
  93.             // checks to see if color quick draw is running.
  94.             
  95. };// more MB realted member functions to follow!!
  96.  
  97. #define    rErrorAlert    255
  98. #define rErrorStrings    255
  99. #define    sNoMem    1
  100. #define    sFileOpen    2
  101. #define    sUnknownErr    3
  102.  
  103.  
  104. #endif __DOBJECT__
  105.