home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 October: Mac OS SDK / Dev.CD Oct 00 SDK1.toast / Development Kits / Mac OS / MLTE SDK / TEtoMLTESample / TESources / TESample.h < prev   
Encoding:
C/C++ Source or Header  |  1999-12-24  |  2.4 KB  |  81 lines  |  [TEXT/MPS ]

  1. /*------------------------------------------------------------------------------
  2. #
  3. #    Apple Macintosh Developer Technical Support
  4. #
  5. #    MultiFinder-Aware Simple TextEdit Sample Application
  6. #
  7. #    CPlusTESample
  8. #
  9. #    TECommon.h    -    C++ and Rez source
  10. #
  11. #    Copyright © 2000 Apple Computer, Inc.
  12. #    All rights reserved.
  13. #
  14. #    Versions:
  15. #            2.00                    03/93        for PowerPC
  16. #            1.10                     07/89
  17. #            1.00                     04/89
  18. #
  19. #    Components:
  20. #            CPlusTESample.make        July 9, 1989
  21. #            TApplicationCommon.h    July 9, 1989
  22. #            TApplication.h            July 9, 1989
  23. #            TDocument.h                July 9, 1989
  24. #            TECommon.h                July 9, 1989
  25. #            TESample.h                July 9, 1989
  26. #            TEDocument.h            July 9, 1989
  27. #            TDocument.cp            July 9, 1989
  28. #            TESample.cp                July 9, 1989
  29. #            TESampleGlue.a            July 9, 1989
  30. #            TApplication.r            July 9, 1989
  31. #
  32. #    CPlusTESample is an example application that demonstrates
  33. #    how to initialize the commonly used toolbox managers,
  34. #    operate successfully under MultiFinder, handle desk
  35. #    accessories and create, grow, and zoom windows. The
  36. #    fundamental TextEdit toolbox calls and TextEdit autoscroll
  37. #    are demonstrated. It also shows how to create and maintain
  38. #    scrollbar controls. 
  39. #
  40. #    This version of TESample has been substantially reworked in
  41. #    C++ to show how a "typical" object oriented program could
  42. #    be written. To this end, what was once a single source code
  43. #    file has been restructured into a set of classes which
  44. #    demonstrate the advantages of object-oriented programming.
  45. #
  46. ------------------------------------------------------------------------------*/
  47.  
  48. #ifndef TESample_Defs
  49. #define TESample_Defs
  50.  
  51. // we need resource definitions
  52. #include "TECommon.h"
  53.  
  54. // Since we are based on the Application class, we need its class definitions
  55. #include "TApplication.h"
  56.  
  57. // TESample is our application class. It is a subclass of TApplication,
  58. // so it only needs to specify its behaviour in areas where it is different
  59. // from the default.
  60.     class TESample : public TApplication
  61.     {
  62.         public:
  63.             TESample( void );                        // Our constructor
  64.         
  65.         private:
  66.             // routines from TApplication we are overriding
  67.                 long HeapNeeded( void );
  68.                 unsigned long SleepVal( void );
  69.                 void DoIdle( void );
  70.                 void AdjustCursor( void );
  71.                 void AdjustMenus( void );
  72.                 void DoMenuCommand( short menuID, short menuItem );
  73.         
  74.             // routines for our own devious purposes
  75.                 void DoNew( void );
  76.                 void Terminate( void );
  77.                 
  78.     }; /* class TESample */
  79.  
  80. #endif // TESample_Defs
  81.