File:  [NeXTSTEP 3.3 examples] / Examples / AppKit / Yap / YapDocument.h
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:48:40 2018 UTC (8 years, 1 month ago) by root
Branches: NeXT, MAIN
CVS tags: NeXTSTEP33, HEAD
Sample Programs from NeXSTEP 3.3

#import <objc/Object.h>
#import <streams/streams.h>

@interface YapDocument:Object {
  id document;
  char *name;
}

+ new;
+ newFromFile:(const char *)fileName;
- initializePrintInfo;

// Connect to target/action methods

- save:sender;
- saveAs:sender;
- execute:sender;
- print:sender;

// Other methods

- setName:(const char *)title;
- (const char *)name;
- (BOOL)saveDocument:(const char *)fileName;
- (BOOL)closeDocument:(const char *)message andWindow:(BOOL)flag;
- (BOOL)needsSaving;

// Return the document in the specified window; nil if the
// window contains no Yap document.

+ documentForWindow:window;

// The following delegate method is used for detecting when the user 
// edits the text.

- text:text isEmpty:(BOOL)empty;

// ...and the following when he/she changes the font.

- textWillConvert:textObject fromFont:oldFont toFont:newFont;

// YapDocuments have their own zones; the following two methods allow
// reuse of zones.

+ (NXZone *)newZone;
+ (void)reuseZone:(NXZone *)aZone;

@end

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.