home *** CD-ROM | disk | FTP | other *** search
- /* LOCDoc.c -- document methods */
- /* Created 10/4/91 10:31 AM by AppMaker */
-
- /* This module overrides the AppMaker-generated code in zLOCDoc. */
- /* It provides a place for you to add your own code and still be able to */
- /* generate code for new changes to the user interface. This module will */
- /* not be regenerated by AppMaker unless you delete it. Its superclass, */
- /* zLOCDoc, may be regenerated to handle user interface changes */
- /* without losing your hand-coded changes to this module. */
-
- #include <CApplication.h>
- #include <CDataFile.h>
- #include "ResourceDefs.h"
- #include "LOCApp.h"
- #include "LOCDoc.h"
- #include "commands.h"
-
- extern CApplication *gApplication; /* The application */
-
- /*----------*/
- Boolean CLOCDoc::ReadData (Handle *theData)
- {
- gApplication->RequestMemory (FALSE, FALSE);
- ((CDataFile *)itsFile)->ReadAll (theData);
- if (*theData == NULL) {
- /* Acknowledge (couldntReadID); */
- return (FALSE);
- } else {
- return (TRUE);
- }
- }
-
- /*----------*/
- void CLOCDoc::WriteData (void)
- {
- /* application-specific write data to itsFile */
- }
-
- /*----------*/
- void CLOCDoc::DoCommand (long theCommand)
- {
- switch (theCommand) {
- default:
- inherited::DoCommand (theCommand);
- break;
- } /* switch */
-
- }
-
- /*----------*/
- void CLOCDoc::CloseWind ( CWindow *theWindow )
- {
- CLOCApp *supervisor = (CLOCApp *) itsSupervisor;
- inherited::CloseWind ( theWindow );
- supervisor->DoCommand ( cmdQuit );
- }
-