DekGenius.com
[ Team LiB ] Previous Section Next Section

NSWindowController Mac OS X 10.0

This is one of the three classes that makes up Cocoa's document-based application architecture; the other two classes are NSDocument and NSDocumentController. Instances of NSWindowController are responsible for managing a single window for a document. NSWindowController has a close relationship with windows contained in nib files, which is evident in the initializer initWithWindowNibName:. This initializer will load the window in the nib and take ownership over it. See Chapter 3 for more information on NSWindowController and its role in document-based applications.

figs/cocn_15116.gif

@interface NSWindowController : NSResponder <NSCoding>
 // Initializers
   - (id)initWithWindow:(NSWindow *)window;
   - (id)initWithWindowNibName:(NSString *)windowNibName;
   - (id)initWithWindowNibName:(NSString *)windowNibName owner:(id)owner;
   - (id)initWithWindowNibPath:(NSString *)windowNibPath owner:(id)owner;
 // Accessor Methods
   - (void)setWindowFrameAutosaveName:(NSString *)name;
   - (NSString *)windowFrameAutosaveName;
   - (void)setWindow:(NSWindow *)window;
   - (NSWindow *)window;
   - (void)setDocumentEdited:(BOOL)dirtyFlag;
   - (void)setShouldCloseDocument:(BOOL)flag;
   - (BOOL)shouldCloseDocument;
   - (void)setDocument:(NSDocument *)document;
   - (id)document;
   - (void)setShouldCascadeWindows:(BOOL)flag;
   - (BOOL)shouldCascadeWindows;
 // Instance Methods
   - (void)close;
   - (BOOL)isWindowLoaded;
   - (void)loadWindow;
   - (id)owner;
   - (IBAction)showWindow:(id)sender;
   - (void)synchronizeWindowTitleWithDocumentName;
   - (void)windowDidLoad;
   - (NSString *)windowNibName;
   - (NSString *)windowNibPath;
   - (NSString *)windowTitleForDocumentDisplayName:(NSString *)displayName;
   - (void)windowWillLoad;
 // Methods Implementing NSCoding
   - (void)encodeWithCoder:(NSCoder *)aCoder;
   - (id)initWithCoder:(NSCoder *)aDecoder;

    [ Team LiB ] Previous Section Next Section