This is TextWindow.h in view mode; [Download] [Up]
// // TextWindow.h // Copyright (c) 1990 by Jiro Nakamura // All rights reserved // // Handles a window with a scroll view in it, opens it with a filename, // lets the user modify it, // and if anything changes, lets she or he save it before // closing it. // // RCS Information // Revision Number-> $Revision: 2.7 $ // Last Revised-> $Date: 90/10/27 17:53:40 $ // #import <appkit/Window.h> #import <appkit/Text.h> #import "cass.h" // For default fontsize/name and AUTOSAVE // If AUTOSAVE is defined, then windows will automatically save themselves // on closing. The window close button will not change on window modification // (as this is somewhat confusing). @interface TextWindow:Window { #ifdef AUTOSAVE // Don't call this docEdited since it will conflict with // the real docEdited (this is a fake one) BOOL hasChanged; #endif const char *filename; const char *windowIcon; // The icon used for the miniturization Text *textView; // The docView of textScroll id textScroll; // Set by IB. Our scrolling area } + new; // Create ourself and set default values - initMoreStuff; // used to set our-own default values - free; // Free ourself - openWith: (const char *) file; // Open ourself with this filename - update; // Update our display (reread filename) - close; // Close our display - save; // Save our contents to filename - setFilename: (const char *) file; // Set the current filename to file - setWindowIcon: (const char *) name; // Set the current window icon - setDocEdited: (BOOL) value; // These may or may not call their - (BOOL) isDocEdited; // superclass functions - (const char *) filename; // Access the current filename - (const char *) windowIcon; // Access the current windowIcon - selectTextEnd: sender; // Select the end of the file. // We are the delegate of ourself (don't forget that!) // Catch delegate methods so that we can tell if the user has changed // anything (inserted/deleted material or changed the font). - textDidChange : object; // the user has changed the text - textWillConvert:textObject fromFont:from toFont:to; // Changed the font @end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.