ftp.nice.ch/pub/next/developer/objc/appkit/BasicApp.99.99.s.tar.gz#/Flash/BasicApp.subproj/Document.h

This is Document.h in view mode; [Download] [Up]

/* -------------------------------------------------------------------

	RDR, Inc. 

	Objective-C interface file for the class Document

	COPYRIGHT (C), 1991, RDR, Inc.
	ALL RIGHTS RESERVED.

	Responsible:			Approved:
	RDR:Ernest Prabhakar		

	Date:				Rev:
	1991-Jul-02			___

	Reference:			Document no:
 */

/*====================================================================
                     Interface of class Document                      
====================================================================*/
#import <appkit/Responder.h>
#define Notify(title, msg) NXRunAlertPanel(title, msg, "OK", NULL, NULL)
#define	NotifyArg(title, msg, arg)\
 NXRunAlertPanel(title, msg, "OK", NULL, NULL, arg)

@interface Document : Responder
{
    BOOL haveSavedDocument;	/* is associated with a disk file */
    char *name;			/* the name of the document */
    char *directory;		/* the directory it is in */
    id window;			/* the window it is in */
    id contents;		/* the document's contents */
    id view;			/* main or current view */
    id printInfo;		/* Print Margins etc. */
    id listener;		/* Listen for Workspace Icons */
}

/* ---------------------- App Initialization ---------------------- */
+setContentsClass:newClass;
+setExtension:(const char *)newExtension;
+(const char *)extension;

/* --------------------- Zone Control Methods --------------------- */
+(NXZone *)newZone;
+(void)reuseZone:(NXZone *)aZone;
+allocFromZone:(NXZone *)aZone;
+alloc;

/* --------------------- Initialize and Free ---------------------- */
+new;
+newFromContents:newContent;
+newFromContents:newContent withName:(const char *)newName;
+newFromFile:(const char *)file;
-free;

/* -------------------- Set Contents and View --------------------- */
-setContents:anObject;
-getContents;
-freeContents;

/* --------------- Generate windows; set delegates ---------------- */
-getWindow;
-getWindowFromNib:(const char *)nibFile;
-getWindowForView:aView;
-getWindow:aWindow;

/* ------------------- Register Window with WM -------------------- */
-registerWindow;
-unregisterWindow;

/* ---------------- Services menu support methods ----------------- */
-registerForServicesMenu;
-validRequestorForSendType:(NXAtom)sendType andReturnType:(NXAtom)returnType;
-writeSelectionToPasteboard:pboard types:(NXAtom *)types;

/* ----------------------- State Variables ------------------------ */
-window;
-contents;
-view;
-printInfo;
-changeLayout:sender;

/* ------------------------ Action Methods ------------------------ */
-find:sender;
-save:sender;
-saveAs:sender;
-saveTypes:sender;
-saveTo:sender;
-revertToSaved:sender;

/* ------------------ Name and Save the Document ------------------ */
-(const char *)filename;
-(const char *)directory;
-(const char *)name;
-setName:(const char *)newName andDirectory:(const char *)newDirectory;
-(BOOL)setName:(const char *)file;
-sync;
-save;
-(BOOL)needsSaving;

/* ------------------- Window delegate methods -------------------- */
-windowWillClose:sender;
-windowWillClose:sender action:(const char *)action;
-windowDidBecomeMain:sender;
-windowWillResize:sender toSize:(NXSize *) size;
-windowWillMiniaturize:sender toMiniwindow:counterpart;
-windowDidResize:sender;
-resetScrollers;

/* -------------------- Validate menu command --------------------- */
-(BOOL)validateCommand:menuCell;

@end

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.