API  0.9.6
 All Classes Files Functions Variables Macros Modules Pages
CPWindowController Class Reference

#import <CPWindowController.h>

+ Inheritance diagram for CPWindowController:

Instance Methods

(void) - addDocument:
 
(void) - close
 
(CPDocument- document
 
(CPArray- documents
 
(id) - init
 
(id) - initWithWindow:
 
(id) - initWithWindowCibName:
 
(id) - initWithWindowCibName:owner:
 
(id) - initWithWindowCibPath:owner:
 
(BOOL) - isWindowLoaded
 
(void) - loadWindow
 
(id) - owner
 
(void) - removeDocument:
 
(void) - removeDocumentAndCloseIfNecessary:
 
(void) - setDocument:
 
(void) - setDocumentEdited:
 
(void) - setShouldCloseDocument:
 
(void) - setSupportsMultipleDocuments:
 
(void) - setViewController:
 
(void) - setViewControllerContainerView:
 
(void) - setWindow:
 
(BOOL) - shouldCloseDocument
 
(action) - showWindow:
 
(BOOL) - supportsMultipleDocuments
 
(void) - synchronizeWindowTitleWithDocumentName
 
(CPViewController- viewController
 
(void) - viewControllerContainerView
 
(CPWindow- window
 
(CPString- windowCibName
 
(CPString- windowCibPath
 
(void) - windowDidLoad
 
(CPString- windowTitleForDocumentDisplayName:
 
(void) - windowWillLoad
 
- Instance Methods inherited from CPResponder
(BOOL) - acceptsFirstResponder
 
(BOOL) - becomeFirstResponder
 
(void) - doCommandBySelector:
 
(void) - encodeWithCoder:
 
(void) - flagsChanged:
 
(id) - initWithCoder:
 
(void) - insertBackTab:
 
(void) - insertLineBreak:
 
(void) - insertNewline:
 
(void) - insertTab:
 
(void) - insertText:
 
(void) - interpretKeyEvents:
 
(void) - keyDown:
 
(void) - keyUp:
 
(CPMenu- menu
 
(void) - mouseDown:
 
(void) - mouseDragged:
 
(void) - mouseEntered:
 
(void) - mouseExited:
 
(void) - mouseMoved:
 
(void) - mouseUp:
 
(CPResponder- nextResponder
 
(void) - noResponderFor:
 
(BOOL) - performKeyEquivalent:
 
(BOOL) - resignFirstResponder
 
(void) - rightMouseDown:
 
(void) - rightMouseUp:
 
(void) - scrollWheel:
 
(void) - setMenu:
 
(void) - setNextResponder:
 
(BOOL) - tryToPerform:with:
 
(CPUndoManager- undoManager
 
- Instance Methods inherited from CPObject
(void) - addObserver:forKeyPath:options:context:
 
(void) - applyChange:toKeyPath:
 
(id) - autorelease
 
(id) - awakeAfterUsingCoder:
 
(void) - awakeFromCib
 
(void) - bind:toObject:withKeyPath:options:
 
(Class) - classForCoder
 
(Class) - classForKeyedArchiver
 
(CPString- className
 
(id) - copy
 
(void) - dealloc
 
(CPString- description
 
(CPDictionary- dictionaryWithValuesForKeys:
 
(void) - didChange:valuesAtIndexes:forKey:
 
(void) - didChangeValueForKey:
 
(void) - didChangeValueForKey:withSetMutation:usingObjects:
 
(void) - doesNotRecognizeSelector:
 
(CPArray- exposedBindings
 
(id) - forwardingTargetForSelector:
 
(void) - forwardInvocation:
 
(unsigned) - hash
 
(BOOL) - implementsSelector:
 
(CPDictionary- infoForBinding:
 
(BOOL) - isEqual:
 
(BOOL) - isKindOfClass:
 
(BOOL) - isMemberOfClass:
 
(BOOL) - isProxy
 
(IMP) - methodForSelector:
 
(CPMethodSignature) - methodSignatureForSelector:
 
(id) - mutableArrayValueForKey:
 
(id) - mutableArrayValueForKeyPath:
 
(id) - mutableCopy
 
(id) - mutableSetValueForKey:
 
(id) - mutableSetValueForKeyPath:
 
(id) - performSelector:
 
(id) - performSelector:withObject:
 
(id) - performSelector:withObject:withObject:
 
(id) - performSelector:withObjects:
 
(void) - release
 
(void) - removeObserver:forKeyPath:
 
(id) - replacementObjectForArchiver:
 
(id) - replacementObjectForCoder:
 
(id) - replacementObjectForKeyedArchiver:
 
(BOOL) - respondsToSelector:
 
(id) - retain
 
(id) - self
 
(void) - setValue:forKey:
 
(void) - setValue:forKeyPath:
 
(void) - setValue:forUndefinedKey:
 
(void) - setValuesForKeysWithDictionary:
 
(CPString- UID
 
(void) - unbind:
 
(Class) - valueClassForBinding:
 
(id) - valueForKey:
 
(id) - valueForKeyPath:
 
(id) - valueForUndefinedKey:
 
(void) - willChange:valuesAtIndexes:forKey:
 
(void) - willChangeValueForKey:
 
(void) - willChangeValueForKey:withSetMutation:usingObjects:
 

Additional Inherited Members

- Class Methods inherited from CPObject
(BOOL) + accessInstanceVariablesDirectly
 
(id) + alloc
 
(id) + allocWithCoder:
 
(BOOL) + automaticallyNotifiesObserversForKey:
 
(Class) + class
 
(void) + exposeBinding:
 
(void) + initialize
 
(IMP) + instanceMethodForSelector:
 
(BOOL) + instancesRespondToSelector:
 
(BOOL) + isSubclassOfClass:
 
(CPSet+ keyPathsForValuesAffectingValueForKey:
 
(void) + load
 
(id) + new
 
(void) + setVersion:
 
(Class) + superclass
 
(int) + version
 
- Instance Variables inherited from CPObject
Class isa
 

Detailed Description

An instance of a CPWindowController manages a CPWindow. Windows are typically loaded via a cib, but they can also manage windows created in code. A CPWindowController can manage a window by itself or work with AppKits's document-based architecture.

In a Document based app, a CPWindowController instance is created and managed by a CPDocument subclass.

If the CPWindowController is managing a CPWindow created in a cib the owner of the CPWindow is this controller.

Note
When creating the window programatically (instead of a cib) you should override the loadWindow method.loadWindow is called the first time the window object is needed.

Definition at line 2 of file CPWindowController.h.

Method Documentation

- (void) addDocument: (CPDocument aDocument
implementation

Definition at line 296 of file CPWindowController.j.

- (void) close
implementation

Definition at line 458 of file CPWindowController.j.

- (CPDocument) document
implementation

Returns the CPDocument in the controlled window.

Definition at line 444 of file CPWindowController.j.

- (CPArray) documents
implementation

Definition at line 323 of file CPWindowController.j.

- (id) init
implementation

Initializes the receiver

Returns
the initialized receiver

Reimplemented from CPObject.

Definition at line 57 of file CPWindowController.j.

- (id) initWithWindow: (CPWindow aWindow
implementation

Initializes the controller with a window.

Parameters
aWindowthe window to control
Returns
the initialized window controller

Definition at line 67 of file CPWindowController.j.

- (id) initWithWindowCibName: (CPString aWindowCibName
implementation

Initializes the controller with a Cappuccino Interface Builder name.

Parameters
aWindowCibNamethe cib name of the window to control
Returns
the initialized window controller

Definition at line 89 of file CPWindowController.j.

- (id) initWithWindowCibName: (CPString aWindowCibName
owner: (id)  anOwner 
implementation

Initializes the controller with a cafe name.

Parameters
aWindowCibNamethe cib name of the window to control
anOwnerthe owner of the cib file
Returns
the initialized window controller

Definition at line 100 of file CPWindowController.j.

- (id) initWithWindowCibPath: (CPString aWindowCibPath
owner: (id)  anOwner 
implementation

Definition at line 113 of file CPWindowController.j.

- (BOOL) isWindowLoaded
implementation

Returns YES if the window has been loaded. Specifically, if loadWindow has been called.

Definition at line 156 of file CPWindowController.j.

- (void) loadWindow
implementation

Loads the window. This method should never be called directly. Instead call window which will in turn call windowWillLoad and windowDidLoad. This method should be overwritten if you are creating the view programatically.

Definition at line 130 of file CPWindowController.j.

- (id) owner
implementation

Definition at line 473 of file CPWindowController.j.

- (void) removeDocument: (CPDocument aDocument
implementation

Definition at line 302 of file CPWindowController.j.

- (void) removeDocumentAndCloseIfNecessary: (CPDocument aDocument
implementation

Definition at line 315 of file CPWindowController.j.

- (void) setDocument: (CPDocument aDocument
implementation

Sets the document that is inside the controlled window.

Parameters
aDocumentthe document in the controlled window

Definition at line 225 of file CPWindowController.j.

- (void) setDocumentEdited: (BOOL)  isEdited
implementation

Sets whether the document has unsaved changes. The window can use this as a hint to

Parameters
isEditedYES means the document has unsaved changes.

Definition at line 453 of file CPWindowController.j.

- (void) setShouldCloseDocument: (BOOL)  shouldCloseDocument
implementation

Definition at line 463 of file CPWindowController.j.

- (void) setSupportsMultipleDocuments: (BOOL)  shouldSupportMultipleDocuments
implementation

Definition at line 286 of file CPWindowController.j.

- (void) setViewController: (CPViewController aViewController
implementation

Definition at line 373 of file CPWindowController.j.

- (void) setViewControllerContainerView: (CPView aView
implementation

Definition at line 328 of file CPWindowController.j.

- (void) setWindow: (CPWindow aWindow
implementation

Sets the window to be controlled.

Parameters
aWindowthe new window to control

Definition at line 197 of file CPWindowController.j.

- (BOOL) shouldCloseDocument
implementation

Definition at line 468 of file CPWindowController.j.

- (action) showWindow: (id)  aSender
implementation

Shows the window.

Parameters
aSenderthe object requesting the show

Definition at line 142 of file CPWindowController.j.

- (BOOL) supportsMultipleDocuments
implementation

Definition at line 291 of file CPWindowController.j.

- (void) synchronizeWindowTitleWithDocumentName
implementation

Sets the title of the window as the name of the document.

Definition at line 499 of file CPWindowController.j.

- (CPViewController) viewController
implementation

Definition at line 418 of file CPWindowController.j.

- (void) viewControllerContainerView
implementation

Definition at line 368 of file CPWindowController.j.

- (CPWindow) window
implementation

Returns the CPWindow the reciever controls. This will cause loadWindow to be called if no window object exists yet.

Definition at line 165 of file CPWindowController.j.

- (CPString) windowCibName
implementation

Definition at line 478 of file CPWindowController.j.

- (CPString) windowCibPath
implementation

Definition at line 486 of file CPWindowController.j.

- (void) windowDidLoad
implementation

The method notifies the controller that it's window has loaded.

Definition at line 210 of file CPWindowController.j.

- (CPString) windowTitleForDocumentDisplayName: (CPString aDisplayName
implementation

Returns the window title based on the document's name.

Parameters
aDisplayNamethe document's filename

Definition at line 512 of file CPWindowController.j.

- (void) windowWillLoad
implementation

The method notifies the controller that it's window is about to load.

Definition at line 217 of file CPWindowController.j.


The documentation for this class was generated from the following files: