home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 2 / ETO Development Tools 2.iso / Tools - Objects / MacApp / MacApp CD Release / MacApp 2.0.1 (Many Libraries) / Examples / CPlusExamples / DemoText / MDemoText.cp < prev    next >
Encoding:
Text File  |  1990-10-25  |  1.6 KB  |  61 lines  |  [TEXT/MPS ]

  1. /*******************************************************************************
  2. *
  3. * File:   MDemoText.cp
  4. *
  5. * Description: Main Program
  6. *
  7. *
  8. * Copyright © 1985 - 1990 by Apple Computer, Inc. All rights reserved.
  9. ********************************************************************************/
  10. #define  __MDEMOTEXT__
  11.  
  12. //  {$MC68020-}                                                // The main program must be universal code
  13. //  {$MC68881-}
  14.  
  15.         // • MacApp
  16. #include <UMacApp.h>
  17.  
  18.         // • Building Blocks
  19. #include <UPrinting.h>
  20. #include <UTEView.h>
  21.  
  22.         // • Implementation use
  23. #ifndef __UDEMOTEXT__
  24. #include "UDemoText.h"
  25. #endif
  26.  
  27. #pragma segment Main
  28.  
  29. void main()
  30.     {
  31.     TDemoTextApplication *gDemoTextApplication;
  32.  
  33.     InitToolBox();                                             // Essential toolbox and utilities
  34.                                                             // initialization
  35.     if (ValidateConfiguration(&gConfiguration))                // Make sure we can run
  36.         {
  37.  
  38.         // Continue with remainder of initialization
  39.         InitUMacApp(8);                                     // Initialize MacApp; 8 calls to MoreMasters
  40.  
  41.         // ------------------------------------------------------
  42.         // If you are going to use streams for debugging IO then:
  43.         // #include <stdio.h>
  44.         // #include <iostream.h>
  45.         // and execute the following line since MacApp's debug output is essentialy "printf"s
  46.  
  47.         // cout.sync_with_stdio();
  48.  
  49.         InitUPrinting();                                    // Initialize the Printing unit
  50.         InitUTEView();                                        // Initialize the TEView unit
  51.         
  52.         gDemoTextApplication = new TDemoTextApplication;    // Create an application object
  53.         FailNIL(gDemoTextApplication);
  54.         gDemoTextApplication->IDemoTextApplication();        // Initialize the application
  55.         gDemoTextApplication->Run();                        // Run the application
  56.         }
  57.     else
  58.         {
  59.         StdAlert(phUnsupportedConfiguration);
  60.         }
  61.     }