home *** CD-ROM | disk | FTP | other *** search
/ Eagles Nest BBS 8 / Eagles_Nest_Mac_Collection_Disc_8.TOAST / Developer Tools⁄Additions / DinkClas8⁄93 / DinkClass Expo93 / DC Scribble / DScribbleApp.c < prev    next >
Encoding:
Text File  |  1992-10-11  |  1.2 KB  |  71 lines  |  [TEXT/KAHL]

  1. /*
  2.     File:        DScribbleApp.c
  3.  
  4.     Written by:    Mark Gross
  5.  
  6.     Copyright:    © 1992 by Applied Technical Software, all rights reserved.
  7.     Use at your own risk.
  8.  
  9. */
  10. //This is the class deffinition of the DScribbleApplication
  11.  
  12. #include "DScribbleApp.h"
  13. #include "DScribbleDoc.h"
  14.  
  15.  
  16. DScribbleApp::DScribbleApp(void)
  17. {
  18.     //Stub
  19. }
  20.  
  21.  
  22. DScribbleApp::~DScribbleApp()
  23. {
  24.     //Stub
  25. }
  26.  
  27.  
  28. DDocument* DScribbleApp :: MakeDDoc(Boolean OpenFromFile)
  29. {
  30.     DScribbleDoc *New;
  31.     
  32.     New = new DScribbleDoc;
  33.  
  34.             // if OpenFromFile == FALSE then it will 
  35.             // not read from any file
  36.     if(New->Init(OpenFromFile)) 
  37.     {
  38.         if ( fTarget = New->MakeWindow(HasColorQD()) )
  39.             ((DWindow *) fTarget)->SetWindowTitle();// everything went ok, so set the title
  40.                 // I'm having the App tell 
  41.                 // the doc to make the window because I don't 
  42.                 // like haveing one init function do too much stuff.  
  43.                 // Its a reliability thing. 
  44.         else
  45.             fTarget = New; // window not created
  46.     }
  47.     else
  48.     {
  49.         fTarget = this;
  50.         SelectWindow( FrontWindow());
  51.     }
  52.     return New;
  53. }// end of MakeDDoc method
  54.  
  55.  
  56.  
  57. void DScribbleApp::SetUpMenues(void)
  58. {
  59.     MenuHandle    menu;
  60.     
  61.     menu = GetMHandle(rFileMenu);
  62.     EnableMenuItem( menu, iOpen, TRUE);
  63.     
  64.     inherited::SetUpMenues( );
  65.     
  66. }// end of SetUpMenus method
  67.  
  68.  
  69.  
  70.  
  71.