This is MODocController.h in view mode; [Download] [Up]
// MODocController.h // // by Mike Ferris // Part of MOKit // Copyright 1993, all rights reserved. // ABOUT MOKit // // MOKit is a collection of useful and general objects. Permission is // granted by the author to use MOKit in your own programs in any way // you see fit. All other rights to the kit are reserved by the author // including the right to sell these objects as part of a LIBRARY or as // SOURCE CODE. In plain English, I wish to retain rights to these // objects as objects, but allow the use of the objects as pieces in a // fully functional program. NO WARRANTY is expressed or implied. The author // will under no circumstances be held responsible for ANY consequences to // you from the use of these objects. Since you don't have to pay for // them, and full source is provided, I think this is perfectly fair. // ABOUT MODocController // // MODocController is a subclass of MOController which adds file support. // Each MODocController has a window (inherited from MOController) and a file // to save the window in. Documents can be untitled (no file yet). Documents // need not have windows. Documents can be managed by a MODocManager. // // By itself, a subclass of MODocController can keep track of whether it is // untitled or has a file. It can perform all the standard file // operations new, open, save, revert, save as, and save to, if several // methods are provided in the subclass. It will also alert the user // if it is dirty and they try to close it allowing them to save and // close, close without saving or cancel the close. // // With a MODocManager subclass it will uniquely number untitled documents // and stagger windows. As well as other things documented in the MODocManager // class header. #import "MOController.h" // Forward declarations of class names we'll use for static typing. @class MOPathString; @class MODocManager; @class MODocType; @interface MODocController:MOController { MODocManager *manager; MOPathString *docName; MOPathString *untitledString; MODocType *docType; BOOL isDirty; // save panel popup accessory outlets id saveAccessoryPanel; id saveAccessoryBox; id saveAccessoryPopupButton; } + initialize; + setControllerName:(const char *)typeName; + (MOString *)controllerName; + addDocType:(int)tag name:(const char *)name extension:(const char *)ext openSelector:(SEL)openSel saveSelector:(SEL)saveSel; + (List *)docTypes; + (MODocType *)docTypeForTag:(int)tag; + (MODocType *)docTypeForName:(const char *)name; + (MODocType *)docTypeForExtension:(const char *)extension; + (List *)getOpenTypesList:(List *)list; + (List *)getSaveTypesList:(List *)list; + startUnloading; - initFromFile:(const char *)path manager:aManager; - initWithFrameName:(const char *)theFrameName; - initWithFrameName:(const char *)theFrameName fromFile:(const char *)path manager:aManager; - free; - nibDidLoad; - (BOOL)doClear; - (BOOL)doPrint; - saveAccessoryPopupAction:sender; - getSaveAccessoryForSaveTypes:(List *)saveTypes currentType:(MODocType *)currentType; - save:sender; - saveAs:sender; - saveTo:sender; - revert:sender; - close:sender; - print:sender; - saveIfNeeded; - setManager:aManager; - manager; - setFile:(const char *)fName; - (BOOL)isUntitled; - (const char *)file; - docName; - resetWindowTitle; - setDirty:(BOOL)flag; - (BOOL)isDirty; - windowDidBecomeMain:sender; - windowDidResignMain:sender; - windowWillClose:sender; - awake; - read:(NXTypedStream *)strm; - write:(NXTypedStream *)strm; @end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.